Home >Operation and Maintenance >Linux Operation and Maintenance >How to create a snapshot for an ECS disk when calling this interface
This article introduces how to create a snapshot for an ECS disk when calling this interface, and focuses on the specific steps. The content of this article is compact, and I hope you can gain something from it.
CreateSnapshot
Create a snapshot of an ECS disk.
Description
When calling this interface, you need to note:
A disk can create up to 64 snapshots.
The disk-mounted instance must be in Stopped or Running state, otherwise the snapshot cannot be created.
The disk must be mounted to the instance, otherwise the snapshot cannot be created.
The disk-mounted instance has never been started and a snapshot cannot be created.
The OperationLocks of the ECS instance controlled by security cannot be marked as "LockReason": "security".
Create a new cloud server ECS (RunInstances), replace the system disk (ReplaceSystemDisk), or add a new data disk based on the snapshot (CreateDisk). Since the data loading has not been completed, the snapshot cannot be created. A snapshot can be created about an hour after creating a new cloud server ECS or replacing the system disk. The time it takes to create a snapshot for a new data disk depends on the size of the disk data.
If the snapshot creation is not completed, you cannot create another snapshot for the disk.
If the snapshot creation has not been completed, this snapshot cannot be used to create a custom image (CreateImage).
Request parameters
##Return parameters
Example
Request Example
https://ecs.aliyuncs.com/?Action=CreateSnapshot &DiskId=1033-60053321 &<公共请求参数>
Return example
XML format
<CreateSnapshotResponse> <RequestId>C8B26B44-0189-443E-9816-D951F59623A9</RequestId> <SnapshotId>s-923FE2BF0</SnapshotId> </CreateSnapshotResponse>
JSON format
{ "RequestId": "C8B26B44-0189-443E-9816-D951F59623A9", "SnapshotId": "s-923FE2BF0" }
Error code
The following are error codes unique to this interface. For more error codes, please visit the API Error Center.The above is the detailed content of How to create a snapshot for an ECS disk when calling this interface. For more information, please follow other related articles on the PHP Chinese website!