AWS Backup

2020/09/23 - AWS Backup - 10 updated api methods

Changes  Update backup client to latest version

CreateBackupPlan (updated) Link ¶
Changes (request, response)
Request
{'BackupPlan': {'AdvancedBackupSettings': [{'BackupOptions': {'string': 'string'},
                                            'ResourceType': 'string'}]}}
Response
{'AdvancedBackupSettings': [{'BackupOptions': {'string': 'string'},
                             'ResourceType': 'string'}]}

Creates a backup plan using a backup plan name and backup rules. A backup plan is a document that contains information that AWS Backup uses to schedule tasks that create recovery points for resources.

If you call CreateBackupPlan with a plan that already exists, an AlreadyExistsException is returned.

See also: AWS API Documentation

Request Syntax

client.create_backup_plan(
    BackupPlan={
        'BackupPlanName': 'string',
        'Rules': [
            {
                'RuleName': 'string',
                'TargetBackupVaultName': 'string',
                'ScheduleExpression': 'string',
                'StartWindowMinutes': 123,
                'CompletionWindowMinutes': 123,
                'Lifecycle': {
                    'MoveToColdStorageAfterDays': 123,
                    'DeleteAfterDays': 123
                },
                'RecoveryPointTags': {
                    'string': 'string'
                },
                'CopyActions': [
                    {
                        'Lifecycle': {
                            'MoveToColdStorageAfterDays': 123,
                            'DeleteAfterDays': 123
                        },
                        'DestinationBackupVaultArn': 'string'
                    },
                ]
            },
        ],
        'AdvancedBackupSettings': [
            {
                'ResourceType': 'string',
                'BackupOptions': {
                    'string': 'string'
                }
            },
        ]
    },
    BackupPlanTags={
        'string': 'string'
    },
    CreatorRequestId='string'
)
type BackupPlan:

dict

param BackupPlan:

[REQUIRED]

