Compartilhar via


SearchResourceEncryptionKey Class

A customer-managed encryption key in Azure Key Vault. Keys that you create and manage can be used to encrypt or decrypt data-at-rest, such as indexes and synonym maps.

All required parameters must be populated in order to send to server.

Constructor

SearchResourceEncryptionKey(*, key_name: str, key_version: str, vault_uri: str, application_id: str | None = None, application_secret: str | None = None, identity: SearchIndexerDataIdentity | None = None, **kwargs)

Keyword-Only Parameters

Name Description
key_name
Required
key_version
Required
vault_uri
Required
application_id
Default value: None
application_secret
Default value: None
identity
Default value: None

Variables

Name Description
key_name
str

The name of your Azure Key Vault key to be used to encrypt your data at rest. Required.

key_version
str

The version of your Azure Key Vault key to be used to encrypt your data at rest.

vault_uri
str

The URI of your Azure Key Vault, also referred to as DNS name, that contains the key to be used to encrypt your data at rest. An example URI might be https://my-keyvault-name.vault.azure.net. Required.

application_id
str

Optional Azure Active Directory application ID used to construct access credentials. Supply this together with application_secret instead of access_credentials.

application_secret
str

The authentication key of the specified AAD application. Used with application_id to populate access credentials.

identity

An explicit managed identity to use for this encryption key. If not specified and the access credentials property is null, the system-assigned managed identity is used. On update to the resource, if the explicit identity is unspecified, it remains unchanged. If "none" is specified, the value of this property is cleared.

Methods

as_dict

Return a dict that can be serialized using json.dump.

deserialize

Parse a str using the RestAPI syntax and return a SearchResourceEncryptionKey instance.

enable_additional_properties_sending
from_dict

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

is_xml_model
serialize

Return the JSON that would be sent to server from this model.

as_dict

Return a dict that can be serialized using json.dump.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) -> MutableMapping[str, Any]

Parameters

Name Description
keep_readonly

If you want to serialize the readonly attributes

Default value: True
key_transformer

A callable that will transform the key of the dict

Returns

Type Description

A dict JSON compatible object

deserialize

Parse a str using the RestAPI syntax and return a SearchResourceEncryptionKey instance.

deserialize(data: Any, content_type: str | None = None) -> Self | None

Parameters

Name Description
data
Required
str

A str using RestAPI structure. JSON by default.

content_type
str

JSON by default, set application/xml if XML.

Default value: None

Returns

Type Description

A SearchResourceEncryptionKey instance

Exceptions

Type Description
DeserializationError

if something went wrong

enable_additional_properties_sending

enable_additional_properties_sending() -> None

from_dict

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) -> Self | None

Parameters

Name Description
data
Required

A dict using RestAPI structure

key_extractors

A callable that will extract a key from a dict

Default value: None
content_type
str

JSON by default, set application/xml if XML.

Default value: None

Returns

Type Description

A SearchResourceEncryptionKey instance

Exceptions

Type Description
DeserializationError

if something went wrong

is_xml_model

is_xml_model() -> bool

serialize

Return the JSON that would be sent to server from this model.

serialize(keep_readonly: bool = False, **kwargs: Any) -> MutableMapping[str, Any]

Parameters

Name Description
keep_readonly

If you want to serialize the readonly attributes

Default value: False

Returns

Type Description

A dict JSON compatible object