OpsWorksCM / Client / create_backup
create_backup#
- OpsWorksCM.Client.create_backup(**kwargs)#
Creates an application-level backup of a server. While the server is in the
BACKING_UP
state, the server cannot be changed, and no additional backup can be created.Backups can be created for servers in
RUNNING
,HEALTHY
, andUNHEALTHY
states. By default, you can create a maximum of 50 manual backups.This operation is asynchronous.
A
LimitExceededException
is thrown when the maximum number of manual backups is reached. AnInvalidStateException
is thrown when the server is not in any of the following states: RUNNING, HEALTHY, or UNHEALTHY. AResourceNotFoundException
is thrown when the server is not found. AValidationException
is thrown when parameters of the request are not valid.See also: AWS API Documentation
Request Syntax
response = client.create_backup( ServerName='string', Description='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
- Parameters:
ServerName (string) –
[REQUIRED]
The name of the server that you want to back up.
Description (string) – A user-defined description of the backup.
Tags (list) –
A map that contains tag keys and tag values to attach to an AWS OpsWorks-CM server backup.
The key cannot be empty.
The key can be a maximum of 127 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters:
+ - = . _ : /
The value can be a maximum 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters:
+ - = . _ : /
Leading and trailing white spaces are trimmed from both the key and value.
A maximum of 50 user-applied tags is allowed for tag-supported AWS OpsWorks-CM resources.
(dict) –
A map that contains tag keys and tag values to attach to an AWS OpsWorks for Chef Automate or AWS OpsWorks for Puppet Enterprise server. Leading and trailing white spaces are trimmed from both the key and value. A maximum of 50 user-applied tags is allowed for tag-supported AWS OpsWorks-CM resources.
Key (string) – [REQUIRED]
A tag key, such as
Stage
orName
. A tag key cannot be empty. The key can be a maximum of 127 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters:+ - = . _ : /
Value (string) – [REQUIRED]
An optional tag value, such as
Production
ortest-owcm-server
. The value can be a maximum of 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters:+ - = . _ : /
- Return type:
dict
- Returns:
Response Syntax
{ 'Backup': { 'BackupArn': 'string', 'BackupId': 'string', 'BackupType': 'AUTOMATED'|'MANUAL', 'CreatedAt': datetime(2015, 1, 1), 'Description': 'string', 'Engine': 'string', 'EngineModel': 'string', 'EngineVersion': 'string', 'InstanceProfileArn': 'string', 'InstanceType': 'string', 'KeyPair': 'string', 'PreferredBackupWindow': 'string', 'PreferredMaintenanceWindow': 'string', 'S3DataSize': 123, 'S3DataUrl': 'string', 'S3LogUrl': 'string', 'SecurityGroupIds': [ 'string', ], 'ServerName': 'string', 'ServiceRoleArn': 'string', 'Status': 'IN_PROGRESS'|'OK'|'FAILED'|'DELETING', 'StatusDescription': 'string', 'SubnetIds': [ 'string', ], 'ToolsVersion': 'string', 'UserArn': 'string' } }
Response Structure
(dict) –
Backup (dict) –
Backup created by request.
BackupArn (string) –
The ARN of the backup.
BackupId (string) –
The generated ID of the backup. Example:
myServerName-yyyyMMddHHmmssSSS
BackupType (string) –
The backup type. Valid values are
automated
ormanual
.CreatedAt (datetime) –
The time stamp when the backup was created in the database. Example:
2016-07-29T13:38:47.520Z
Description (string) –
A user-provided description for a manual backup. This field is empty for automated backups.
Engine (string) –
The engine type that is obtained from the server when the backup is created.
EngineModel (string) –
The engine model that is obtained from the server when the backup is created.
EngineVersion (string) –
The engine version that is obtained from the server when the backup is created.
InstanceProfileArn (string) –
The EC2 instance profile ARN that is obtained from the server when the backup is created. Because this value is stored, you are not required to provide the InstanceProfileArn again if you restore a backup.
InstanceType (string) –
The instance type that is obtained from the server when the backup is created.
KeyPair (string) –
The key pair that is obtained from the server when the backup is created.
PreferredBackupWindow (string) –
The preferred backup period that is obtained from the server when the backup is created.
PreferredMaintenanceWindow (string) –
The preferred maintenance period that is obtained from the server when the backup is created.
S3DataSize (integer) –
This field is deprecated and is no longer used.
S3DataUrl (string) –
This field is deprecated and is no longer used.
S3LogUrl (string) –
The Amazon S3 URL of the backup’s log file.
SecurityGroupIds (list) –
The security group IDs that are obtained from the server when the backup is created.
(string) –
ServerName (string) –
The name of the server from which the backup was made.
ServiceRoleArn (string) –
The service role ARN that is obtained from the server when the backup is created.
Status (string) –
The status of a backup while in progress.
StatusDescription (string) –
An informational message about backup status.
SubnetIds (list) –
The subnet IDs that are obtained from the server when the backup is created.
(string) –
ToolsVersion (string) –
The version of AWS OpsWorks CM-specific tools that is obtained from the server when the backup is created.
UserArn (string) –
The IAM user ARN of the requester for manual backups. This field is empty for automated backups.
Exceptions
OpsWorksCM.Client.exceptions.InvalidStateException
OpsWorksCM.Client.exceptions.LimitExceededException
OpsWorksCM.Client.exceptions.ResourceNotFoundException
OpsWorksCM.Client.exceptions.ValidationException