All Products
Search
Document Center

Elastic Compute Service:CreateSnapshotGroup

Last Updated:Oct 22, 2026

Creates a snapshot-consistent group for cloud disks in a specified ECS instance. A snapshot-consistent group contains snapshots of one or more cloud disks.

Operation description

You can set InstanceId to create a snapshot-consistent group for specified cloud disks within an instance. Alternatively, you can use only DiskId.N to create a snapshot-consistent group for multiple cloud disks attached to multiple ECS instances in the same zone.

Note

You cannot set both DiskId.N and ExcludeDiskId.N. Additionally, if InstanceId is set, DiskId.N can only be set to cloud disks attached to the specified instance. Setting multiple cloud disk IDs across instances is no longer supported.

When you create a snapshot-consistent group, take note of the following items:

  • The cloud disks for which you want to create snapshots must be in the In use (In_use) or Available (Available) state.

    • If a cloud disk is in the In use (In_use) state, the ECS instance status must be Running (Running) or Stopped (Stopped).

    • If a cloud disk is in the Available (Available) state, make sure that the cloud disk has been mounted to an ECS instance before. Snapshots cannot be created for cloud disks that have never been mounted to an ECS instance.

  • Currently, snapshot-consistent groups only support ESSD series cloud disks (ESSD, ESSD AutoPL, and ESSD Entry).

  • A single snapshot-consistent group can contain up to 128 cloud disks (including system cloud disks and data cloud disks), and the total capacity cannot exceed 256 TiB.

  • Snapshots that you create are retained indefinitely. Delete snapshots that are no longer needed on a regular basis to avoid continuous billing for snapshot size.

  • Cloud disks with the multi-attach attribute enabled do not support snapshot-consistent groups. If an instance has mounted a cloud disk with the multi-attach attribute enabled, you must configure the Settings for the ExcludeDiskId.N parameter to exclude the cloud disk.

For more information about the features and billing of snapshot-consistent groups, see Snapshot-consistent groups.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:CreateSnapshotGroup

create

Instance

acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}

Disk

