Skip to main content

CreateSnapshot

Description

call CreateSnapshot to create 1 snapshot of a cloud disk.

Request Method

POST

Request Path

/apsara/route/Ecs/CreateSnapshot

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
DescriptionBODYstringNoThis is a description example.description of the snapshot. 2 to 256 English or Chinese characters in length and cannot start with http:// or https. default value: empty.
CategoryBODYstringNoStandardsnapshot type. Value range: Standard: normal snapshot Flash: local snapshot
Tag.N.KeyBODYstringNoTestKeythe tag key of the snapshot. The value range of n is 1~20. Once the value is passed in, an empty string is not allowed. it can be up to 128 characters in length. it cannot start with aliyun or acs: and cannot contain http:// or https://.
regionIdBODYstringYesNo sample value for this parameter.region id
Tag.N.ValueBODYstringNoTestValuethe label value of the snapshot. The value range of n is 1~20. Once the value is passed in, it can be an empty string. it can be up to 128 characters and cannot start with acs: and cannot contain http:// or https://.
RetentionDaysBODYintegerNo30sets the retention time of snapshots in days. The snapshot is automatically released after the retention time is exceeded. Valid values: 1 to 65536. default value: empty, indicating that the snapshot will not be automatically released.
ClientTokenBODYstringNo123e4567-e89b-12d3-a456-42665544****Ensure request idempotence. Generate a parameter value from your client to ensure that the parameter value is unique between different requests. ClientToken only supports ASCII characters and cannot exceed 64 characters. For more details, please refer to how to ensure idempotence in the Cloud Server ECS Development Guide.
SnapshotNameBODYstringNotest-Snapshot****the display name of the snapshot. The length is 2~128 English or Chinese characters. It must start with a letter or Chinese, and cannot start with http:// or https. It can contain numbers, colons (:), underscores (_), or hyphens (-). cannot start with auto to prevent name conflicts with automatic snapshots.
versionBODYstringNo2016-01-01version of api
DiskIdBODYstringYesd-bp1s5fnvk4gn2tws0****cloud disk ID.

Return data

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}