backups
Creates, updates, deletes, gets or lists a backups resource.
Overview
| Name | backups |
| Type | Resource |
| Id | aws.cloudhsmv2.backups |
Fields
The following fields are returned by SELECT queries:
- describe_backups
| Name | Datatype | Description |
|---|---|---|
backup_arn | string | The 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_id | string | The identifier (ID) of the backup. (pattern: <code>backup-[2-7a-zA-Z]{11,16}</code>) |
backup_state | string | The state of the backup. (CREATE_IN_PROGRESS, READY, DELETED, PENDING_DELETION) |
cluster_id | string | The identifier (ID) of the cluster that was backed up. (pattern: <code>cluster-[2-7a-zA-Z]{11,16}</code>) |
copy_timestamp | string (date-time) | The date and time when the backup was copied from a source backup. |
create_timestamp | string (date-time) | The date and time when the backup was created. |
delete_timestamp | string (date-time) | The date and time when the backup will be permanently deleted. |
hsm_type | string | The HSM type used to create the backup. (pattern: <code>((p|)hsm[0-9][a-z.]*.[a-zA-Z]+)</code>) |
mode | string | The mode of the cluster that was backed up. (FIPS, NON_FIPS) |
never_expires | boolean | 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. |
source_backup | string | The identifier (ID) of the source backup from which the new backup was copied. (pattern: <code>backup-[2-7a-zA-Z]{11,16}</code>) |
source_cluster | string | The 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_region | string | The 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_list | array | The list of tags for the backup. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_backups | select | region | 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. | |
modify_backup_attributes | update | region, BackupId, NeverExpires | 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. | |
delete_backup | delete | region | 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. | |
copy_backup_to_region | exec | region, DestinationRegion, BackupId | 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. | |
restore_backup | exec | region, BackupId | Restores 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_backups
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
- modify_backup_attributes
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
- delete_backup
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_backup_to_region
- restore_backup
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 }}"
}'
;
Restores 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.
EXEC aws.cloudhsmv2.backups.restore_backup
@region='{{ region }}' --required
@@json=
'{
"BackupId": "{{ BackupId }}"
}'
;