AWS Backup

2024/12/17 - AWS Backup - 3 new9 updated api methods

Changes  Add Support for Backup Indexing

ListIndexedRecoveryPoints (new) Link ¶

This operation returns a list of recovery points that have an associated index, belonging to the specified account.

Optional parameters you can include are: MaxResults; NextToken; SourceResourceArns; CreatedBefore; CreatedAfter; and ResourceType.

See also: AWS API Documentation

Request Syntax

client.list_indexed_recovery_points(
    NextToken='string',
    MaxResults=123,
    SourceResourceArn='string',
    CreatedBefore=datetime(2015, 1, 1),
    CreatedAfter=datetime(2015, 1, 1),
    ResourceType='string',
    IndexStatus='PENDING'|'ACTIVE'|'FAILED'|'DELETING'
)
type NextToken:

string

param NextToken:

The next item following a partial list of returned recovery points.

For example, if a request is made to return MaxResults number of indexed recovery points, 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 resource list items to be returned.

type SourceResourceArn:

string

param SourceResourceArn:

A string of the Amazon Resource Name (ARN) that uniquely identifies the source resource.

type CreatedBefore:

datetime

param CreatedBefore:

Returns only indexed recovery points that were created before the specified date.

type CreatedAfter:

datetime

param CreatedAfter:

Returns only indexed recovery points that were created after the specified date.

type ResourceType:

string

param ResourceType:

Returns a list of indexed recovery points for the specified resource type(s).

Accepted values include:

  • EBS for Amazon Elastic Block Store

  • S3 for Amazon Simple Storage Service (Amazon S3)

type IndexStatus:

string

param IndexStatus:

Include this parameter to filter the returned list by the indicated statuses.

Accepted values: PENDING | ACTIVE | FAILED | DELETING

A recovery point with an index that has the status of ACTIVE can be included in a search.

rtype:

dict

returns:

Response Syntax

{
    'IndexedRecoveryPoints': [
        {
            'RecoveryPointArn': 'string',
            'SourceResourceArn': 'string',
            'IamRoleArn': 'string',
            'BackupCreationDate': datetime(2015, 1, 1),
            'ResourceType': 'string',
            'IndexCreationDate': datetime(2015, 1, 1),
            'IndexStatus': 'PENDING'|'ACTIVE'|'FAILED'|'DELETING',
            'IndexStatusMessage': 'string',
            'BackupVaultArn': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • IndexedRecoveryPoints (list) --

      This is a list of recovery points that have an associated index, belonging to the specified account.

      • (dict) --

        This is a recovery point that has an associated backup index.

        Only recovery points with a backup index can be included in a search.

        • 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

        • SourceResourceArn (string) --

          A string of the Amazon Resource Name (ARN) that uniquely identifies the source resource.

        • IamRoleArn (string) --

          This specifies the IAM role ARN used for this operation.

          For example, arn:aws:iam::123456789012:role/S3Access

        • BackupCreationDate (datetime) --

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

        • ResourceType (string) --

          The resource type of the indexed recovery point.

          • EBS for Amazon Elastic Block Store

          • S3 for Amazon Simple Storage Service (Amazon S3)

        • IndexCreationDate (datetime) --

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

        • IndexStatus (string) --

          This is the current status for the backup index associated with the specified recovery point.

          Statuses are: PENDING | ACTIVE | FAILED | DELETING

          A recovery point with an index that has the status of ACTIVE can be included in a search.

        • IndexStatusMessage (string) --

          A string in the form of a detailed message explaining the status of a backup index associated with the recovery point.

        • BackupVaultArn (string) --

          An ARN that uniquely identifies the backup vault where the recovery point index is stored.

          For example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault.

    • NextToken (string) --

      The next item following a partial list of returned recovery points.

      For example, if a request is made to return MaxResults number of indexed recovery points, NextToken allows you to return more items in your list starting at the location pointed to by the next token.

GetRecoveryPointIndexDetails (new) Link ¶

This operation returns the metadata and details specific to the backup index associated with the specified recovery point.

See also: AWS API Documentation

Request Syntax

client.get_recovery_point_index_details(
    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 Region where they are created.

Accepted characters include lowercase letters, numbers, and hyphens.

type RecoveryPointArn:

string

param RecoveryPointArn:

[REQUIRED]

An 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',
    'BackupVaultArn': 'string',
    'SourceResourceArn': 'string',
    'IndexCreationDate': datetime(2015, 1, 1),
    'IndexDeletionDate': datetime(2015, 1, 1),
    'IndexCompletionDate': datetime(2015, 1, 1),
    'IndexStatus': 'PENDING'|'ACTIVE'|'FAILED'|'DELETING',
    'IndexStatusMessage': 'string',
    'TotalItemsIndexed': 123
}

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.

    • BackupVaultArn (string) --

      An ARN that uniquely identifies the backup vault where the recovery point index is stored.

      For example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault.

    • SourceResourceArn (string) --

      A string of the Amazon Resource Name (ARN) that uniquely identifies the source resource.

    • IndexCreationDate (datetime) --

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

    • IndexDeletionDate (datetime) --

      The date and time that a backup index was deleted, 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.

    • IndexCompletionDate (datetime) --

      The date and time that a backup index finished creation, 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.

    • IndexStatus (string) --

      This is the current status for the backup index associated with the specified recovery point.

      Statuses are: PENDING | ACTIVE | FAILED | DELETING

      A recovery point with an index that has the status of ACTIVE can be included in a search.

    • IndexStatusMessage (string) --

      A detailed message explaining the status of a backup index associated with the recovery point.

    • TotalItemsIndexed (integer) --

      Count of items within the backup index associated with the recovery point.

UpdateRecoveryPointIndexSettings (new) Link ¶

This operation updates the settings of a recovery point index.

Required: BackupVaultName, RecoveryPointArn, and IAMRoleArn

See also: AWS API Documentation

Request Syntax

client.update_recovery_point_index_settings(
    BackupVaultName='string',
    RecoveryPointArn='string',
    IamRoleArn='string',
    Index='ENABLED'|'DISABLED'
)
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 Region where they are created.

Accepted characters include lowercase letters, numbers, and hyphens.

type RecoveryPointArn:

string

param RecoveryPointArn:

[REQUIRED]

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

type IamRoleArn:

string

param IamRoleArn:

This specifies the IAM role ARN used for this operation.

For example, arn:aws:iam::123456789012:role/S3Access

type Index:

string

param Index:

[REQUIRED]

Index can have 1 of 2 possible values, either ENABLED or DISABLED.

To create a backup index for an eligible ACTIVE recovery point that does not yet have a backup index, set value to ENABLED.

To delete a backup index, set value to DISABLED.

rtype:

dict

returns:

Response Syntax

{
    'BackupVaultName': 'string',
    'RecoveryPointArn': 'string',
    'IndexStatus': 'PENDING'|'ACTIVE'|'FAILED'|'DELETING',
    'Index': 'ENABLED'|'DISABLED'
}

Response Structure

  • (dict) --

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

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

    • IndexStatus (string) --

      This is the current status for the backup index associated with the specified recovery point.

      Statuses are: PENDING | ACTIVE | FAILED | DELETING

      A recovery point with an index that has the status of ACTIVE can be included in a search.

    • Index (string) --

      Index can have 1 of 2 possible values, either ENABLED or DISABLED.

      A value of ENABLED means a backup index for an eligible ACTIVE recovery point has been created.

      A value of DISABLED means a backup index was deleted.

CreateBackupPlan (updated) Link ¶
Changes (request)
{'BackupPlan': {'Rules': {'IndexActions': [{'ResourceTypes': ['string']}]}}}

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

If you call CreateBackupPlan with a plan that already exists, you receive an AlreadyExistsException exception.

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,
                    'OptInToArchiveForSupportedResources': True|False
                },
                'RecoveryPointTags': {
                    'string': 'string'
                },
                'CopyActions': [
                    {
                        'Lifecycle': {
                            'MoveToColdStorageAfterDays': 123,
                            'DeleteAfterDays': 123,
                            'OptInToArchiveForSupportedResources': True|False
                        },
                        'DestinationBackupVaultArn': 'string'
                    },
                ],
                'EnableContinuousBackup': True|False,
                'ScheduleExpressionTimezone': 'string',
                'IndexActions': [
                    {
                        'ResourceTypes': [
                            'string',
                        ]
                    },
                ]
            },
        ],
        'AdvancedBackupSettings': [
            {
                'ResourceType': 'string',
                'BackupOptions': {
                    'string': 'string'
                }
            },
        ]
    },
    BackupPlanTags={
        'string': 'string'
    },
    CreatorRequestId='string'
)
type BackupPlan:

