Skip to main content

clusters

Creates, updates, deletes, gets or lists a clusters resource.

Overview

Nameclusters
TypeResource
Idaws.cloudhsmv2.clusters

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
backup_policystringThe cluster's backup policy. (DEFAULT)
backup_retention_policyobjectA policy that defines how the service retains backups.
certificatesobjectContains one or more certificates or a certificate signing request (CSR).
cluster_idstringThe cluster's identifier (ID). (pattern: <code>cluster-[2-7a-zA-Z]{11,16}</code>)
create_timestampstring (date-time)The date and time when the cluster was created.
hsm_typestringThe type of HSM that the cluster contains. (pattern: <code>((p|)hsm[0-9][a-z.]*.[a-zA-Z]+)</code>)
hsm_type_rollback_expirationstring (date-time)The timestamp until when the cluster can be rolled back to its original HSM type.
hsmsarrayContains information about the HSMs in the cluster.
modestringThe mode of the cluster. (FIPS, NON_FIPS)
network_typestringThe cluster's NetworkType can be IPv4 (the default) or DUALSTACK. The IPv4 NetworkType restricts communication between your application and the hardware security modules (HSMs) to the IPv4 protocol only. The DUALSTACK NetworkType enables communication over both IPv4 and IPv6 protocols. To use DUALSTACK, configure your virtual private cloud (VPC) and subnets to support both IPv4 and IPv6. This configuration involves adding IPv6 Classless Inter-Domain Routing (CIDR) blocks to the existing IPv4 CIDR blocks in your subnets. The NetworkType you choose affects the network addressing options for your cluster. DUALSTACK provides more flexibility by supporting both IPv4 and IPv6 communication. (IPV4, DUALSTACK)
pre_co_passwordstringThe default password for the cluster's Pre-Crypto Officer (PRECO) user.
security_groupstringThe identifier (ID) of the cluster's security group. (pattern: <code>sg-[0-9a-fA-F]{8,17}</code>)
source_backup_idstringThe identifier (ID) of the backup used to create the cluster. This value exists only when the cluster was created from a backup. (pattern: <code>backup-[2-7a-zA-Z]{11,16}</code>)
statestringThe cluster's state. (CREATE_IN_PROGRESS, UNINITIALIZED, INITIALIZE_IN_PROGRESS, INITIALIZED, ACTIVE, UPDATE_IN_PROGRESS, MODIFY_IN_PROGRESS, ROLLBACK_IN_PROGRESS, DELETE_IN_PROGRESS, DELETED, DEGRADED)
state_messagestringA description of the cluster's state. (pattern: <code>.*</code>)
subnet_mappingobjectA map from availability zone to the cluster’s subnet in that availability zone.
tag_listarrayThe list of tags for the cluster.
vpc_idstringThe identifier (ID) of the virtual private cloud (VPC) that contains the cluster. (pattern: <code>vpc-[0-9a-fA-F]</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_clustersselectregionGets information about 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 CloudHSM clusters in a different Amazon Web Services account.
create_clusterinsertregion, HsmType, SubnetIdsCreates a new CloudHSM cluster. Cross-account use: Yes. To perform this operation with an CloudHSM backup in a different AWS account, specify the full backup ARN in the value of the SourceBackupId parameter.
create_hsminsertregion, ClusterId, AvailabilityZoneCreates a new hardware security module (HSM) in the specified CloudHSM cluster. Cross-account use: No. You cannot perform this operation on an CloudHSM cluster in a different Amazon Web Service account.
modify_clusterupdateregion, ClusterIdModifies CloudHSM cluster. Cross-account use: No. You cannot perform this operation on an CloudHSM cluster in a different Amazon Web Services account.
delete_clusterdeleteregionDeletes the specified 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. To delete an HSM, use DeleteHsm. Cross-account use: No. You cannot perform this operation on an CloudHSM cluster in a different Amazon Web Services account.
delete_hsmexecregion, ClusterIdDeletes 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. Cross-account use: No. You cannot perform this operation on an CloudHSM hsm in a different Amazon Web Services account.
initialize_clusterexecregion, ClusterId, SignedCert, TrustAnchorClaims an 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. Cross-account use: No. You cannot perform this operation on an CloudHSM cluster in a different Amazon Web Services account.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Gets information about 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 CloudHSM clusters in a different Amazon Web Services account.

SELECT
backup_policy,
backup_retention_policy,
certificates,
cluster_id,
create_timestamp,
hsm_type,
hsm_type_rollback_expiration,
hsms,
mode,
network_type,
pre_co_password,
security_group,
source_backup_id,
state,
state_message,
subnet_mapping,
tag_list,
vpc_id
FROM aws.cloudhsmv2.clusters
WHERE region = '{{ region }}' -- required
;

INSERT examples

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

INSERT INTO aws.cloudhsmv2.clusters (
BackupRetentionPolicy,
HsmType,
SourceBackupId,
SubnetIds,
NetworkType,
TagList,
Mode,
region
)
SELECT
'{{ BackupRetentionPolicy }}',
'{{ HsmType }}' /* required */,
'{{ SourceBackupId }}',
'{{ SubnetIds }}' /* required */,
'{{ NetworkType }}',
'{{ TagList }}',
'{{ Mode }}',
'{{ region }}'
RETURNING
cluster
;

UPDATE examples

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

UPDATE aws.cloudhsmv2.clusters
SET
HsmType = '{{ HsmType }}',
BackupRetentionPolicy = '{{ BackupRetentionPolicy }}',
ClusterId = '{{ ClusterId }}'
WHERE
region = '{{ region }}' --required
AND ClusterId = '{{ ClusterId }}' --required
RETURNING
cluster;

DELETE examples

Deletes the specified 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. To delete an HSM, use DeleteHsm. Cross-account use: No. You cannot perform this operation on an CloudHSM cluster in a different Amazon Web Services account.

DELETE FROM aws.cloudhsmv2.clusters
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

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. Cross-account use: No. You cannot perform this operation on an CloudHSM hsm in a different Amazon Web Services account.

EXEC aws.cloudhsmv2.clusters.delete_hsm
@region='{{ region }}' --required
@@json=
'{
"ClusterId": "{{ ClusterId }}",
"HsmId": "{{ HsmId }}",
"EniId": "{{ EniId }}",
"EniIp": "{{ EniIp }}"
}'
;