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
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
Description | BODY | string | No | This 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. |
Category | BODY | string | No | Standard | snapshot type. Value range: Standard: normal snapshot Flash: local snapshot |
Tag.N.Key | BODY | string | No | TestKey | the 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://. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
Tag.N.Value | BODY | string | No | TestValue | the 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://. |
RetentionDays | BODY | integer | No | 30 | sets 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. |
ClientToken | BODY | string | No | 123e4567-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. |
SnapshotName | BODY | string | No | test-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. |
version | BODY | string | No | 2016-01-01 | version of api |
DiskId | BODY | string | Yes | d-bp1s5fnvk4gn2tws0**** | cloud disk ID. |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestID | string | 1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC | Request id |
Example
Successful Response example
{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}