dict

param BackupPlan:

[REQUIRED]

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

  • BackupPlanName (string) -- [REQUIRED]

    The display name of a backup plan. Must contain 1 to 50 alphanumeric or '-_.' characters.

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

        A display name for a backup rule. Must contain 1 to 50 alphanumeric or '-_.' characters.

      • 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 Amazon Web Services Region where they are created.

      • ScheduleExpression (string) --

        A CRON expression in UTC specifying when 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. If this value is included, it must be at least 60 minutes to avoid errors.

        This parameter has a maximum value of 100 years (52,560,000 minutes).

        During the start window, the backup job status remains in CREATED status until it has successfully begun or until the start window time has run out. If within the start window time Backup receives an error that allows the job to be retried, Backup will automatically retry to begin the job at least every 10 minutes until the backup successfully begins (the job status changes to RUNNING) or until the job status changes to EXPIRED (which is expected to occur when the start window time is over).

      • CompletionWindowMinutes (integer) --

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

      • Lifecycle (dict) --

        The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. 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 “retention” 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 storage.

        Resource types that can transition to cold storage are listed in the Feature availability by resource table. Backup ignores this expression for other resource types.

        This parameter has a maximum value of 100 years (36,500 days).

        • MoveToColdStorageAfterDays (integer) --

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

        • DeleteAfterDays (integer) --

          The number of days after creation that a recovery point is deleted. This value must be at least 90 days after the number of days specified in MoveToColdStorageAfterDays.

        • OptInToArchiveForSupportedResources (boolean) --

          If the value is true, your backup plan transitions supported resources to archive (cold) storage tier in accordance with your lifecycle settings.

      • RecoveryPointTags (dict) --

        The tags to assign to the resources.

        • (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) --

            Specifies the time period, 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 retention setting must be 90 days greater than the transition to cold after days setting. The transition to cold after days setting can't be changed after a backup has been transitioned to cold.

            Resource types that can transition to cold storage are listed in the Feature availability by resource table. Backup ignores this expression for other resource types.

            To remove the existing lifecycle and retention periods and keep your recovery points indefinitely, specify -1 for MoveToColdStorageAfterDays and DeleteAfterDays.

            • MoveToColdStorageAfterDays (integer) --

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

            • DeleteAfterDays (integer) --

              The number of days after creation that a recovery point is deleted. This value must be at least 90 days after the number of days specified in MoveToColdStorageAfterDays.

            • OptInToArchiveForSupportedResources (boolean) --

              If the value is true, your backup plan transitions supported resources to archive (cold) storage tier in accordance with your lifecycle settings.

          • 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:backup-vault:aBackupVault.

      • EnableContinuousBackup (boolean) --

        Specifies whether Backup creates continuous backups. True causes Backup to create continuous backups capable of point-in-time restore (PITR). False (or not specified) causes Backup to create snapshot backups.

      • ScheduleExpressionTimezone (string) --

        The timezone in which the schedule expression is set. By default, ScheduleExpressions are in UTC. You can modify this to a specified timezone.

      • IndexActions (list) --

        There can up to one IndexAction in each BackupRule, as each backup can have 0 or 1 backup index associated with it.

        Within the array is ResourceTypes. Only 1 resource type will be accepted for each BackupRule. Valid values:

        • EBS for Amazon Elastic Block Store

        • S3 for Amazon Simple Storage Service (Amazon S3)

        • (dict) --

          This is an optional array within a BackupRule.

          IndexAction consists of one ResourceTypes.

          • ResourceTypes (list) --

            0 or 1 index action will be accepted for each BackupRule.

            Valid values:

            • EBS for Amazon Elastic Block Store

            • S3 for Amazon Simple Storage Service (Amazon S3)

            • (string) --

  • AdvancedBackupSettings (list) --

    Specifies a list of BackupOptions for each resource type. These settings are only available for Windows Volume Shadow Copy Service (VSS) backup jobs.

    • (dict) --

      The backup options for each resource type.

      • ResourceType (string) --

        Specifies an object containing resource type and backup options. The only supported resource type is Amazon EC2 instances with Windows Volume Shadow Copy Service (VSS). For a CloudFormation example, see the sample CloudFormation template to enable Windows VSS in the Backup User Guide.

        Valid values: EC2.

      • BackupOptions (dict) --

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

        Valid values:

        Set to "WindowsVSS":"enabled" to enable the WindowsVSS backup option and create a Windows VSS backup.

        Set to "WindowsVSS":"disabled" to create a regular backup. The WindowsVSS option is not enabled by default.

        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:

The tags to assign to the backup 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.

If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.

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

      The ID of the 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) --

      The settings for a resource type. This option is only available for Windows Volume Shadow Copy Service (VSS) backup jobs.

      • (dict) --

        The backup options for each resource type.

        • ResourceType (string) --

          Specifies an object containing resource type and backup options. The only supported resource type is Amazon EC2 instances with Windows Volume Shadow Copy Service (VSS). For a CloudFormation example, see the sample CloudFormation template to enable Windows VSS in the Backup User Guide.

          Valid values: EC2.

        • BackupOptions (dict) --

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

          Valid values:

          Set to "WindowsVSS":"enabled" to enable the WindowsVSS backup option and create a Windows VSS backup.

          Set to "WindowsVSS":"disabled" to create a regular backup. The WindowsVSS option is not enabled by default.

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

DescribeRecoveryPoint (updated) Link ¶
Changes (response)
{'IndexStatus': 'PENDING | ACTIVE | FAILED | DELETING',
 'IndexStatusMessage': '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',
    BackupVaultAccountId='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 Amazon Web Services Region where they are created.

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.

type BackupVaultAccountId:

string

param BackupVaultAccountId:

The account ID of the specified backup vault.

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',
    'StatusMessage': 'string',
    '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,
        'OptInToArchiveForSupportedResources': True|False
    },
    'EncryptionKeyArn': 'string',
    'IsEncrypted': True|False,
    'StorageClass': 'WARM'|'COLD'|'DELETED',
    'LastRestoreTime': datetime(2015, 1, 1),
    'ParentRecoveryPointArn': 'string',
    'CompositeMemberIdentifier': 'string',
    'IsParent': True|False,
    'ResourceName': 'string',
    'VaultType': 'BACKUP_VAULT'|'LOGICALLY_AIR_GAPPED_BACKUP_VAULT',
    'IndexStatus': 'PENDING'|'ACTIVE'|'FAILED'|'DELETING',
    'IndexStatusMessage': 'string'
}

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.

    • BackupVaultArn (string) --

      An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:backup-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:backup-vault:aBackupVault. If the recovery is restored to the same Amazon Web Services 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 Amazon Web Services 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.

      PARTIAL status indicates Backup could not create the recovery point before the backup window closed. To increase your backup plan window using the API, see UpdateBackupPlan. You can also increase your backup plan window using the Console by choosing and editing your backup plan.

      EXPIRED status indicates that the recovery point has exceeded its retention period, but Backup lacks permission or is otherwise unable to delete it. To manually delete these recovery points, see Step 3: Delete the recovery points in the Clean up resources section of Getting started.

      STOPPED status occurs on a continuous backup where a user has taken some action that causes the continuous backup to be disabled. This can be caused by the removal of permissions, turning off versioning, turning off events being sent to EventBridge, or disabling the EventBridge rules that are put in place by Backup. For recovery points of Amazon S3, Amazon RDS, and Amazon Aurora resources, this status occurs when the retention period of a continuous backup rule is changed.

      To resolve STOPPED status, ensure that all requested permissions are in place and that versioning is enabled on the S3 bucket. Once these conditions are met, the next instance of a backup rule running will result in a new continuous recovery point being created. The recovery points with STOPPED status do not need to be deleted.

      For SAP HANA on Amazon EC2 STOPPED status occurs due to user action, application misconfiguration, or backup failure. To ensure that future continuous backups succeed, refer to the recovery point status and check SAP HANA for details.

    • StatusMessage (string) --

      A status message explaining the status of the recovery point.

    • 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. 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 “retention” 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.

      Resource types that can transition to cold storage are listed in the Feature availability by resource table. Backup ignores this expression for other resource types.

      • MoveToColdStorageAfterDays (integer) --

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

      • DeleteAfterDays (integer) --

        The number of days after creation that a recovery point is deleted. This value must be at least 90 days after the number of days specified in MoveToColdStorageAfterDays.

      • OptInToArchiveForSupportedResources (boolean) --

        If the value is true, your backup plan transitions supported resources to archive (cold) storage tier in accordance with your lifecycle settings.

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

    • ParentRecoveryPointArn (string) --

      This is an ARN that uniquely identifies a parent (composite) recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.

    • CompositeMemberIdentifier (string) --

      The identifier of a resource within a composite group, such as nested (child) recovery point belonging to a composite (parent) stack. The ID is transferred from the logical ID within a stack.

    • IsParent (boolean) --

      This returns the boolean value that a recovery point is a parent (composite) job.

    • ResourceName (string) --

      The name of the resource that belongs to the specified backup.

    • VaultType (string) --

      The type of vault in which the described recovery point is stored.

    • IndexStatus (string) --

      This is the current status for the backup index associated with the specified recovery point.

      Statuses are: PENDING | ACTIVE | FAILED | DELETING

      A recovery point with an index that has the status of ACTIVE can be included in a search.

    • IndexStatusMessage (string) --

      A string in the form of a detailed message explaining the status of a backup index associated with the recovery point.

GetBackupPlan (updated) Link ¶
Changes (response)
{'BackupPlan': {'Rules': {'IndexActions': [{'ResourceTypes': ['string']}]}}}