acs:ecs:{#regionId}:{#accountId}:disk/{#DiskId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

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

cn-hangzhou

InstanceId

string

No

The instance ID.

i-j6ca469urv8ei629****

InstantAccess

boolean

No

Specifies whether to enable the instant active feature for snapshots. Valid values:

  • true: enables the feature.

  • false: shutdown.

Default value: false.

Note

This parameter is deprecated. Standard snapshots of ESSD (standard SSD) cloud disks have been upgraded to instant active by default. You do not need to configure this parameter, and no additional fees are incurred.

false

InstantAccessRetentionDays

integer

No

Specifies the Settings for the usage duration of the instant active feature for snapshots. Unit: days. Valid values: 1 to 65535.

This parameter takes effect only when InstantAccess is set to true. An automatic shutdown of the instant active feature is performed when the retention period expires.

Default value: null, which indicates that the retention period of the instant active feature is the same as the retention period of the snapshot.

Note

This parameter is deprecated. Standard snapshots of ESSD (standard SSD) cloud disks have been upgraded to instant active by default. You do not need to configure this parameter, and no additional fees are incurred.

1

Name

string

No

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

testName

Description

string

No

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.

ClientToken

string

No

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

123e4567-e89b-12d3-a456-426655440000

StorageLocationArn

string

No

Note

This parameter is not available.

null

ExcludeDiskId

array

No

The ID of the cloud disk in the instance for which you do not want to create a snapshot. After you specify a cloud disk ID, the created snapshot-consistent group will not contain the snapshot of the cloud disk. Valid values of N: 1 to 128.

Default value: null, which indicates that snapshots are created for all cloud disks in the instance.

Note

You cannot set both this parameter and DiskId.N.

d-j6cf7l0ewidb78lq****

string

No

The ID of the cloud disk in the instance for which you do not want to create a snapshot. After you specify a cloud disk ID, the created snapshot-consistent group will not contain the snapshot of the cloud disk. Valid values of N: 1 to 128.

Default value: null, which indicates that snapshots are created for all cloud disks in the instance.

Note

You cannot set both this parameter and DiskId.N.

d-j6cf7l0ewidb78lq****

DiskId

array

No

The ID of the cloud disk for which you want to create a snapshot-consistent group. You can specify multiple cloud disk IDs across instances in the same zone. Valid values of N: 1 to 128. A single snapshot-consistent group can contain up to 128 cloud disks with a total capacity of up to 256 TiB.

Take note of the following items:

  • You cannot set both this parameter and ExcludeDiskId.N.

  • If you set InstanceId, you can only set this parameter to cloud disks attached to the specified instance. Setting multiple cloud disk IDs across instances is no longer supported.

string

No

The ID of the cloud disk for which you want to create a snapshot-consistent group. You can specify multiple cloud disk IDs across instances in the same zone. Valid values of N: 1 to 128. A single snapshot-consistent group can contain up to 128 cloud disks with a total capacity of up to 256 TiB.

Take note of the following items:

  • You cannot set both this parameter and ExcludeDiskId.N.

  • If you set InstanceId, you can only set this parameter to cloud disks attached to the specified instance. Setting multiple cloud disk IDs across instances is no longer supported.

d-bp1bcpqxahucdrcn****

Tag

array<object>

No

The list of tags.

object

No

Key

string

No

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 aliyun or acs:. It cannot contain http:// or https://.

TestKey

Value

string

No

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. The tag value can be up to 128 characters in length and cannot start with acs:. It cannot contain http:// or https://.

TestValue

ResourceGroupId

string

No

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

rg-bp67acfmxazb4p****

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

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

SnapshotGroupId

string

The ID of the snapshot-consistent group.

ssg-j6ciyh3k52qp7ovm****

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

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. The resource is in a state that does not support the current operation.
400 Duplicate.TagKey The parameter Tag.N.Key contains duplicate values. Please remove the duplicate tag keys and try again.
400 InvalidTagKey.Malformed The specified Tag.n.Key is not valid. The specified Tag.N.Key parameter is invalid.
400 InvalidTagValue.Malformed The specified Tag.n.Value is not valid. The specified tag value is invalid.
400 InvalidRetentionDays.Malformed The specified RetentionDays is not valid. The specified RetentionDays parameter is invalid.
400 DiskCategory.OperationNotSupported The specified disk is encrypted. This operation is not supported.
400 InvalidParameter.Name The specified Name is invalid. The specified Name parameter is invalid.
400 InvalidParameter.Description The specified Description is invalid.
400 InvalidInstantAccessRetentionDays.Malformed The specified parameter InstantAccessRetentionDays is not valid. Ensure you provide a value between 1 and 65536.
500 InternalError The request processing has failed due to an internal error and you may retry later or contact support with the request ID.
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. The specified EBS device category does not support the operation.
403 IncorrectDiskStatus The current disk status does not support this operation.
403 InvalidAccountStatus.NotEnoughBalance Your account does not have enough balance.
403 InvalidAccountStatus.SnapshotServiceUnavailable The snapshot service has not been activated. Please activate it and try again.
403 IncorrectInstanceStatus The current status of the resource does not support this operation.
403 IncorrectVolumeStatus The current volume status does not support this operation. The current state does not support this operation.
403 IdempotentParameterMismatch The specified clientToken is used. The specified client token is already in use.
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. The specified disk type does not support the operation.
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. A previous idempotent request is being processed. Try again later.
403 InvalidSnapshotCategory.Malformed The specified Category is not valid. The specified Category parameter is invalid.
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. No disk is mounted on the instance.
403 NumberExceed.TooManyDisks The number of all disks in the request exceeds. The number of disks in the request exceeds the upper limit.
403 CapacityExceed.TooManyDisks The capacity of all disks in the request exceeds.
403 InvalidOperation.MultiAttachDisk Multi attach disk does not support this operation. Disks for which the multi-attach feature is enabled do not support the 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. The number of snapshots being created for this disk has exceeded the concurrent quota. 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. The specified diskId is invalid. The shared volume does not support creating a snapshot group.
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. The current operation failed because the specified StorageLocationArn has insufficient permissions. Contact the administrator of the resource to obtain the operation permissions.
403 InvalidOperation.SnapshotStorageLocationUnsupported Snapshots with storage location in CloudBox do not support the current operation. The snapshot of the storage location in the CloudBox does not support the current operation.
403 InvalidStorageLocationArn.Malformed The specified parameter StorageLocationArn is malformed.
403 Forbidden.InDebt The operation is not allowed because your account has an outstanding balance. Please settle the overdue payment and try again.
403 InvalidOperation.RegionUnsupported Creating snapshots is not supported in the specified region. Please use a region that supports the snapshot feature. the specified region does not support snapshot creation. Use a region that supports the snapshot function.
403 OperationDenied.KMSKeyUnauthorized The operation is denied due to missing KMS key authorization. Please check the KMS key permissions and ensure the key is properly authorized for this operation.
404 InvalidDiskId.NotFound The specified DiskId does not exist. The specified disk does not exist. Check whether the disk ID is correct.
404 InvalidDescription.Malformed The specified description is malformed.
404 InvalidInstanceId.NotFound The specified InstanceId does not exist. The specified instanceId is invalid.
404 InvalidVolumeId.NotFound The specified volume does not exist.
404 InvalidRegionId.NotFound The specified RegionId does not exist. The specified region ID does not exist.
404 InvalidKMSKeyId.NotFound The specified KMSKeyId does not exist. Please verify that the key ID is correct and that the key resides in the current region.
404 InvalidResourceGroup.NotFound The ResourceGroup provided does not exist in our records. The specified resource group does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.