Skip to main content

backups

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

Overview

Namebackups
TypeResource
Idaws.cloudhsmv2.backups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
backup_arnstringThe Amazon Resource Name (ARN) of the backup. (pattern: <code>^(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}</code>)
backup_idstringThe identifier (ID) of the backup. (pattern: <code>backup-[2-7a-zA-Z]{11,16}</code>)
backup_statestringThe state of the backup. (CREATE_IN_PROGRESS, READY, DELETED, PENDING_DELETION)
cluster_idstringThe identifier (ID) of the cluster that was backed up. (pattern: <code>cluster-[2-7a-zA-Z]{11,16}</code>)
copy_timestampstring (date-time)The date and time when the backup was copied from a source backup.
create_timestampstring (date-time)The date and time when the backup was created.
delete_timestampstring (date-time)The date and time when the backup will be permanently deleted.
hsm_typestringThe HSM type used to create the backup. (pattern: <code>((p|)hsm[0-9][a-z.]*.[a-zA-Z]+)</code>)
modestringThe mode of the cluster that was backed up. (FIPS, NON_FIPS)
never_expiresbooleanSpecifies 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.
source_backupstringThe identifier (ID) of the source backup from which the new backup was copied. (pattern: <code>backup-[2-7a-zA-Z]{11,16}</code>)
source_clusterstringThe identifier (ID) of the cluster containing the source backup from which the new backup was copied. (pattern: <code>cluster-[2-7a-zA-Z]{11,16}</code>)
source_regionstringThe AWS Region that contains the source backup from which the new backup was copied. (pattern: <code>[a-z]{2}(-(gov))?-(east|west|north|south|central){1,2}-\d</code>)
tag_listarrayThe list of tags for the backup.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_backupsselectregionGets information about backups of 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 Amazon Web Services accounts that are shared with them.
modify_backup_attributesupdateregion, BackupId, NeverExpiresModifies attributes for CloudHSM backup. Cross-account use: No. You cannot perform this operation on an CloudHSM backup in a different Amazon Web Services account.
delete_backupdeleteregionDeletes a specified 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. Cross-account use: No. You cannot perform this operation on an CloudHSM backup in a different Amazon Web Services account.
copy_backup_to_regionexecregion, DestinationRegion, BackupIdCopy an CloudHSM cluster backup to a different region. Cross-account use: No. You cannot perform this operation on an CloudHSM backup in a different Amazon Web Services account.
restore_backupexecregion, BackupIdRestores a specified CloudHSM backup that is in the PENDING_DELETION state. For more information on deleting a backup, see DeleteBackup. Cross-account use: No. You cannot perform this operation on an CloudHSM backup 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 backups of 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 Amazon Web Services accounts that are shared with them.

SELECT
backup_arn,
backup_id,
backup_state,
cluster_id,
copy_timestamp,
create_timestamp,
delete_timestamp,
hsm_type,
mode,
never_expires,
source_backup,
source_cluster,
source_region,
tag_list
FROM aws.cloudhsmv2.backups
WHERE region = '{{ region }}' -- required
;

UPDATE examples

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

UPDATE aws.cloudhsmv2.backups
SET
BackupId = '{{ BackupId }}',
NeverExpires = {{ NeverExpires }}
WHERE
region = '{{ region }}' --required
AND BackupId = '{{ BackupId }}' --required
AND NeverExpires = {{ NeverExpires }} --required
RETURNING
backup;

DELETE examples

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

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

Lifecycle Methods

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

EXEC aws.cloudhsmv2.backups.copy_backup_to_region
@region='{{ region }}' --required
@@json=
'{
"DestinationRegion": "{{ DestinationRegion }}",
"BackupId": "{{ BackupId }}",
"TagList": "{{ TagList }}"
}'
;