Returns BackupPlan details for the specified BackupPlanId. The details are 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,
                    'OptInToArchiveForSupportedResources': True|False
                },
                'RecoveryPointTags': {
                    'string': 'string'
                },
                'RuleId': 'string',
                'CopyActions': [
                    {
                        'Lifecycle': {
                            'MoveToColdStorageAfterDays': 123,
                            'DeleteAfterDays': 123,
                            'OptInToArchiveForSupportedResources': True|False
                        },
                        'DestinationBackupVaultArn': 'string'
                    },
                ],
                'EnableContinuousBackup': True|False,
                'ScheduleExpressionTimezone': 'string',
                'IndexActions': [
                    {
                        'ResourceTypes': [
                            '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. Must contain only alphanumeric or '-_.' special characters.

        If this is set in the console, it can contain 1 to 50 characters; if this is set through CLI or API, it can contain 1 to 200 characters.

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

            A display name for a backup rule. Must contain 1 to 50 alphanumeric or '-_.' characters.

          • 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 Amazon Web Services Region where they are created.

          • ScheduleExpression (string) --

            A cron expression in UTC specifying when Backup initiates a backup job. For more information about Amazon Web Services cron expressions, see Schedule Expressions for Rules in the Amazon CloudWatch Events User Guide.. Two examples of Amazon Web Services cron expressions are 15 * ? * * * (take a backup every hour at 15 minutes past the hour) and 0 12 * * ? * (take a backup every day at 12 noon UTC). For a table of examples, click the preceding link and scroll down the page.

          • 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. If this value is included, it must be at least 60 minutes to avoid errors.

            During the start window, the backup job status remains in CREATED status until it has successfully begun or until the start window time has run out. If within the start window time Backup receives an error that allows the job to be retried, Backup will automatically retry to begin the job at least every 10 minutes until the backup successfully begins (the job status changes to RUNNING) or until the job status changes to EXPIRED (which is expected to occur when the start window time is over).

          • CompletionWindowMinutes (integer) --

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

          • Lifecycle (dict) --

            The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. 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 “retention” 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.

            Resource types that can transition to cold storage are listed in the Feature availability by resource table. Backup ignores this expression for other resource types.

            • MoveToColdStorageAfterDays (integer) --

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

            • DeleteAfterDays (integer) --

              The number of days after creation that a recovery point is deleted. This value must be at least 90 days after the number of days specified in MoveToColdStorageAfterDays.

            • OptInToArchiveForSupportedResources (boolean) --

              If the value is true, your backup plan transitions supported resources to archive (cold) storage tier in accordance with your lifecycle settings.

          • RecoveryPointTags (dict) --

            The tags 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) --

                Specifies the time period, 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 retention setting must be 90 days greater than the transition to cold after days setting. The transition to cold after days setting can't be changed after a backup has been transitioned to cold.

                Resource types that can transition to cold storage are listed in the Feature availability by resource table. Backup ignores this expression for other resource types.

                To remove the existing lifecycle and retention periods and keep your recovery points indefinitely, specify -1 for MoveToColdStorageAfterDays and DeleteAfterDays.

                • MoveToColdStorageAfterDays (integer) --

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

                • DeleteAfterDays (integer) --

                  The number of days after creation that a recovery point is deleted. This value must be at least 90 days after the number of days specified in MoveToColdStorageAfterDays.

                • OptInToArchiveForSupportedResources (boolean) --

                  If the value is true, your backup plan transitions supported resources to archive (cold) storage tier in accordance with your lifecycle settings.

              • 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:backup-vault:aBackupVault.

          • EnableContinuousBackup (boolean) --

            Specifies whether Backup creates continuous backups. True causes Backup to create continuous backups capable of point-in-time restore (PITR). False (or not specified) causes Backup to create snapshot backups.

          • ScheduleExpressionTimezone (string) --

            The timezone in which the schedule expression is set. By default, ScheduleExpressions are in UTC. You can modify this to a specified timezone.

          • IndexActions (list) --

            IndexActions is an array you use to specify how backup data should be indexed.

            eEach BackupRule can have 0 or 1 IndexAction, as each backup can have up to one index associated with it.

            Within the array is ResourceType. Only one will be accepted for each BackupRule.

            • (dict) --

              This is an optional array within a BackupRule.

              IndexAction consists of one ResourceTypes.

              • ResourceTypes (list) --

                0 or 1 index action will be accepted for each BackupRule.

                Valid values:

                • EBS for Amazon Elastic Block Store

                • S3 for Amazon Simple Storage Service (Amazon S3)

                • (string) --

      • AdvancedBackupSettings (list) --

        Contains a list of BackupOptions for each resource type.

        • (dict) --

          The backup options for each resource type.

          • ResourceType (string) --

            Specifies an object containing resource type and backup options. The only supported resource type is Amazon EC2 instances with Windows Volume Shadow Copy Service (VSS). For a CloudFormation example, see the sample CloudFormation template to enable Windows VSS in the Backup User Guide.

            Valid values: EC2.

          • BackupOptions (dict) --

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

            Valid values:

            Set to "WindowsVSS":"enabled" to enable the WindowsVSS backup option and create a Windows VSS backup.

            Set to "WindowsVSS":"disabled" to create a regular backup. The WindowsVSS option is not enabled by default.

            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 this backup plan was run. 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) --

        The backup options for each resource type.

        • ResourceType (string) --

          Specifies an object containing resource type and backup options. The only supported resource type is Amazon EC2 instances with Windows Volume Shadow Copy Service (VSS). For a CloudFormation example, see the sample CloudFormation template to enable Windows VSS in the Backup User Guide.

          Valid values: EC2.

        • BackupOptions (dict) --

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

          Valid values:

          Set to "WindowsVSS":"enabled" to enable the WindowsVSS backup option and create a Windows VSS backup.

          Set to "WindowsVSS":"disabled" to create a regular backup. The WindowsVSS option is not enabled by default.

          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': {'Rules': {'IndexActions': [{'ResourceTypes': ['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,
                    'OptInToArchiveForSupportedResources': True|False
                },
                'RecoveryPointTags': {
                    'string': 'string'
                },
                'RuleId': 'string',
                'CopyActions': [
                    {
                        'Lifecycle': {
                            'MoveToColdStorageAfterDays': 123,
                            'DeleteAfterDays': 123,
                            'OptInToArchiveForSupportedResources': True|False
                        },
                        'DestinationBackupVaultArn': 'string'
                    },
                ],
                'EnableContinuousBackup': True|False,
                'ScheduleExpressionTimezone': 'string',
                'IndexActions': [
                    {
                        'ResourceTypes': [
                            '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. Must contain only alphanumeric or '-_.' special characters.

        If this is set in the console, it can contain 1 to 50 characters; if this is set through CLI or API, it can contain 1 to 200 characters.

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

            A display name for a backup rule. Must contain 1 to 50 alphanumeric or '-_.' characters.

          • 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 Amazon Web Services Region where they are created.

          • ScheduleExpression (string) --

            A cron expression in UTC specifying when Backup initiates a backup job. For more information about Amazon Web Services cron expressions, see Schedule Expressions for Rules in the Amazon CloudWatch Events User Guide.. Two examples of Amazon Web Services cron expressions are 15 * ? * * * (take a backup every hour at 15 minutes past the hour) and 0 12 * * ? * (take a backup every day at 12 noon UTC). For a table of examples, click the preceding link and scroll down the page.

          • 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. If this value is included, it must be at least 60 minutes to avoid errors.

            During the start window, the backup job status remains in CREATED status until it has successfully begun or until the start window time has run out. If within the start window time Backup receives an error that allows the job to be retried, Backup will automatically retry to begin the job at least every 10 minutes until the backup successfully begins (the job status changes to RUNNING) or until the job status changes to EXPIRED (which is expected to occur when the start window time is over).

          • CompletionWindowMinutes (integer) --

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

          • Lifecycle (dict) --

            The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. 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 “retention” 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.

            Resource types that can transition to cold storage are listed in the Feature availability by resource table. Backup ignores this expression for other resource types.

            • MoveToColdStorageAfterDays (integer) --

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

            • DeleteAfterDays (integer) --

              The number of days after creation that a recovery point is deleted. This value must be at least 90 days after the number of days specified in MoveToColdStorageAfterDays.

            • OptInToArchiveForSupportedResources (boolean) --

              If the value is true, your backup plan transitions supported resources to archive (cold) storage tier in accordance with your lifecycle settings.

          • RecoveryPointTags (dict) --

            The tags 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) --

                Specifies the time period, 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 retention setting must be 90 days greater than the transition to cold after days setting. The transition to cold after days setting can't be changed after a backup has been transitioned to cold.

                Resource types that can transition to cold storage are listed in the Feature availability by resource table. Backup ignores this expression for other resource types.

                To remove the existing lifecycle and retention periods and keep your recovery points indefinitely, specify -1 for MoveToColdStorageAfterDays and DeleteAfterDays.

                • MoveToColdStorageAfterDays (integer) --

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

                • DeleteAfterDays (integer) --

                  The number of days after creation that a recovery point is deleted. This value must be at least 90 days after the number of days specified in MoveToColdStorageAfterDays.

                • OptInToArchiveForSupportedResources (boolean) --

                  If the value is true, your backup plan transitions supported resources to archive (cold) storage tier in accordance with your lifecycle settings.

              • 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:backup-vault:aBackupVault.

          • EnableContinuousBackup (boolean) --

            Specifies whether Backup creates continuous backups. True causes Backup to create continuous backups capable of point-in-time restore (PITR). False (or not specified) causes Backup to create snapshot backups.

          • ScheduleExpressionTimezone (string) --

            The timezone in which the schedule expression is set. By default, ScheduleExpressions are in UTC. You can modify this to a specified timezone.

          • IndexActions (list) --

            IndexActions is an array you use to specify how backup data should be indexed.

            eEach BackupRule can have 0 or 1 IndexAction, as each backup can have up to one index associated with it.

            Within the array is ResourceType. Only one will be accepted for each BackupRule.

            • (dict) --

              This is an optional array within a BackupRule.

              IndexAction consists of one ResourceTypes.

              • ResourceTypes (list) --

                0 or 1 index action will be accepted for each BackupRule.

                Valid values:

                • EBS for Amazon Elastic Block Store

                • S3 for Amazon Simple Storage Service (Amazon S3)

                • (string) --

      • AdvancedBackupSettings (list) --

        Contains a list of BackupOptions for each resource type.

        • (dict) --

          The backup options for each resource type.

          • ResourceType (string) --

            Specifies an object containing resource type and backup options. The only supported resource type is Amazon EC2 instances with Windows Volume Shadow Copy Service (VSS). For a CloudFormation example, see the sample CloudFormation template to enable Windows VSS in the Backup User Guide.

            Valid values: EC2.

          • BackupOptions (dict) --

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

            Valid values:

            Set to "WindowsVSS":"enabled" to enable the WindowsVSS backup option and create a Windows VSS backup.

            Set to "WindowsVSS":"disabled" to create a regular backup. The WindowsVSS option is not enabled by default.

            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': {'Rules': {'IndexActions': [{'ResourceTypes': ['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,
                    'OptInToArchiveForSupportedResources': True|False
                },
                'RecoveryPointTags': {
                    'string': 'string'
                },
                'RuleId': 'string',
                'CopyActions': [
                    {
                        'Lifecycle': {
                            'MoveToColdStorageAfterDays': 123,
                            'DeleteAfterDays': 123,
                            'OptInToArchiveForSupportedResources': True|False
                        },
                        'DestinationBackupVaultArn': 'string'
                    },
                ],
                'EnableContinuousBackup': True|False,
                'ScheduleExpressionTimezone': 'string',
                'IndexActions': [
                    {
                        'ResourceTypes': [
                            '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. Must contain only alphanumeric or '-_.' special characters.

        If this is set in the console, it can contain 1 to 50 characters; if this is set through CLI or API, it can contain 1 to 200 characters.

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

            A display name for a backup rule. Must contain 1 to 50 alphanumeric or '-_.' characters.

          • 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 Amazon Web Services Region where they are created.

          • ScheduleExpression (string) --

            A cron expression in UTC specifying when Backup initiates a backup job. For more information about Amazon Web Services cron expressions, see Schedule Expressions for Rules in the Amazon CloudWatch Events User Guide.. Two examples of Amazon Web Services cron expressions are 15 * ? * * * (take a backup every hour at 15 minutes past the hour) and 0 12 * * ? * (take a backup every day at 12 noon UTC). For a table of examples, click the preceding link and scroll down the page.

          • 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. If this value is included, it must be at least 60 minutes to avoid errors.

            During the start window, the backup job status remains in CREATED status until it has successfully begun or until the start window time has run out. If within the start window time Backup receives an error that allows the job to be retried, Backup will automatically retry to begin the job at least every 10 minutes until the backup successfully begins (the job status changes to RUNNING) or until the job status changes to EXPIRED (which is expected to occur when the start window time is over).

          • CompletionWindowMinutes (integer) --

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

          • Lifecycle (dict) --

            The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. 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 “retention” 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.

            Resource types that can transition to cold storage are listed in the Feature availability by resource table. Backup ignores this expression for other resource types.

            • MoveToColdStorageAfterDays (integer) --

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

            • DeleteAfterDays (integer) --

              The number of days after creation that a recovery point is deleted. This value must be at least 90 days after the number of days specified in MoveToColdStorageAfterDays.

            • OptInToArchiveForSupportedResources (boolean) --

              If the value is true, your backup plan transitions supported resources to archive (cold) storage tier in accordance with your lifecycle settings.

          • RecoveryPointTags (dict) --

            The tags 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) --

                Specifies the time period, 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 retention setting must be 90 days greater than the transition to cold after days setting. The transition to cold after days setting can't be changed after a backup has been transitioned to cold.

                Resource types that can transition to cold storage are listed in the Feature availability by resource table. Backup ignores this expression for other resource types.

                To remove the existing lifecycle and retention periods and keep your recovery points indefinitely, specify -1 for MoveToColdStorageAfterDays and DeleteAfterDays.

                • MoveToColdStorageAfterDays (integer) --

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

                • DeleteAfterDays (integer) --

                  The number of days after creation that a recovery point is deleted. This value must be at least 90 days after the number of days specified in MoveToColdStorageAfterDays.

                • OptInToArchiveForSupportedResources (boolean) --

                  If the value is true, your backup plan transitions supported resources to archive (cold) storage tier in accordance with your lifecycle settings.

              • 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:backup-vault:aBackupVault.

          • EnableContinuousBackup (boolean) --

            Specifies whether Backup creates continuous backups. True causes Backup to create continuous backups capable of point-in-time restore (PITR). False (or not specified) causes Backup to create snapshot backups.

          • ScheduleExpressionTimezone (string) --

            The timezone in which the schedule expression is set. By default, ScheduleExpressions are in UTC. You can modify this to a specified timezone.

          • IndexActions (list) --

            IndexActions is an array you use to specify how backup data should be indexed.

            eEach BackupRule can have 0 or 1 IndexAction, as each backup can have up to one index associated with it.

            Within the array is ResourceType. Only one will be accepted for each BackupRule.

            • (dict) --

              This is an optional array within a BackupRule.

              IndexAction consists of one ResourceTypes.

              • ResourceTypes (list) --

                0 or 1 index action will be accepted for each BackupRule.

                Valid values:

                • EBS for Amazon Elastic Block Store

                • S3 for Amazon Simple Storage Service (Amazon S3)

                • (string) --

      • AdvancedBackupSettings (list) --

        Contains a list of BackupOptions for each resource type.

        • (dict) --

          The backup options for each resource type.

          • ResourceType (string) --

            Specifies an object containing resource type and backup options. The only supported resource type is Amazon EC2 instances with Windows Volume Shadow Copy Service (VSS). For a CloudFormation example, see the sample CloudFormation template to enable Windows VSS in the Backup User Guide.

            Valid values: EC2.

          • BackupOptions (dict) --

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

            Valid values:

            Set to "WindowsVSS":"enabled" to enable the WindowsVSS backup option and create a Windows VSS backup.

            Set to "WindowsVSS":"disabled" to create a regular backup. The WindowsVSS option is not enabled by default.

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

ListRecoveryPointsByBackupVault (updated) Link ¶
Changes (response)
{'RecoveryPoints': {'IndexStatus': 'PENDING | ACTIVE | FAILED | DELETING',
                    'IndexStatusMessage': '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',
    BackupVaultAccountId='string',
    NextToken='string',
    MaxResults=123,
    ByResourceArn='string',
    ByResourceType='string',
    ByBackupPlanId='string',
    ByCreatedBefore=datetime(2015, 1, 1),
    ByCreatedAfter=datetime(2015, 1, 1),
    ByParentRecoveryPointArn='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 Amazon Web Services Region where they are created.

type BackupVaultAccountId:

string

param BackupVaultAccountId:

This parameter will sort the list of recovery points by account ID.

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(s):

  • Aurora for Amazon Aurora

  • CloudFormation for CloudFormation

  • DocumentDB for Amazon DocumentDB (with MongoDB compatibility)

  • DynamoDB for Amazon DynamoDB

  • EBS for Amazon Elastic Block Store

  • EC2 for Amazon Elastic Compute Cloud

  • EFS for Amazon Elastic File System

  • FSx for Amazon FSx

  • Neptune for Amazon Neptune

  • RDS for Amazon Relational Database Service

  • Redshift for Amazon Redshift

  • S3 for Amazon Simple Storage Service (Amazon S3)

  • SAP HANA on Amazon EC2 for SAP HANA databases on Amazon Elastic Compute Cloud instances

  • Storage Gateway for Storage Gateway

  • Timestream for Amazon Timestream

  • VirtualMachine for VMware virtual machines

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.

type ByParentRecoveryPointArn:

string

param ByParentRecoveryPointArn:

This returns only recovery points that match the specified parent (composite) recovery point Amazon Resource Name (ARN).

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',
            'StatusMessage': 'string',
            '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,
                'OptInToArchiveForSupportedResources': True|False
            },
            'EncryptionKeyArn': 'string',
            'IsEncrypted': True|False,
            'LastRestoreTime': datetime(2015, 1, 1),
            'ParentRecoveryPointArn': 'string',
            'CompositeMemberIdentifier': 'string',
            'IsParent': True|False,
            'ResourceName': 'string',
            'VaultType': 'BACKUP_VAULT'|'LOGICALLY_AIR_GAPPED_BACKUP_VAULT',
            'IndexStatus': 'PENDING'|'ACTIVE'|'FAILED'|'DELETING',
            'IndexStatusMessage': '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.

    • 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 Amazon Web Services Region where they are created.

        • BackupVaultArn (string) --

          An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:backup-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 Amazon Web Services 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 Windows Volume Shadow Copy Service (VSS) 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.

        • StatusMessage (string) --

          A message explaining the current status 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. 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 “retention” 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.

          Resource types that can transition to cold storage are listed in the Feature availability by resource table. Backup ignores this expression for other resource types.

          • MoveToColdStorageAfterDays (integer) --

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

          • DeleteAfterDays (integer) --

            The number of days after creation that a recovery point is deleted. This value must be at least 90 days after the number of days specified in MoveToColdStorageAfterDays.

          • OptInToArchiveForSupportedResources (boolean) --

            If the value is true, your backup plan transitions supported resources to archive (cold) storage tier in accordance with your lifecycle settings.

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

        • ParentRecoveryPointArn (string) --

          The Amazon Resource Name (ARN) of the parent (composite) recovery point.

        • CompositeMemberIdentifier (string) --

          The identifier of a resource within a composite group, such as nested (child) recovery point belonging to a composite (parent) stack. The ID is transferred from the logical ID within a stack.

        • IsParent (boolean) --

          This is a boolean value indicating this is a parent (composite) recovery point.

        • ResourceName (string) --

          The non-unique name of the resource that belongs to the specified backup.

        • VaultType (string) --

          The type of vault in which the described recovery point is stored.

        • IndexStatus (string) --

          This is the current status for the backup index associated with the specified recovery point.

          Statuses are: PENDING | ACTIVE | FAILED | DELETING

          A recovery point with an index that has the status of ACTIVE can be included in a search.

        • IndexStatusMessage (string) --

          A string in the form of a detailed message explaining the status of a backup index associated with the recovery point.

ListRecoveryPointsByResource (updated) Link ¶
Changes (response)
{'RecoveryPoints': {'IndexStatus': 'PENDING | ACTIVE | FAILED | DELETING',
                    'IndexStatusMessage': 'string'}}

The information about the recovery points of the type specified by a resource Amazon Resource Name (ARN).

See also: AWS API Documentation

Request Syntax

client.list_recovery_points_by_resource(
    ResourceArn='string',
    NextToken='string',
    MaxResults=123,
    ManagedByAWSBackupOnly=True|False
)
type ResourceArn:

string

param ResourceArn:

[REQUIRED]

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

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 ManagedByAWSBackupOnly:

boolean

param ManagedByAWSBackupOnly:

This attribute filters recovery points based on ownership.

If this is set to TRUE, the response will contain recovery points associated with the selected resources that are managed by Backup.

If this is set to FALSE, the response will contain all recovery points associated with the selected resource.

Type: Boolean

rtype:

dict

returns:

Response Syntax

{
    'NextToken': 'string',
    'RecoveryPoints': [
        {
            'RecoveryPointArn': 'string',
            'CreationDate': datetime(2015, 1, 1),
            'Status': 'COMPLETED'|'PARTIAL'|'DELETING'|'EXPIRED',
            'StatusMessage': 'string',
            'EncryptionKeyArn': 'string',
            'BackupSizeBytes': 123,
            'BackupVaultName': 'string',
            'IsParent': True|False,
            'ParentRecoveryPointArn': 'string',
            'ResourceName': 'string',
            'VaultType': 'BACKUP_VAULT'|'LOGICALLY_AIR_GAPPED_BACKUP_VAULT',
            'IndexStatus': 'PENDING'|'ACTIVE'|'FAILED'|'DELETING',
            'IndexStatusMessage': '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.

    • RecoveryPoints (list) --

      An array of objects that contain detailed information about recovery points of the specified resource type.

      • (dict) --

        Contains detailed information about a saved recovery point.

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

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

        • Status (string) --

          A status code specifying the state of the recovery point.

        • StatusMessage (string) --

          A message explaining the current status of the recovery point.

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

        • BackupSizeBytes (integer) --

          The size, in bytes, of a backup.

        • 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 Amazon Web Services Region where they are created.

        • IsParent (boolean) --

          This is a boolean value indicating this is a parent (composite) recovery point.

        • ParentRecoveryPointArn (string) --

          The Amazon Resource Name (ARN) of the parent (composite) recovery point.

        • ResourceName (string) --

          The non-unique name of the resource that belongs to the specified backup.

        • VaultType (string) --

          The type of vault in which the described recovery point is stored.

        • IndexStatus (string) --

          This is the current status for the backup index associated with the specified recovery point.

          Statuses are: PENDING | ACTIVE | FAILED | DELETING

          A recovery point with an index that has the status of ACTIVE can be included in a search.

        • IndexStatusMessage (string) --

          A string in the form of a detailed message explaining the status of a backup index associated with the recovery point.

StartBackupJob (updated) Link ¶
Changes (request)
{'Index': 'ENABLED | DISABLED'}

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,
        'OptInToArchiveForSupportedResources': True|False
    },
    RecoveryPointTags={
        'string': 'string'
    },
    BackupOptions={
        'string': 'string'
    },
    Index='ENABLED'|'DISABLED'
)
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 Amazon Web Services Region where they are created.

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 you can use to distinguish between otherwise identical calls to StartBackupJob. Retrying a successful request with the same idempotency token results in a success message with no action taken.

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, and the default is 8 hours. If this value is included, it must be at least 60 minutes to avoid errors.

This parameter has a maximum value of 100 years (52,560,000 minutes).

During the start window, the backup job status remains in CREATED status until it has successfully begun or until the start window time has run out. If within the start window time Backup receives an error that allows the job to be retried, Backup will automatically retry to begin the job at least every 10 minutes until the backup successfully begins (the job status changes to RUNNING) or until the job status changes to EXPIRED (which is expected to occur when the start window time is over).

type CompleteWindowMinutes:

integer

param CompleteWindowMinutes:

A value in minutes during which a successfully started backup must complete, or else Backup will cancel the job. This value is optional. This value begins counting down from when the backup was scheduled. It does not add additional time for StartWindowMinutes, or if the backup started later than scheduled.

Like StartWindowMinutes, this parameter has a maximum value of 100 years (52,560,000 minutes).

type Lifecycle:

dict

param Lifecycle:

The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. 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 “retention” 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.

Resource types that can transition to cold storage are listed in the Feature availability by resource table. Backup ignores this expression for other resource types.

This parameter has a maximum value of 100 years (36,500 days).

  • MoveToColdStorageAfterDays (integer) --

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

  • DeleteAfterDays (integer) --

    The number of days after creation that a recovery point is deleted. This value must be at least 90 days after the number of days specified in MoveToColdStorageAfterDays.

  • OptInToArchiveForSupportedResources (boolean) --

    If the value is true, your backup plan transitions supported resources to archive (cold) storage tier in accordance with your lifecycle settings.

type RecoveryPointTags:

dict

param RecoveryPointTags:

The tags to assign to the resources.

  • (string) --

    • (string) --

type BackupOptions:

dict

param BackupOptions:

The backup option for a selected resource. This option is only available for Windows Volume Shadow Copy Service (VSS) backup jobs.

Valid values: Set to "WindowsVSS":"enabled" to enable the WindowsVSS backup option and create a Windows VSS backup. Set to "WindowsVSS""disabled" to create a regular backup. The WindowsVSS option is not enabled by default.

  • (string) --

    • (string) --

type Index:

string

param Index:

Include this parameter to enable index creation if your backup job has a resource type that supports backup indexes.

Resource types that support backup indexes include:

  • EBS for Amazon Elastic Block Store

  • S3 for Amazon Simple Storage Service (Amazon S3)

Index can have 1 of 2 possible values, either ENABLED or DISABLED.

To create a backup index for an eligible ACTIVE recovery point that does not yet have a backup index, set value to ENABLED.

To delete a backup index, set value to DISABLED.

rtype:

dict

returns:

Response Syntax

{
    'BackupJobId': 'string',
    'RecoveryPointArn': 'string',
    'CreationDate': datetime(2015, 1, 1),
    'IsParent': True|False
}

Response Structure

  • (dict) --

    • BackupJobId (string) --

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

    • RecoveryPointArn (string) --

      Note: This field is only returned for Amazon EFS and Advanced DynamoDB resources.

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

    • IsParent (boolean) --

      This is a returned boolean value indicating this is a parent (composite) backup job.

UpdateBackupPlan (updated) Link ¶
Changes (request)
{'BackupPlan': {'Rules': {'IndexActions': [{'ResourceTypes': ['string']}]}}}

Updates the specified backup plan. The new version is uniquely identified by its ID.

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,
                    'OptInToArchiveForSupportedResources': True|False
                },
                'RecoveryPointTags': {
                    'string': 'string'
                },
                'CopyActions': [
                    {
                        'Lifecycle': {
                            'MoveToColdStorageAfterDays': 123,
                            'DeleteAfterDays': 123,
                            'OptInToArchiveForSupportedResources': True|False
                        },
                        'DestinationBackupVaultArn': 'string'
                    },
                ],
                'EnableContinuousBackup': True|False,
                'ScheduleExpressionTimezone': 'string',
                'IndexActions': [
                    {
                        'ResourceTypes': [
                            'string',
                        ]
                    },
                ]
            },
        ],
        'AdvancedBackupSettings': [
            {
                'ResourceType': 'string',
                'BackupOptions': {
                    'string': 'string'
                }
            },
        ]
    }
)
type BackupPlanId:

