Skip to content

CloudHSMV2Client

Index > CloudHSMV2 > CloudHSMV2Client

Auto-generated documentation for CloudHSMV2 type annotations stubs module mypy-boto3-cloudhsmv2.

CloudHSMV2Client

Type annotations and code completion for boto3.client("cloudhsmv2"). boto3 documentation

Usage example
from boto3.session import Session
from mypy_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.

Usage example
client = boto3.client("cloudhsmv2")

try:
    do_something(client)
except (
    client.ClientError,
    client.CloudHsmAccessDeniedException,
    client.CloudHsmInternalFailureException,
    client.CloudHsmInvalidRequestException,
    client.CloudHsmResourceNotFoundException,
    client.CloudHsmServiceException,
    client.CloudHsmTagException,
) as e:
    print(e)
Type checking example
from mypy_boto3_cloudhsmv2.client import Exceptions

def handle_error(exc: Exceptions.ClientError) -> None:
    ...

Methods

can_paginate

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("cloudhsmv2").can_paginate method. boto3 documentation

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("cloudhsmv2").close method. boto3 documentation

Method definition
def close(
    self,
) -> None:
    ...

copy_backup_to_region

Copy an AWS CloudHSM cluster backup to a different region.

Type annotations and code completion for boto3.client("cloudhsmv2").copy_backup_to_region method. boto3 documentation

Method definition
def copy_backup_to_region(
    self,
    *,
    DestinationRegion: str,
    BackupId: str,
    TagList: Sequence[TagTypeDef] = ...,  # (1)
) -> CopyBackupToRegionResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CopyBackupToRegionResponseTypeDef
Usage example with kwargs
kwargs: CopyBackupToRegionRequestRequestTypeDef = {  # (1)
    "DestinationRegion": ...,
    "BackupId": ...,
}

parent.copy_backup_to_region(**kwargs)
  1. See CopyBackupToRegionRequestRequestTypeDef

create_cluster

Creates a new AWS CloudHSM cluster.

Type annotations and code completion for boto3.client("cloudhsmv2").create_cluster method. boto3 documentation

Method definition
def create_cluster(
    self,
    *,
    HsmType: str,
    SubnetIds: Sequence[str],
    BackupRetentionPolicy: BackupRetentionPolicyTypeDef = ...,  # (1)
    SourceBackupId: str = ...,
    TagList: Sequence[TagTypeDef] = ...,  # (2)
) -> CreateClusterResponseTypeDef:  # (3)
    ...
  1. See BackupRetentionPolicyTypeDef
  2. See TagTypeDef
  3. See CreateClusterResponseTypeDef
Usage example with kwargs
kwargs: CreateClusterRequestRequestTypeDef = {  # (1)
    "HsmType": ...,
    "SubnetIds": ...,
}

parent.create_cluster(**kwargs)
  1. See CreateClusterRequestRequestTypeDef

create_hsm

Creates a new hardware security module (HSM) in the specified AWS CloudHSM cluster.

Type annotations and code completion for boto3.client("cloudhsmv2").create_hsm method. boto3 documentation

Method definition
def create_hsm(
    self,
    *,
    ClusterId: str,
    AvailabilityZone: str,
    IpAddress: str = ...,
) -> CreateHsmResponseTypeDef:  # (1)
    ...
  1. See CreateHsmResponseTypeDef
Usage example with kwargs
kwargs: CreateHsmRequestRequestTypeDef = {  # (1)
    "ClusterId": ...,
    "AvailabilityZone": ...,
}

parent.create_hsm(**kwargs)
  1. See CreateHsmRequestRequestTypeDef

delete_backup

Deletes a specified AWS CloudHSM backup.

Type annotations and code completion for boto3.client("cloudhsmv2").delete_backup method. boto3 documentation

Method definition
def delete_backup(
    self,
    *,
    BackupId: str,
) -> DeleteBackupResponseTypeDef:  # (1)
    ...
  1. See DeleteBackupResponseTypeDef
Usage example with kwargs
kwargs: DeleteBackupRequestRequestTypeDef = {  # (1)
    "BackupId": ...,
}

parent.delete_backup(**kwargs)
  1. See DeleteBackupRequestRequestTypeDef

delete_cluster

Deletes the specified AWS CloudHSM cluster.

Type annotations and code completion for boto3.client("cloudhsmv2").delete_cluster method. boto3 documentation

Method definition
def delete_cluster(
    self,
    *,
    ClusterId: str,
) -> DeleteClusterResponseTypeDef:  # (1)
    ...
  1. See DeleteClusterResponseTypeDef
Usage example with kwargs
kwargs: DeleteClusterRequestRequestTypeDef = {  # (1)
    "ClusterId": ...,
}

parent.delete_cluster(**kwargs)
  1. See DeleteClusterRequestRequestTypeDef

delete_hsm

Deletes the specified HSM.

Type annotations and code completion for boto3.client("cloudhsmv2").delete_hsm method. boto3 documentation

Method definition
def delete_hsm(
    self,
    *,
    ClusterId: str,
    HsmId: str = ...,
    EniId: str = ...,
    EniIp: str = ...,
) -> DeleteHsmResponseTypeDef:  # (1)
    ...
  1. See DeleteHsmResponseTypeDef
Usage example with kwargs
kwargs: DeleteHsmRequestRequestTypeDef = {  # (1)
    "ClusterId": ...,
}

parent.delete_hsm(**kwargs)
  1. See DeleteHsmRequestRequestTypeDef

describe_backups

Gets information about backups of AWS CloudHSM clusters.

