2020/01/13 - AWS Backup - 3 new 7 updated api methods
Changes Cross-region backup is a new AWS Backup feature that allows enterprises to copy backups across multiple AWS services to different regions.
Returns metadata associated with creating a copy of a resource.
See also: AWS API Documentation
Request Syntax
client.describe_copy_job( CopyJobId='string' )
string
[REQUIRED]
Uniquely identifies a request to AWS Backup to copy a resource.
dict
Response Syntax
{ 'CopyJob': { 'CopyJobId': 'string', 'SourceBackupVaultArn': 'string', 'SourceRecoveryPointArn': 'string', 'DestinationBackupVaultArn': 'string', 'DestinationRecoveryPointArn': 'string', 'ResourceArn': 'string', 'CreationDate': datetime(2015, 1, 1), 'CompletionDate': datetime(2015, 1, 1), 'State': 'CREATED'|'RUNNING'|'COMPLETED'|'FAILED', 'StatusMessage': 'string', 'BackupSizeInBytes': 123, 'IamRoleArn': 'string', 'CreatedBy': { 'BackupPlanId': 'string', 'BackupPlanArn': 'string', 'BackupPlanVersion': 'string', 'BackupRuleId': 'string' }, 'ResourceType': 'string' } }
Response Structure
(dict) --
CopyJob (dict) --
Contains detailed information about a copy job.
CopyJobId (string) --
Uniquely identifies a request to AWS Backup to copy a resource.
SourceBackupVaultArn (string) --
An Amazon Resource Name (ARN) that uniquely identifies a source copy vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
SourceRecoveryPointArn (string) --
An ARN that uniquely identifies a source recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
DestinationBackupVaultArn (string) --
An Amazon Resource Name (ARN) that uniquely identifies a destination copy vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
DestinationRecoveryPointArn (string) --
An ARN that uniquely identifies a destination recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
ResourceArn (string) --
The type of AWS resource to be copied; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.
CreationDate (datetime) --
The date and time a copy job is created, in Unix format and Coordinated Universal Time (UTC). The value of CreationDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
CompletionDate (datetime) --
The date and time a job to create a copy job is completed, in Unix format and Coordinated Universal Time (UTC). The value of CompletionDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
State (string) --
The current state of a resource recovery point.
StatusMessage (string) --
A detailed message explaining the status of the job that to copy a resource.
BackupSizeInBytes (integer) --
The size, in bytes, of a copy job.
IamRoleArn (string) --
Specifies the IAM role ARN used to copy the target recovery point; for example, arn:aws:iam::123456789012:role/S3Access.
CreatedBy (dict) --
Contains information about the backup plan and rule that AWS Backup used to initiate the recovery point backup.
BackupPlanId (string) --
Uniquely identifies a backup plan.
BackupPlanArn (string) --
An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50 .
BackupPlanVersion (string) --
Version IDs are unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. They cannot be edited.
BackupRuleId (string) --
Uniquely identifies a rule used to schedule the backup of a selection of resources.
ResourceType (string) --
The type of AWS resource to be copied; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.
Starts a job to create a one-time copy of the specified resource.
See also: AWS API Documentation
Request Syntax
client.start_copy_job( RecoveryPointArn='string', SourceBackupVaultName='string', DestinationBackupVaultArn='string', IamRoleArn='string', IdempotencyToken='string', Lifecycle={ 'MoveToColdStorageAfterDays': 123, 'DeleteAfterDays': 123 } )
string
[REQUIRED]
An ARN that uniquely identifies a recovery point to use for the copy job; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
string
[REQUIRED]
The name of a logical source container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens. >
string
[REQUIRED]
An Amazon Resource Name (ARN) that uniquely identifies a destination backup vault to copy to; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault .
string
[REQUIRED]
Specifies the IAM role ARN used to copy the target recovery point; for example, arn:aws:iam::123456789012:role/S3Access.
string
A customer chosen string that can be used to distinguish between calls to StartCopyJob .
dict
Contains an array of Transition objects specifying how long in days before a recovery point transitions to cold storage or is deleted.
Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, on the console, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.
MoveToColdStorageAfterDays (integer) --
Specifies the number of days after creation that a recovery point is moved to cold storage.
DeleteAfterDays (integer) --
Specifies the number of days after creation that a recovery point is deleted. Must be greater than 90 days plus MoveToColdStorageAfterDays .
dict
Response Syntax
{ 'CopyJobId': 'string', 'CreationDate': datetime(2015, 1, 1) }
Response Structure
(dict) --
CopyJobId (string) --
Uniquely identifies a request to AWS Backup to copy a resource.
CreationDate (datetime) --
The date and time that a backup job is started, in Unix format and Coordinated Universal Time (UTC). The value of CreationDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. >
Returns metadata about your copy jobs.
See also: AWS API Documentation
Request Syntax
client.list_copy_jobs( NextToken='string', MaxResults=123, ByResourceArn='string', ByState='CREATED'|'RUNNING'|'COMPLETED'|'FAILED', ByCreatedBefore=datetime(2015, 1, 1), ByCreatedAfter=datetime(2015, 1, 1), ByResourceType='string', ByDestinationVaultArn='string' )
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.
integer
The maximum number of items to be returned.
string
Returns only copy jobs that match the specified resource Amazon Resource Name (ARN).
string
Returns only copy jobs that are in the specified state.
datetime
Returns only copy jobs that were created before the specified date.
datetime
Returns only copy jobs that were created after the specified date.
string
Returns only backup jobs for the specified resources:
DynamoDB for Amazon DynamoDB
EBS for Amazon Elastic Block Store
EFS for Amazon Elastic File System
RDS for Amazon Relational Database Service
Storage Gateway for AWS Storage Gateway
string
An Amazon Resource Name (ARN) that uniquely identifies a source backup vault to copy from; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
dict
Response Syntax
{ 'CopyJobs': [ { 'CopyJobId': 'string', 'SourceBackupVaultArn': 'string', 'SourceRecoveryPointArn': 'string', 'DestinationBackupVaultArn': 'string', 'DestinationRecoveryPointArn': 'string', 'ResourceArn': 'string', 'CreationDate': datetime(2015, 1, 1), 'CompletionDate': datetime(2015, 1, 1), 'State': 'CREATED'|'RUNNING'|'COMPLETED'|'FAILED', 'StatusMessage': 'string', 'BackupSizeInBytes': 123, 'IamRoleArn': 'string', 'CreatedBy': { 'BackupPlanId': 'string', 'BackupPlanArn': 'string', 'BackupPlanVersion': 'string', 'BackupRuleId': 'string' }, 'ResourceType': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
CopyJobs (list) --
An array of structures containing metadata about your copy jobs returned in JSON format.
(dict) --
Contains detailed information about a copy job.
CopyJobId (string) --
Uniquely identifies a request to AWS Backup to copy a resource.
SourceBackupVaultArn (string) --
An Amazon Resource Name (ARN) that uniquely identifies a source copy vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
SourceRecoveryPointArn (string) --
An ARN that uniquely identifies a source recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
DestinationBackupVaultArn (string) --
An Amazon Resource Name (ARN) that uniquely identifies a destination copy vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
DestinationRecoveryPointArn (string) --
An ARN that uniquely identifies a destination recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
ResourceArn (string) --
The type of AWS resource to be copied; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.
CreationDate (datetime) --
The date and time a copy job is created, in Unix format and Coordinated Universal Time (UTC). The value of CreationDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
CompletionDate (datetime) --
The date and time a job to create a copy job is completed, in Unix format and Coordinated Universal Time (UTC). The value of CompletionDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
State (string) --
The current state of a resource recovery point.
StatusMessage (string) --
A detailed message explaining the status of the job that to copy a resource.
BackupSizeInBytes (integer) --
The size, in bytes, of a copy job.
IamRoleArn (string) --
Specifies the IAM role ARN used to copy the target recovery point; for example, arn:aws:iam::123456789012:role/S3Access.
CreatedBy (dict) --
Contains information about the backup plan and rule that AWS Backup used to initiate the recovery point backup.
BackupPlanId (string) --
Uniquely identifies a backup plan.
BackupPlanArn (string) --
An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50 .
BackupPlanVersion (string) --
Version IDs are unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. They cannot be edited.
BackupRuleId (string) --
Uniquely identifies a rule used to schedule the backup of a selection of resources.
ResourceType (string) --
The type of AWS resource to be copied; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.
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.
{'BackupPlan': {'Rules': {'CopyActions': [{'DestinationBackupVaultArn': 'string', 'Lifecycle': {'DeleteAfterDays': 'long', 'MoveToColdStorageAfterDays': 'long'}}]}}}
Backup plans are documents that contain information that AWS Backup uses to schedule tasks that create recovery points of resources.
If you call CreateBackupPlan with a plan that already exists, an AlreadyExistsException is returned.
See also: AWS API Documentation
Request Syntax
client.create_backup_plan( BackupPlan={ 'BackupPlanName': 'string', 'Rules': [ { 'RuleName': 'string', 'TargetBackupVaultName': 'string', 'ScheduleExpression': 'string', 'StartWindowMinutes': 123, 'CompletionWindowMinutes': 123, 'Lifecycle': { 'MoveToColdStorageAfterDays': 123, 'DeleteAfterDays': 123 }, 'RecoveryPointTags': { 'string': 'string' }, 'CopyActions': [ { 'Lifecycle': { 'MoveToColdStorageAfterDays': 123, 'DeleteAfterDays': 123 }, 'DestinationBackupVaultArn': 'string' }, ] }, ] }, BackupPlanTags={ 'string': 'string' }, CreatorRequestId='string' )
dict
[REQUIRED]
Specifies 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.
Rules (list) -- [REQUIRED]
An array of BackupRule objects, each of which specifies a scheduled task that is used to back up a selection of resources.
(dict) --
Specifies a scheduled task used to back up a selection of resources.
RuleName (string) -- [REQUIRED]
>An optional display name for a backup rule.
TargetBackupVaultName (string) -- [REQUIRED]
The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.
ScheduleExpression (string) --
A CRON expression specifying when AWS Backup initiates a backup job.
StartWindowMinutes (integer) --
The amount of time in minutes before beginning a backup.
CompletionWindowMinutes (integer) --
The amount of time AWS Backup attempts a backup before canceling the job and returning an error.
Lifecycle (dict) --
The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup will transition and expire backups automatically according to the lifecycle that you define.
Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days”. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.
MoveToColdStorageAfterDays (integer) --
Specifies the number of days after creation that a recovery point is moved to cold storage.
DeleteAfterDays (integer) --
Specifies the number of days after creation that a recovery point is deleted. Must be greater than 90 days plus MoveToColdStorageAfterDays .
RecoveryPointTags (dict) --
To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a key-value pair.
(string) --
(string) --
CopyActions (list) --
An array of CopyAction objects, which contains the details of the copy operation.
(dict) --
The details of the copy operation.
Lifecycle (dict) --
Contains an array of Transition objects specifying how long in days before a recovery point transitions to cold storage or is deleted.
Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, on the console, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.
MoveToColdStorageAfterDays (integer) --
Specifies the number of days after creation that a recovery point is moved to cold storage.
DeleteAfterDays (integer) --
Specifies the number of days after creation that a recovery point is deleted. Must be greater than 90 days plus MoveToColdStorageAfterDays .
DestinationBackupVaultArn (string) -- [REQUIRED]
An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup. For example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
dict
To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a key-value pair. The specified tags are assigned to all backups created with this plan.
(string) --
(string) --
string
Identifies the request and allows failed requests to be retried without the risk of executing the operation twice. If the request includes a CreatorRequestId that matches an existing backup plan, that plan is returned. This parameter is optional.
dict
Response Syntax
{ 'BackupPlanId': 'string', 'BackupPlanArn': 'string', 'CreationDate': datetime(2015, 1, 1), 'VersionId': 'string' }
Response Structure
(dict) --
BackupPlanId (string) --
Uniquely identifies a backup plan.
BackupPlanArn (string) --
An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50 .
CreationDate (datetime) --
The date and time that a backup plan is created, in Unix format and Coordinated Universal Time (UTC). The value of CreationDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
VersionId (string) --
Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1024 bytes long. They cannot be edited.
{'BackupPlan': {'Rules': {'CopyActions': [{'DestinationBackupVaultArn': 'string', 'Lifecycle': {'DeleteAfterDays': 'long', 'MoveToColdStorageAfterDays': 'long'}}]}}}
Returns the body of a backup plan in JSON format, in addition to plan metadata.
See also: AWS API Documentation
Request Syntax
client.get_backup_plan( BackupPlanId='string', VersionId='string' )
string
[REQUIRED]
Uniquely identifies a backup plan.
string
Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. Version IDs cannot be edited.
dict
Response Syntax
{ 'BackupPlan': { 'BackupPlanName': 'string', 'Rules': [ { 'RuleName': 'string', 'TargetBackupVaultName': 'string', 'ScheduleExpression': 'string', 'StartWindowMinutes': 123, 'CompletionWindowMinutes': 123, 'Lifecycle': { 'MoveToColdStorageAfterDays': 123, 'DeleteAfterDays': 123 }, 'RecoveryPointTags': { 'string': 'string' }, 'RuleId': 'string', 'CopyActions': [ { 'Lifecycle': { 'MoveToColdStorageAfterDays': 123, 'DeleteAfterDays': 123 }, 'DestinationBackupVaultArn': 'string' }, ] }, ] }, 'BackupPlanId': 'string', 'BackupPlanArn': 'string', 'VersionId': 'string', 'CreatorRequestId': 'string', 'CreationDate': datetime(2015, 1, 1), 'DeletionDate': datetime(2015, 1, 1), 'LastExecutionDate': datetime(2015, 1, 1) }
Response Structure
(dict) --
BackupPlan (dict) --
Specifies the body of a backup plan. Includes a BackupPlanName and one or more sets of Rules .
BackupPlanName (string) --
The display name of a backup plan.
Rules (list) --
An array of BackupRule objects, each of which specifies a scheduled task that is used to back up a selection of resources.
(dict) --
Specifies a scheduled task used to back up a selection of resources.
RuleName (string) --
An optional display name for a backup rule.
TargetBackupVaultName (string) --
The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.
ScheduleExpression (string) --
A CRON expression specifying when AWS Backup initiates a backup job.
StartWindowMinutes (integer) --
An optional value that specifies a period of time in minutes after a backup is scheduled before a job is canceled if it doesn't start successfully.
CompletionWindowMinutes (integer) --
A value in minutes after a backup job is successfully started before it must be completed or it is canceled by AWS Backup. This value is optional.
Lifecycle (dict) --
The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup transitions and expires backups automatically according to the lifecycle that you define.
Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.
MoveToColdStorageAfterDays (integer) --
Specifies the number of days after creation that a recovery point is moved to cold storage.
DeleteAfterDays (integer) --
Specifies the number of days after creation that a recovery point is deleted. Must be greater than 90 days plus MoveToColdStorageAfterDays .
RecoveryPointTags (dict) --
An array of key-value pair strings that are assigned to resources that are associated with this rule when restored from backup.
(string) --
(string) --
RuleId (string) --
Uniquely identifies a rule that is used to schedule the backup of a selection of resources.
CopyActions (list) --
An array of CopyAction objects, which contains the details of the copy operation.
(dict) --
The details of the copy operation.
Lifecycle (dict) --
Contains an array of Transition objects specifying how long in days before a recovery point transitions to cold storage or is deleted.
Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, on the console, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.
MoveToColdStorageAfterDays (integer) --
Specifies the number of days after creation that a recovery point is moved to cold storage.
DeleteAfterDays (integer) --
Specifies the number of days after creation that a recovery point is deleted. Must be greater than 90 days plus MoveToColdStorageAfterDays .
DestinationBackupVaultArn (string) --
An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup. For example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
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 executing 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 CreationDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
LastExecutionDate (datetime) --
The last time a job to back up resources was executed with this backup plan. A date and time, in Unix format and Coordinated Universal Time (UTC). The value of LastExecutionDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
{'BackupPlan': {'Rules': {'CopyActions': [{'DestinationBackupVaultArn': 'string', 'Lifecycle': {'DeleteAfterDays': 'long', 'MoveToColdStorageAfterDays': 'long'}}]}}}
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' )
string
[REQUIRED]
A customer-supplied backup plan document in JSON format.
dict
Response Syntax
{ 'BackupPlan': { 'BackupPlanName': 'string', 'Rules': [ { 'RuleName': 'string', 'TargetBackupVaultName': 'string', 'ScheduleExpression': 'string', 'StartWindowMinutes': 123, 'CompletionWindowMinutes': 123, 'Lifecycle': { 'MoveToColdStorageAfterDays': 123, 'DeleteAfterDays': 123 }, 'RecoveryPointTags': { 'string': 'string' }, 'RuleId': 'string', 'CopyActions': [ { 'Lifecycle': { 'MoveToColdStorageAfterDays': 123, 'DeleteAfterDays': 123 }, 'DestinationBackupVaultArn': 'string' }, ] }, ] } }
Response Structure
(dict) --
BackupPlan (dict) --
Specifies the body of a backup plan. Includes a BackupPlanName and one or more sets of Rules .
BackupPlanName (string) --
The display name of a backup plan.
Rules (list) --
An array of BackupRule objects, each of which specifies a scheduled task that is used to back up a selection of resources.
(dict) --
Specifies a scheduled task used to back up a selection of resources.
RuleName (string) --
An optional display name for a backup rule.
TargetBackupVaultName (string) --
The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.
ScheduleExpression (string) --
A CRON expression specifying when AWS Backup initiates a backup job.
StartWindowMinutes (integer) --
An optional value that specifies a period of time in minutes after a backup is scheduled before a job is canceled if it doesn't start successfully.
CompletionWindowMinutes (integer) --
A value in minutes after a backup job is successfully started before it must be completed or it is canceled by AWS Backup. This value is optional.
Lifecycle (dict) --
The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup transitions and expires backups automatically according to the lifecycle that you define.
Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.
MoveToColdStorageAfterDays (integer) --
Specifies the number of days after creation that a recovery point is moved to cold storage.
DeleteAfterDays (integer) --
Specifies the number of days after creation that a recovery point is deleted. Must be greater than 90 days plus MoveToColdStorageAfterDays .
RecoveryPointTags (dict) --
An array of key-value pair strings that are assigned to resources that are associated with this rule when restored from backup.
(string) --
(string) --
RuleId (string) --
Uniquely identifies a rule that is used to schedule the backup of a selection of resources.
CopyActions (list) --
An array of CopyAction objects, which contains the details of the copy operation.
(dict) --
The details of the copy operation.
Lifecycle (dict) --
Contains an array of Transition objects specifying how long in days before a recovery point transitions to cold storage or is deleted.
Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, on the console, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.
MoveToColdStorageAfterDays (integer) --
Specifies the number of days after creation that a recovery point is moved to cold storage.
DeleteAfterDays (integer) --
Specifies the number of days after creation that a recovery point is deleted. Must be greater than 90 days plus MoveToColdStorageAfterDays .
DestinationBackupVaultArn (string) --
An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup. For example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
{'BackupPlanDocument': {'Rules': {'CopyActions': [{'DestinationBackupVaultArn': 'string', 'Lifecycle': {'DeleteAfterDays': 'long', 'MoveToColdStorageAfterDays': 'long'}}]}}}
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' )
string
[REQUIRED]
Uniquely identifies a stored backup plan template.
dict
Response Syntax
{ 'BackupPlanDocument': { 'BackupPlanName': 'string', 'Rules': [ { 'RuleName': 'string', 'TargetBackupVaultName': 'string', 'ScheduleExpression': 'string', 'StartWindowMinutes': 123, 'CompletionWindowMinutes': 123, 'Lifecycle': { 'MoveToColdStorageAfterDays': 123, 'DeleteAfterDays': 123 }, 'RecoveryPointTags': { 'string': 'string' }, 'RuleId': 'string', 'CopyActions': [ { 'Lifecycle': { 'MoveToColdStorageAfterDays': 123, 'DeleteAfterDays': 123 }, 'DestinationBackupVaultArn': 'string' }, ] }, ] } }
Response Structure
(dict) --
BackupPlanDocument (dict) --
Returns the body of a backup plan based on the target template, including the name, rules, and backup vault of the plan.
BackupPlanName (string) --
The display name of a backup plan.
Rules (list) --
An array of BackupRule objects, each of which specifies a scheduled task that is used to back up a selection of resources.
(dict) --
Specifies a scheduled task used to back up a selection of resources.
RuleName (string) --
An optional display name for a backup rule.
TargetBackupVaultName (string) --
The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.
ScheduleExpression (string) --
A CRON expression specifying when AWS Backup initiates a backup job.
StartWindowMinutes (integer) --
An optional value that specifies a period of time in minutes after a backup is scheduled before a job is canceled if it doesn't start successfully.
CompletionWindowMinutes (integer) --
A value in minutes after a backup job is successfully started before it must be completed or it is canceled by AWS Backup. This value is optional.
Lifecycle (dict) --
The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup transitions and expires backups automatically according to the lifecycle that you define.
Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.
MoveToColdStorageAfterDays (integer) --
Specifies the number of days after creation that a recovery point is moved to cold storage.
DeleteAfterDays (integer) --
Specifies the number of days after creation that a recovery point is deleted. Must be greater than 90 days plus MoveToColdStorageAfterDays .
RecoveryPointTags (dict) --
An array of key-value pair strings that are assigned to resources that are associated with this rule when restored from backup.
(string) --
(string) --
RuleId (string) --
Uniquely identifies a rule that is used to schedule the backup of a selection of resources.
CopyActions (list) --
An array of CopyAction objects, which contains the details of the copy operation.
(dict) --
The details of the copy operation.
Lifecycle (dict) --
Contains an array of Transition objects specifying how long in days before a recovery point transitions to cold storage or is deleted.
Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, on the console, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.
MoveToColdStorageAfterDays (integer) --
Specifies the number of days after creation that a recovery point is moved to cold storage.
DeleteAfterDays (integer) --
Specifies the number of days after creation that a recovery point is deleted. Must be greater than 90 days plus MoveToColdStorageAfterDays .
DestinationBackupVaultArn (string) --
An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup. For example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
{'BackupVaultEvents': {'BACKUP_JOB_EXPIRED', 'BACKUP_JOB_FAILED', 'BACKUP_JOB_SUCCESSFUL', 'COPY_JOB_FAILED', 'COPY_JOB_STARTED', 'COPY_JOB_SUCCESSFUL', 'RESTORE_JOB_FAILED', 'RESTORE_JOB_SUCCESSFUL'}}
Returns event notifications for the specified backup vault.
See also: AWS API Documentation
Request Syntax
client.get_backup_vault_notifications( BackupVaultName='string' )
string
[REQUIRED]
The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.
dict
Response Syntax
{ 'BackupVaultName': 'string', 'BackupVaultArn': 'string', 'SNSTopicArn': 'string', 'BackupVaultEvents': [ 'BACKUP_JOB_STARTED'|'BACKUP_JOB_COMPLETED'|'BACKUP_JOB_SUCCESSFUL'|'BACKUP_JOB_FAILED'|'BACKUP_JOB_EXPIRED'|'RESTORE_JOB_STARTED'|'RESTORE_JOB_COMPLETED'|'RESTORE_JOB_SUCCESSFUL'|'RESTORE_JOB_FAILED'|'COPY_JOB_STARTED'|'COPY_JOB_SUCCESSFUL'|'COPY_JOB_FAILED'|'RECOVERY_POINT_MODIFIED'|'BACKUP_PLAN_CREATED'|'BACKUP_PLAN_MODIFIED', ] }
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. They consist of lowercase letters, numbers, and hyphens.
BackupVaultArn (string) --
An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault .
SNSTopicArn (string) --
An ARN that uniquely identifies an Amazon Simple Notification Service (Amazon SNS) topic; for example, arn:aws:sns:us-west-2:111122223333:MyTopic .
BackupVaultEvents (list) --
An array of events that indicate the status of jobs to back up resources to the backup vault.
(string) --
{'BackupVaultEvents': {'BACKUP_JOB_EXPIRED', 'BACKUP_JOB_FAILED', 'BACKUP_JOB_SUCCESSFUL', 'COPY_JOB_FAILED', 'COPY_JOB_STARTED', 'COPY_JOB_SUCCESSFUL', 'RESTORE_JOB_FAILED', 'RESTORE_JOB_SUCCESSFUL'}}
Turns on notifications on a backup vault for the specified topic and events.
See also: AWS API Documentation
Request Syntax
client.put_backup_vault_notifications( BackupVaultName='string', SNSTopicArn='string', BackupVaultEvents=[ 'BACKUP_JOB_STARTED'|'BACKUP_JOB_COMPLETED'|'BACKUP_JOB_SUCCESSFUL'|'BACKUP_JOB_FAILED'|'BACKUP_JOB_EXPIRED'|'RESTORE_JOB_STARTED'|'RESTORE_JOB_COMPLETED'|'RESTORE_JOB_SUCCESSFUL'|'RESTORE_JOB_FAILED'|'COPY_JOB_STARTED'|'COPY_JOB_SUCCESSFUL'|'COPY_JOB_FAILED'|'RECOVERY_POINT_MODIFIED'|'BACKUP_PLAN_CREATED'|'BACKUP_PLAN_MODIFIED', ] )
string
[REQUIRED]
The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.
string
[REQUIRED]
The Amazon Resource Name (ARN) that specifies the topic for a backup vault’s events; for example, arn:aws:sns:us-west-2:111122223333:MyVaultTopic .
list
[REQUIRED]
An array of events that indicate the status of jobs to back up resources to the backup vault.
(string) --
None
{'BackupPlan': {'Rules': {'CopyActions': [{'DestinationBackupVaultArn': 'string', 'Lifecycle': {'DeleteAfterDays': 'long', 'MoveToColdStorageAfterDays': 'long'}}]}}}
Replaces the body of a saved backup plan identified by its backupPlanId with the input document in JSON format. The new version is uniquely identified by a VersionId .
See also: AWS API Documentation
Request Syntax
client.update_backup_plan( BackupPlanId='string', BackupPlan={ 'BackupPlanName': 'string', 'Rules': [ { 'RuleName': 'string', 'TargetBackupVaultName': 'string', 'ScheduleExpression': 'string', 'StartWindowMinutes': 123, 'CompletionWindowMinutes': 123, 'Lifecycle': { 'MoveToColdStorageAfterDays': 123, 'DeleteAfterDays': 123 }, 'RecoveryPointTags': { 'string': 'string' }, 'CopyActions': [ { 'Lifecycle': { 'MoveToColdStorageAfterDays': 123, 'DeleteAfterDays': 123 }, 'DestinationBackupVaultArn': 'string' }, ] }, ] } )
string
[REQUIRED]
Uniquely identifies a backup plan.
dict
[REQUIRED]
Specifies 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.
Rules (list) -- [REQUIRED]
An array of BackupRule objects, each of which specifies a scheduled task that is used to back up a selection of resources.
(dict) --
Specifies a scheduled task used to back up a selection of resources.
RuleName (string) -- [REQUIRED]
>An optional display name for a backup rule.
TargetBackupVaultName (string) -- [REQUIRED]
The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.
ScheduleExpression (string) --
A CRON expression specifying when AWS Backup initiates a backup job.
StartWindowMinutes (integer) --
The amount of time in minutes before beginning a backup.
CompletionWindowMinutes (integer) --
The amount of time AWS Backup attempts a backup before canceling the job and returning an error.
Lifecycle (dict) --
The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup will transition and expire backups automatically according to the lifecycle that you define.
Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days”. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.
MoveToColdStorageAfterDays (integer) --
Specifies the number of days after creation that a recovery point is moved to cold storage.
DeleteAfterDays (integer) --
Specifies the number of days after creation that a recovery point is deleted. Must be greater than 90 days plus MoveToColdStorageAfterDays .
RecoveryPointTags (dict) --
To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a key-value pair.
(string) --
(string) --
CopyActions (list) --
An array of CopyAction objects, which contains the details of the copy operation.
(dict) --
The details of the copy operation.
Lifecycle (dict) --
Contains an array of Transition objects specifying how long in days before a recovery point transitions to cold storage or is deleted.
Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, on the console, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.
MoveToColdStorageAfterDays (integer) --
Specifies the number of days after creation that a recovery point is moved to cold storage.
DeleteAfterDays (integer) --
Specifies the number of days after creation that a recovery point is deleted. Must be greater than 90 days plus MoveToColdStorageAfterDays .
DestinationBackupVaultArn (string) -- [REQUIRED]
An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup. For example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
dict
Response Syntax
{ 'BackupPlanId': 'string', 'BackupPlanArn': 'string', 'CreationDate': datetime(2015, 1, 1), 'VersionId': 'string' }
Response Structure
(dict) --
BackupPlanId (string) --
Uniquely identifies a backup plan.
BackupPlanArn (string) --
An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50 .
CreationDate (datetime) --
The date and time a backup plan is updated, in Unix format and Coordinated Universal Time (UTC). The value of CreationDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
VersionId (string) --
Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. Version Ids cannot be edited.