string

param BackupPlanId:

[REQUIRED]

The ID of the backup plan.

type BackupPlan:

dict

param BackupPlan:

[REQUIRED]

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

  • BackupPlanName (string) -- [REQUIRED]

    The display name of a backup plan. Must contain 1 to 50 alphanumeric or '-_.' characters.

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

        A display name for a backup rule. Must contain 1 to 50 alphanumeric or '-_.' characters.

      • 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 Amazon Web Services Region where they are created.

      • ScheduleExpression (string) --

        A CRON expression in UTC specifying when 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. If this value is included, it must be at least 60 minutes to avoid errors.

        This parameter has a maximum value of 100 years (52,560,000 minutes).

        During the start window, the backup job status remains in CREATED status until it has successfully begun or until the start window time has run out. If within the start window time Backup receives an error that allows the job to be retried, Backup will automatically retry to begin the job at least every 10 minutes until the backup successfully begins (the job status changes to RUNNING) or until the job status changes to EXPIRED (which is expected to occur when the start window time is over).

      • CompletionWindowMinutes (integer) --

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

      • Lifecycle (dict) --

        The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. 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 “retention” 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 storage.

        Resource types that can transition to cold storage are listed in the Feature availability by resource table. Backup ignores this expression for other resource types.

        This parameter has a maximum value of 100 years (36,500 days).

        • MoveToColdStorageAfterDays (integer) --

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

        • DeleteAfterDays (integer) --

          The number of days after creation that a recovery point is deleted. This value must be at least 90 days after the number of days specified in MoveToColdStorageAfterDays.

        • OptInToArchiveForSupportedResources (boolean) --

          If the value is true, your backup plan transitions supported resources to archive (cold) storage tier in accordance with your lifecycle settings.

      • RecoveryPointTags (dict) --

        The tags to assign to the resources.

        • (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) --

            Specifies the time period, 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 retention setting must be 90 days greater than the transition to cold after days setting. The transition to cold after days setting can't be changed after a backup has been transitioned to cold.

            Resource types that can transition to cold storage are listed in the Feature availability by resource table. Backup ignores this expression for other resource types.

            To remove the existing lifecycle and retention periods and keep your recovery points indefinitely, specify -1 for MoveToColdStorageAfterDays and DeleteAfterDays.

            • MoveToColdStorageAfterDays (integer) --

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

            • DeleteAfterDays (integer) --

              The number of days after creation that a recovery point is deleted. This value must be at least 90 days after the number of days specified in MoveToColdStorageAfterDays.

            • OptInToArchiveForSupportedResources (boolean) --

              If the value is true, your backup plan transitions supported resources to archive (cold) storage tier in accordance with your lifecycle settings.

          • 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:backup-vault:aBackupVault.

      • EnableContinuousBackup (boolean) --

        Specifies whether Backup creates continuous backups. True causes Backup to create continuous backups capable of point-in-time restore (PITR). False (or not specified) causes Backup to create snapshot backups.

      • ScheduleExpressionTimezone (string) --

        The timezone in which the schedule expression is set. By default, ScheduleExpressions are in UTC. You can modify this to a specified timezone.

      • IndexActions (list) --

        There can up to one IndexAction in each BackupRule, as each backup can have 0 or 1 backup index associated with it.

        Within the array is ResourceTypes. Only 1 resource type will be accepted for each BackupRule. Valid values:

        • EBS for Amazon Elastic Block Store

        • S3 for Amazon Simple Storage Service (Amazon S3)

        • (dict) --

          This is an optional array within a BackupRule.

          IndexAction consists of one ResourceTypes.

          • ResourceTypes (list) --

            0 or 1 index action will be accepted for each BackupRule.

            Valid values:

            • EBS for Amazon Elastic Block Store

            • S3 for Amazon Simple Storage Service (Amazon S3)

            • (string) --

  • AdvancedBackupSettings (list) --

    Specifies a list of BackupOptions for each resource type. These settings are only available for Windows Volume Shadow Copy Service (VSS) backup jobs.

    • (dict) --

      The backup options for each resource type.

      • ResourceType (string) --

        Specifies an object containing resource type and backup options. The only supported resource type is Amazon EC2 instances with Windows Volume Shadow Copy Service (VSS). For a CloudFormation example, see the sample CloudFormation template to enable Windows VSS in the Backup User Guide.

        Valid values: EC2.

      • BackupOptions (dict) --

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

        Valid values:

        Set to "WindowsVSS":"enabled" to enable the WindowsVSS backup option and create a Windows VSS backup.

        Set to "WindowsVSS":"disabled" to create a regular backup. The WindowsVSS option is not enabled by default.

        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 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. Version Ids cannot be edited.

    • AdvancedBackupSettings (list) --

      Contains a list of BackupOptions for each resource type.

      • (dict) --

        The backup options for each resource type.

        • ResourceType (string) --

          Specifies an object containing resource type and backup options. The only supported resource type is Amazon EC2 instances with Windows Volume Shadow Copy Service (VSS). For a CloudFormation example, see the sample CloudFormation template to enable Windows VSS in the Backup User Guide.

          Valid values: EC2.

        • BackupOptions (dict) --

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

          Valid values:

          Set to "WindowsVSS":"enabled" to enable the WindowsVSS backup option and create a Windows VSS backup.

          Set to "WindowsVSS":"disabled" to create a regular backup. The WindowsVSS option is not enabled by default.

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