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

# CloudHSMV2Client 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.

# 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.CloudHsmResourceNotFoundException,
    client.exceptions.CloudHsmServiceException,
    client.exceptions.CloudHsmTagException,
) as e:
    print(e)
# Exceptions.exceptions 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

# can_paginate 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

# close method definition

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

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)
    ...
  1. See TagTypeDef
  2. See CopyBackupToRegionResponseTypeDef
# copy_backup_to_region method usage example with argument unpacking

kwargs: CopyBackupToRegionRequestRequestTypeDef = {  # (1)
    "DestinationRegion": ...,
    "BackupId": ...,
}

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

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 = ...,
    TagList: Sequence[TagTypeDef] = ...,  # (2)
    Mode: ClusterModeType = ...,  # (3)
) -> CreateClusterResponseTypeDef:  # (4)
    ...
  1. See BackupRetentionPolicyTypeDef
  2. See TagTypeDef
  3. See ClusterModeType
  4. See CreateClusterResponseTypeDef
# create_cluster method usage example with argument unpacking

kwargs: CreateClusterRequestRequestTypeDef = {  # (1)
    "HsmType": ...,
    "SubnetIds": ...,
}

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

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)
    ...
  1. See CreateHsmResponseTypeDef
# create_hsm method usage example with argument unpacking

kwargs: CreateHsmRequestRequestTypeDef = {  # (1)
    "ClusterId": ...,
    "AvailabilityZone": ...,
}

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

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)
    ...
  1. See DeleteBackupResponseTypeDef
# delete_backup method usage example with argument unpacking

kwargs: DeleteBackupRequestRequestTypeDef = {  # (1)
    "BackupId": ...,
}

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

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)
    ...
  1. See DeleteClusterResponseTypeDef
# delete_cluster method usage example with argument unpacking

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

# delete_hsm method definition

def delete_hsm(
    self,
    *,
    ClusterId: str,
    HsmId: str = ...,
    EniId: str = ...,
    EniIp: str = ...,
) -> DeleteHsmResponseTypeDef:  # (1)
    ...
  1. See DeleteHsmResponseTypeDef
# delete_hsm method usage example with argument unpacking

kwargs: DeleteHsmRequestRequestTypeDef = {  # (1)
    "ClusterId": ...,
}

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

delete_resource_policy#

Deletes an CloudHSM resource policy.

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