

# Actions
<a name="API_Operations"></a>

The following actions are supported:
+  [CopyBackupToRegion](API_CopyBackupToRegion.md) 
+  [CreateCluster](API_CreateCluster.md) 
+  [CreateHsm](API_CreateHsm.md) 
+  [DeleteBackup](API_DeleteBackup.md) 
+  [DeleteCluster](API_DeleteCluster.md) 
+  [DeleteHsm](API_DeleteHsm.md) 
+  [DeleteResourcePolicy](API_DeleteResourcePolicy.md) 
+  [DescribeBackups](API_DescribeBackups.md) 
+  [DescribeClusters](API_DescribeClusters.md) 
+  [GetResourcePolicy](API_GetResourcePolicy.md) 
+  [InitializeCluster](API_InitializeCluster.md) 
+  [ListTags](API_ListTags.md) 
+  [ModifyBackupAttributes](API_ModifyBackupAttributes.md) 
+  [ModifyCluster](API_ModifyCluster.md) 
+  [PutResourcePolicy](API_PutResourcePolicy.md) 
+  [RestoreBackup](API_RestoreBackup.md) 
+  [TagResource](API_TagResource.md) 
+  [UntagResource](API_UntagResource.md) 

# CopyBackupToRegion
<a name="API_CopyBackupToRegion"></a>

Copy an AWS CloudHSM cluster backup to a different region.

 **Cross-account use:** No. You cannot perform this operation on an AWS CloudHSM backup in a different AWS account.

## Request Syntax
<a name="API_CopyBackupToRegion_RequestSyntax"></a>

```
{
   "BackupId": "string",
   "DestinationRegion": "string",
   "TagList": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}
```

