All Products
Search
Document Center

Elastic Compute Service:CreateSnapshotGroup

Last Updated:May 16, 2024

Creates a snapshot-consistent group for the cloud disks of an Elastic Compute Service (ECS) instance. A snapshot-consistent group contains snapshots of one or more cloud disks.

Operation description

Usage notes

You can specify InstanceId to create a snapshot-consistent group for disks on a specific (ECS instance. You can also specify DiskId.N to create a snapshot-consistent group for multiple disks on multiple ECS instances within the same zone.

Note You cannot specify both DiskId.N and ExcludeDiskId.N in the same request. If InstanceId is specified, you can use DiskId.N to specify only disks on the ECS instance specified by InstanceId and cannot use DiskId.N to specify disks across ECS instances.

Take note of the following items:

  • The disks for which you want to create a snapshot must be in the In Use (In_use) or Unattached (Available) state.

    • If a disk is in the In Use (In_use) state, make sure that the ECS instance to which the disk is attached is in the Running (Running) or Stopped (Stopped) state.
    • If a disk is in the Unattached (Available) state, make sure that the disk has been attached to ECS instances. Snapshots cannot be created for disks that have never been attached to an ECS instance.
  • Snapshot-consistent groups can be used to create snapshots only for enhanced SSDs (ESSDs).

  • A snapshot-consistent group can contain snapshots of up to 16 disks, including system disks and data disks, and cannot exceed 32 TiB in size.

  • Snapshots that you created are stored indefinitely until you delete the snapshots. We recommend that you delete unnecessary snapshots on a regular basis to prevent excess snapshot storage fees.

  • Snapshot-consistent groups cannot be created for disks for which multi-attach feature is enabled. If disks for which the multi-attach feature is enabled are attached to an ECS instance, specify the ExcludeDiskId.N parameter to exclude the disks.

For more information about the snapshot-consistent group feature, see Create a snapshot-consistent group.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the instance. You can call the DescribeRegions operation to query the most recent list of regions.

cn-hangzhou
InstanceIdstringNo

The instance ID.

i-j6ca469urv8ei629****
InstantAccessbooleanNo

Specifies whether to enable the instant access feature. Valid values:

  • true
  • false

Default value: false.

Note This parameter is no longer used. By default, new normal snapshots of ESSDs are upgraded to instant access snapshots free of charge without the need for additional configurations. For more information, see Use the instant access feature.
false
InstantAccessRetentionDaysintegerNo

The number of days for which the instant access feature is available. Unit: days. Valid values: 1 to 65535.

This parameter takes effect only when InstantAccess is set to true. The instant access feature is automatically disabled when the specified duration ends.

This parameter is left empty by default, which indicates that the instant access feature is automatically disabled for snapshots when the snapshots are released.

Note This parameter is no longer used. By default, new normal snapshots of ESSDs are upgraded to instant access snapshots free of charge without the need for additional configurations. For more information, see Use the instant access feature.
1
NamestringNo

The name of the snapshot-consistent group. The name must be 2 to 128 characters in length. The name can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:). It must start with a letter and cannot start with http:// or https://.

testName
DescriptionstringNo

The description of the snapshot-consistent group. The description must be 2 to 256 characters in length and cannot start with http:// or https://.

This is description.
StorageLocationArnstringNo
Note This parameter is unavailable for public use.
null
ExcludeDiskIdarrayNo

The ID of cloud disk N for which you do not want to create snapshots. If this parameter is specified, the created snapshot-consistent group does not contain snapshots of the cloud disk. Valid values of N: 1 to 16.

This parameter is empty by default, which indicates that snapshots are created for all the disks of the instance.

Note You cannot specify ExcludeDiskId.N and DiskId.N in the same request.
stringNo

The ID of cloud disk N for which you do not want to create snapshots. If this parameter is specified, the created snapshot-consistent group does not contain snapshots of the cloud disk. Valid values of N: 1 to 16.

This parameter is empty by default, which indicates that snapshots are created for all the disks of the instance.

Note You cannot specify ExcludeDiskId.N and DiskId.N in the same request.
d-j6cf7l0ewidb78lq****
DiskIdarrayNo

The ID of cloud disk N for which you want to create snapshots. You can specify multiple cloud disk IDs across instances within the same zone. Valid values of N: 1 to 16. A single snapshot-consistent group can contain snapshots of up to 16 cloud disks whose total disk size does not exceed 32 TiB.

