为指定ECS实例中的云盘创建快照一致性组。快照一致性组包含一个或多个云盘对应的快照。
接口说明
您可以设置InstanceId为实例内的指定云盘创建快照一致性组;也可以只使用DiskId.N为同可用区内多台 ECS 实例挂载的多块云盘创建快照一致性组。
DiskId.N不可与ExcludeDiskId.N同时设置。此外,如果设置了InstanceId,则DiskId.N只能设置指定实例内已挂载的云盘,不再支持设置多个跨实例的云盘 ID。
创建快照一致性组时,请注意:
-
待创建快照的云盘必须处于使用中(
In_use)或待挂载(Available)的状态。如果云盘处于使用中(
In_use)的状态,则 ECS 实例状态为运行中(Running)或者已停止(Stopped)。如果云盘处于待挂载(
Available)的状态,则需要保证云盘有过挂载到 ECS 实例的历史操作。从未挂载过 ECS 实例的云盘不支持创建快照。
-
目前快照一致性组只支持 ESSD 系列云盘(ESSD、ESSD AutoPL、ESSD Entry)。
-
单个快照一致性组最多包括 16 块云盘(包括系统盘和数据盘),且总容量不超过 32 TiB。
-
您自行创建的快照会一直保留,请定期删除不再需要的快照,避免快照容量持续扣费。
-
开启多重挂载特性的云盘不支持创建快照一致性组。如果实例挂载了开启多重挂载特性的云盘,您需要设置
ExcludeDiskId.N参数排除该云盘。
关于快照一致性组的功能、计费等信息,请参见快照一致性组。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ecs:CreateSnapshotGroup |
create |
Instance
Disk
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
实例所属的地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。 |
cn-hangzhou |
| InstanceId |
string |
否 |
实例 ID。 |
i-j6ca469urv8ei629**** |
| InstantAccess |
boolean |
否 |
是否开启快照极速可用。取值范围:
默认值:false。 说明
该参数已弃用。ESSD 云盘标准快照已升级为默认极速可用,您无需额外配置,且不产生额外花销。 |
false |
| InstantAccessRetentionDays |
integer |
否 |
设置快照极速可用的使用时间。单位:天,取值范围:1~65535。 仅当 默认值:空,表示和快照释放时间一致。 说明
该参数已弃用。ESSD 云盘标准快照已升级为默认极速可用,您无需额外配置,且不产生额外花销。 |
1 |
| Name |
string |
否 |
快照一致性组名称。长度为 2~128 个英文或中文字符。必须以大小写字母或中文开头,不能以 |
testName |
| Description |
string |
否 |
描述。长度为 2~256 个字符,不能以 |
This is description. |
| ClientToken |
string |
否 |
保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符,且不能超过 64 个字符。更多详情,请参见如何保证幂等性。 |
123e4567-e89b-12d3-a456-426655440000 |
| StorageLocationArn |
string |
否 |
说明
该参数暂未开发使用。 |
null |
| ExcludeDiskId |
array |
否 |
实例中不需要创建快照的云盘 ID。指定云盘 ID 后,创建的快照一致性组将不包含该云盘对应的快照。N 的取值范围为 1~16。 默认值:空,表示为实例中的所有云盘创建快照。 说明
该参数不可与 |
d-j6cf7l0ewidb78lq**** |
|
string |
否 |
实例中不需要创建快照的云盘 ID。指定云盘 ID 后,创建的快照一致性组将不包含该云盘对应的快照。N 的取值范围为 1~16。 默认值:空,表示为实例中的所有云盘创建快照。 说明
该参数不可与 |
d-j6cf7l0ewidb78lq**** |
|
| DiskId |
array |
否 |
指定创建快照一致性组的云盘 ID。在同可用区内支持跨实例设置多个云盘 ID。N 的取值范围为 1~16,即一个快照一致性组内最多支持设置 16 块总大小不超过 32 TiB 的云盘。 您需要注意:
|
|
|
string |
否 |
指定创建快照一致性组的云盘 ID。在同可用区内支持跨实例设置多个云盘 ID。N 的取值范围为 1~16,即一个快照一致性组内最多支持设置 16 块总大小不超过 32 TiB 的云盘。 您需要注意:
|
d-bp1bcpqxahucdrcn**** |
|
| Tag |
array<object> |
否 |
标签列表。 |
|
|
object |
否 |
|||
| Key |
string |
否 |
快照一致性组的标签键。N 的取值范围:1~20。一旦传入该值,则不允许为空字符串。最多支持 128 个字符,不能以 |
TestKey |
| Value |
string |
否 |
快照一致性组的标签值。N 的取值范围:1~20。一旦传入该值,可以为空字符串。最多支持 128 个字符,不能以 |
TestValue |
| ResourceGroupId |
string |
否 |
快照一致性组所属的资源组 ID。 |
rg-bp67acfmxazb4p**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| SnapshotGroupId |
string |
快照一致性组 ID。 |
ssg-j6ciyh3k52qp7ovm**** |
| RequestId |
string |
请求 ID。 |
01ABBD93-1ABB-4D92-B496-1A3D20EC0697 |
示例
正常返回示例
JSON格式
{
"SnapshotGroupId": "ssg-j6ciyh3k52qp7ovm****",
"RequestId": "01ABBD93-1ABB-4D92-B496-1A3D20EC0697"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidDiskIds.NotInSameZone | The specified disks are not in the same availability zone. | |
| 400 | MissingParamter.InstanceId | The specified InstanceId should not be null. | |
| 400 | InvalidParam.ExcludeDiskIdsAndDiskIds.Conflict | The use of parameter 'ExcludeDiskIds' and 'DiskIds' at the same time is not supported. | |
| 400 | InvalidSnapshotName.Malformed | The specified SnapshotName is malformed. | |
| 400 | IncorrectInstanceStatus | The current status of the resource does not support this operation. | 该资源目前的状态不支持此操作。 |
| 400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | 标签中存在重复的键,请保持键的唯一性。 |
| 400 | InvalidTagKey.Malformed | The specified Tag.n.Key is not valid. | 指定的标签键参数有误。 |
| 400 | InvalidTagValue.Malformed | The specified Tag.n.Value is not valid. | 指定的标签值参数有误。 |
| 400 | InvalidRetentionDays.Malformed | The specified RetentionDays is not valid. | 指定的保留天数无效。请检查 RetentionDays 参数值是否正确。 |
| 400 | DiskCategory.OperationNotSupported | The specified disk is encrypted. This operation is not supported. | |
| 400 | InvalidParameter.Name | The specified Name is invalid. | 指定的 Name 参数无效。 |
| 400 | InvalidParameter.Description | The specified Description is invalid. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | IncorrectDiskStatus.CreatingSnapshot | A previous snapshot creation is in process. | |
| 403 | InstanceLockedForSecurity | The disk attached instance is locked due to security. | |
| 403 | IncorrectDiskStatus.NeverAttached | The specified disk has never been attached to any instance. | |
| 403 | QuotaExceed.Snapshot | The snapshot quota exceeds. | |
| 403 | IncorrectDiskStatus.NeverUsed | The specified disk has never been used after creating. | |
| 403 | CreateSnapshot.Failed | The process of creating snapshot is failed. | |
| 403 | DiskInArrears | The specified operation is denied as your disk has expired. | |
| 403 | DiskId.ValueNotSupported | The specified parameter diskid is not supported. | 指定的块存储类型不支持此操作。 |
| 403 | IncorrectDiskStatus | The current disk status does not support this operation. | |
| 403 | InvalidAccountStatus.NotEnoughBalance | Your account does not have enough balance. | |
| 403 | InvalidAccountStatus.SnapshotServiceUnavailable | Snapshot service has not been opened yet. | 快照服务未开通,操作无法执行。 |
| 403 | IncorrectInstanceStatus | The current status of the resource does not support this operation. | |
| 403 | IncorrectVolumeStatus | The current volume status does not support this operation. | 共享块存储状态不支持当前操作。 |
| 403 | IdempotentParameterMismatch | The specified clientToken is used. | 指定的客户令牌已经被使用。 |
| 403 | IncorrectDiskStatus.Invalid | The specified device status is invalid. Restart the instance and try again. | |
| 403 | IncorrectDiskType.NotSupport | The specified device type is not supported. | 指定磁盘存储类型不支持此操作。 |
| 403 | IncorrectDiskStatus.Transferring | The specified device is transferring. You can retry after the process is finished. | |
| 403 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK needs to be enabled. | |
| 403 | InvalidParameter.KMSKeyId.KMSUnauthorized | ECS service does not have permission to access your KMS key. Please verify that the specified KMS key has authorized the ECS service. | |
| 403 | IdempotentProcessing | The previous idempotent request(s) is still processing. | 先前的幂等请求仍在处理中,请稍后重试。 |
| 403 | InvalidSnapshotCategory.Malformed | The specified Category is not valid. | 指定的快照类型无效。请检查 Category 参数值是否正确。 |
| 403 | InvalidOperation.Unauthorized | The specified operation is unauthorized. | |
| 403 | InvalidRegion.NotSupportSnapshotInstantAccessRegion | The snapshot InstantAccess is not supported for this region. | |
| 403 | InvalidCategoryAndInstantAccess.Malformed | The snapshot Category and InstantAccess can't be used together. | |
| 403 | IncorrectDiskStatus.TooManyCreatingSnapshots | The specified disk has too many unfinished snapshots. | |
| 403 | InvalidRegion.NotSupport | The specified region does not support creating snapshot group. | |
| 403 | UserNotInTheWhiteList | The user is not in the white list of creating snapshot group. | |
| 403 | InvalidInstance.NoDisk | There is no disk mounted on the instance. | 实例上没有挂载磁盘。 |
| 403 | NumberExceed.TooManyDisks | The number of all disks in the request exceeds. | 请求中云盘的数量超过限制。 |
| 403 | CapacityExceed.TooManyDisks | The capacity of all disks in the request exceeds. | |
| 403 | InvalidOperation.MultiAttachDisk | Multi attach disk does not support this operation. | 开启多重挂载特性的云盘不支持该操作。 |
| 403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The CMK has not authorized the ECS service to perform the KMS TagResource and UntagResource operations. Please verify the authorization and try again. | |
| 403 | InvalidDisk.DiskCategoryInconsistent | If any specified disk is of a regional disk category; then all disks must also be of that regional disk category. | |
| 403 | QuotaExceed.ConcurrentSnapshotQuota | The number of snapshots being created for the disk %s has exceeded the concurrent quota (%s). Please wait for the previous snapshots to complete before trying again. | 该磁盘正在创建的快照数量已超过并发配额,请等待之前的快照完成后再重试。 |
| 403 | InvalidDisk.ShareVolume | The specified diskId is invalid. The shared volume does not support creating a snapshot group. | 指定的diskId无效,共享卷不支持创建快照组。 |
| 403 | InvalidParameter.UnauthorizedStorageLocationArn | The operation has failed due to lack of permission for the specified "StorageLocationArn". Please use a resource with appropriate permission for the operation. | 当前操作因为指定的StorageLocationArn权限不足失败,请联系该资源的管理员获取操作权限。 |
| 403 | InvalidOperation.SnapshotStorageLocationUnsupported | Snapshots with storage location in CloudBox do not support the current operation. | 存储位置在CloudBox中的快照不支持当前操作。 |
| 403 | InvalidStorageLocationArn.Malformed | The specified parameter StorageLocationArn is malformed. | |
| 404 | InvalidDiskId.NotFound | The specified DiskId does not exist. | 指定的磁盘不存在。请您检查磁盘 ID 是否正确。 |
| 404 | InvalidDescription.Malformed | The specified description is malformed. | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | 指定的实例ID无效。 |
| 404 | InvalidVolumeId.NotFound | The specified volume does not exist. | |
| 404 | InvalidRegionId.NotFound | The specified RegionId does not exist. | 指定的地域 ID 不存在。 |
| 404 | InvalidKMSKeyId.NotFound | The KMS key used by the disk does not exist. | 磁盘使用的 KMS 密钥不存在. |
| 404 | InvalidResourceGroup.NotFound | The ResourceGroup provided does not exist in our records. | 资源组并不在记录中。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。