## Request Parameters
<a name="API_CopyBackupToRegion_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [BackupId](#API_CopyBackupToRegion_RequestSyntax) **   <a name="CloudHSMV2-CopyBackupToRegion-request-BackupId"></a>
The ID of the backup that will be copied to the destination region.   
Type: String  
Pattern: `backup-[2-7a-zA-Z]{11,16}`   
Required: Yes

 ** [DestinationRegion](#API_CopyBackupToRegion_RequestSyntax) **   <a name="CloudHSMV2-CopyBackupToRegion-request-DestinationRegion"></a>
The AWS region that will contain your copied AWS CloudHSM cluster backup.  
Type: String  
Pattern: `[a-z]{2}(-(gov))?-(east|west|north|south|central){1,2}-\d`   
Required: Yes

 ** [TagList](#API_CopyBackupToRegion_RequestSyntax) **   <a name="CloudHSMV2-CopyBackupToRegion-request-TagList"></a>
Tags to apply to the destination backup during creation. If you specify tags, only these tags will be applied to the destination backup. If you do not specify tags, the service copies tags from the source backup to the destination backup.  
Type: Array of [Tag](API_Tag.md) objects  
Array Members: Minimum number of 1 item. Maximum number of 50 items.  
Required: No

## Response Syntax
<a name="API_CopyBackupToRegion_ResponseSyntax"></a>

```
{
   "DestinationBackup": { 
      "CreateTimestamp": number,
      "SourceBackup": "string",
      "SourceCluster": "string",
      "SourceRegion": "string"
   }
}
```

## Response Elements
<a name="API_CopyBackupToRegion_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [DestinationBackup](#API_CopyBackupToRegion_ResponseSyntax) **   <a name="CloudHSMV2-CopyBackupToRegion-response-DestinationBackup"></a>
Information on the backup that will be copied to the destination region, including CreateTimestamp, SourceBackup, SourceCluster, and Source Region. CreateTimestamp of the destination backup will be the same as that of the source backup.  
You will need to use the `sourceBackupID` returned in this operation to use the [DescribeBackups](API_DescribeBackups.md) operation on the backup that will be copied to the destination region.  
Type: [DestinationBackup](API_DestinationBackup.md) object

## Errors
<a name="API_CopyBackupToRegion_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmResourceNotFoundException **   
The request was rejected because it refers to a resource that cannot be found.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

 ** CloudHsmTagException **   
The request was rejected because of a tagging failure. Verify the tag conditions in all applicable policies, and then retry the request.  
HTTP Status Code: 400

## See Also
<a name="API_CopyBackupToRegion_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/CopyBackupToRegion) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/CopyBackupToRegion) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/CopyBackupToRegion) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/CopyBackupToRegion) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/CopyBackupToRegion) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/CopyBackupToRegion) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/CopyBackupToRegion) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/CopyBackupToRegion) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/CopyBackupToRegion) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/CopyBackupToRegion) 

# CreateCluster
<a name="API_CreateCluster"></a>

Creates a new AWS CloudHSM cluster.

 **Cross-account use:** Yes. To perform this operation with an AWS CloudHSM backup in a different AWS account, specify the full backup ARN in the value of the SourceBackupId parameter.

## Request Syntax
<a name="API_CreateCluster_RequestSyntax"></a>

```
{
   "BackupRetentionPolicy": { 
      "Type": "string",
      "Value": "string"
   },
   "HsmType": "string",
   "Mode": "string",
   "NetworkType": "string",
   "SourceBackupId": "string",
   "SubnetIds": [ "string" ],
   "TagList": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}
```

## Request Parameters
<a name="API_CreateCluster_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [BackupRetentionPolicy](#API_CreateCluster_RequestSyntax) **   <a name="CloudHSMV2-CreateCluster-request-BackupRetentionPolicy"></a>
A policy that defines how the service retains backups.  
Type: [BackupRetentionPolicy](API_BackupRetentionPolicy.md) object  
Required: No

 ** [HsmType](#API_CreateCluster_RequestSyntax) **   <a name="CloudHSMV2-CreateCluster-request-HsmType"></a>
The type of HSM to use in the cluster. The allowed values are `hsm1.medium` and `hsm2m.medium`.  
Type: String  
Length Constraints: Maximum length of 32.  
Pattern: `((p|)hsm[0-9][a-z.]*\.[a-zA-Z]+)`   
Required: Yes

 ** [Mode](#API_CreateCluster_RequestSyntax) **   <a name="CloudHSMV2-CreateCluster-request-Mode"></a>
The mode to use in the cluster. The allowed values are `FIPS` and `NON_FIPS`.  
Type: String  
Valid Values: `FIPS | NON_FIPS`   
Required: No

 ** [NetworkType](#API_CreateCluster_RequestSyntax) **   <a name="CloudHSMV2-CreateCluster-request-NetworkType"></a>
The NetworkType to create a cluster with. The allowed values are `IPV4` and `DUALSTACK`.   
Type: String  
Valid Values: `IPV4 | DUALSTACK`   
Required: No

 ** [SourceBackupId](#API_CreateCluster_RequestSyntax) **   <a name="CloudHSMV2-CreateCluster-request-SourceBackupId"></a>
The identifier (ID) or the Amazon Resource Name (ARN) of the cluster backup to restore. Use this value to restore the cluster from a backup instead of creating a new cluster. To find the backup ID or ARN, use [DescribeBackups](API_DescribeBackups.md). *If using a backup in another account, the full ARN must be supplied.*   
Type: String  
Pattern: `^(arn:aws(-(us-gov))?:cloudhsm:([a-z]{2}(-(gov|isob|iso))?-(east|west|north|south|central){1,2}-[0-9]{1}):[0-9]{12}:backup/)?backup-[2-7a-zA-Z]{11,16}`   
Required: No

 ** [SubnetIds](#API_CreateCluster_RequestSyntax) **   <a name="CloudHSMV2-CreateCluster-request-SubnetIds"></a>
The identifiers (IDs) of the subnets where you are creating the cluster. You must specify at least one subnet. If you specify multiple subnets, they must meet the following criteria:  
+ All subnets must be in the same virtual private cloud (VPC).
+ You can specify only one subnet per Availability Zone.
Type: Array of strings  
Array Members: Minimum number of 1 item. Maximum number of 10 items.  
Pattern: `subnet-[0-9a-fA-F]{8,17}`   
Required: Yes

 ** [TagList](#API_CreateCluster_RequestSyntax) **   <a name="CloudHSMV2-CreateCluster-request-TagList"></a>
Tags to apply to the AWS CloudHSM cluster during creation.  
Type: Array of [Tag](API_Tag.md) objects  
Array Members: Minimum number of 1 item. Maximum number of 50 items.  
Required: No

## Response Syntax
<a name="API_CreateCluster_ResponseSyntax"></a>

```
{
   "Cluster": { 
      "BackupPolicy": "string",
      "BackupRetentionPolicy": { 
         "Type": "string",
         "Value": "string"
      },
      "Certificates": { 
         "AwsHardwareCertificate": "string",
         "ClusterCertificate": "string",
         "ClusterCsr": "string",
         "HsmCertificate": "string",
         "ManufacturerHardwareCertificate": "string"
      },
      "ClusterId": "string",
      "CreateTimestamp": number,
      "Hsms": [ 
         { 
            "AvailabilityZone": "string",
            "ClusterId": "string",
            "EniId": "string",
            "EniIp": "string",
            "EniIpV6": "string",
            "HsmId": "string",
            "HsmType": "string",
            "State": "string",
            "StateMessage": "string",
            "SubnetId": "string"
         }
      ],
      "HsmType": "string",
      "HsmTypeRollbackExpiration": number,
      "Mode": "string",
      "NetworkType": "string",
      "PreCoPassword": "string",
      "SecurityGroup": "string",
      "SourceBackupId": "string",
      "State": "string",
      "StateMessage": "string",
      "SubnetMapping": { 
         "string" : "string" 
      },
      "TagList": [ 
         { 
            "Key": "string",
            "Value": "string"
         }
      ],
      "VpcId": "string"
   }
}
```

## Response Elements
<a name="API_CreateCluster_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Cluster](#API_CreateCluster_ResponseSyntax) **   <a name="CloudHSMV2-CreateCluster-response-Cluster"></a>
Information about the cluster that was created.  
Type: [Cluster](API_Cluster.md) object

## Errors
<a name="API_CreateCluster_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmResourceNotFoundException **   
The request was rejected because it refers to a resource that cannot be found.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

 ** CloudHsmTagException **   
The request was rejected because of a tagging failure. Verify the tag conditions in all applicable policies, and then retry the request.  
HTTP Status Code: 400

## See Also
<a name="API_CreateCluster_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/CreateCluster) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/CreateCluster) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/CreateCluster) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/CreateCluster) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/CreateCluster) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/CreateCluster) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/CreateCluster) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/CreateCluster) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/CreateCluster) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/CreateCluster) 

# CreateHsm
<a name="API_CreateHsm"></a>

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

 **Cross-account use:** No. You cannot perform this operation on an AWS CloudHSM cluster in a different Amazon Web Service account.

## Request Syntax
<a name="API_CreateHsm_RequestSyntax"></a>

```
{
   "AvailabilityZone": "string",
   "ClusterId": "string",
   "IpAddress": "string"
}
```

## Request Parameters
<a name="API_CreateHsm_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [AvailabilityZone](#API_CreateHsm_RequestSyntax) **   <a name="CloudHSMV2-CreateHsm-request-AvailabilityZone"></a>
The Availability Zone where you are creating the HSM. To find the cluster's Availability Zones, use [DescribeClusters](API_DescribeClusters.md).  
Type: String  
Pattern: `[a-z]{2}(-(gov))?-(east|west|north|south|central){1,2}-\d[a-z]`   
Required: Yes

 ** [ClusterId](#API_CreateHsm_RequestSyntax) **   <a name="CloudHSMV2-CreateHsm-request-ClusterId"></a>
The identifier (ID) of the HSM's cluster. To find the cluster ID, use [DescribeClusters](API_DescribeClusters.md).  
Type: String  
Pattern: `cluster-[2-7a-zA-Z]{11,16}`   
Required: Yes

 ** [IpAddress](#API_CreateHsm_RequestSyntax) **   <a name="CloudHSMV2-CreateHsm-request-IpAddress"></a>
The HSM's IP address. If you specify an IP address, use an available address from the subnet that maps to the Availability Zone where you are creating the HSM. If you don't specify an IP address, one is chosen for you from that subnet.  
Type: String  
Pattern: `\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}`   
Required: No

## Response Syntax
<a name="API_CreateHsm_ResponseSyntax"></a>

```
{
   "Hsm": { 
      "AvailabilityZone": "string",
      "ClusterId": "string",
      "EniId": "string",
      "EniIp": "string",
      "EniIpV6": "string",
      "HsmId": "string",
      "HsmType": "string",
      "State": "string",
      "StateMessage": "string",
      "SubnetId": "string"
   }
}
```

## Response Elements
<a name="API_CreateHsm_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Hsm](#API_CreateHsm_ResponseSyntax) **   <a name="CloudHSMV2-CreateHsm-response-Hsm"></a>
Information about the HSM that was created.  
Type: [Hsm](API_Hsm.md) object

## Errors
<a name="API_CreateHsm_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmResourceNotFoundException **   
The request was rejected because it refers to a resource that cannot be found.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

## See Also
<a name="API_CreateHsm_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/CreateHsm) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/CreateHsm) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/CreateHsm) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/CreateHsm) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/CreateHsm) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/CreateHsm) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/CreateHsm) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/CreateHsm) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/CreateHsm) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/CreateHsm) 

# DeleteBackup
<a name="API_DeleteBackup"></a>

Deletes a specified AWS CloudHSM backup. A backup can be restored up to 7 days after the DeleteBackup request is made. For more information on restoring a backup, see [RestoreBackup](API_RestoreBackup.md).

 **Cross-account use:** No. You cannot perform this operation on an AWS CloudHSM backup in a different AWS account.

## Request Syntax
<a name="API_DeleteBackup_RequestSyntax"></a>

```
{
   "BackupId": "string"
}
```

## Request Parameters
<a name="API_DeleteBackup_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [BackupId](#API_DeleteBackup_RequestSyntax) **   <a name="CloudHSMV2-DeleteBackup-request-BackupId"></a>
The ID of the backup to be deleted. To find the ID of a backup, use the [DescribeBackups](API_DescribeBackups.md) operation.  
Type: String  
Pattern: `backup-[2-7a-zA-Z]{11,16}`   
Required: Yes

## Response Syntax
<a name="API_DeleteBackup_ResponseSyntax"></a>

```
{
   "Backup": { 
      "BackupArn": "string",
      "BackupId": "string",
      "BackupState": "string",
      "ClusterId": "string",
      "CopyTimestamp": number,
      "CreateTimestamp": number,
      "DeleteTimestamp": number,
      "HsmType": "string",
      "Mode": "string",
      "NeverExpires": boolean,
      "SourceBackup": "string",
      "SourceCluster": "string",
      "SourceRegion": "string",
      "TagList": [ 
         { 
            "Key": "string",
            "Value": "string"
         }
      ]
   }
}
```

## Response Elements
<a name="API_DeleteBackup_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Backup](#API_DeleteBackup_ResponseSyntax) **   <a name="CloudHSMV2-DeleteBackup-response-Backup"></a>
Information on the `Backup` object deleted.  
Type: [Backup](API_Backup.md) object

## Errors
<a name="API_DeleteBackup_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmResourceNotFoundException **   
The request was rejected because it refers to a resource that cannot be found.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

## See Also
<a name="API_DeleteBackup_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/DeleteBackup) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/DeleteBackup) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/DeleteBackup) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/DeleteBackup) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/DeleteBackup) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/DeleteBackup) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/DeleteBackup) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/DeleteBackup) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/DeleteBackup) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/DeleteBackup) 

# DeleteCluster
<a name="API_DeleteCluster"></a>

Deletes the specified AWS CloudHSM cluster. Before you can delete a cluster, you must delete all HSMs in the cluster. To see if the cluster contains any HSMs, use [DescribeClusters](API_DescribeClusters.md). To delete an HSM, use [DeleteHsm](API_DeleteHsm.md).

 **Cross-account use:** No. You cannot perform this operation on an AWS CloudHSM cluster in a different AWS account.

## Request Syntax
<a name="API_DeleteCluster_RequestSyntax"></a>

```
{
   "ClusterId": "string"
}
```

## Request Parameters
<a name="API_DeleteCluster_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ClusterId](#API_DeleteCluster_RequestSyntax) **   <a name="CloudHSMV2-DeleteCluster-request-ClusterId"></a>
The identifier (ID) of the cluster that you are deleting. To find the cluster ID, use [DescribeClusters](API_DescribeClusters.md).  
Type: String  
Pattern: `cluster-[2-7a-zA-Z]{11,16}`   
Required: Yes

## Response Syntax
<a name="API_DeleteCluster_ResponseSyntax"></a>

```
{
   "Cluster": { 
      "BackupPolicy": "string",
      "BackupRetentionPolicy": { 
         "Type": "string",
         "Value": "string"
      },
      "Certificates": { 
         "AwsHardwareCertificate": "string",
         "ClusterCertificate": "string",
         "ClusterCsr": "string",
         "HsmCertificate": "string",
         "ManufacturerHardwareCertificate": "string"
      },
      "ClusterId": "string",
      "CreateTimestamp": number,
      "Hsms": [ 
         { 
            "AvailabilityZone": "string",
            "ClusterId": "string",
            "EniId": "string",
            "EniIp": "string",
            "EniIpV6": "string",
            "HsmId": "string",
            "HsmType": "string",
            "State": "string",
            "StateMessage": "string",
            "SubnetId": "string"
         }
      ],
      "HsmType": "string",
      "HsmTypeRollbackExpiration": number,
      "Mode": "string",
      "NetworkType": "string",
      "PreCoPassword": "string",
      "SecurityGroup": "string",
      "SourceBackupId": "string",
      "State": "string",
      "StateMessage": "string",
      "SubnetMapping": { 
         "string" : "string" 
      },
      "TagList": [ 
         { 
            "Key": "string",
            "Value": "string"
         }
      ],
      "VpcId": "string"
   }
}
```

## Response Elements
<a name="API_DeleteCluster_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Cluster](#API_DeleteCluster_ResponseSyntax) **   <a name="CloudHSMV2-DeleteCluster-response-Cluster"></a>
Information about the cluster that was deleted.  
Type: [Cluster](API_Cluster.md) object

## Errors
<a name="API_DeleteCluster_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmResourceNotFoundException **   
The request was rejected because it refers to a resource that cannot be found.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

 ** CloudHsmTagException **   
The request was rejected because of a tagging failure. Verify the tag conditions in all applicable policies, and then retry the request.  
HTTP Status Code: 400

## See Also
<a name="API_DeleteCluster_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/DeleteCluster) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/DeleteCluster) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/DeleteCluster) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/DeleteCluster) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/DeleteCluster) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/DeleteCluster) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/DeleteCluster) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/DeleteCluster) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/DeleteCluster) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/DeleteCluster) 

# DeleteHsm
<a name="API_DeleteHsm"></a>

Deletes the specified HSM. To specify an HSM, you can use its identifier (ID), the IP address of the HSM's elastic network interface (ENI), or the ID of the HSM's ENI. You need to specify only one of these values. To find these values, use [DescribeClusters](API_DescribeClusters.md).

 **Cross-account use:** No. You cannot perform this operation on an AWS CloudHSM hsm in a different AWS account.

## Request Syntax
<a name="API_DeleteHsm_RequestSyntax"></a>

```
{
   "ClusterId": "string",
   "EniId": "string",
   "EniIp": "string",
   "HsmId": "string"
}
```

## Request Parameters
<a name="API_DeleteHsm_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ClusterId](#API_DeleteHsm_RequestSyntax) **   <a name="CloudHSMV2-DeleteHsm-request-ClusterId"></a>
The identifier (ID) of the cluster that contains the HSM that you are deleting.  
Type: String  
Pattern: `cluster-[2-7a-zA-Z]{11,16}`   
Required: Yes

 ** [EniId](#API_DeleteHsm_RequestSyntax) **   <a name="CloudHSMV2-DeleteHsm-request-EniId"></a>
The identifier (ID) of the elastic network interface (ENI) of the HSM that you are deleting.  
Type: String  
Pattern: `eni-[0-9a-fA-F]{8,17}`   
Required: No

 ** [EniIp](#API_DeleteHsm_RequestSyntax) **   <a name="CloudHSMV2-DeleteHsm-request-EniIp"></a>
The IP address of the elastic network interface (ENI) of the HSM that you are deleting.  
Type: String  
Pattern: `\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}`   
Required: No

 ** [HsmId](#API_DeleteHsm_RequestSyntax) **   <a name="CloudHSMV2-DeleteHsm-request-HsmId"></a>
The identifier (ID) of the HSM that you are deleting.  
Type: String  
Pattern: `hsm-[2-7a-zA-Z]{11,16}`   
Required: No

## Response Syntax
<a name="API_DeleteHsm_ResponseSyntax"></a>

```
{
   "HsmId": "string"
}
```

## Response Elements
<a name="API_DeleteHsm_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [HsmId](#API_DeleteHsm_ResponseSyntax) **   <a name="CloudHSMV2-DeleteHsm-response-HsmId"></a>
The identifier (ID) of the HSM that was deleted.  
Type: String  
Pattern: `hsm-[2-7a-zA-Z]{11,16}` 

## Errors
<a name="API_DeleteHsm_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmResourceNotFoundException **   
The request was rejected because it refers to a resource that cannot be found.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

## See Also
<a name="API_DeleteHsm_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/DeleteHsm) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/DeleteHsm) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/DeleteHsm) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/DeleteHsm) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/DeleteHsm) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/DeleteHsm) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/DeleteHsm) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/DeleteHsm) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/DeleteHsm) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/DeleteHsm) 

# DeleteResourcePolicy
<a name="API_DeleteResourcePolicy"></a>

 Deletes an AWS CloudHSM resource policy. Deleting a resource policy will result in the resource being unshared and removed from any AWS RAM resource shares. Deleting the resource policy attached to a backup will not impact any clusters created from that backup.

 **Cross-account use:** No. You cannot perform this operation on an AWS CloudHSM resource in a different AWS account.

## Request Syntax
<a name="API_DeleteResourcePolicy_RequestSyntax"></a>

```
{
   "ResourceArn": "string"
}
```

## Request Parameters
<a name="API_DeleteResourcePolicy_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ResourceArn](#API_DeleteResourcePolicy_RequestSyntax) **   <a name="CloudHSMV2-DeleteResourcePolicy-request-ResourceArn"></a>
Amazon Resource Name (ARN) of the resource from which the policy will be removed.   
Type: String  
Pattern: `arn:aws(-(us-gov))?:cloudhsm:([a-z]{2}(-(gov|isob|iso))?-(east|west|north|south|central){1,2}-[0-9]{1}):[0-9]{12}:(backup/backup|cluster/cluster|hsm/hsm)-[2-7a-zA-Z]{11,16}`   
Required: No

## Response Syntax
<a name="API_DeleteResourcePolicy_ResponseSyntax"></a>

```
{
   "Policy": "string",
   "ResourceArn": "string"
}
```

## Response Elements
<a name="API_DeleteResourcePolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Policy](#API_DeleteResourcePolicy_ResponseSyntax) **   <a name="CloudHSMV2-DeleteResourcePolicy-response-Policy"></a>
The policy previously attached to the resource.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 20000.

 ** [ResourceArn](#API_DeleteResourcePolicy_ResponseSyntax) **   <a name="CloudHSMV2-DeleteResourcePolicy-response-ResourceArn"></a>
Amazon Resource Name (ARN) of the resource from which the policy was deleted.   
Type: String  
Pattern: `arn:aws(-(us-gov))?:cloudhsm:([a-z]{2}(-(gov|isob|iso))?-(east|west|north|south|central){1,2}-[0-9]{1}):[0-9]{12}:(backup/backup|cluster/cluster|hsm/hsm)-[2-7a-zA-Z]{11,16}` 

## Errors
<a name="API_DeleteResourcePolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmResourceNotFoundException **   
The request was rejected because it refers to a resource that cannot be found.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

## See Also
<a name="API_DeleteResourcePolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/DeleteResourcePolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/DeleteResourcePolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/DeleteResourcePolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/DeleteResourcePolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/DeleteResourcePolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/DeleteResourcePolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/DeleteResourcePolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/DeleteResourcePolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/DeleteResourcePolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/DeleteResourcePolicy) 

# DescribeBackups
<a name="API_DescribeBackups"></a>

Gets information about backups of AWS CloudHSM clusters. Lists either the backups you own or the backups shared with you when the Shared parameter is true.

This is a paginated operation, which means that each response might contain only a subset of all the backups. When the response contains only a subset of backups, it includes a `NextToken` value. Use this value in a subsequent `DescribeBackups` request to get more backups. When you receive a response with no `NextToken` (or an empty or null value), that means there are no more backups to get.

 **Cross-account use:** Yes. Customers can describe backups in other AWS accounts that are shared with them.

## Request Syntax
<a name="API_DescribeBackups_RequestSyntax"></a>

```
{
   "Filters": { 
      "string" : [ "string" ]
   },
   "MaxResults": number,
   "NextToken": "string",
   "Shared": boolean,
   "SortAscending": boolean
}
```

## Request Parameters
<a name="API_DescribeBackups_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Filters](#API_DescribeBackups_RequestSyntax) **   <a name="CloudHSMV2-DescribeBackups-request-Filters"></a>
One or more filters to limit the items returned in the response.  
Use the `backupIds` filter to return only the specified backups. Specify backups by their backup identifier (ID).  
Use the `sourceBackupIds` filter to return only the backups created from a source backup. The `sourceBackupID` of a source backup is returned by the [CopyBackupToRegion](API_CopyBackupToRegion.md) operation.  
Use the `clusterIds` filter to return only the backups for the specified clusters. Specify clusters by their cluster identifier (ID).  
Use the `states` filter to return only backups that match the specified state.  
Use the `neverExpires` filter to return backups filtered by the value in the `neverExpires` parameter. `True` returns all backups exempt from the backup retention policy. `False` returns all backups with a backup retention policy defined at the cluster.  
Type: String to array of strings map  
Map Entries: Maximum number of 30 items.  
Key Pattern: `[a-zA-Z0-9_-]+`   
Required: No

 ** [MaxResults](#API_DescribeBackups_RequestSyntax) **   <a name="CloudHSMV2-DescribeBackups-request-MaxResults"></a>
The maximum number of backups to return in the response. When there are more backups than the number you specify, the response contains a `NextToken` value.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 50.  
Required: No

 ** [NextToken](#API_DescribeBackups_RequestSyntax) **   <a name="CloudHSMV2-DescribeBackups-request-NextToken"></a>
The `NextToken` value that you received in the previous response. Use this value to get more backups.  
Type: String  
Length Constraints: Maximum length of 256.  
Pattern: `.*`   
Required: No

 ** [Shared](#API_DescribeBackups_RequestSyntax) **   <a name="CloudHSMV2-DescribeBackups-request-Shared"></a>
Describe backups that are shared with you.  
By default when using this option, the command returns backups that have been shared using a standard AWS Resource Access Manager resource share. In order for a backup that was shared using the PutResourcePolicy command to be returned, the share must be promoted to a standard resource share using the AWS RAM [PromoteResourceShareCreatedFromPolicy](https://docs.aws.amazon.com/cli/latest/reference/ram/promote-resource-share-created-from-policy.html) API operation. For more information about sharing backups, see [ Working with shared backups](https://docs.aws.amazon.com/cloudhsm/latest/userguide/sharing.html) in the AWS CloudHSM User Guide.
Type: Boolean  
Required: No

 ** [SortAscending](#API_DescribeBackups_RequestSyntax) **   <a name="CloudHSMV2-DescribeBackups-request-SortAscending"></a>
Designates whether or not to sort the return backups by ascending chronological order of generation.  
Type: Boolean  
Required: No

## Response Syntax
<a name="API_DescribeBackups_ResponseSyntax"></a>

```
{
   "Backups": [ 
      { 
         "BackupArn": "string",
         "BackupId": "string",
         "BackupState": "string",
         "ClusterId": "string",
         "CopyTimestamp": number,
         "CreateTimestamp": number,
         "DeleteTimestamp": number,
         "HsmType": "string",
         "Mode": "string",
         "NeverExpires": boolean,
         "SourceBackup": "string",
         "SourceCluster": "string",
         "SourceRegion": "string",
         "TagList": [ 
            { 
               "Key": "string",
               "Value": "string"
            }
         ]
      }
   ],
   "NextToken": "string"
}
```

## Response Elements
<a name="API_DescribeBackups_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Backups](#API_DescribeBackups_ResponseSyntax) **   <a name="CloudHSMV2-DescribeBackups-response-Backups"></a>
A list of backups.  
Type: Array of [Backup](API_Backup.md) objects

 ** [NextToken](#API_DescribeBackups_ResponseSyntax) **   <a name="CloudHSMV2-DescribeBackups-response-NextToken"></a>
An opaque string that indicates that the response contains only a subset of backups. Use this value in a subsequent `DescribeBackups` request to get more backups.  
Type: String  
Length Constraints: Maximum length of 256.  
Pattern: `.*` 

## Errors
<a name="API_DescribeBackups_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmResourceNotFoundException **   
The request was rejected because it refers to a resource that cannot be found.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

 ** CloudHsmTagException **   
The request was rejected because of a tagging failure. Verify the tag conditions in all applicable policies, and then retry the request.  
HTTP Status Code: 400

## See Also
<a name="API_DescribeBackups_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/DescribeBackups) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/DescribeBackups) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/DescribeBackups) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/DescribeBackups) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/DescribeBackups) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/DescribeBackups) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/DescribeBackups) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/DescribeBackups) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/DescribeBackups) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/DescribeBackups) 

# DescribeClusters
<a name="API_DescribeClusters"></a>

Gets information about AWS CloudHSM clusters.

This is a paginated operation, which means that each response might contain only a subset of all the clusters. When the response contains only a subset of clusters, it includes a `NextToken` value. Use this value in a subsequent `DescribeClusters` request to get more clusters. When you receive a response with no `NextToken` (or an empty or null value), that means there are no more clusters to get.

 **Cross-account use:** No. You cannot perform this operation on AWS CloudHSM clusters in a different AWS account.

## Request Syntax
<a name="API_DescribeClusters_RequestSyntax"></a>

```
{
   "Filters": { 
      "string" : [ "string" ]
   },
   "MaxResults": number,
   "NextToken": "string"
}
```

## Request Parameters
<a name="API_DescribeClusters_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Filters](#API_DescribeClusters_RequestSyntax) **   <a name="CloudHSMV2-DescribeClusters-request-Filters"></a>
One or more filters to limit the items returned in the response.  
Use the `clusterIds` filter to return only the specified clusters. Specify clusters by their cluster identifier (ID).  
Use the `vpcIds` filter to return only the clusters in the specified virtual private clouds (VPCs). Specify VPCs by their VPC identifier (ID).  
Use the `states` filter to return only clusters that match the specified state.  
Type: String to array of strings map  
Map Entries: Maximum number of 30 items.  
Key Pattern: `[a-zA-Z0-9_-]+`   
Required: No

 ** [MaxResults](#API_DescribeClusters_RequestSyntax) **   <a name="CloudHSMV2-DescribeClusters-request-MaxResults"></a>
The maximum number of clusters to return in the response. When there are more clusters than the number you specify, the response contains a `NextToken` value.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 25.  
Required: No

 ** [NextToken](#API_DescribeClusters_RequestSyntax) **   <a name="CloudHSMV2-DescribeClusters-request-NextToken"></a>
The `NextToken` value that you received in the previous response. Use this value to get more clusters.  
Type: String  
Length Constraints: Maximum length of 256.  
Pattern: `.*`   
Required: No

## Response Syntax
<a name="API_DescribeClusters_ResponseSyntax"></a>

```
{
   "Clusters": [ 
      { 
         "BackupPolicy": "string",
         "BackupRetentionPolicy": { 
            "Type": "string",
            "Value": "string"
         },
         "Certificates": { 
            "AwsHardwareCertificate": "string",
            "ClusterCertificate": "string",
            "ClusterCsr": "string",
            "HsmCertificate": "string",
            "ManufacturerHardwareCertificate": "string"
         },
         "ClusterId": "string",
         "CreateTimestamp": number,
         "Hsms": [ 
            { 
               "AvailabilityZone": "string",
               "ClusterId": "string",
               "EniId": "string",
               "EniIp": "string",
               "EniIpV6": "string",
               "HsmId": "string",
               "HsmType": "string",
               "State": "string",
               "StateMessage": "string",
               "SubnetId": "string"
            }
         ],
         "HsmType": "string",
         "HsmTypeRollbackExpiration": number,
         "Mode": "string",
         "NetworkType": "string",
         "PreCoPassword": "string",
         "SecurityGroup": "string",
         "SourceBackupId": "string",
         "State": "string",
         "StateMessage": "string",
         "SubnetMapping": { 
            "string" : "string" 
         },
         "TagList": [ 
            { 
               "Key": "string",
               "Value": "string"
            }
         ],
         "VpcId": "string"
      }
   ],
   "NextToken": "string"
}
```

## Response Elements
<a name="API_DescribeClusters_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Clusters](#API_DescribeClusters_ResponseSyntax) **   <a name="CloudHSMV2-DescribeClusters-response-Clusters"></a>
A list of clusters.  
Type: Array of [Cluster](API_Cluster.md) objects

 ** [NextToken](#API_DescribeClusters_ResponseSyntax) **   <a name="CloudHSMV2-DescribeClusters-response-NextToken"></a>
An opaque string that indicates that the response contains only a subset of clusters. Use this value in a subsequent `DescribeClusters` request to get more clusters.  
Type: String  
Length Constraints: Maximum length of 256.  
Pattern: `.*` 

## Errors
<a name="API_DescribeClusters_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

 ** CloudHsmTagException **   
The request was rejected because of a tagging failure. Verify the tag conditions in all applicable policies, and then retry the request.  
HTTP Status Code: 400

## See Also
<a name="API_DescribeClusters_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/DescribeClusters) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/DescribeClusters) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/DescribeClusters) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/DescribeClusters) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/DescribeClusters) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/DescribeClusters) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/DescribeClusters) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/DescribeClusters) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/DescribeClusters) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/DescribeClusters) 

# GetResourcePolicy
<a name="API_GetResourcePolicy"></a>

 Retrieves the resource policy document attached to a given resource. 

 **Cross-account use:** No. You cannot perform this operation on an AWS CloudHSM resource in a different AWS account.

## Request Syntax
<a name="API_GetResourcePolicy_RequestSyntax"></a>

```
{
   "ResourceArn": "string"
}
```

## Request Parameters
<a name="API_GetResourcePolicy_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ResourceArn](#API_GetResourcePolicy_RequestSyntax) **   <a name="CloudHSMV2-GetResourcePolicy-request-ResourceArn"></a>
Amazon Resource Name (ARN) of the resource to which a policy is attached.  
Type: String  
Pattern: `arn:aws(-(us-gov))?:cloudhsm:([a-z]{2}(-(gov|isob|iso))?-(east|west|north|south|central){1,2}-[0-9]{1}):[0-9]{12}:(backup/backup|cluster/cluster|hsm/hsm)-[2-7a-zA-Z]{11,16}`   
Required: No

## Response Syntax
<a name="API_GetResourcePolicy_ResponseSyntax"></a>

```
{
   "Policy": "string"
}
```

## Response Elements
<a name="API_GetResourcePolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Policy](#API_GetResourcePolicy_ResponseSyntax) **   <a name="CloudHSMV2-GetResourcePolicy-response-Policy"></a>
The policy attached to a resource.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 20000.

## Errors
<a name="API_GetResourcePolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmResourceNotFoundException **   
The request was rejected because it refers to a resource that cannot be found.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

## See Also
<a name="API_GetResourcePolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/GetResourcePolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/GetResourcePolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/GetResourcePolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/GetResourcePolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/GetResourcePolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/GetResourcePolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/GetResourcePolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/GetResourcePolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/GetResourcePolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/GetResourcePolicy) 

# InitializeCluster
<a name="API_InitializeCluster"></a>

Claims an AWS CloudHSM cluster by submitting the cluster certificate issued by your issuing certificate authority (CA) and the CA's root certificate. Before you can claim a cluster, you must sign the cluster's certificate signing request (CSR) with your issuing CA. To get the cluster's CSR, use [DescribeClusters](API_DescribeClusters.md).

 **Cross-account use:** No. You cannot perform this operation on an AWS CloudHSM cluster in a different AWS account.

## Request Syntax
<a name="API_InitializeCluster_RequestSyntax"></a>

```
{
   "ClusterId": "string",
   "SignedCert": "string",
   "TrustAnchor": "string"
}
```

## Request Parameters
<a name="API_InitializeCluster_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ClusterId](#API_InitializeCluster_RequestSyntax) **   <a name="CloudHSMV2-InitializeCluster-request-ClusterId"></a>
The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use [DescribeClusters](API_DescribeClusters.md).  
Type: String  
Pattern: `cluster-[2-7a-zA-Z]{11,16}`   
Required: Yes

 ** [SignedCert](#API_InitializeCluster_RequestSyntax) **   <a name="CloudHSMV2-InitializeCluster-request-SignedCert"></a>
The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must be in PEM format and can contain a maximum of 5000 characters.  
Type: String  
Length Constraints: Maximum length of 20000.  
Pattern: `[a-zA-Z0-9+-/=\s]*`   
Required: Yes

 ** [TrustAnchor](#API_InitializeCluster_RequestSyntax) **   <a name="CloudHSMV2-InitializeCluster-request-TrustAnchor"></a>
The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster certificate. You must use a self-signed certificate. The certificate used to sign the HSM CSR must be directly available, and thus must be the root certificate. The certificate must be in PEM format and can contain a maximum of 5000 characters.  
Type: String  
Length Constraints: Maximum length of 20000.  
Pattern: `[a-zA-Z0-9+-/=\s]*`   
Required: Yes

## Response Syntax
<a name="API_InitializeCluster_ResponseSyntax"></a>

```
{
   "State": "string",
   "StateMessage": "string"
}
```

## Response Elements
<a name="API_InitializeCluster_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [State](#API_InitializeCluster_ResponseSyntax) **   <a name="CloudHSMV2-InitializeCluster-response-State"></a>
The cluster's state.  
Type: String  
Valid Values: `CREATE_IN_PROGRESS | UNINITIALIZED | INITIALIZE_IN_PROGRESS | INITIALIZED | ACTIVE | UPDATE_IN_PROGRESS | MODIFY_IN_PROGRESS | ROLLBACK_IN_PROGRESS | PENDING_ROLLBACK | DELETE_IN_PROGRESS | DELETED | DEGRADED` 

 ** [StateMessage](#API_InitializeCluster_ResponseSyntax) **   <a name="CloudHSMV2-InitializeCluster-response-StateMessage"></a>
A description of the cluster's state.  
Type: String  
Length Constraints: Maximum length of 300.  
Pattern: `.*` 

## Errors
<a name="API_InitializeCluster_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmResourceNotFoundException **   
The request was rejected because it refers to a resource that cannot be found.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

## See Also
<a name="API_InitializeCluster_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/InitializeCluster) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/InitializeCluster) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/InitializeCluster) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/InitializeCluster) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/InitializeCluster) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/InitializeCluster) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/InitializeCluster) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/InitializeCluster) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/InitializeCluster) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/InitializeCluster) 

# ListTags
<a name="API_ListTags"></a>

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

This is a paginated operation, which means that each response might contain only a subset of all the tags. When the response contains only a subset of tags, it includes a `NextToken` value. Use this value in a subsequent `ListTags` request to get more tags. When you receive a response with no `NextToken` (or an empty or null value), that means there are no more tags to get.

 **Cross-account use:** No. You cannot perform this operation on an AWS CloudHSM resource in a different AWS account.

## Request Syntax
<a name="API_ListTags_RequestSyntax"></a>

```
{
   "MaxResults": number,
   "NextToken": "string",
   "ResourceId": "string"
}
```

## Request Parameters
<a name="API_ListTags_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MaxResults](#API_ListTags_RequestSyntax) **   <a name="CloudHSMV2-ListTags-request-MaxResults"></a>
The maximum number of tags to return in the response. When there are more tags than the number you specify, the response contains a `NextToken` value.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 100.  
Required: No

 ** [NextToken](#API_ListTags_RequestSyntax) **   <a name="CloudHSMV2-ListTags-request-NextToken"></a>
The `NextToken` value that you received in the previous response. Use this value to get more tags.  
Type: String  
Length Constraints: Maximum length of 256.  
Pattern: `.*`   
Required: No

 ** [ResourceId](#API_ListTags_RequestSyntax) **   <a name="CloudHSMV2-ListTags-request-ResourceId"></a>
The cluster identifier (ID) for the cluster whose tags you are getting. To find the cluster ID, use [DescribeClusters](API_DescribeClusters.md).  
Type: String  
Pattern: `(?:cluster|backup)-[2-7a-zA-Z]{11,16}`   
Required: Yes

## Response Syntax
<a name="API_ListTags_ResponseSyntax"></a>

```
{
   "NextToken": "string",
   "TagList": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListTags_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [NextToken](#API_ListTags_ResponseSyntax) **   <a name="CloudHSMV2-ListTags-response-NextToken"></a>
An opaque string that indicates that the response contains only a subset of tags. Use this value in a subsequent `ListTags` request to get more tags.  
Type: String  
Length Constraints: Maximum length of 256.  
Pattern: `.*` 

 ** [TagList](#API_ListTags_ResponseSyntax) **   <a name="CloudHSMV2-ListTags-response-TagList"></a>
A list of tags.  
Type: Array of [Tag](API_Tag.md) objects  
Array Members: Minimum number of 1 item. Maximum number of 50 items.

## Errors
<a name="API_ListTags_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmResourceNotFoundException **   
The request was rejected because it refers to a resource that cannot be found.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

 ** CloudHsmTagException **   
The request was rejected because of a tagging failure. Verify the tag conditions in all applicable policies, and then retry the request.  
HTTP Status Code: 400

## See Also
<a name="API_ListTags_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/ListTags) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/ListTags) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/ListTags) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/ListTags) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/ListTags) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/ListTags) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/ListTags) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/ListTags) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/ListTags) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/ListTags) 

# ModifyBackupAttributes
<a name="API_ModifyBackupAttributes"></a>

Modifies attributes for AWS CloudHSM backup.

 **Cross-account use:** No. You cannot perform this operation on an AWS CloudHSM backup in a different AWS account.

## Request Syntax
<a name="API_ModifyBackupAttributes_RequestSyntax"></a>

```
{
   "BackupId": "string",
   "NeverExpires": boolean
}
```

## Request Parameters
<a name="API_ModifyBackupAttributes_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [BackupId](#API_ModifyBackupAttributes_RequestSyntax) **   <a name="CloudHSMV2-ModifyBackupAttributes-request-BackupId"></a>
The identifier (ID) of the backup to modify. To find the ID of a backup, use the [DescribeBackups](API_DescribeBackups.md) operation.  
Type: String  
Pattern: `backup-[2-7a-zA-Z]{11,16}`   
Required: Yes

 ** [NeverExpires](#API_ModifyBackupAttributes_RequestSyntax) **   <a name="CloudHSMV2-ModifyBackupAttributes-request-NeverExpires"></a>
Specifies whether the service should exempt a backup from the retention policy for the cluster. `True` exempts a backup from the retention policy. `False` means the service applies the backup retention policy defined at the cluster.  
Type: Boolean  
Required: Yes

## Response Syntax
<a name="API_ModifyBackupAttributes_ResponseSyntax"></a>

```
{
   "Backup": { 
      "BackupArn": "string",
      "BackupId": "string",
      "BackupState": "string",
      "ClusterId": "string",
      "CopyTimestamp": number,
      "CreateTimestamp": number,
      "DeleteTimestamp": number,
      "HsmType": "string",
      "Mode": "string",
      "NeverExpires": boolean,
      "SourceBackup": "string",
      "SourceCluster": "string",
      "SourceRegion": "string",
      "TagList": [ 
         { 
            "Key": "string",
            "Value": "string"
         }
      ]
   }
}
```

## Response Elements
<a name="API_ModifyBackupAttributes_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Backup](#API_ModifyBackupAttributes_ResponseSyntax) **   <a name="CloudHSMV2-ModifyBackupAttributes-response-Backup"></a>
Contains information about a backup of an AWS CloudHSM cluster. All backup objects contain the `BackupId`, `BackupState`, `ClusterId`, and `CreateTimestamp` parameters. Backups that were copied into a destination region additionally contain the `CopyTimestamp`, `SourceBackup`, `SourceCluster`, and `SourceRegion` parameters. A backup that is pending deletion will include the `DeleteTimestamp` parameter.  
Type: [Backup](API_Backup.md) object

## Errors
<a name="API_ModifyBackupAttributes_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmResourceNotFoundException **   
The request was rejected because it refers to a resource that cannot be found.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

## See Also
<a name="API_ModifyBackupAttributes_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/ModifyBackupAttributes) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/ModifyBackupAttributes) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/ModifyBackupAttributes) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/ModifyBackupAttributes) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/ModifyBackupAttributes) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/ModifyBackupAttributes) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/ModifyBackupAttributes) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/ModifyBackupAttributes) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/ModifyBackupAttributes) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/ModifyBackupAttributes) 

# ModifyCluster
<a name="API_ModifyCluster"></a>

Modifies AWS CloudHSM cluster.

 **Cross-account use:** No. You cannot perform this operation on an AWS CloudHSM cluster in a different AWS account.

## Request Syntax
<a name="API_ModifyCluster_RequestSyntax"></a>

```
{
   "BackupRetentionPolicy": { 
      "Type": "string",
      "Value": "string"
   },
   "ClusterId": "string",
   "HsmType": "string"
}
```

## Request Parameters
<a name="API_ModifyCluster_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [BackupRetentionPolicy](#API_ModifyCluster_RequestSyntax) **   <a name="CloudHSMV2-ModifyCluster-request-BackupRetentionPolicy"></a>
A policy that defines how the service retains backups.  
Type: [BackupRetentionPolicy](API_BackupRetentionPolicy.md) object  
Required: No

 ** [ClusterId](#API_ModifyCluster_RequestSyntax) **   <a name="CloudHSMV2-ModifyCluster-request-ClusterId"></a>
The identifier (ID) of the cluster that you want to modify. To find the cluster ID, use [DescribeClusters](API_DescribeClusters.md).  
Type: String  
Pattern: `cluster-[2-7a-zA-Z]{11,16}`   
Required: Yes

 ** [HsmType](#API_ModifyCluster_RequestSyntax) **   <a name="CloudHSMV2-ModifyCluster-request-HsmType"></a>
The desired HSM type of the cluster.  
Type: String  
Length Constraints: Maximum length of 32.  
Pattern: `((p|)hsm[0-9][a-z.]*\.[a-zA-Z]+)`   
Required: No

## Response Syntax
<a name="API_ModifyCluster_ResponseSyntax"></a>

```
{
   "Cluster": { 
      "BackupPolicy": "string",
      "BackupRetentionPolicy": { 
         "Type": "string",
         "Value": "string"
      },
      "Certificates": { 
         "AwsHardwareCertificate": "string",
         "ClusterCertificate": "string",
         "ClusterCsr": "string",
         "HsmCertificate": "string",
         "ManufacturerHardwareCertificate": "string"
      },
      "ClusterId": "string",
      "CreateTimestamp": number,
      "Hsms": [ 
         { 
            "AvailabilityZone": "string",
            "ClusterId": "string",
            "EniId": "string",
            "EniIp": "string",
            "EniIpV6": "string",
            "HsmId": "string",
            "HsmType": "string",
            "State": "string",
            "StateMessage": "string",
            "SubnetId": "string"
         }
      ],
      "HsmType": "string",
      "HsmTypeRollbackExpiration": number,
      "Mode": "string",
      "NetworkType": "string",
      "PreCoPassword": "string",
      "SecurityGroup": "string",
      "SourceBackupId": "string",
      "State": "string",
      "StateMessage": "string",
      "SubnetMapping": { 
         "string" : "string" 
      },
      "TagList": [ 
         { 
            "Key": "string",
            "Value": "string"
         }
      ],
      "VpcId": "string"
   }
}
```

## Response Elements
<a name="API_ModifyCluster_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Cluster](#API_ModifyCluster_ResponseSyntax) **   <a name="CloudHSMV2-ModifyCluster-response-Cluster"></a>
Contains information about an AWS CloudHSM cluster.  
Type: [Cluster](API_Cluster.md) object

## Errors
<a name="API_ModifyCluster_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmResourceNotFoundException **   
The request was rejected because it refers to a resource that cannot be found.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

## See Also
<a name="API_ModifyCluster_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/ModifyCluster) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/ModifyCluster) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/ModifyCluster) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/ModifyCluster) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/ModifyCluster) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/ModifyCluster) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/ModifyCluster) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/ModifyCluster) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/ModifyCluster) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/ModifyCluster) 

# PutResourcePolicy
<a name="API_PutResourcePolicy"></a>

Creates or updates an AWS CloudHSM resource policy. A resource policy helps you to define the IAM entity (for example, an AWS account) that can manage your AWS CloudHSM resources. The following resources support AWS CloudHSM resource policies: 
+  Backup - The resource policy allows you to describe the backup and restore a cluster from the backup in another AWS account.

In order to share a backup, it must be in a 'READY' state and you must own it.

**Important**  
While you can share a backup using the AWS CloudHSM PutResourcePolicy operation, we recommend using AWS Resource Access Manager (AWS RAM) instead. Using AWS RAM provides multiple benefits as it creates the policy for you, allows multiple resources to be shared at one time, and increases the discoverability of shared resources. If you use PutResourcePolicy and want consumers to be able to describe the backups you share with them, you must promote the backup to a standard AWS RAM Resource Share using the AWS RAM PromoteResourceShareCreatedFromPolicy API operation. For more information, see [ Working with shared backups](https://docs.aws.amazon.com/cloudhsm/latest/userguide/sharing.html) in the AWS CloudHSM User Guide

 **Cross-account use:** No. You cannot perform this operation on an AWS CloudHSM resource in a different AWS account.

## Request Syntax
<a name="API_PutResourcePolicy_RequestSyntax"></a>

```
{
   "Policy": "string",
   "ResourceArn": "string"
}
```

## Request Parameters
<a name="API_PutResourcePolicy_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [Policy](#API_PutResourcePolicy_RequestSyntax) **   <a name="CloudHSMV2-PutResourcePolicy-request-Policy"></a>
The policy you want to associate with a resource.   
For an example policy, see [ Working with shared backups](https://docs.aws.amazon.com/cloudhsm/latest/userguide/sharing.html) in the AWS CloudHSM User Guide  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 20000.  
Required: No

 ** [ResourceArn](#API_PutResourcePolicy_RequestSyntax) **   <a name="CloudHSMV2-PutResourcePolicy-request-ResourceArn"></a>
Amazon Resource Name (ARN) of the resource to which you want to attach a policy.   
Type: String  
Pattern: `arn:aws(-(us-gov))?:cloudhsm:([a-z]{2}(-(gov|isob|iso))?-(east|west|north|south|central){1,2}-[0-9]{1}):[0-9]{12}:(backup/backup|cluster/cluster|hsm/hsm)-[2-7a-zA-Z]{11,16}`   
Required: No

## Response Syntax
<a name="API_PutResourcePolicy_ResponseSyntax"></a>

```
{
   "Policy": "string",
   "ResourceArn": "string"
}
```

## Response Elements
<a name="API_PutResourcePolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Policy](#API_PutResourcePolicy_ResponseSyntax) **   <a name="CloudHSMV2-PutResourcePolicy-response-Policy"></a>
The policy attached to a resource.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 20000.

 ** [ResourceArn](#API_PutResourcePolicy_ResponseSyntax) **   <a name="CloudHSMV2-PutResourcePolicy-response-ResourceArn"></a>
Amazon Resource Name (ARN) of the resource to which a policy is attached.  
Type: String  
Pattern: `arn:aws(-(us-gov))?:cloudhsm:([a-z]{2}(-(gov|isob|iso))?-(east|west|north|south|central){1,2}-[0-9]{1}):[0-9]{12}:(backup/backup|cluster/cluster|hsm/hsm)-[2-7a-zA-Z]{11,16}` 

## Errors
<a name="API_PutResourcePolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmResourceNotFoundException **   
The request was rejected because it refers to a resource that cannot be found.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

## See Also
<a name="API_PutResourcePolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/PutResourcePolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/PutResourcePolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/PutResourcePolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/PutResourcePolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/PutResourcePolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/PutResourcePolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/PutResourcePolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/PutResourcePolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/PutResourcePolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/PutResourcePolicy) 

# RestoreBackup
<a name="API_RestoreBackup"></a>

Restores a specified AWS CloudHSM backup that is in the `PENDING_DELETION` state. For more information on deleting a backup, see [DeleteBackup](API_DeleteBackup.md).

 **Cross-account use:** No. You cannot perform this operation on an AWS CloudHSM backup in a different AWS account.

## Request Syntax
<a name="API_RestoreBackup_RequestSyntax"></a>

```
{
   "BackupId": "string"
}
```

## Request Parameters
<a name="API_RestoreBackup_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [BackupId](#API_RestoreBackup_RequestSyntax) **   <a name="CloudHSMV2-RestoreBackup-request-BackupId"></a>
The ID of the backup to be restored. To find the ID of a backup, use the [DescribeBackups](API_DescribeBackups.md) operation.  
Type: String  
Pattern: `backup-[2-7a-zA-Z]{11,16}`   
Required: Yes

## Response Syntax
<a name="API_RestoreBackup_ResponseSyntax"></a>

```
{
   "Backup": { 
      "BackupArn": "string",
      "BackupId": "string",
      "BackupState": "string",
      "ClusterId": "string",
      "CopyTimestamp": number,
      "CreateTimestamp": number,
      "DeleteTimestamp": number,
      "HsmType": "string",
      "Mode": "string",
      "NeverExpires": boolean,
      "SourceBackup": "string",
      "SourceCluster": "string",
      "SourceRegion": "string",
      "TagList": [ 
         { 
            "Key": "string",
            "Value": "string"
         }
      ]
   }
}
```

## Response Elements
<a name="API_RestoreBackup_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Backup](#API_RestoreBackup_ResponseSyntax) **   <a name="CloudHSMV2-RestoreBackup-response-Backup"></a>
Information on the `Backup` object created.  
Type: [Backup](API_Backup.md) object

## Errors
<a name="API_RestoreBackup_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmResourceNotFoundException **   
The request was rejected because it refers to a resource that cannot be found.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

## See Also
<a name="API_RestoreBackup_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/RestoreBackup) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/RestoreBackup) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/RestoreBackup) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/RestoreBackup) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/RestoreBackup) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/RestoreBackup) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/RestoreBackup) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/RestoreBackup) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/RestoreBackup) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/RestoreBackup) 

# TagResource
<a name="API_TagResource"></a>

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

 **Cross-account use:** No. You cannot perform this operation on an AWS CloudHSM resource in a different AWS account.

## Request Syntax
<a name="API_TagResource_RequestSyntax"></a>

```
{
   "ResourceId": "string",
   "TagList": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}
```

## Request Parameters
<a name="API_TagResource_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ResourceId](#API_TagResource_RequestSyntax) **   <a name="CloudHSMV2-TagResource-request-ResourceId"></a>
The cluster identifier (ID) for the cluster that you are tagging. To find the cluster ID, use [DescribeClusters](API_DescribeClusters.md).  
Type: String  
Pattern: `(?:cluster|backup)-[2-7a-zA-Z]{11,16}`   
Required: Yes

 ** [TagList](#API_TagResource_RequestSyntax) **   <a name="CloudHSMV2-TagResource-request-TagList"></a>
A list of one or more tags.  
Type: Array of [Tag](API_Tag.md) objects  
Array Members: Minimum number of 1 item. Maximum number of 50 items.  
Required: Yes

## Response Elements
<a name="API_TagResource_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_TagResource_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmResourceLimitExceededException **   
The request was rejected because it exceeds an AWS CloudHSM limit.  
HTTP Status Code: 400

 ** CloudHsmResourceNotFoundException **   
The request was rejected because it refers to a resource that cannot be found.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

 ** CloudHsmTagException **   
The request was rejected because of a tagging failure. Verify the tag conditions in all applicable policies, and then retry the request.  
HTTP Status Code: 400

## See Also
<a name="API_TagResource_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/TagResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/TagResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/TagResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/TagResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/TagResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/TagResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/TagResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/TagResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/TagResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/TagResource) 

# UntagResource
<a name="API_UntagResource"></a>

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

 **Cross-account use:** No. You cannot perform this operation on an AWS CloudHSM resource in a different AWS account.

## Request Syntax
<a name="API_UntagResource_RequestSyntax"></a>

```
{
   "ResourceId": "string",
   "TagKeyList": [ "string" ]
}
```

## Request Parameters
<a name="API_UntagResource_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ResourceId](#API_UntagResource_RequestSyntax) **   <a name="CloudHSMV2-UntagResource-request-ResourceId"></a>
The cluster identifier (ID) for the cluster whose tags you are removing. To find the cluster ID, use [DescribeClusters](API_DescribeClusters.md).  
Type: String  
Pattern: `(?:cluster|backup)-[2-7a-zA-Z]{11,16}`   
Required: Yes

 ** [TagKeyList](#API_UntagResource_RequestSyntax) **   <a name="CloudHSMV2-UntagResource-request-TagKeyList"></a>
A list of one or more tag keys for the tags that you are removing. Specify only the tag keys, not the tag values.  
Type: Array of strings  
Array Members: Minimum number of 1 item. Maximum number of 50 items.  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$`   
Required: Yes

## Response Elements
<a name="API_UntagResource_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_UntagResource_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CloudHsmAccessDeniedException **   
The request was rejected because the requester does not have permission to perform the requested operation.  
HTTP Status Code: 400

 ** CloudHsmInternalFailureException **   
The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.  
HTTP Status Code: 500

 ** CloudHsmInvalidRequestException **   
The request was rejected because it is not a valid request.  
HTTP Status Code: 400

 ** CloudHsmResourceNotFoundException **   
The request was rejected because it refers to a resource that cannot be found.  
HTTP Status Code: 400

 ** CloudHsmServiceException **   
The request was rejected because an error occurred.  
HTTP Status Code: 400

 ** CloudHsmTagException **   
The request was rejected because of a tagging failure. Verify the tag conditions in all applicable policies, and then retry the request.  
HTTP Status Code: 400

## See Also
<a name="API_UntagResource_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cloudhsmv2-2017-04-28/UntagResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cloudhsmv2-2017-04-28/UntagResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cloudhsmv2-2017-04-28/UntagResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cloudhsmv2-2017-04-28/UntagResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cloudhsmv2-2017-04-28/UntagResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cloudhsmv2-2017-04-28/UntagResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cloudhsmv2-2017-04-28/UntagResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cloudhsmv2-2017-04-28/UntagResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cloudhsmv2-2017-04-28/UntagResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cloudhsmv2-2017-04-28/UntagResource) 