KmsHsmClusterClient

class oci.key_management.KmsHsmClusterClient(config, **kwargs)

Use the Key Management API to manage vaults and keys. For more information, see [Managing Vaults](/Content/KeyManagement/Tasks/managingvaults.htm) and [Managing Keys](/Content/KeyManagement/Tasks/managingkeys.htm).

Methods

__init__(config, **kwargs) Creates a new service client
cancel_hsm_cluster_deletion(hsm_cluster_id, …) Cancels deletion of specified HSM Cluster, restores it and associated HSM partitions to pre-deletion states.
change_hsm_cluster_compartment(…) Moves a HSM Cluster resource to a different compartment within the same tenancy.
create_hsm_cluster(…) Creates a new HSM cluster resource.
download_certificate_signing_request(…) Retrieves the certificate signing request for the designated HSM Cluster resource.
get_hsm_cluster(hsm_cluster_id, **kwargs) Retrieves configuration details for the specified HSM Cluster resource.
get_hsm_partition(hsm_cluster_id, …) Retrieves HSM partition details for the specified HSM cluster.
get_pre_co_user_credentials(hsm_cluster_id, …) Retrieves Pre Crypto Officer user credentials for the specified HSM cluster.
list_hsm_clusters(compartment_id, **kwargs) Lists all HSM cluster resources contained within the specified compartment.
list_hsm_partitions(hsm_cluster_id, **kwargs) Lists all HSM partitions within the specified HSM Cluster resource.
schedule_hsm_cluster_deletion(…) Schedules HSM cluster for deletion, update its lifecycle state to ‘PENDING_DELETION’ and deletes it after the retention period.
update_hsm_cluster(hsm_cluster_id, …) Modifies properties of an HSM cluster resource, including displayName, freeformTags and definedTags.
upload_partition_certificates(…) Uploads the partition owner certificates to the HSM Cluster resource.
__init__(config, **kwargs)

Creates a new service client

Parameters:
  • config (dict) – Configuration keys and values as per SDK and Tool Configuration. The from_file() method can be used to load configuration from a file. Alternatively, a dict can be passed. You can validate_config the dict using validate_config()
  • service_endpoint (str) – (optional) The endpoint of the service to call using this client. For example https://iaas.us-ashburn-1.oraclecloud.com. If this keyword argument is not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit need to specify a service endpoint.
  • timeout (float or tuple(float, float)) – (optional) The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
  • signer (AbstractBaseSigner) –

    (optional) The signer to use when signing requests made by the service client. The default is to use a Signer based on the values provided in the config parameter.

    One use case for this parameter is for Instance Principals authentication by passing an instance of InstancePrincipalsSecurityTokenSigner as the value for this keyword argument

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default. Retry strategies can also be applied at the operation level by passing a retry_strategy keyword argument as part of calling the operation. Any value provided at the operation level will override whatever is specified at the client level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

  • circuit_breaker_strategy (obj) – (optional) A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). This client uses DEFAULT_CIRCUIT_BREAKER_STRATEGY as default if no circuit breaker strategy is provided. The specifics of circuit breaker strategy are described here.
  • circuit_breaker_callback (function) – (optional) Callback function to receive any exceptions triggerred by the circuit breaker.
  • client_level_realm_specific_endpoint_template_enabled (bool) – (optional) A boolean flag to indicate whether or not this client should be created with realm specific endpoint template enabled or disable. By default, this will be set as None.
  • allow_control_chars – (optional) allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not allow control characters to be in the response object.
cancel_hsm_cluster_deletion(hsm_cluster_id, **kwargs)

Cancels deletion of specified HSM Cluster, restores it and associated HSM partitions to pre-deletion states.

Parameters:
  • hsm_cluster_id (str) – (required) The OCID of the HSM Cluster.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type HsmCluster

Return type:

Response

Example:

Click here to see an example of how to use cancel_hsm_cluster_deletion API.

change_hsm_cluster_compartment(hsm_cluster_id, change_hsm_cluster_compartment_details, **kwargs)

Moves a HSM Cluster resource to a different compartment within the same tenancy.

Parameters:
  • hsm_cluster_id (str) – (required) The OCID of the HSM Cluster.
  • change_hsm_cluster_compartment_details (oci.key_management.models.ChangeHsmClusterCompartmentDetails) – (required) Details of change HSM Cluster compartment.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use change_hsm_cluster_compartment API.

create_hsm_cluster(create_hsm_cluster_details, **kwargs)

Creates a new HSM cluster resource.

Parameters:
  • create_hsm_cluster_details (oci.key_management.models.CreateHsmClusterDetails) – (required) Details for the new HsmCluster resource
  • opc_request_id (str) – (optional) Unique identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type HsmCluster

Return type:

Response

Example:

Click here to see an example of how to use create_hsm_cluster API.

download_certificate_signing_request(hsm_cluster_id, **kwargs)

Retrieves the certificate signing request for the designated HSM Cluster resource.

Parameters:
  • hsm_cluster_id (str) – (required) The OCID of the HSM Cluster.
  • opc_request_id (str) – (optional) Unique identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type str

Return type:

Response

Example:

Click here to see an example of how to use download_certificate_signing_request API.

get_hsm_cluster(hsm_cluster_id, **kwargs)

Retrieves configuration details for the specified HSM Cluster resource.

