SecurityDomainClient Class

Manages the security domain of a Managed HSM.

Constructor

SecurityDomainClient(vault_url: str, credential: TokenCredential, **kwargs: Any)

Parameters

Name Description
vault_url
Required
str

URL of the vault on which the client will operate. This is also called the vault's "DNS Name". You should validate that this URL references a valid Key Vault or Managed HSM resource. See https://aka.ms/azsdk/blog/vault-uri for details.

credential
Required

An object which can provide an access token for the vault, such as a credential from identity

Keyword-Only Parameters

Name Description
api_version
str

The API version to use for this operation. Default value is "7.5". Note that overriding this default value may result in unsupported behavior.

verify_challenge_resource

Whether to verify the authentication challenge resource matches the Key Vault or Managed HSM domain. Defaults to True.

Methods

begin_download

Retrieves the Security Domain from the managed HSM. Calling this endpoint can be used to activate a provisioned managed HSM resource.

begin_upload

Restore the provided Security Domain.

close
get_download_status

Retrieves the Security Domain download operation status.

get_transfer_key

Retrieve Security Domain transfer key.

get_upload_status

Get Security Domain upload operation status.

send_request

Runs a network request using the client's existing pipeline.

The request URL can be relative to the vault URL. The service API version used for the request is the same as the client's unless otherwise specified. This method does not raise if the response is an error; to raise an exception, call raise_for_status() on the returned response object. For more information about how to send custom requests with this method, see https://aka.ms/azsdk/dpcodegen/python/send_request.

begin_download

Retrieves the Security Domain from the managed HSM. Calling this endpoint can be used to activate a provisioned managed HSM resource.

begin_download(certificate_info: CertificateInfo, *, content_type: str = 'application/json', skip_activation_polling: bool = False, **kwargs: Any) -> LROPoller[SecurityDomain]

Parameters

Name Description
certificate_info
Required
CertificateInfo or <xref:JSON> or IO[bytes]

The Security Domain download operation requires the customer to provide N certificates (minimum 3 and maximum 10) containing a public key in JWK format. Required in one of the following types: CertificateInfo, JSON, or IO[bytes].

Keyword-Only Parameters

Name Description
content_type
str

Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json".

Default value: application/json
skip_activation_polling

If set to True, the operation will not poll for HSM activation to complete and calling .result() on the poller will return the security domain object immediately. Default value is False.

Default value: False

Returns

Type Description

An instance of LROPoller that returns SecurityDomain. The SecurityDomain is compatible with MutableMapping

Exceptions

Type Description

begin_upload

Restore the provided Security Domain.

begin_upload(security_domain: SecurityDomain, *, content_type: str = 'application/json', skip_activation_polling: bool = False, **kwargs: Any) -> LROPoller[None]

Parameters

Name Description
security_domain
Required
SecurityDomain or <xref:JSON> or IO[bytes]

The Security Domain to be restored. Required in one of the following types: SecurityDomain, JSON, or IO[bytes].

Keyword-Only Parameters

Name Description
content_type
str

Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json".

Default value: application/json
skip_activation_polling

If set to True, the operation will not poll for HSM activation to complete and calling .result() on the poller will return None immediately, or raise an exception in case of an error. Default value is False.

Default value: False

Returns

Type Description

An instance of LROPoller that returns None.

Exceptions

Type Description

close

close() -> None

get_download_status

Retrieves the Security Domain download operation status.

get_download_status(**kwargs: Any) -> SecurityDomainOperationStatus

Returns

Type Description

SecurityDomainOperationStatus. The SecurityDomainOperationStatus is compatible with MutableMapping

Exceptions

Type Description

get_transfer_key

Retrieve Security Domain transfer key.

get_transfer_key(**kwargs: Any) -> TransferKey

Returns

Type Description

TransferKey. The TransferKey is compatible with MutableMapping

Exceptions

Type Description

get_upload_status

Get Security Domain upload operation status.

get_upload_status(**kwargs: Any) -> SecurityDomainOperationStatus

Returns

Type Description

SecurityDomainOperationStatus. The SecurityDomainOperationStatus is compatible with MutableMapping

Exceptions

Type Description

send_request

Runs a network request using the client's existing pipeline.

The request URL can be relative to the vault URL. The service API version used for the request is the same as the client's unless otherwise specified. This method does not raise if the response is an error; to raise an exception, call raise_for_status() on the returned response object. For more information about how to send custom requests with this method, see https://aka.ms/azsdk/dpcodegen/python/send_request.

send_request(request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse

Parameters

Name Description
request
Required

The network request you want to make.

Keyword-Only Parameters

Name Description
stream

Whether the response payload will be streamed. Defaults to False.

Default value: False

Returns

Type Description

The response of your network call. Does not do error handling on your response.

Attributes

vault_url