Type annotations and code completion for boto3.client("cloudhsmv2").describe_backups method. boto3 documentation

Method definition
def describe_backups(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
    Filters: Mapping[str, Sequence[str]] = ...,
    SortAscending: bool = ...,
) -> DescribeBackupsResponseTypeDef:  # (1)
    ...
  1. See DescribeBackupsResponseTypeDef
Usage example with kwargs
kwargs: DescribeBackupsRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.describe_backups(**kwargs)
  1. See DescribeBackupsRequestRequestTypeDef

describe_clusters

Gets information about AWS CloudHSM clusters.

Type annotations and code completion for boto3.client("cloudhsmv2").describe_clusters method. boto3 documentation

Method definition
def describe_clusters(
    self,
    *,
    Filters: Mapping[str, Sequence[str]] = ...,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> DescribeClustersResponseTypeDef:  # (1)
    ...
  1. See DescribeClustersResponseTypeDef
Usage example with kwargs
kwargs: DescribeClustersRequestRequestTypeDef = {  # (1)
    "Filters": ...,
}

parent.describe_clusters(**kwargs)
  1. See DescribeClustersRequestRequestTypeDef

generate_presigned_url

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for boto3.client("cloudhsmv2").generate_presigned_url method. boto3 documentation

Method definition
def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

initialize_cluster

Claims an AWS 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

Method definition
def initialize_cluster(
    self,
    *,
    ClusterId: str,
    SignedCert: str,
    TrustAnchor: str,
) -> InitializeClusterResponseTypeDef:  # (1)
    ...
  1. See InitializeClusterResponseTypeDef
Usage example with kwargs
kwargs: InitializeClusterRequestRequestTypeDef = {  # (1)
    "ClusterId": ...,
    "SignedCert": ...,
    "TrustAnchor": ...,
}

parent.initialize_cluster(**kwargs)
  1. See InitializeClusterRequestRequestTypeDef

list_tags

Gets a list of tags for the specified AWS CloudHSM cluster.

Type annotations and code completion for boto3.client("cloudhsmv2").list_tags method. boto3 documentation

Method definition
def list_tags(
    self,
    *,
    ResourceId: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListTagsResponseTypeDef:  # (1)
    ...
  1. See ListTagsResponseTypeDef
Usage example with kwargs
kwargs: ListTagsRequestRequestTypeDef = {  # (1)
    "ResourceId": ...,
}

parent.list_tags(**kwargs)
  1. See ListTagsRequestRequestTypeDef

modify_backup_attributes

Modifies attributes for AWS CloudHSM backup.

Type annotations and code completion for boto3.client("cloudhsmv2").modify_backup_attributes method. boto3 documentation

Method definition
def modify_backup_attributes(
    self,
    *,
    BackupId: str,
    NeverExpires: bool,
) -> ModifyBackupAttributesResponseTypeDef:  # (1)
    ...
  1. See ModifyBackupAttributesResponseTypeDef
Usage example with kwargs
kwargs: ModifyBackupAttributesRequestRequestTypeDef = {  # (1)
    "BackupId": ...,
    "NeverExpires": ...,
}

parent.modify_backup_attributes(**kwargs)
  1. See ModifyBackupAttributesRequestRequestTypeDef

modify_cluster

Modifies AWS CloudHSM cluster.

Type annotations and code completion for boto3.client("cloudhsmv2").modify_cluster method. boto3 documentation

Method definition
def modify_cluster(
    self,
    *,
    BackupRetentionPolicy: BackupRetentionPolicyTypeDef,  # (1)
    ClusterId: str,
) -> ModifyClusterResponseTypeDef:  # (2)
    ...
  1. See BackupRetentionPolicyTypeDef
  2. See ModifyClusterResponseTypeDef
Usage example with kwargs
kwargs: ModifyClusterRequestRequestTypeDef = {  # (1)
    "BackupRetentionPolicy": ...,
    "ClusterId": ...,
}

parent.modify_cluster(**kwargs)
  1. See ModifyClusterRequestRequestTypeDef

restore_backup

Restores a specified AWS CloudHSM backup that is in the PENDING_DELETION state.

Type annotations and code completion for boto3.client("cloudhsmv2").restore_backup method. boto3 documentation

Method definition
def restore_backup(
    self,
    *,
    BackupId: str,
) -> RestoreBackupResponseTypeDef:  # (1)
    ...
  1. See RestoreBackupResponseTypeDef
Usage example with kwargs
kwargs: RestoreBackupRequestRequestTypeDef = {  # (1)
    "BackupId": ...,
}

parent.restore_backup(**kwargs)
  1. See RestoreBackupRequestRequestTypeDef

tag_resource

Adds or overwrites one or more tags for the specified AWS CloudHSM cluster.

Type annotations and code completion for boto3.client("cloudhsmv2").tag_resource method. boto3 documentation

Method definition
def tag_resource(
    self,
    *,
    ResourceId: str,
    TagList: Sequence[TagTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See TagTypeDef
Usage example with kwargs
kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "ResourceId": ...,
    "TagList": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

untag_resource

Removes the specified tag or tags from the specified AWS CloudHSM cluster.

Type annotations and code completion for boto3.client("cloudhsmv2").untag_resource method. boto3 documentation

Method definition
def untag_resource(
    self,
    *,
    ResourceId: str,
    TagKeyList: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "ResourceId": ...,
    "TagKeyList": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

get_paginator

Type annotations and code completion for boto3.client("cloudhsmv2").get_paginator method with overloads.