As a provisioning operation, this call is subject to a Key Management limit that applies to the total number of requests across all provisioning read operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of provisioning read operations exceeds 10 requests per second for a given tenancy.

Parameters:
  • hsm_cluster_id (str) – (required) The OCID of the HSM Cluster.
  • opc_request_id (str) – (optional) Unique identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type HsmCluster

Return type:

Response

Example:

Click here to see an example of how to use get_hsm_cluster API.

get_hsm_partition(hsm_cluster_id, hsm_partition_id, **kwargs)

Retrieves HSM partition details for the specified HSM cluster.

Parameters:
  • hsm_cluster_id (str) – (required) The OCID of the HSM Cluster.
  • hsm_partition_id (str) – (required) The OCID of the HSM Partition.
  • opc_request_id (str) – (optional) Unique identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type HsmPartition

Return type:

Response

Example:

Click here to see an example of how to use get_hsm_partition API.

get_pre_co_user_credentials(hsm_cluster_id, **kwargs)

Retrieves Pre Crypto Officer user credentials for the specified HSM cluster.

Parameters:
  • hsm_cluster_id (str) – (required) The OCID of the HSM Cluster.
  • opc_request_id (str) – (optional) Unique identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type PreCoUserCredentials

Return type:

Response

Example:

Click here to see an example of how to use get_pre_co_user_credentials API.

list_hsm_clusters(compartment_id, **kwargs)

Lists all HSM cluster resources contained within the specified compartment.

As a provisioning operation, this call is subject to a Key Management limit that applies to the total number of requests across all provisioning read operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of provisioning read operations exceeds 10 requests per second for a given tenancy.

Parameters:
  • compartment_id (str) – (required) The OCID of the compartment.
  • limit (int) – (optional) The maximum number of items to return in a paginated “List” call.
  • page (str) – (optional) The value of the opc-next-page response header from the previous “List” call.
  • opc_request_id (str) – (optional) Unique identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.
  • sort_by (str) –

    (optional) The field to sort by. You can specify only one sort order. The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.

    Allowed values are: “TIMECREATED”, “DISPLAYNAME”

  • sort_order (str) –

    (optional) The sort order to use, either ascending (ASC) or descending (DESC).

    Allowed values are: “ASC”, “DESC”

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type HsmClusterCollection

Return type:

Response

Example:

Click here to see an example of how to use list_hsm_clusters API.

list_hsm_partitions(hsm_cluster_id, **kwargs)

Lists all HSM partitions within the specified HSM Cluster resource.

Parameters:
  • hsm_cluster_id (str) – (required) The OCID of the HSM Cluster.
  • limit (int) – (optional) The maximum number of items to return in a paginated “List” call.
  • page (str) – (optional) The value of the opc-next-page response header from the previous “List” call.
  • opc_request_id (str) – (optional) Unique identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.
  • sort_by (str) –

    (optional) The field to sort by. You can specify only one sort order. The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending.

    Allowed values are: “TIMECREATED”, “DISPLAYNAME”

  • sort_order (str) –

    (optional) The sort order to use, either ascending (ASC) or descending (DESC).

    Allowed values are: “ASC”, “DESC”

  • lifecycle_state (str) –

    (optional) A filter that returns only resources that match the specified lifecycle state. The state value is case-insensitive.

    Allowed values are: “ACTIVE”, “INACTIVE”, “ACTIVATING”, “ACTIVATION_REQUIRED”

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type HsmPartitionCollection

Return type:

Response

Example:

Click here to see an example of how to use list_hsm_partitions API.

schedule_hsm_cluster_deletion(hsm_cluster_id, schedule_hsm_cluster_deletion_details, **kwargs)

Schedules HSM cluster for deletion, update its lifecycle state to ‘PENDING_DELETION’ and deletes it after the retention period.

Parameters:
  • hsm_cluster_id (str) – (required) The OCID of the HSM Cluster.
  • schedule_hsm_cluster_deletion_details (oci.key_management.models.ScheduleHsmClusterDeletionDetails) – (required) Details of ScheduleHsmClusterDeletionDetails
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type HsmCluster

Return type:

Response

Example:

Click here to see an example of how to use schedule_hsm_cluster_deletion API.

update_hsm_cluster(hsm_cluster_id, update_hsm_cluster_details, **kwargs)

Modifies properties of an HSM cluster resource, including displayName, freeformTags and definedTags.

As a provisioning operation, this call is subject to a Key Management limit that applies to the total number of requests across all provisioning write operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of provisioning write operations exceeds 10 requests per second for a given tenancy.

Parameters:
  • hsm_cluster_id (str) – (required) The OCID of the HSM Cluster.
  • update_hsm_cluster_details (oci.key_management.models.UpdateHsmClusterDetails) – (required) Details of the HsmCluster Resource
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type HsmCluster

Return type:

Response

Example:

Click here to see an example of how to use update_hsm_cluster API.

upload_partition_certificates(hsm_cluster_id, upload_partition_certificates_details, **kwargs)

Uploads the partition owner certificates to the HSM Cluster resource.

Parameters:
  • hsm_cluster_id (str) – (required) The OCID of the HSM Cluster.
  • upload_partition_certificates_details (oci.key_management.models.UploadPartitionCertificatesDetails) – (required) To upload partition certificates.
  • opc_request_id (str) – (optional) Unique identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use upload_partition_certificates API.