All Products
Search
Document Center

Elastic Compute Service:CreateSnapshotGroup

Last Updated:Jul 14, 2026

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

Operation description

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

Note

DiskId.N and ExcludeDiskId.N cannot be specified at the same time. If InstanceId is specified, DiskId.N can only be set to disks attached to the specified instance and no longer supports specifying disk IDs across multiple instances.

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

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

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

    • If a disk is in the Available (Available) state, the disk must have been previously attached to an ECS instance. Disks that have never been attached to an ECS instance do not support snapshot creation.

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

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

  • Snapshots that you manually create are retained until you delete them. Delete unnecessary snapshots on a regular basis to avoid incurring ongoing snapshot size fees.

  • Disks with the multi-attach attribute enabled do not support snapshot-consistent groups. If an instance has a multi-attach disk attached, set the ExcludeDiskId.N parameter to exclude the 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 snapshot instant access. Valid values:

  • true: enables snapshot instant access.

  • false: disables snapshot instant access.

Default value: false.

Note

This parameter is deprecated. Standard snapshots of enterprise SSDs are upgraded to instant access by default. No additional configuration or fees are required.

false

InstantAccessRetentionDays

integer

No

The number of days for which the snapshot instant access feature remains active. Unit: days. Valid values: 1 to 65535.

This parameter takes effect only when InstantAccess=true. The snapshot instant access feature is automatically shutdown when the specified duration expires.

Default value: null, which indicates that the instant access duration is the same as the snapshot release period.

Note

This parameter is deprecated. Standard snapshots of enterprise SSDs are upgraded to instant access by default. No additional configuration or fees are required.

1

Name

string

No

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

testName

Description

string

No

The description. 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 make sure that the token is unique among different requests. The ClientToken value can contain only 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 publicly available.

null

ExcludeDiskId

array

No

The ID of a disk in the instance for which you do not want to create a snapshot. After you specify this parameter, the snapshot-consistent group does not contain the snapshot of the specified disk. Valid values of N: 1 to 16.

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

Note

This parameter cannot be specified together with DiskId.N.

d-j6cf7l0ewidb78lq****

string

No

The ID of a disk in the instance for which you do not want to create a snapshot. After you specify this parameter, the snapshot-consistent group does not contain the snapshot of the specified disk. Valid values of N: 1 to 16.

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

Note

This parameter cannot be specified together with DiskId.N.

d-j6cf7l0ewidb78lq****

DiskId

array

No

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

Take note of the following items:

  • This parameter cannot be specified together with ExcludeDiskId.N.

  • If you specify InstanceId, this parameter can only be set to disks attached to the specified instance and no longer supports specifying disk IDs across multiple instances.

string

No

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

Take note of the following items:

  • This parameter cannot be specified together with ExcludeDiskId.N.

  • If you specify InstanceId, this parameter can only be set to disks attached to the specified instance and no longer supports specifying disk IDs across multiple instances.

d-bp1bcpqxahucdrcn****

Tag

array<object>

No

The tags.

object

No

Key

string

No

The tag key 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:. The tag key cannot contain http:// or https://.

TestKey

Value

string

No

The tag value 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:. The tag value 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

SnapshotGroupId

string

The ID of the snapshot-consistent group.

ssg-j6ciyh3k52qp7ovm****

RequestId

string

The request ID.

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

Examples

Success response

JSON format

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

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 Tag.N.Key contain duplicate key. The specified tag key already exists. Tag keys must be unique.
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.
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. 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 Snapshot service has not been opened yet. The operation is not supported while the snapshot service is not activated.
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 of the Shared Block Storage device 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.
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 KMS key used by the disk does not exist. The KMS key used by the disk does not exist.
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.