CloudHSMV2Client#
Index > CloudHSMV2 > CloudHSMV2Client
Auto-generated documentation for CloudHSMV2 type annotations stubs module types-boto3-cloudhsmv2.
CloudHSMV2Client#
Type annotations and code completion for boto3.client("cloudhsmv2")
.
boto3 documentation
# CloudHSMV2Client usage example
from boto3.session import Session
from types_boto3_cloudhsmv2.client import CloudHSMV2Client
def get_cloudhsmv2_client() -> CloudHSMV2Client:
return Session().client("cloudhsmv2")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("cloudhsmv2").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("cloudhsmv2")
try:
do_something(client)
except (
client.exceptions.ClientError,
client.exceptions.CloudHsmAccessDeniedException,
client.exceptions.CloudHsmInternalFailureException,
client.exceptions.CloudHsmInvalidRequestException,
client.exceptions.CloudHsmResourceLimitExceededException,
client.exceptions.CloudHsmResourceNotFoundException,
client.exceptions.CloudHsmServiceException,
client.exceptions.CloudHsmTagException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from types_boto3_cloudhsmv2.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods#
can_paginate#
Type annotations and code completion for boto3.client("cloudhsmv2").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
generate_presigned_url#
Type annotations and code completion for boto3.client("cloudhsmv2").generate_presigned_url
method.
boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
copy_backup_to_region#
Copy an CloudHSM cluster backup to a different region.
Type annotations and code completion for boto3.client("cloudhsmv2").copy_backup_to_region
method.
boto3 documentation
# copy_backup_to_region method definition
def copy_backup_to_region(
self,
*,
DestinationRegion: str,
BackupId: str,
TagList: Sequence[TagTypeDef] = ..., # (1)
) -> CopyBackupToRegionResponseTypeDef: # (2)
...
# copy_backup_to_region method usage example with argument unpacking
kwargs: CopyBackupToRegionRequestRequestTypeDef = { # (1)
"DestinationRegion": ...,
"BackupId": ...,
}
parent.copy_backup_to_region(**kwargs)
create_cluster#
Creates a new CloudHSM cluster.
Type annotations and code completion for boto3.client("cloudhsmv2").create_cluster
method.
boto3 documentation
# create_cluster method definition
def create_cluster(
self,
*,
HsmType: str,
SubnetIds: Sequence[str],
BackupRetentionPolicy: BackupRetentionPolicyTypeDef = ..., # (1)
SourceBackupId: str = ...,
NetworkType: NetworkTypeType = ..., # (2)
TagList: Sequence[TagTypeDef] = ..., # (3)
Mode: ClusterModeType = ..., # (4)
) -> CreateClusterResponseTypeDef: # (5)
...
- See BackupRetentionPolicyTypeDef
- See NetworkTypeType
- See TagTypeDef
- See ClusterModeType
- See CreateClusterResponseTypeDef
# create_cluster method usage example with argument unpacking
kwargs: CreateClusterRequestRequestTypeDef = { # (1)
"HsmType": ...,
"SubnetIds": ...,
}
parent.create_cluster(**kwargs)
create_hsm#
Creates a new hardware security module (HSM) in the specified CloudHSM cluster.
Type annotations and code completion for boto3.client("cloudhsmv2").create_hsm
method.
boto3 documentation
# create_hsm method definition
def create_hsm(
self,
*,
ClusterId: str,
AvailabilityZone: str,
IpAddress: str = ...,
) -> CreateHsmResponseTypeDef: # (1)
...
# create_hsm method usage example with argument unpacking
kwargs: CreateHsmRequestRequestTypeDef = { # (1)
"ClusterId": ...,
"AvailabilityZone": ...,
}
parent.create_hsm(**kwargs)
delete_backup#
Deletes a specified CloudHSM backup.
Type annotations and code completion for boto3.client("cloudhsmv2").delete_backup
method.
boto3 documentation
# delete_backup method definition
def delete_backup(
self,
*,
BackupId: str,
) -> DeleteBackupResponseTypeDef: # (1)
...
# delete_backup method usage example with argument unpacking
kwargs: DeleteBackupRequestRequestTypeDef = { # (1)
"BackupId": ...,
}
parent.delete_backup(**kwargs)
delete_cluster#
Deletes the specified CloudHSM cluster.
Type annotations and code completion for boto3.client("cloudhsmv2").delete_cluster
method.
boto3 documentation
# delete_cluster method definition
def delete_cluster(
self,
*,
ClusterId: str,
) -> DeleteClusterResponseTypeDef: # (1)
...
# delete_cluster method usage example with argument unpacking
kwargs: DeleteClusterRequestRequestTypeDef = { # (1)
"ClusterId": ...,
}
parent.delete_cluster(**kwargs)
delete_hsm#
Deletes the specified HSM.
Type annotations and code completion for boto3.client("cloudhsmv2").delete_hsm
method.
boto3 documentation
# delete_hsm method definition
def delete_hsm(
self,
*,
ClusterId: str,
HsmId: str = ...,
EniId: str = ...,
EniIp: str = ...,
) -> DeleteHsmResponseTypeDef: # (1)
...
# delete_hsm method usage example with argument unpacking
kwargs: DeleteHsmRequestRequestTypeDef = { # (1)
"ClusterId": ...,
}
parent.delete_hsm(**kwargs)
delete_resource_policy#
Deletes an CloudHSM resource policy.
Type annotations and code completion for boto3.client("cloudhsmv2").delete_resource_policy
method.
boto3 documentation
# delete_resource_policy method definition
def delete_resource_policy(
self,
*,
ResourceArn: str = ...,
) -> DeleteResourcePolicyResponseTypeDef: # (1)
...
# delete_resource_policy method usage example with argument unpacking
kwargs: DeleteResourcePolicyRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
}
parent.delete_resource_policy(**kwargs)
describe_backups#
Gets information about backups of CloudHSM clusters.
Type annotations and code completion for boto3.client("cloudhsmv2").describe_backups
method.
boto3 documentation
# describe_backups method definition
def describe_backups(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
Filters: Mapping[str, Sequence[str]] = ...,
Shared: bool = ...,
SortAscending: bool = ...,
) -> DescribeBackupsResponseTypeDef: # (1)
...
# describe_backups method usage example with argument unpacking
kwargs: DescribeBackupsRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.describe_backups(**kwargs)
describe_clusters#
Gets information about CloudHSM clusters.
Type annotations and code completion for boto3.client("cloudhsmv2").describe_clusters
method.
boto3 documentation
# describe_clusters method definition
def describe_clusters(
self,
*,
Filters: Mapping[str, Sequence[str]] = ...,
NextToken: str = ...,
MaxResults: int = ...,
) -> DescribeClustersResponseTypeDef: # (1)
...
# describe_clusters method usage example with argument unpacking
kwargs: DescribeClustersRequestRequestTypeDef = { # (1)
"Filters": ...,
}
parent.describe_clusters(**kwargs)
get_resource_policy#
Retrieves the resource policy document attached to a given resource.
Type annotations and code completion for boto3.client("cloudhsmv2").get_resource_policy
method.
boto3 documentation
# get_resource_policy method definition
def get_resource_policy(
self,
*,
ResourceArn: str = ...,
) -> GetResourcePolicyResponseTypeDef: # (1)
...
# get_resource_policy method usage example with argument unpacking
kwargs: GetResourcePolicyRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
}
parent.get_resource_policy(**kwargs)
initialize_cluster#
Claims an CloudHSM cluster by submitting the cluster certificate issued by your issuing certificate authority (CA) and the CA's root certificate.
Type annotations and code completion for boto3.client("cloudhsmv2").initialize_cluster
method.
boto3 documentation
# initialize_cluster method definition
def initialize_cluster(
self,
*,
ClusterId: str,
SignedCert: str,
TrustAnchor: str,
) -> InitializeClusterResponseTypeDef: # (1)
...
# initialize_cluster method usage example with argument unpacking
kwargs: InitializeClusterRequestRequestTypeDef = { # (1)
"ClusterId": ...,
"SignedCert": ...,
"TrustAnchor": ...,
}
parent.initialize_cluster(**kwargs)
list_tags#
Gets a list of tags for the specified CloudHSM cluster.
Type annotations and code completion for boto3.client("cloudhsmv2").list_tags
method.
boto3 documentation
# list_tags method definition
def list_tags(
self,
*,
ResourceId: str,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListTagsResponseTypeDef: # (1)
...
# list_tags method usage example with argument unpacking
kwargs: ListTagsRequestRequestTypeDef = { # (1)
"ResourceId": ...,
}
parent.list_tags(**kwargs)
modify_backup_attributes#
Modifies attributes for CloudHSM backup.
Type annotations and code completion for boto3.client("cloudhsmv2").modify_backup_attributes
method.
boto3 documentation
# modify_backup_attributes method definition
def modify_backup_attributes(
self,
*,
BackupId: str,
NeverExpires: bool,
) -> ModifyBackupAttributesResponseTypeDef: # (1)
...
# modify_backup_attributes method usage example with argument unpacking
kwargs: ModifyBackupAttributesRequestRequestTypeDef = { # (1)
"BackupId": ...,
"NeverExpires": ...,
}
parent.modify_backup_attributes(**kwargs)
modify_cluster#
Modifies CloudHSM cluster.
Type annotations and code completion for boto3.client("cloudhsmv2").modify_cluster
method.
boto3 documentation
# modify_cluster method definition
def modify_cluster(
self,
*,
BackupRetentionPolicy: BackupRetentionPolicyTypeDef, # (1)
ClusterId: str,
) -> ModifyClusterResponseTypeDef: # (2)
...
# modify_cluster method usage example with argument unpacking
kwargs: ModifyClusterRequestRequestTypeDef = { # (1)
"BackupRetentionPolicy": ...,
"ClusterId": ...,
}
parent.modify_cluster(**kwargs)
put_resource_policy#
Creates or updates an CloudHSM resource policy.
Type annotations and code completion for boto3.client("cloudhsmv2").put_resource_policy
method.
boto3 documentation
# put_resource_policy method definition
def put_resource_policy(
self,
*,
ResourceArn: str = ...,
Policy: str = ...,
) -> PutResourcePolicyResponseTypeDef: # (1)
...
# put_resource_policy method usage example with argument unpacking
kwargs: PutResourcePolicyRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
}
parent.put_resource_policy(**kwargs)
restore_backup#
Restores a specified CloudHSM backup that is in the
PENDING_DELETION
state.
Type annotations and code completion for boto3.client("cloudhsmv2").restore_backup
method.
boto3 documentation
# restore_backup method definition
def restore_backup(
self,
*,
BackupId: str,
) -> RestoreBackupResponseTypeDef: # (1)
...
# restore_backup method usage example with argument unpacking
kwargs: RestoreBackupRequestRequestTypeDef = { # (1)
"BackupId": ...,
}
parent.restore_backup(**kwargs)
tag_resource#
Adds or overwrites one or more tags for the specified CloudHSM cluster.
Type annotations and code completion for boto3.client("cloudhsmv2").tag_resource
method.
boto3 documentation
# tag_resource method definition
def tag_resource(
self,
*,
ResourceId: str,
TagList: Sequence[TagTypeDef], # (1)
) -> dict[str, Any]:
...
- See TagTypeDef
# tag_resource method usage example with argument unpacking
kwargs: TagResourceRequestRequestTypeDef = { # (1)
"ResourceId": ...,
"TagList": ...,
}
parent.tag_resource(**kwargs)
untag_resource#
Removes the specified tag or tags from the specified CloudHSM cluster.
Type annotations and code completion for boto3.client("cloudhsmv2").untag_resource
method.
boto3 documentation
# untag_resource method definition
def untag_resource(
self,
*,
ResourceId: str,
TagKeyList: Sequence[str],
) -> dict[str, Any]:
...
# untag_resource method usage example with argument unpacking
kwargs: UntagResourceRequestRequestTypeDef = { # (1)
"ResourceId": ...,
"TagKeyList": ...,
}
parent.untag_resource(**kwargs)
get_paginator#
Type annotations and code completion for boto3.client("cloudhsmv2").get_paginator
method with overloads.
client.get_paginator("describe_backups")
-> DescribeBackupsPaginatorclient.get_paginator("describe_clusters")
-> DescribeClustersPaginatorclient.get_paginator("list_tags")
-> ListTagsPaginator