CloudHSM.Client¶A low-level client representing Amazon CloudHSM:
client = session.create_client('cloudhsm')
These are the available methods:
add_tags_to_resource()can_paginate()create_hapg()create_hsm()create_luna_client()delete_hapg()delete_hsm()delete_luna_client()describe_hapg()describe_hsm()describe_luna_client()generate_presigned_url()get_config()get_paginator()get_waiter()list_available_zones()list_hapgs()list_hsms()list_luna_clients()list_tags_for_resource()modify_hapg()modify_hsm()modify_luna_client()remove_tags_from_resource()Adds or overwrites one or more tags for the specified AWS CloudHSM resource.
Each tag consists of a key and a value. Tag keys must be unique to each resource.
See also: AWS API Documentation
Request Syntax
response = client.add_tags_to_resource(
ResourceArn='string',
TagList=[
{
'Key': 'string',
'Value': 'string'
},
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Status': 'string'
}
Response Structure
|
can_paginate(operation_name)¶Check if an operation can be paginated.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Returns: | True if the operation can be paginated,
False otherwise. |
create_hapg(**kwargs)¶Creates a high-availability partition group. A high-availability partition group is a group of partitions that spans multiple physical HSMs.
See also: AWS API Documentation
Request Syntax
response = client.create_hapg(
Label='string'
)
| Parameters: | Label (string) – [REQUIRED] The label of the new high-availability partition group. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'HapgArn': 'string'
}
Response Structure
|
create_hsm(**kwargs)¶Creates an uninitialized HSM instance.
There is an upfront fee charged for each HSM instance that you create with the CreateHsm operation. If you accidentally provision an HSM and want to request a refund, delete the instance using the DeleteHsm operation, go to the AWS Support Center , create a new case, and select Account and Billing Support .
Warning
It can take up to 20 minutes to create and provision an HSM. You can monitor the status of the HSM with the DescribeHsm operation. The HSM is ready to be initialized when the status changes to RUNNING .
See also: AWS API Documentation
Request Syntax
response = client.create_hsm(
SubnetId='string',
SshKey='string',
EniIp='string',
IamRoleArn='string',
ExternalId='string',
SubscriptionType='PRODUCTION',
ClientToken='string',
SyslogIp='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'HsmArn': 'string'
}
Response Structure
|
create_luna_client(**kwargs)¶Creates an HSM client.
See also: AWS API Documentation
Request Syntax
response = client.create_luna_client(
Label='string',
Certificate='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ClientArn': 'string'
}
Response Structure
|
delete_hapg(**kwargs)¶Deletes a high-availability partition group.
See also: AWS API Documentation
Request Syntax
response = client.delete_hapg(
HapgArn='string'
)
| Parameters: | HapgArn (string) – [REQUIRED] The ARN of the high-availability partition group to delete. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'Status': 'string'
}
Response Structure
|
delete_hsm(**kwargs)¶Deletes an HSM. After completion, this operation cannot be undone and your key material cannot be recovered.
See also: AWS API Documentation
Request Syntax
response = client.delete_hsm(
HsmArn='string'
)
| Parameters: | HsmArn (string) – [REQUIRED] The ARN of the HSM to delete. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'Status': 'string'
}
Response Structure
|
delete_luna_client(**kwargs)¶Deletes a client.
See also: AWS API Documentation
Request Syntax
response = client.delete_luna_client(
ClientArn='string'
)
| Parameters: | ClientArn (string) – [REQUIRED] The ARN of the client to delete. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'Status': 'string'
}
Response Structure
|
describe_hapg(**kwargs)¶Retrieves information about a high-availability partition group.
See also: AWS API Documentation
Request Syntax
response = client.describe_hapg(
HapgArn='string'
)
| Parameters: | HapgArn (string) – [REQUIRED] The ARN of the high-availability partition group to describe. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'HapgArn': 'string',
'HapgSerial': 'string',
'HsmsLastActionFailed': [
'string',
],
'HsmsPendingDeletion': [
'string',
],
'HsmsPendingRegistration': [
'string',
],
'Label': 'string',
'LastModifiedTimestamp': 'string',
'PartitionSerialList': [
'string',
],
'State': 'READY'|'UPDATING'|'DEGRADED'
}
Response Structure
|
describe_hsm(**kwargs)¶Retrieves information about an HSM. You can identify the HSM by its ARN or its serial number.
See also: AWS API Documentation
Request Syntax
response = client.describe_hsm(
HsmArn='string',
HsmSerialNumber='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'HsmArn': 'string',
'Status': 'PENDING'|'RUNNING'|'UPDATING'|'SUSPENDED'|'TERMINATING'|'TERMINATED'|'DEGRADED',
'StatusDetails': 'string',
'AvailabilityZone': 'string',
'EniId': 'string',
'EniIp': 'string',
'SubscriptionType': 'PRODUCTION',
'SubscriptionStartDate': 'string',
'SubscriptionEndDate': 'string',
'VpcId': 'string',
'SubnetId': 'string',
'IamRoleArn': 'string',
'SerialNumber': 'string',
'VendorName': 'string',
'HsmType': 'string',
'SoftwareVersion': 'string',
'SshPublicKey': 'string',
'SshKeyLastUpdated': 'string',
'ServerCertUri': 'string',
'ServerCertLastUpdated': 'string',
'Partitions': [
'string',
]
}
Response Structure
|
describe_luna_client(**kwargs)¶Retrieves information about an HSM client.
See also: AWS API Documentation
Request Syntax
response = client.describe_luna_client(
ClientArn='string',
CertificateFingerprint='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ClientArn': 'string',
'Certificate': 'string',
'CertificateFingerprint': 'string',
'LastModifiedTimestamp': 'string',
'Label': 'string'
}
Response Structure
|
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
| Parameters: |
|
|---|---|
| Returns: | The presigned url |
get_config(**kwargs)¶Gets the configuration files necessary to connect to all high availability partition groups the client is associated with.
See also: AWS API Documentation
Request Syntax
response = client.get_config(
ClientArn='string',
ClientVersion='5.1'|'5.3',
HapgList=[
'string',
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ConfigType': 'string',
'ConfigFile': 'string',
'ConfigCred': 'string'
}
Response Structure
|
get_paginator(operation_name)¶Create a paginator for an operation.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Raises: | OperationNotPageableError – Raised if the operation is not
pageable. You can use the client.can_paginate method to
check if an operation is pageable. |
| Return type: | L{botocore.paginate.Paginator} |
| Returns: | A paginator object. |
get_waiter(waiter_name)¶list_available_zones()¶Lists the Availability Zones that have available AWS CloudHSM capacity.
See also: AWS API Documentation
Request Syntax
response = client.list_available_zones()
| Return type: | dict |
|---|---|
| Returns: | Response Syntax{
'AZList': [
'string',
]
}
Response Structure
|
list_hapgs(**kwargs)¶Lists the high-availability partition groups for the account.
This operation supports pagination with the use of the NextToken member. If more results are available, the NextToken member of the response contains a token that you pass in the next call to ListHapgs to retrieve the next set of items.
See also: AWS API Documentation
Request Syntax
response = client.list_hapgs(
NextToken='string'
)
| Parameters: | NextToken (string) – The NextToken value from a previous call to ListHapgs . Pass null if this is the first call. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'HapgList': [
'string',
],
'NextToken': 'string'
}
Response Structure
|
list_hsms(**kwargs)¶Retrieves the identifiers of all of the HSMs provisioned for the current customer.
This operation supports pagination with the use of the NextToken member. If more results are available, the NextToken member of the response contains a token that you pass in the next call to ListHsms to retrieve the next set of items.
See also: AWS API Documentation
Request Syntax
response = client.list_hsms(
NextToken='string'
)
| Parameters: | NextToken (string) – The NextToken value from a previous call to ListHsms . Pass null if this is the first call. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'HsmList': [
'string',
],
'NextToken': 'string'
}
Response Structure
|
list_luna_clients(**kwargs)¶Lists all of the clients.
This operation supports pagination with the use of the NextToken member. If more results are available, the NextToken member of the response contains a token that you pass in the next call to ListLunaClients to retrieve the next set of items.
See also: AWS API Documentation
Request Syntax
response = client.list_luna_clients(
NextToken='string'
)
| Parameters: | NextToken (string) – The NextToken value from a previous call to ListLunaClients . Pass null if this is the first call. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'ClientList': [
'string',
],
'NextToken': 'string'
}
Response Structure
|
Returns a list of all tags for the specified AWS CloudHSM resource.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
ResourceArn='string'
)
| Parameters: | ResourceArn (string) – [REQUIRED] The Amazon Resource Name (ARN) of the AWS CloudHSM resource. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'TagList': [
{
'Key': 'string',
'Value': 'string'
},
]
}
Response Structure
|
modify_hapg(**kwargs)¶Modifies an existing high-availability partition group.
See also: AWS API Documentation
Request Syntax
response = client.modify_hapg(
HapgArn='string',
Label='string',
PartitionSerialList=[
'string',
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'HapgArn': 'string'
}
Response Structure
|
modify_hsm(**kwargs)¶Modifies an HSM.
Warning
This operation can result in the HSM being offline for up to 15 minutes while the AWS CloudHSM service is reconfigured. If you are modifying a production HSM, you should ensure that your AWS CloudHSM service is configured for high availability, and consider executing this operation during a maintenance window.
See also: AWS API Documentation
Request Syntax
response = client.modify_hsm(
HsmArn='string',
SubnetId='string',
EniIp='string',
IamRoleArn='string',
ExternalId='string',
SyslogIp='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'HsmArn': 'string'
}
Response Structure
|
modify_luna_client(**kwargs)¶Modifies the certificate used by the client.
This action can potentially start a workflow to install the new certificate on the client’s HSMs.
See also: AWS API Documentation
Request Syntax
response = client.modify_luna_client(
ClientArn='string',
Certificate='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ClientArn': 'string'
}
Response Structure
|
Removes one or more tags from the specified AWS CloudHSM resource.
To remove a tag, specify only the tag key to remove (not the value). To overwrite the value for an existing tag, use AddTagsToResource .
See also: AWS API Documentation
Request Syntax
response = client.remove_tags_from_resource(
ResourceArn='string',
TagKeyList=[
'string',
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Status': 'string'
}
Response Structure
|