Specifies the body of a backup plan. Includes a BackupPlanName and one or more sets of Rules.

  • BackupPlanName (string) -- [REQUIRED]

    The optional display name of a backup plan.

  • Rules (list) -- [REQUIRED]

    An array of BackupRule objects, each of which specifies a scheduled task that is used to back up a selection of resources.

    • (dict) --

      Specifies a scheduled task used to back up a selection of resources.

      • RuleName (string) -- [REQUIRED]

        An optional display name for a backup rule.

      • TargetBackupVaultName (string) -- [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.

      • ScheduleExpression (string) --

        A CRON expression specifying when AWS Backup initiates a backup job.

      • StartWindowMinutes (integer) --

        A value in minutes after a backup is scheduled before a job will be canceled if it doesn't start successfully. This value is optional.

      • CompletionWindowMinutes (integer) --

        A value in minutes after a backup job is successfully started before it must be completed or it will be canceled by AWS Backup. This value is optional.

      • Lifecycle (dict) --

        The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup will transition and expire 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.

      • RecoveryPointTags (dict) --

        To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a key-value pair.

        • (string) --

          • (string) --

      • CopyActions (list) --

        An array of CopyAction objects, which contains the details of the copy operation.

        • (dict) --

          The details of the copy operation.

          • Lifecycle (dict) --

            Contains an array of Transition objects specifying how long in days before a recovery point transitions to cold storage or is deleted.

            Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, on the console, 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.

          • DestinationBackupVaultArn (string) -- [REQUIRED]

            An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup. For example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.

  • AdvancedBackupSettings (list) --

    Specifies a list of BackupOptions for each resource type. These settings are only available for Windows VSS backup jobs.

    • (dict) --

      A list of backup options for each resource type.

      • ResourceType (string) --

        The type of AWS resource to be backed up. For VSS Windows backups, the only supported resource type is Amazon EC2.

        Valid values: EC2.

      • BackupOptions (dict) --

        Specifies the backup option for a selected resource. This option is only available for Windows VSS backup jobs.

        Valid value: "WindowsVSS”:“enabled". If enabled, creates a VSS Windows backup; otherwise, creates a regular backup.

        If you specify an invalid option, you get an InvalidParameterValueException exception.

        For more information about Windows VSS backups, see Creating a VSS-Enabled Windows Backup.

        • (string) --

          • (string) --

type BackupPlanTags:

dict

param BackupPlanTags:

To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a key-value pair. The specified tags are assigned to all backups created with this plan.

  • (string) --

    • (string) --

type CreatorRequestId:

string

param CreatorRequestId:

Identifies the request and allows failed requests to be retried without the risk of running the operation twice. If the request includes a CreatorRequestId that matches an existing backup plan, that plan is returned. This parameter is optional.

rtype:

dict

returns:

Response Syntax

{
    'BackupPlanId': 'string',
    'BackupPlanArn': 'string',
    'CreationDate': datetime(2015, 1, 1),
    'VersionId': 'string',
    'AdvancedBackupSettings': [
        {
            'ResourceType': 'string',
            'BackupOptions': {
                'string': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

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

    • CreationDate (datetime) --

      The date and time that a backup plan 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.

    • VersionId (string) --

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

    • AdvancedBackupSettings (list) --

      A list of BackupOptions settings for a resource type. This option is only available for Windows VSS backup jobs.

      • (dict) --

        A list of backup options for each resource type.

        • ResourceType (string) --

          The type of AWS resource to be backed up. For VSS Windows backups, the only supported resource type is Amazon EC2.

          Valid values: EC2.

        • BackupOptions (dict) --

          Specifies the backup option for a selected resource. This option is only available for Windows VSS backup jobs.

          Valid value: "WindowsVSS”:“enabled". If enabled, creates a VSS Windows backup; otherwise, creates a regular backup.

          If you specify an invalid option, you get an InvalidParameterValueException exception.

          For more information about Windows VSS backups, see Creating a VSS-Enabled Windows Backup.

          • (string) --

            • (string) --

DescribeBackupJob (updated) Link ¶
Changes (response)
{'BackupOptions': {'string': 'string'}, 'BackupType': 'string'}

Returns backup job details for the specified BackupJobId.

See also: AWS API Documentation

Request Syntax

client.describe_backup_job(
    BackupJobId='string'
)
type BackupJobId:

string

param BackupJobId:

[REQUIRED]

Uniquely identifies a request to AWS Backup to back up a resource.

rtype:

dict

returns:

Response Syntax

{
    'AccountId': 'string',
    'BackupJobId': 'string',
    'BackupVaultName': 'string',
    'BackupVaultArn': 'string',
    'RecoveryPointArn': 'string',
    'ResourceArn': 'string',
    'CreationDate': datetime(2015, 1, 1),
    'CompletionDate': datetime(2015, 1, 1),
    'State': 'CREATED'|'PENDING'|'RUNNING'|'ABORTING'|'ABORTED'|'COMPLETED'|'FAILED'|'EXPIRED',
    'StatusMessage': 'string',
    'PercentDone': 'string',
    'BackupSizeInBytes': 123,
    'IamRoleArn': 'string',
    'CreatedBy': {
        'BackupPlanId': 'string',
        'BackupPlanArn': 'string',
        'BackupPlanVersion': 'string',
        'BackupRuleId': 'string'
    },
    'ResourceType': 'string',
    'BytesTransferred': 123,
    'ExpectedCompletionDate': datetime(2015, 1, 1),
    'StartBy': datetime(2015, 1, 1),
    'BackupOptions': {
        'string': 'string'
    },
    'BackupType': 'string'
}

Response Structure

  • (dict) --

    • AccountId (string) --

      Returns the account ID that owns the backup job.

    • BackupJobId (string) --

      Uniquely identifies a request to AWS Backup to back up a resource.

    • 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 Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.

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

    • ResourceArn (string) --

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

    • CreationDate (datetime) --

      The date and time that a backup job 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 backup job 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.

    • State (string) --

      The current state of a resource recovery point.

    • StatusMessage (string) --

      A detailed message explaining the status of the job to back up a resource.

    • PercentDone (string) --

      Contains an estimated percentage that is complete of a job at the time the job status was queried.

    • BackupSizeInBytes (integer) --

      The size, in bytes, of a backup.

    • IamRoleArn (string) --

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

    • CreatedBy (dict) --

      Contains identifying information about the creation of a backup job, 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.

    • ResourceType (string) --

      The type of AWS resource to be backed up; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.

    • BytesTransferred (integer) --

      The size in bytes transferred to a backup vault at the time that the job status was queried.

    • ExpectedCompletionDate (datetime) --

      The date and time that a job to back up resources is expected to be completed, in Unix format and Coordinated Universal Time (UTC). The value of ExpectedCompletionDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.

    • StartBy (datetime) --

      Specifies the time in Unix format and Coordinated Universal Time (UTC) when a backup job must be started before it is canceled. The value is calculated by adding the start window to the scheduled time. So if the scheduled time were 6:00 PM and the start window is 2 hours, the StartBy time would be 8:00 PM on the date specified. The value of StartBy is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.

    • BackupOptions (dict) --

      Represents the options specified as part of backup plan or on-demand backup job.

      • (string) --

        • (string) --

    • BackupType (string) --

      Represents the actual backup type selected for a backup job. For example, if a successful WindowsVSS backup was taken, BackupType returns “WindowsVSS”. If BackupType is empty, then it is a regular backup.

GetBackupPlan (updated) Link ¶
Changes (response)
{'AdvancedBackupSettings': [{'BackupOptions': {'string': 'string'},
                             'ResourceType': 'string'}],
 'BackupPlan': {'AdvancedBackupSettings': [{'BackupOptions': {'string': 'string'},
                                            'ResourceType': 'string'}]}}

Returns BackupPlan details for the specified BackupPlanId. Returns the body of a backup plan in JSON format, in addition to plan metadata.

See also: AWS API Documentation

Request Syntax

client.get_backup_plan(
    BackupPlanId='string',
    VersionId='string'
)
type BackupPlanId:

string

param BackupPlanId:

[REQUIRED]

Uniquely identifies a backup plan.

type VersionId:

string

param VersionId:

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

rtype:

dict

returns:

Response Syntax

{
    'BackupPlan': {
        'BackupPlanName': 'string',
        'Rules': [
            {
                'RuleName': 'string',
                'TargetBackupVaultName': 'string',
                'ScheduleExpression': 'string',
                'StartWindowMinutes': 123,
                'CompletionWindowMinutes': 123,
                'Lifecycle': {
                    'MoveToColdStorageAfterDays': 123,
                    'DeleteAfterDays': 123
                },
                'RecoveryPointTags': {
                    'string': 'string'
                },
                'RuleId': 'string',
                'CopyActions': [
                    {
                        'Lifecycle': {
                            'MoveToColdStorageAfterDays': 123,
                            'DeleteAfterDays': 123
                        },
                        'DestinationBackupVaultArn': 'string'
                    },
                ]
            },
        ],
        'AdvancedBackupSettings': [
            {
                'ResourceType': 'string',
                'BackupOptions': {
                    'string': 'string'
                }
            },
        ]
    },
    'BackupPlanId': 'string',
    'BackupPlanArn': 'string',
    'VersionId': 'string',
    'CreatorRequestId': 'string',
    'CreationDate': datetime(2015, 1, 1),
    'DeletionDate': datetime(2015, 1, 1),
    'LastExecutionDate': datetime(2015, 1, 1),
    'AdvancedBackupSettings': [
        {
            'ResourceType': 'string',
            'BackupOptions': {
                'string': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • BackupPlan (dict) --

      Specifies the body of a backup plan. Includes a BackupPlanName and one or more sets of Rules.

      • BackupPlanName (string) --

        The display name of a backup plan.

      • Rules (list) --

        An array of BackupRule objects, each of which specifies a scheduled task that is used to back up a selection of resources.

        • (dict) --

          Specifies a scheduled task used to back up a selection of resources.

          • RuleName (string) --

            An optional display name for a backup rule.

          • TargetBackupVaultName (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.

          • ScheduleExpression (string) --

            A CRON expression specifying when AWS Backup initiates a backup job.

          • StartWindowMinutes (integer) --

            A value in minutes after a backup is scheduled before a job will be canceled if it doesn't start successfully. This value is optional.

          • CompletionWindowMinutes (integer) --

            A value in minutes after a backup job is successfully started before it must be completed or it will be canceled by AWS Backup. This value is optional.

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

          • RecoveryPointTags (dict) --

            An array of key-value pair strings that are assigned to resources that are associated with this rule when restored from backup.

            • (string) --

              • (string) --

          • RuleId (string) --

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

          • CopyActions (list) --

            An array of CopyAction objects, which contains the details of the copy operation.

            • (dict) --

              The details of the copy operation.

              • Lifecycle (dict) --

                Contains an array of Transition objects specifying how long in days before a recovery point transitions to cold storage or is deleted.

                Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, on the console, 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.

              • DestinationBackupVaultArn (string) --

                An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup. For example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.

      • AdvancedBackupSettings (list) --

        Contains a list of BackupOptions for each resource type.

        • (dict) --

          A list of backup options for each resource type.

          • ResourceType (string) --

            The type of AWS resource to be backed up. For VSS Windows backups, the only supported resource type is Amazon EC2.

            Valid values: EC2.

          • BackupOptions (dict) --

            Specifies the backup option for a selected resource. This option is only available for Windows VSS backup jobs.

            Valid value: "WindowsVSS”:“enabled". If enabled, creates a VSS Windows backup; otherwise, creates a regular backup.

            If you specify an invalid option, you get an InvalidParameterValueException exception.

            For more information about Windows VSS backups, see Creating a VSS-Enabled Windows Backup.

            • (string) --

              • (string) --

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

    • VersionId (string) --

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

    • CreatorRequestId (string) --

      A unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice.

    • CreationDate (datetime) --

      The date and time that a backup plan 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.

    • DeletionDate (datetime) --

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

    • LastExecutionDate (datetime) --

      The last time a job to back up resources was run with this backup plan. A date and time, in Unix format and Coordinated Universal Time (UTC). The value of LastExecutionDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.

    • AdvancedBackupSettings (list) --

      Contains a list of BackupOptions for each resource type. The list is populated only if the advanced option is set for the backup plan.

      • (dict) --

        A list of backup options for each resource type.

        • ResourceType (string) --

          The type of AWS resource to be backed up. For VSS Windows backups, the only supported resource type is Amazon EC2.

          Valid values: EC2.

        • BackupOptions (dict) --

          Specifies the backup option for a selected resource. This option is only available for Windows VSS backup jobs.

          Valid value: "WindowsVSS”:“enabled". If enabled, creates a VSS Windows backup; otherwise, creates a regular backup.

          If you specify an invalid option, you get an InvalidParameterValueException exception.

          For more information about Windows VSS backups, see Creating a VSS-Enabled Windows Backup.

          • (string) --

            • (string) --

GetBackupPlanFromJSON (updated) Link ¶
Changes (response)
{'BackupPlan': {'AdvancedBackupSettings': [{'BackupOptions': {'string': 'string'},
                                            'ResourceType': 'string'}]}}

Returns a valid JSON document specifying a backup plan or an error.

See also: AWS API Documentation

Request Syntax

client.get_backup_plan_from_json(
    BackupPlanTemplateJson='string'
)
type BackupPlanTemplateJson:

string

param BackupPlanTemplateJson:

[REQUIRED]

A customer-supplied backup plan document in JSON format.

rtype:

dict

returns:

Response Syntax

{
    'BackupPlan': {
        'BackupPlanName': 'string',
        'Rules': [
            {
                'RuleName': 'string',
                'TargetBackupVaultName': 'string',
                'ScheduleExpression': 'string',
                'StartWindowMinutes': 123,
                'CompletionWindowMinutes': 123,
                'Lifecycle': {
                    'MoveToColdStorageAfterDays': 123,
                    'DeleteAfterDays': 123
                },
                'RecoveryPointTags': {
                    'string': 'string'
                },
                'RuleId': 'string',
                'CopyActions': [
                    {
                        'Lifecycle': {
                            'MoveToColdStorageAfterDays': 123,
                            'DeleteAfterDays': 123
                        },
                        'DestinationBackupVaultArn': 'string'
                    },
                ]
            },
        ],
        'AdvancedBackupSettings': [
            {
                'ResourceType': 'string',
                'BackupOptions': {
                    'string': 'string'
                }
            },
        ]
    }
}

Response Structure

  • (dict) --

    • BackupPlan (dict) --

      Specifies the body of a backup plan. Includes a BackupPlanName and one or more sets of Rules.

      • BackupPlanName (string) --

        The display name of a backup plan.

      • Rules (list) --

        An array of BackupRule objects, each of which specifies a scheduled task that is used to back up a selection of resources.

        • (dict) --

          Specifies a scheduled task used to back up a selection of resources.

          • RuleName (string) --

            An optional display name for a backup rule.

          • TargetBackupVaultName (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.

          • ScheduleExpression (string) --

            A CRON expression specifying when AWS Backup initiates a backup job.

          • StartWindowMinutes (integer) --

            A value in minutes after a backup is scheduled before a job will be canceled if it doesn't start successfully. This value is optional.

          • CompletionWindowMinutes (integer) --

            A value in minutes after a backup job is successfully started before it must be completed or it will be canceled by AWS Backup. This value is optional.

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

          • RecoveryPointTags (dict) --

            An array of key-value pair strings that are assigned to resources that are associated with this rule when restored from backup.

            • (string) --

              • (string) --

          • RuleId (string) --

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

          • CopyActions (list) --

            An array of CopyAction objects, which contains the details of the copy operation.

            • (dict) --

              The details of the copy operation.

              • Lifecycle (dict) --

                Contains an array of Transition objects specifying how long in days before a recovery point transitions to cold storage or is deleted.

                Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, on the console, 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.

              • DestinationBackupVaultArn (string) --

                An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup. For example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.

      • AdvancedBackupSettings (list) --

        Contains a list of BackupOptions for each resource type.

        • (dict) --

          A list of backup options for each resource type.

          • ResourceType (string) --

            The type of AWS resource to be backed up. For VSS Windows backups, the only supported resource type is Amazon EC2.

            Valid values: EC2.

          • BackupOptions (dict) --

            Specifies the backup option for a selected resource. This option is only available for Windows VSS backup jobs.

            Valid value: "WindowsVSS”:“enabled". If enabled, creates a VSS Windows backup; otherwise, creates a regular backup.

            If you specify an invalid option, you get an InvalidParameterValueException exception.

            For more information about Windows VSS backups, see Creating a VSS-Enabled Windows Backup.

            • (string) --

              • (string) --

GetBackupPlanFromTemplate (updated) Link ¶
Changes (response)
{'BackupPlanDocument': {'AdvancedBackupSettings': [{'BackupOptions': {'string': 'string'},
                                                    'ResourceType': 'string'}]}}

Returns the template specified by its templateId as a backup plan.

See also: AWS API Documentation

Request Syntax

client.get_backup_plan_from_template(
    BackupPlanTemplateId='string'
)
type BackupPlanTemplateId:

string

param BackupPlanTemplateId:

[REQUIRED]

Uniquely identifies a stored backup plan template.

rtype:

dict

returns:

Response Syntax

{
    'BackupPlanDocument': {
        'BackupPlanName': 'string',
        'Rules': [
            {
                'RuleName': 'string',
                'TargetBackupVaultName': 'string',
                'ScheduleExpression': 'string',
                'StartWindowMinutes': 123,
                'CompletionWindowMinutes': 123,
                'Lifecycle': {
                    'MoveToColdStorageAfterDays': 123,
                    'DeleteAfterDays': 123
                },
                'RecoveryPointTags': {
                    'string': 'string'
                },
                'RuleId': 'string',
                'CopyActions': [
                    {
                        'Lifecycle': {
                            'MoveToColdStorageAfterDays': 123,
                            'DeleteAfterDays': 123
                        },
                        'DestinationBackupVaultArn': 'string'
                    },
                ]
            },
        ],
        'AdvancedBackupSettings': [
            {
                'ResourceType': 'string',
                'BackupOptions': {
                    'string': 'string'
                }
            },
        ]
    }
}

Response Structure

  • (dict) --

    • BackupPlanDocument (dict) --

      Returns the body of a backup plan based on the target template, including the name, rules, and backup vault of the plan.

      • BackupPlanName (string) --

        The display name of a backup plan.

      • Rules (list) --

        An array of BackupRule objects, each of which specifies a scheduled task that is used to back up a selection of resources.

        • (dict) --

          Specifies a scheduled task used to back up a selection of resources.

          • RuleName (string) --

            An optional display name for a backup rule.

          • TargetBackupVaultName (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.

          • ScheduleExpression (string) --

            A CRON expression specifying when AWS Backup initiates a backup job.

          • StartWindowMinutes (integer) --

            A value in minutes after a backup is scheduled before a job will be canceled if it doesn't start successfully. This value is optional.

          • CompletionWindowMinutes (integer) --

            A value in minutes after a backup job is successfully started before it must be completed or it will be canceled by AWS Backup. This value is optional.

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

          • RecoveryPointTags (dict) --

            An array of key-value pair strings that are assigned to resources that are associated with this rule when restored from backup.

            • (string) --

              • (string) --

          • RuleId (string) --

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

          • CopyActions (list) --

            An array of CopyAction objects, which contains the details of the copy operation.

            • (dict) --

              The details of the copy operation.

              • Lifecycle (dict) --

                Contains an array of Transition objects specifying how long in days before a recovery point transitions to cold storage or is deleted.

                Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, on the console, 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.

              • DestinationBackupVaultArn (string) --

                An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup. For example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.

      • AdvancedBackupSettings (list) --

        Contains a list of BackupOptions for each resource type.

        • (dict) --

          A list of backup options for each resource type.

          • ResourceType (string) --

            The type of AWS resource to be backed up. For VSS Windows backups, the only supported resource type is Amazon EC2.

            Valid values: EC2.

          • BackupOptions (dict) --

            Specifies the backup option for a selected resource. This option is only available for Windows VSS backup jobs.

            Valid value: "WindowsVSS”:“enabled". If enabled, creates a VSS Windows backup; otherwise, creates a regular backup.

            If you specify an invalid option, you get an InvalidParameterValueException exception.

            For more information about Windows VSS backups, see Creating a VSS-Enabled Windows Backup.

            • (string) --

              • (string) --

ListBackupJobs (updated) Link ¶
Changes (response)
{'BackupJobs': {'BackupOptions': {'string': 'string'}, 'BackupType': 'string'}}

Returns a list of existing backup jobs for an authenticated account.

See also: AWS API Documentation

Request Syntax

client.list_backup_jobs(
    NextToken='string',
    MaxResults=123,
    ByResourceArn='string',
    ByState='CREATED'|'PENDING'|'RUNNING'|'ABORTING'|'ABORTED'|'COMPLETED'|'FAILED'|'EXPIRED',
    ByBackupVaultName='string',
    ByCreatedBefore=datetime(2015, 1, 1),
    ByCreatedAfter=datetime(2015, 1, 1),
    ByResourceType='string',
    ByAccountId='string'
)
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 backup jobs that match the specified resource Amazon Resource Name (ARN).

type ByState:

string

param ByState:

Returns only backup jobs that are in the specified state.

type ByBackupVaultName:

string

param ByBackupVaultName:

Returns only backup jobs that will be stored in the specified backup vault. 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 ByCreatedBefore:

datetime

param ByCreatedBefore:

Returns only backup jobs that were created before the specified date.

type ByCreatedAfter:

datetime

param ByCreatedAfter:

Returns only backup jobs that were created after the specified date.

type ByResourceType:

string

param ByResourceType:

Returns only backup jobs for the specified resources:

  • DynamoDB for Amazon DynamoDB

  • EBS for Amazon Elastic Block Store

  • EC2 for Amazon Elastic Compute Cloud

  • EFS for Amazon Elastic File System

  • RDS for Amazon Relational Database Service

  • Storage Gateway for AWS Storage Gateway

type ByAccountId:

string

param ByAccountId:

The account ID to list the jobs from. Returns only backup jobs associated with the specified account ID.

rtype:

dict

returns:

Response Syntax

{
    'BackupJobs': [
        {
            'AccountId': 'string',
            'BackupJobId': 'string',
            'BackupVaultName': 'string',
            'BackupVaultArn': 'string',
            'RecoveryPointArn': 'string',
            'ResourceArn': 'string',
            'CreationDate': datetime(2015, 1, 1),
            'CompletionDate': datetime(2015, 1, 1),
            'State': 'CREATED'|'PENDING'|'RUNNING'|'ABORTING'|'ABORTED'|'COMPLETED'|'FAILED'|'EXPIRED',
            'StatusMessage': 'string',
            'PercentDone': 'string',
            'BackupSizeInBytes': 123,
            'IamRoleArn': 'string',
            'CreatedBy': {
                'BackupPlanId': 'string',
                'BackupPlanArn': 'string',
                'BackupPlanVersion': 'string',
                'BackupRuleId': 'string'
            },
            'ExpectedCompletionDate': datetime(2015, 1, 1),
            'StartBy': datetime(2015, 1, 1),
            'ResourceType': 'string',
            'BytesTransferred': 123,
            'BackupOptions': {
                'string': 'string'
            },
            'BackupType': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • BackupJobs (list) --

      An array of structures containing metadata about your backup jobs returned in JSON format.

      • (dict) --

        Contains detailed information about a backup job.

        • AccountId (string) --

          The account ID that owns the backup job.

        • BackupJobId (string) --

          Uniquely identifies a request to AWS Backup to back up a resource.

        • 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 Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.

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

        • ResourceArn (string) --

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

        • CreationDate (datetime) --

          The date and time a backup job 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 create a backup job 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.

        • State (string) --

          The current state of a resource recovery point.

        • StatusMessage (string) --

          A detailed message explaining the status of the job to back up a resource.

        • PercentDone (string) --

          Contains an estimated percentage complete of a job at the time the job status was queried.

        • BackupSizeInBytes (integer) --

          The size, in bytes, of a backup.

        • IamRoleArn (string) --

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

        • CreatedBy (dict) --

          Contains identifying information about the creation of a backup job, 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.

        • ExpectedCompletionDate (datetime) --

          The date and time a job to back up resources is expected to be completed, in Unix format and Coordinated Universal Time (UTC). The value of ExpectedCompletionDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.

        • StartBy (datetime) --

          Specifies the time in Unix format and Coordinated Universal Time (UTC) when a backup job must be started before it is canceled. The value is calculated by adding the start window to the scheduled time. So if the scheduled time were 6:00 PM and the start window is 2 hours, the StartBy time would be 8:00 PM on the date specified. The value of StartBy is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.

        • ResourceType (string) --

          The type of AWS resource to be backed up; 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.

        • BytesTransferred (integer) --

          The size in bytes transferred to a backup vault at the time that the job status was queried.

        • BackupOptions (dict) --

          Specifies the backup option for a selected resource. This option is only available for Windows VSS backup jobs.

          Valid value: "WindowsVSS”:“enabled". If enabled, creates a VSS Windows backup; otherwise, creates a regular backup. If you specify an invalid option, you get an InvalidParameterValueException exception.

          • (string) --

            • (string) --

        • BackupType (string) --

          Represents the type of backup for a backup job.

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

ListBackupPlanVersions (updated) Link ¶
Changes (response)
{'BackupPlanVersionsList': {'AdvancedBackupSettings': [{'BackupOptions': {'string': 'string'},
                                                        'ResourceType': 'string'}]}}

Returns version metadata of your backup plans, including Amazon Resource Names (ARNs), backup plan IDs, creation and deletion dates, plan names, and version IDs.

See also: AWS API Documentation

Request Syntax

client.list_backup_plan_versions(
    BackupPlanId='string',
    NextToken='string',
    MaxResults=123
)
type BackupPlanId:

string

param BackupPlanId:

[REQUIRED]

Uniquely identifies a backup plan.

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.

rtype:

dict

returns:

Response Syntax

{
    'NextToken': 'string',
    'BackupPlanVersionsList': [
        {
            'BackupPlanArn': 'string',
            'BackupPlanId': 'string',
            'CreationDate': datetime(2015, 1, 1),
            'DeletionDate': datetime(2015, 1, 1),
            'VersionId': 'string',
            'BackupPlanName': 'string',
            'CreatorRequestId': 'string',
            'LastExecutionDate': datetime(2015, 1, 1),
            'AdvancedBackupSettings': [
                {
                    'ResourceType': 'string',
                    'BackupOptions': {
                        'string': 'string'
                    }
                },
            ]
        },
    ]
}

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.

    • BackupPlanVersionsList (list) --

      An array of version list items containing metadata about your backup plans.

      • (dict) --

        Contains metadata about 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.

        • BackupPlanId (string) --

          Uniquely identifies a backup plan.

        • CreationDate (datetime) --

          The date and time a resource backup plan 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.

        • DeletionDate (datetime) --

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

        • VersionId (string) --

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

        • BackupPlanName (string) --

          The display name of a saved backup plan.

        • CreatorRequestId (string) --

          A unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice.

        • LastExecutionDate (datetime) --

          The last time a job to back up resources was run with this rule. A date and time, in Unix format and Coordinated Universal Time (UTC). The value of LastExecutionDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.

        • AdvancedBackupSettings (list) --

          Contains a list of BackupOptions for a resource type.

          • (dict) --

            A list of backup options for each resource type.

            • ResourceType (string) --

              The type of AWS resource to be backed up. For VSS Windows backups, the only supported resource type is Amazon EC2.

              Valid values: EC2.

            • BackupOptions (dict) --

              Specifies the backup option for a selected resource. This option is only available for Windows VSS backup jobs.

              Valid value: "WindowsVSS”:“enabled". If enabled, creates a VSS Windows backup; otherwise, creates a regular backup.

              If you specify an invalid option, you get an InvalidParameterValueException exception.

              For more information about Windows VSS backups, see Creating a VSS-Enabled Windows Backup.

              • (string) --

                • (string) --

ListBackupPlans (updated) Link ¶
Changes (response)
{'BackupPlansList': {'AdvancedBackupSettings': [{'BackupOptions': {'string': 'string'},
                                                 'ResourceType': 'string'}]}}

Returns a list of existing backup plans for an authenticated account. The list is populated only if the advanced option is set for the backup plan. The list contains information such as Amazon Resource Names (ARNs), plan IDs, creation and deletion dates, version IDs, plan names, and creator request IDs.

See also: AWS API Documentation

Request Syntax

client.list_backup_plans(
    NextToken='string',
    MaxResults=123,
    IncludeDeleted=True|False
)
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 IncludeDeleted:

boolean

param IncludeDeleted:

A Boolean value with a default value of FALSE that returns deleted backup plans when set to TRUE.

rtype:

dict

returns:

Response Syntax

{
    'NextToken': 'string',
    'BackupPlansList': [
        {
            'BackupPlanArn': 'string',
            'BackupPlanId': 'string',
            'CreationDate': datetime(2015, 1, 1),
            'DeletionDate': datetime(2015, 1, 1),
            'VersionId': 'string',
            'BackupPlanName': 'string',
            'CreatorRequestId': 'string',
            'LastExecutionDate': datetime(2015, 1, 1),
            'AdvancedBackupSettings': [
                {
                    'ResourceType': 'string',
                    'BackupOptions': {
                        'string': 'string'
                    }
                },
            ]
        },
    ]
}

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.

    • BackupPlansList (list) --

      An array of backup plan list items containing metadata about your saved backup plans.

      • (dict) --

        Contains metadata about 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.

        • BackupPlanId (string) --

          Uniquely identifies a backup plan.

        • CreationDate (datetime) --

          The date and time a resource backup plan 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.

        • DeletionDate (datetime) --

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

        • VersionId (string) --

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

        • BackupPlanName (string) --

          The display name of a saved backup plan.

        • CreatorRequestId (string) --

          A unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice.

        • LastExecutionDate (datetime) --

          The last time a job to back up resources was run with this rule. A date and time, in Unix format and Coordinated Universal Time (UTC). The value of LastExecutionDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.

        • AdvancedBackupSettings (list) --

          Contains a list of BackupOptions for a resource type.

          • (dict) --

            A list of backup options for each resource type.

            • ResourceType (string) --

              The type of AWS resource to be backed up. For VSS Windows backups, the only supported resource type is Amazon EC2.

              Valid values: EC2.

            • BackupOptions (dict) --

              Specifies the backup option for a selected resource. This option is only available for Windows VSS backup jobs.

              Valid value: "WindowsVSS”:“enabled". If enabled, creates a VSS Windows backup; otherwise, creates a regular backup.

              If you specify an invalid option, you get an InvalidParameterValueException exception.

              For more information about Windows VSS backups, see Creating a VSS-Enabled Windows Backup.

              • (string) --

                • (string) --

StartBackupJob (updated) Link ¶
Changes (request)
{'BackupOptions': {'string': 'string'}}

Starts an on-demand backup job for the specified resource.

See also: AWS API Documentation

Request Syntax

client.start_backup_job(
    BackupVaultName='string',
    ResourceArn='string',
    IamRoleArn='string',
    IdempotencyToken='string',
    StartWindowMinutes=123,
    CompleteWindowMinutes=123,
    Lifecycle={
        'MoveToColdStorageAfterDays': 123,
        'DeleteAfterDays': 123
    },
    RecoveryPointTags={
        'string': 'string'
    },
    BackupOptions={
        'string': '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 ResourceArn:

string

param ResourceArn:

[REQUIRED]

An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type.

type IamRoleArn:

string

param IamRoleArn:

[REQUIRED]

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

type IdempotencyToken:

string

param IdempotencyToken:

A customer chosen string that can be used to distinguish between calls to StartBackupJob.

type StartWindowMinutes:

integer

param StartWindowMinutes:

A value in minutes after a backup is scheduled before a job will be canceled if it doesn't start successfully. This value is optional.

type CompleteWindowMinutes:

integer

param CompleteWindowMinutes:

A value in minutes after a backup job is successfully started before it must be completed or it will be canceled by AWS Backup. This value is optional.

type Lifecycle:

dict

param Lifecycle:

The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup will transition and expire 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.

type RecoveryPointTags:

dict

param RecoveryPointTags:

To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a key-value pair.

  • (string) --

    • (string) --

type BackupOptions:

dict

param BackupOptions:

Specifies the backup option for a selected resource. This option is only available for Windows VSS backup jobs.

Valid value: "WindowsVSS”:“enabled". If enabled, creates a VSS Windows backup; otherwise, creates a regular backup.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'BackupJobId': 'string',
    'RecoveryPointArn': 'string',
    'CreationDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • BackupJobId (string) --

      Uniquely identifies a request to AWS Backup to back up a resource.

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

    • CreationDate (datetime) --

      The date and time that a backup job is started, 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.

UpdateBackupPlan (updated) Link ¶
Changes (request, response)
Request
{'BackupPlan': {'AdvancedBackupSettings': [{'BackupOptions': {'string': 'string'},
                                            'ResourceType': 'string'}]}}
Response
{'AdvancedBackupSettings': [{'BackupOptions': {'string': 'string'},
                             'ResourceType': 'string'}]}

Updates an existing backup plan identified by its backupPlanId with the input document in JSON format. The new version is uniquely identified by a VersionId.

See also: AWS API Documentation

Request Syntax

client.update_backup_plan(
    BackupPlanId='string',
    BackupPlan={
        'BackupPlanName': 'string',
        'Rules': [
            {
                'RuleName': 'string',
                'TargetBackupVaultName': 'string',
                'ScheduleExpression': 'string',
                'StartWindowMinutes': 123,
                'CompletionWindowMinutes': 123,
                'Lifecycle': {
                    'MoveToColdStorageAfterDays': 123,
                    'DeleteAfterDays': 123
                },
                'RecoveryPointTags': {
                    'string': 'string'
                },
                'CopyActions': [
                    {
                        'Lifecycle': {
                            'MoveToColdStorageAfterDays': 123,
                            'DeleteAfterDays': 123
                        },
                        'DestinationBackupVaultArn': 'string'
                    },
                ]
            },
        ],
        'AdvancedBackupSettings': [
            {
                'ResourceType': 'string',
                'BackupOptions': {
                    'string': 'string'
                }
            },
        ]
    }
)
type BackupPlanId:

string

param BackupPlanId:

[REQUIRED]

Uniquely identifies a backup plan.

type BackupPlan:

dict

param BackupPlan:

[REQUIRED]

Specifies the body of a backup plan. Includes a BackupPlanName and one or more sets of Rules.

  • BackupPlanName (string) -- [REQUIRED]

    The optional display name of a backup plan.

  • Rules (list) -- [REQUIRED]

    An array of BackupRule objects, each of which specifies a scheduled task that is used to back up a selection of resources.

    • (dict) --

      Specifies a scheduled task used to back up a selection of resources.

      • RuleName (string) -- [REQUIRED]

        An optional display name for a backup rule.

      • TargetBackupVaultName (string) -- [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.

      • ScheduleExpression (string) --

        A CRON expression specifying when AWS Backup initiates a backup job.

      • StartWindowMinutes (integer) --

        A value in minutes after a backup is scheduled before a job will be canceled if it doesn't start successfully. This value is optional.

      • CompletionWindowMinutes (integer) --

        A value in minutes after a backup job is successfully started before it must be completed or it will be canceled by AWS Backup. This value is optional.

      • Lifecycle (dict) --

        The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup will transition and expire 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.

      • RecoveryPointTags (dict) --

        To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a key-value pair.

        • (string) --

          • (string) --

      • CopyActions (list) --

        An array of CopyAction objects, which contains the details of the copy operation.

        • (dict) --

          The details of the copy operation.

          • Lifecycle (dict) --

            Contains an array of Transition objects specifying how long in days before a recovery point transitions to cold storage or is deleted.

            Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, on the console, 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.

          • DestinationBackupVaultArn (string) -- [REQUIRED]

            An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup. For example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.

  • AdvancedBackupSettings (list) --

    Specifies a list of BackupOptions for each resource type. These settings are only available for Windows VSS backup jobs.

    • (dict) --

      A list of backup options for each resource type.

      • ResourceType (string) --

        The type of AWS resource to be backed up. For VSS Windows backups, the only supported resource type is Amazon EC2.

        Valid values: EC2.

      • BackupOptions (dict) --

        Specifies the backup option for a selected resource. This option is only available for Windows VSS backup jobs.

        Valid value: "WindowsVSS”:“enabled". If enabled, creates a VSS Windows backup; otherwise, creates a regular backup.

        If you specify an invalid option, you get an InvalidParameterValueException exception.

        For more information about Windows VSS backups, see Creating a VSS-Enabled Windows Backup.

        • (string) --

          • (string) --

rtype:

dict

returns:

Response Syntax

{
    'BackupPlanId': 'string',
    'BackupPlanArn': 'string',
    'CreationDate': datetime(2015, 1, 1),
    'VersionId': 'string',
    'AdvancedBackupSettings': [
        {
            'ResourceType': 'string',
            'BackupOptions': {
                'string': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

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

    • CreationDate (datetime) --

      The date and time a backup plan is updated, 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.

    • VersionId (string) --

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

    • AdvancedBackupSettings (list) --

      Contains a list of BackupOptions for each resource type.

      • (dict) --

        A list of backup options for each resource type.

        • ResourceType (string) --

          The type of AWS resource to be backed up. For VSS Windows backups, the only supported resource type is Amazon EC2.

          Valid values: EC2.

        • BackupOptions (dict) --

          Specifies the backup option for a selected resource. This option is only available for Windows VSS backup jobs.

          Valid value: "WindowsVSS”:“enabled". If enabled, creates a VSS Windows backup; otherwise, creates a regular backup.

          If you specify an invalid option, you get an InvalidParameterValueException exception.

          For more information about Windows VSS backups, see Creating a VSS-Enabled Windows Backup.

          • (string) --

            • (string) --