Take note of the following items:

  • You cannot specify both DiskId.N and ExcludeDiskId.N in the same request.
  • If InstanceId is set, you can use DiskId.N to specify only cloud disks attached to the instance specified by InstanceId, and you cannot use DiskId.N to specify cloud disks attached to multiple instances.
stringNo

The ID of cloud disk N for which you want to create snapshots. You can specify multiple cloud disk IDs across instances within the same zone. Valid values of N: 1 to 16. A snapshot-consistent group can contain snapshots of up to 16 cloud disks whose total disk size does not exceed 32 TiB.

Take note of the following items:

  • You cannot specify both DiskId.N and ExcludeDiskId.N in the same request.
  • If InstanceId is set, you can use DiskId.N to specify only cloud disks attached to the instance specified by InstanceId, and you cannot use DiskId.N to specify cloud disks attached to multiple instances.
d-bp1bcpqxahucdrcn****
Tagobject []No

The list of tags.

KeystringNo

The key of tag N of the snapshot-consistent group. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

TestKey
ValuestringNo

The value of tag N of the snapshot-consistent group. Valid values of N: 1 to 20. The tag value can be an empty string. It can be up to 128 characters in length and cannot start with acs:. It cannot contain http:// or https://.

TestValue
ResourceGroupIdstringNo

The ID of the resource group to which the snapshot-consistent group belongs.

rg-bp67acfmxazb4p****

Response parameters

ParameterTypeDescriptionExample
object
SnapshotGroupIdstring

The ID of the snapshot-consistent group.

ssg-j6ciyh3k52qp7ovm****
RequestIdstring

The request ID.

01ABBD93-1ABB-4D92-B496-1A3D20EC0697

Examples

Sample success responses

JSONformat

