AWS Backup

2020/11/18 - AWS Backup - 2 new 2 updated api methods

Changes  AWS Backup now supports cross-account backup, enabling AWS customers to securely copy their backups across their AWS accounts within their AWS organizations.

DescribeGlobalSettings (new) Link ¶

The current feature settings for the AWS Account.

See also: AWS API Documentation

Request Syntax

client.describe_global_settings()
rtype

dict

returns

Response Syntax

{
    'GlobalSettings': {
        'string': 'string'
    },
    'LastUpdateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • GlobalSettings (dict) --

      A list of resources along with the opt-in preferences for the account.

      • (string) --

        • (string) --

    • LastUpdateTime (datetime) --

      The date and time that the global settings was last updated. This update is in Unix format and Coordinated Universal Time (UTC). The value of LastUpdateTime is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.

UpdateGlobalSettings (new) Link ¶

Updates the current global settings for the AWS Account. Use the DescribeGlobalSettings API to determine the current settings.

See also: AWS API Documentation

Request Syntax

client.update_global_settings(
    GlobalSettings={
        'string': 'string'
    }
)
type GlobalSettings

dict

param GlobalSettings

A list of resources along with the opt-in preferences for the account.

  • (string) --

    • (string) --

returns

None

DescribeRecoveryPoint (updated) Link ¶
Changes (response)
{'SourceBackupVaultArn': 'string'}

Returns metadata associated with a recovery point, including ID, status, encryption, and lifecycle.

See also: AWS API Documentation

Request Syntax

client.describe_recovery_point(
    BackupVaultName='string',
    RecoveryPointArn='string'
)
type BackupVaultName

string

param BackupVaultName

[REQUIRED]

The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.

type RecoveryPointArn

string

param RecoveryPointArn

[REQUIRED]

An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45 .

rtype

dict

returns

Response Syntax

{
    'RecoveryPointArn': 'string',
    'BackupVaultName': 'string',
    'BackupVaultArn': 'string',
    'SourceBackupVaultArn': 'string',
    'ResourceArn': 'string',
    'ResourceType': 'string',
    'CreatedBy': {
        'BackupPlanId': 'string',
        'BackupPlanArn': 'string',
        'BackupPlanVersion': 'string',
        'BackupRuleId': 'string'
    },
    'IamRoleArn': 'string',
    'Status': 'COMPLETED'|'PARTIAL'|'DELETING'|'EXPIRED',
    'CreationDate': datetime(2015, 1, 1),
    'CompletionDate': datetime(2015, 1, 1),
    'BackupSizeInBytes': 123,
    'CalculatedLifecycle': {
        'MoveToColdStorageAt': datetime(2015, 1, 1),
        'DeleteAt': datetime(2015, 1, 1)
    },
    'Lifecycle': {
        'MoveToColdStorageAfterDays': 123,
        'DeleteAfterDays': 123
    },
    'EncryptionKeyArn': 'string',
    'IsEncrypted': True|False,
    'StorageClass': 'WARM'|'COLD'|'DELETED',
    'LastRestoreTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • RecoveryPointArn (string) --

      An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45 .

    • BackupVaultName (string) --

      The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Region where they are created. They consist of lowercase letters, numbers, and hyphens.

    • BackupVaultArn (string) --

      An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault .

    • SourceBackupVaultArn (string) --

      An Amazon Resource Name (ARN) that uniquely identifies the source vault where the resource was originally backed up in; for example, arn:aws:backup:us-east-1:123456789012:vault:BackupVault . If the recovery is restored to the same AWS account or Region, this value will be null .

    • ResourceArn (string) --

      An ARN that uniquely identifies a saved resource. The format of the ARN depends on the resource type.

    • ResourceType (string) --

      The type of AWS resource to save as a recovery point; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.

    • CreatedBy (dict) --

      Contains identifying information about the creation of a recovery point, including the BackupPlanArn , BackupPlanId , BackupPlanVersion , and BackupRuleId of the backup plan used to create it.

      • BackupPlanId (string) --

        Uniquely identifies a backup plan.

      • BackupPlanArn (string) --

        An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50 .

      • BackupPlanVersion (string) --

        Version IDs are unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. They cannot be edited.

      • BackupRuleId (string) --

        Uniquely identifies a rule used to schedule the backup of a selection of resources.

    • IamRoleArn (string) --

      Specifies the IAM role ARN used to create the target recovery point; for example, arn:aws:iam::123456789012:role/S3Access .

    • Status (string) --

      A status code specifying the state of the recovery point.

      Note

      A partial status indicates that the recovery point was not successfully re-created and must be retried.

    • CreationDate (datetime) --

      The date and time that a recovery point is created, in Unix format and Coordinated Universal Time (UTC). The value of CreationDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.

    • CompletionDate (datetime) --

      The date and time that a job to create a recovery point is completed, in Unix format and Coordinated Universal Time (UTC). The value of CompletionDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.

    • BackupSizeInBytes (integer) --

      The size, in bytes, of a backup.

    • CalculatedLifecycle (dict) --

      A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt timestamps.

      • MoveToColdStorageAt (datetime) --

        A timestamp that specifies when to transition a recovery point to cold storage.

      • DeleteAt (datetime) --

        A timestamp that specifies when to delete a recovery point.

    • Lifecycle (dict) --

      The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup transitions and expires backups automatically according to the lifecycle that you define.

      Backups that are transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.

      • MoveToColdStorageAfterDays (integer) --

        Specifies the number of days after creation that a recovery point is moved to cold storage.

      • DeleteAfterDays (integer) --

        Specifies the number of days after creation that a recovery point is deleted. Must be greater than 90 days plus MoveToColdStorageAfterDays .

    • EncryptionKeyArn (string) --

      The server-side encryption key used to protect your backups; for example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab .

    • IsEncrypted (boolean) --

      A Boolean value that is returned as TRUE if the specified recovery point is encrypted, or FALSE if the recovery point is not encrypted.

    • StorageClass (string) --

      Specifies the storage class of the recovery point. Valid values are WARM or COLD .

    • LastRestoreTime (datetime) --

      The date and time that a recovery point was last restored, in Unix format and Coordinated Universal Time (UTC). The value of LastRestoreTime is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.

ListRecoveryPointsByBackupVault (updated) Link ¶
Changes (response)
{'RecoveryPoints': {'SourceBackupVaultArn': 'string'}}

Returns detailed information about the recovery points stored in a backup vault.

See also: AWS API Documentation

Request Syntax

client.list_recovery_points_by_backup_vault(
    BackupVaultName='string',
    NextToken='string',
    MaxResults=123,
    ByResourceArn='string',
    ByResourceType='string',
    ByBackupPlanId='string',
    ByCreatedBefore=datetime(2015, 1, 1),
    ByCreatedAfter=datetime(2015, 1, 1)
)
type BackupVaultName

string

param BackupVaultName

[REQUIRED]

The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.

type NextToken

string

param NextToken

The next item following a partial list of returned items. For example, if a request is made to return maxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.

type MaxResults

integer

param MaxResults

The maximum number of items to be returned.

type ByResourceArn

string

param ByResourceArn

Returns only recovery points that match the specified resource Amazon Resource Name (ARN).

type ByResourceType

string

param ByResourceType

Returns only recovery points that match the specified resource type.

type ByBackupPlanId

string

param ByBackupPlanId

Returns only recovery points that match the specified backup plan ID.

type ByCreatedBefore

datetime

param ByCreatedBefore

Returns only recovery points that were created before the specified timestamp.

type ByCreatedAfter

datetime

param ByCreatedAfter

Returns only recovery points that were created after the specified timestamp.

rtype

dict

returns

Response Syntax

{
    'NextToken': 'string',
    'RecoveryPoints': [
        {
            'RecoveryPointArn': 'string',
            'BackupVaultName': 'string',
            'BackupVaultArn': 'string',
            'SourceBackupVaultArn': 'string',
            'ResourceArn': 'string',
            'ResourceType': 'string',
            'CreatedBy': {
                'BackupPlanId': 'string',
                'BackupPlanArn': 'string',
                'BackupPlanVersion': 'string',
                'BackupRuleId': 'string'
            },
            'IamRoleArn': 'string',
            'Status': 'COMPLETED'|'PARTIAL'|'DELETING'|'EXPIRED',
            'CreationDate': datetime(2015, 1, 1),
            'CompletionDate': datetime(2015, 1, 1),
            'BackupSizeInBytes': 123,
            'CalculatedLifecycle': {
                'MoveToColdStorageAt': datetime(2015, 1, 1),
                'DeleteAt': datetime(2015, 1, 1)
            },
            'Lifecycle': {
                'MoveToColdStorageAfterDays': 123,
                'DeleteAfterDays': 123
            },
            'EncryptionKeyArn': 'string',
            'IsEncrypted': True|False,
            'LastRestoreTime': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      The next item following a partial list of returned items. For example, if a request is made to return maxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.

    • RecoveryPoints (list) --

      An array of objects that contain detailed information about recovery points saved in a backup vault.

      • (dict) --

        Contains detailed information about the recovery points stored in a backup vault.

        • RecoveryPointArn (string) --

          An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45 .

        • BackupVaultName (string) --

          The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.

        • BackupVaultArn (string) --

          An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault .

        • SourceBackupVaultArn (string) --

          The backup vault where the recovery point was originally copied from. If the recovery point is restored to the same account this value will be null .

        • ResourceArn (string) --

          An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type.

        • ResourceType (string) --

          The type of AWS resource saved as a recovery point; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database. For VSS Windows backups, the only supported resource type is Amazon EC2.

        • CreatedBy (dict) --

          Contains identifying information about the creation of a recovery point, including the BackupPlanArn , BackupPlanId , BackupPlanVersion , and BackupRuleId of the backup plan that is used to create it.

          • BackupPlanId (string) --

            Uniquely identifies a backup plan.

          • BackupPlanArn (string) --

            An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50 .

          • BackupPlanVersion (string) --

            Version IDs are unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. They cannot be edited.

          • BackupRuleId (string) --

            Uniquely identifies a rule used to schedule the backup of a selection of resources.

        • IamRoleArn (string) --

          Specifies the IAM role ARN used to create the target recovery point; for example, arn:aws:iam::123456789012:role/S3Access .

        • Status (string) --

          A status code specifying the state of the recovery point.

        • CreationDate (datetime) --

          The date and time a recovery point is created, in Unix format and Coordinated Universal Time (UTC). The value of CreationDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.

        • CompletionDate (datetime) --

          The date and time a job to restore a recovery point is completed, in Unix format and Coordinated Universal Time (UTC). The value of CompletionDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.

        • BackupSizeInBytes (integer) --

          The size, in bytes, of a backup.

        • CalculatedLifecycle (dict) --

          A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt timestamps.

          • MoveToColdStorageAt (datetime) --

            A timestamp that specifies when to transition a recovery point to cold storage.

          • DeleteAt (datetime) --

            A timestamp that specifies when to delete a recovery point.

        • Lifecycle (dict) --

          The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup transitions and expires backups automatically according to the lifecycle that you define.

          Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.

          • MoveToColdStorageAfterDays (integer) --

            Specifies the number of days after creation that a recovery point is moved to cold storage.

          • DeleteAfterDays (integer) --

            Specifies the number of days after creation that a recovery point is deleted. Must be greater than 90 days plus MoveToColdStorageAfterDays .

        • EncryptionKeyArn (string) --

          The server-side encryption key that is used to protect your backups; for example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab .

        • IsEncrypted (boolean) --

          A Boolean value that is returned as TRUE if the specified recovery point is encrypted, or FALSE if the recovery point is not encrypted.

        • LastRestoreTime (datetime) --

          The date and time a recovery point was last restored, in Unix format and Coordinated Universal Time (UTC). The value of LastRestoreTime is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.