AWS CloudHSM V2

2018/09/10 - AWS CloudHSM V2 - 2 new 1 updated api methods

Changes  With this release, we are adding 2 new APIs. DeleteBackup deletes a specified AWS CloudHSM backup. A backup can be restored up to 7 days after the DeleteBackup request. During this 7-day period, the backup will be in state PENDING_DELETION. Backups can be restored using the RestoreBackup API, which will move the backup from state PENDING_DELETION back to ACTIVE.

RestoreBackup (new) Link ¶

Restores a specified AWS CloudHSM backup that is in the PENDING_DELETION state. For more information on deleting a backup, see DeleteBackup .

See also: AWS API Documentation

Request Syntax

client.restore_backup(
    BackupId='string'
)
type BackupId

string

param BackupId

[REQUIRED]

The ID of the backup to be restored. To find the ID of a backup, use the DescribeBackups operation.

rtype

dict

returns

Response Syntax

{
    'Backup': {
        'BackupId': 'string',
        'BackupState': 'CREATE_IN_PROGRESS'|'READY'|'DELETED'|'PENDING_DELETION',
        'ClusterId': 'string',
        'CreateTimestamp': datetime(2015, 1, 1),
        'CopyTimestamp': datetime(2015, 1, 1),
        'SourceRegion': 'string',
        'SourceBackup': 'string',
        'SourceCluster': 'string',
        'DeleteTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • Backup (dict) --

      Information on the Backup object created.

      • BackupId (string) --

        The identifier (ID) of the backup.

      • BackupState (string) --

        The state of the backup.

      • ClusterId (string) --

        The identifier (ID) of the cluster that was backed up.

      • CreateTimestamp (datetime) --

        The date and time when the backup was created.

      • CopyTimestamp (datetime) --

      • SourceRegion (string) --

      • SourceBackup (string) --

      • SourceCluster (string) --

      • DeleteTimestamp (datetime) --

        The date and time when the backup will be permanently deleted.

DeleteBackup (new) Link ¶

Deletes a specified AWS CloudHSM backup. A backup can be restored up to 7 days after the DeleteBackup request. For more information on restoring a backup, see RestoreBackup

See also: AWS API Documentation

Request Syntax

client.delete_backup(
    BackupId='string'
)
type BackupId

string

param BackupId

[REQUIRED]

The ID of the backup to be deleted. To find the ID of a backup, use the DescribeBackups operation.

rtype

dict

returns

Response Syntax

{
    'Backup': {
        'BackupId': 'string',
        'BackupState': 'CREATE_IN_PROGRESS'|'READY'|'DELETED'|'PENDING_DELETION',
        'ClusterId': 'string',
        'CreateTimestamp': datetime(2015, 1, 1),
        'CopyTimestamp': datetime(2015, 1, 1),
        'SourceRegion': 'string',
        'SourceBackup': 'string',
        'SourceCluster': 'string',
        'DeleteTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • Backup (dict) --

      Information on the Backup object deleted.

      • BackupId (string) --

        The identifier (ID) of the backup.

      • BackupState (string) --

        The state of the backup.

      • ClusterId (string) --

        The identifier (ID) of the cluster that was backed up.

      • CreateTimestamp (datetime) --

        The date and time when the backup was created.

      • CopyTimestamp (datetime) --

      • SourceRegion (string) --

      • SourceBackup (string) --

      • SourceCluster (string) --

      • DeleteTimestamp (datetime) --

        The date and time when the backup will be permanently deleted.

DescribeBackups (updated) Link ¶
Changes (response)
{'Backups': {'BackupState': ['PENDING_DELETION'],
             'DeleteTimestamp': 'timestamp'}}

Gets information about backups of AWS CloudHSM clusters.

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.

See also: AWS API Documentation

Request Syntax

client.describe_backups(
    NextToken='string',
    MaxResults=123,
    Filters={
        'string': [
            'string',
        ]
    },
    SortAscending=True|False
)
type NextToken

string

param NextToken

The NextToken value that you received in the previous response. Use this value to get more backups.

type MaxResults

integer

param MaxResults

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 Filters

dict

param Filters

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

  • (string) --

    • (list) --

      • (string) --

type SortAscending

boolean

param SortAscending

rtype

dict

returns

Response Syntax

{
    'Backups': [
        {
            'BackupId': 'string',
            'BackupState': 'CREATE_IN_PROGRESS'|'READY'|'DELETED'|'PENDING_DELETION',
            'ClusterId': 'string',
            'CreateTimestamp': datetime(2015, 1, 1),
            'CopyTimestamp': datetime(2015, 1, 1),
            'SourceRegion': 'string',
            'SourceBackup': 'string',
            'SourceCluster': 'string',
            'DeleteTimestamp': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Backups (list) --

      A list of backups.

      • (dict) --

        Contains information about a backup of an AWS CloudHSM cluster.

        • BackupId (string) --

          The identifier (ID) of the backup.

        • BackupState (string) --

          The state of the backup.

        • ClusterId (string) --

          The identifier (ID) of the cluster that was backed up.

        • CreateTimestamp (datetime) --

          The date and time when the backup was created.

        • CopyTimestamp (datetime) --

        • SourceRegion (string) --

        • SourceBackup (string) --

        • SourceCluster (string) --

        • DeleteTimestamp (datetime) --

          The date and time when the backup will be permanently deleted.

    • NextToken (string) --

      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.