{
  "SnapshotGroupId": "ssg-j6ciyh3k52qp7ovm****",
  "RequestId": "01ABBD93-1ABB-4D92-B496-1A3D20EC0697"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidDiskIds.NotInSameZoneThe specified disks are not in the same availability zone.-
400MissingParamter.InstanceIdThe specified InstanceId should not be null.-
400InvalidParam.ExcludeDiskIdsAndDiskIds.ConflictThe use of parameter 'ExcludeDiskIds' and 'DiskIds' at the same time is not supported.-
400InvalidSnapshotName.MalformedThe specified SnapshotName is wrongly formed.The format of the specified snapshot name is invalid.
400IncorrectInstanceStatusThe current status of the resource does not support this operation.The resource is in a state that does not support the current operation.
400Duplicate.TagKeyThe Tag.N.Key contain duplicate key.The specified tag key already exists. Tag keys must be unique.
400InvalidTagKey.MalformedThe specified Tag.n.Key is not valid.The specified Tag.N.Key parameter is invalid.
400InvalidTagValue.MalformedThe specified Tag.n.Value is not valid.The specified tag value is invalid.
400InvalidRetentionDays.MalformedThe specified RetentionDays is not valid.The specified RetentionDays parameter is invalid.
400DiskCategory.OperationNotSupportedThe special disk is encrypted, not support this operate.-
400InvalidParameter.NameThe specified Name is invalid.The specified Name parameter is invalid.
400InvalidParameter.DescriptionThe specified Description is invalid.-
400DiskCategory.OperationNotSupportedThe operation is not supported to the specified disk due to its disk category.The specified disk category does not support this operation.
403IncorrectDiskStatus.CreatingSnapshotA previous snapshot creation is in process.A previous snapshot creation task is in process. Please try again later.
403InstanceLockedForSecurityThe disk attached instance is locked due to security.The instance to which the disk is attached is locked for security reasons.
403IncorrectDiskStatus.NeverAttachedThe specified disk has never been attached to any instance.The removable disk has never been attached to instances and its content remains unchanged.
403QuotaExceed.SnapshotThe snapshot quota exceeds.The maximum number of snapshots has been reached. Delete snapshots that are no longer needed and try again.
403IncorrectDiskStatus.NeverUsedThe specified disk has never been used after creating.The disk has never been used and its data remains unchanged.
403CreateSnapshot.FailedThe process of creating snapshot is failed.Failed to create the snapshot.
403DiskInArrearsThe specified operation is denied as your disk has expired.The disk has expired due to an overdue payment.
403DiskId.ValueNotSupportedThe specified parameter diskid is not supported.The specified EBS device category does not support the operation.
403IncorrectDiskStatusThe current disk status does not support this operation.The disk is in a state that does not support the current operation. Make sure that the disk is available and that your account has no overdue payments.
403InvalidAccountStatus.NotEnoughBalanceYour account does not have enough balance.Your account balance is insufficient. Add funds to your account and try again.
403InvalidAccountStatus.SnapshotServiceUnavailableSnapshot service has not been opened yet.The operation is not supported while the snapshot service is not activated.
403IncorrectVolumeStatusThe current volume status does not support this operation.-
403IdempotentParameterMismatchThe specified clientToken is used.The specified client token is already in use.
403IncorrectDiskStatus.InvalidThe specified device status invalid, restart instance and try again.-
403IncorrectDiskType.NotSupportThe specified device type is not supported.The specified disk type does not support the operation.
403IncorrectDiskStatus.TransferringThe specified device is transferring, you can retry after the process is finished.The specified disk is being migrated. Wait until the migration is complete and try again.
403InvalidParameter.KMSKeyId.CMKNotEnabledThe CMK needs to be enabled.The customer master key (CMK) is not enabled when KMSKeyId is specified for an encrypted disk. You can call the DescribeKey operation of KMS to query information about the specified CMK.
403InvalidParameter.KMSKeyId.KMSUnauthorizedECS service have no right to access your KMS.ECS is not authorized to access your KMS resources.
403IdempotentProcessingThe previous idempotent request(s) is still processing.A previous idempotent request is being processed. Try again later.
403QuotaExceed.Tags%sThe number of specified tags exceeds the upper limit. %s is a variable. An error message is dynamically returned based on call conditions.
403InvalidSnapshotCategory.MalformedThe specified Category is not valid.The specified Category parameter is invalid.
403InvalidOperation.UnauthorizedThe specified operation is unauthorized.-
403InvalidRegion.NotSupportSnapshotInstantAccessRegionThe snapshot InstantAccess is not supported for this region.-
403InvalidCategoryAndInstantAccess.MalformedThe snapshot Category and InstantAccess can't be used together.-
403IncorrectDiskStatus.TooManyCreatingSnapshotsThe specified disk has too many unfinished snapshots.-
403InvalidRegion.NotSupportThe specified region does not support creating snapshot group.-
403UserNotInTheWhiteListThe user is not in the white list of creating snapshot group.-
403InvalidInstance.NoDiskThere is no disk mounted on the instance.-
403NumberExceed.TooManyDisksThe number of all disks in the request exceeds.The number of disks in the request exceeds the upper limit.
403CapacityExceed.TooManyDisksThe capacity of all disks in the request exceeds.-
403InvalidDisk.ShareVolume%s-
403InvalidOperation.MultiAttachDiskMulti attach disk does not support this operation.Disks for which the multi-attach feature is enabled do not support the operation.
403IncorrectDiskStatus.InvalidThe specified disk status invalid, restart instance and try again.The state of the specified disk is invalid. Restart the instance and try again.
403InvalidParameter.KMSKeyId.CMKUnauthorizedThe CMK needs to be added ECS tag.-
403InvalidDisk.DiskCategoryInconsistentIf any specified disk is of a regional disk category, then all disks must also be of that regional disk category.If any specified disk is of a regional disk category, then all disks must also be of that regional disk category.
404InvalidDiskId.NotFoundThe specified DiskId does not exist.The specified disk does not exist. Check whether the disk ID is correct.
404InvalidDescription.MalformedThe specified description is wrongly formed.The resource description is invalid. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
404InvalidInstanceId.NotFoundThe specified InstanceId does not exist.The specified instance does not exist.
404InvalidVolumeId.NotFoundThe specified volume does not exist.The specified Shared Block Storage device does not exist.
404InvalidRegionId.NotFoundThe specified RegionId does not exist.The specified region ID does not exist.
500InternalErrorThe request processing has failed due to some unknown error.An internal error has occurred. Try again later.
500InternalErrorThe request processing has failed due to some unknown error, exception or failure.An internal error has occurred. Try again later.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-05-08The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 403 change
    delete Error Codes: 400
    delete Error Codes: 404
    delete Error Codes: 500
2023-08-25The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    Error Codes 403 change
    delete Error Codes: 404
    delete Error Codes: 500
2023-08-24The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    Error Codes 403 change
    delete Error Codes: 404
    delete Error Codes: 500