CreateBackup
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
, and UNHEALTHY
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.
An InvalidStateException
is thrown when the server is not in any of the following states: RUNNING, HEALTHY, or UNHEALTHY.
A ResourceNotFoundException
is thrown when the server is not found.
A ValidationException
is thrown when parameters of the request are not valid.
Request Syntax
{
"Description": "string
",
"ServerName": "string
",
"Tags": [
{
"Key": "string
",
"Value": "string
"
}
]
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- Description
-
A user-defined description of the backup.
Type: String
Length Constraints: Maximum length of 10000.
Pattern:
(?s).*
Required: No
- ServerName
-
The name of the server that you want to back up.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 40.
Pattern:
[a-zA-Z][a-zA-Z0-9\-]*
Required: Yes
- Tags
-
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.
Type: Array of Tag objects
Array Members: Minimum number of 0 items. Maximum number of 200 items.
Required: No
-
Response Syntax
{
"Backup": {
"BackupArn": "string",
"BackupId": "string",
"BackupType": "string",
"CreatedAt": number,
"Description": "string",
"Engine": "string",
"EngineModel": "string",
"EngineVersion": "string",
"InstanceProfileArn": "string",
"InstanceType": "string",
"KeyPair": "string",
"PreferredBackupWindow": "string",
"PreferredMaintenanceWindow": "string",
"S3DataSize": number,
"S3DataUrl": "string",
"S3LogUrl": "string",
"SecurityGroupIds": [ "string" ],
"ServerName": "string",
"ServiceRoleArn": "string",
"Status": "string",
"StatusDescription": "string",
"SubnetIds": [ "string" ],
"ToolsVersion": "string",
"UserArn": "string"
}
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
Errors
For information about the errors that are common to all actions, see Common Errors.
- InvalidStateException
-
The resource is in a state that does not allow you to perform a specified action.
HTTP Status Code: 400
- LimitExceededException
-
The limit of servers or backups has been reached.
HTTP Status Code: 400
- ResourceNotFoundException
-
The requested resource does not exist, or access was denied.
HTTP Status Code: 400
- ValidationException
-
One or more of the provided request parameters are not valid.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: