Skip to main content

ecs snapshot

Manage disk snapshots

Run ecctl ecs snapshot <action> -h for usage, or ecctl schema ecs.snapshot.<action> --full for the complete, agent-readable spec of every parameter and behavior.

create

ecctl ecs snapshot create [flags]

Create snapshot

  • Kind: mutation · Risk: medium
  • Synchronous: waits for accomplished (waiter accomplished_after_create, timeout 600s); use --no-wait to skip.
  • Idempotent via ClientToken.
APIWhen calledPurpose
CreateSnapshotEvery time the command runs.Perform the resource operation.
DescribeSnapshotsWhen --no-wait is not specified.Poll until the resource reaches the target state. (repeated)
DescribeSnapshotsWhen --no-wait is not specified.Return the final resource view. (cached; no additional request)
ParameterTypeRequiredDescription
--diskstringsource disk ID
--regionstringAlibaba Cloud region
--categorystringsnapshot category
--descriptionstringsnapshot description
--instant-accessbooleanenable instant access
--instant-access-retention-daysintegerinstant access retention days
--namestringsnapshot name
--resource-groupstringresource group ID
--retention-daysintegersnapshot retention days
--tagkey_valuetag assignment key=value

update

ecctl ecs snapshot update <id> [flags]

Update snapshot attributes, category, or lock state

  • Kind: mutation · Risk: medium
APIWhen calledPurpose
ModifySnapshotAttributeWhen --name is specified or --description is specified or --disable-instant-access is specified.Perform the resource operation.
ModifySnapshotCategoryWhen --category is specified.Perform the resource operation.
LockSnapshotWhen --lock is specified.Perform the resource operation.
UnlockSnapshotWhen --unlock is specified.Perform the resource operation.
OpenSnapshotServiceWhen --open-service is specified.Perform the resource operation.
DescribeSnapshotsWhen --no-wait is not specified.Read the resource view.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--categorystringsnapshot category
--descriptionstringsnapshot description
--disable-instant-accessbooleandisable instant access on update
--lockbooleanlock the snapshot against deletion
--namestringsnapshot name
--open-servicebooleanactivate the snapshot service
--unlockbooleanunlock the snapshot

delete

ecctl ecs snapshot delete <id> [flags]

Delete snapshot

  • Kind: mutation · Risk: high
  • Synchronous: waits for absent (waiter deleted_after_delete, timeout 300s); use --no-wait to skip.
APIWhen calledPurpose
DeleteSnapshotEvery time the command runs.Perform the resource operation.
DescribeSnapshotsWhen --no-wait is not specified.Poll until the resource reaches the target state. (repeated)
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--forcebooleanforce delete the snapshot even if it is used by a disk (must be set explicitly) (default: false)

get

ecctl ecs snapshot get <id> [flags]

Get snapshot

  • Kind: read · Risk: low
APIWhen calledPurpose
DescribeSnapshotsEvery time the command runs.Read the resource view.
DescribeLockedSnapshotsWhen --with-lock is specified.Read the resource view.
DescribeSnapshotLinksWhen --with-links is specified.Read the resource view.
DescribeSnapshotMonitorDataWhen --with-monitor is specified.Read the resource view.
DescribeSnapshotPackageWhen --with-package is specified.Read the resource view.
DescribeSnapshotsUsageWhen --with-usage is specified.Read the resource view.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--diskstringsource disk ID
--end-timestringmonitor query end time
--fieldsstringcomma-separated resource fields to include
--instancestringsource instance ID
--periodintegermonitor data period in seconds
--start-timestringmonitor query start time
--with-linksbooleaninclude snapshot chain information
--with-lockbooleaninclude snapshot lock information
--with-monitorbooleaninclude snapshot capacity monitor data
--with-packagebooleaninclude OSS snapshot storage package information
--with-usagebooleaninclude snapshot count and capacity usage

list

ecctl ecs snapshot list [<ids>...] [flags]

List snapshots

  • Kind: read · Risk: low
APIWhen calledPurpose
DescribeSnapshotsEvery time the command runs.Read the resource view.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--fieldsstringcomma-separated resource fields to include
--filterkey_valuefilter expression key=value
--limitintegermaximum resources to return (default: 100)
--next-tokenstringtoken for the next result page

copy

ecctl ecs snapshot copy <id> [flags]

Copy snapshot across regions

  • Kind: mutation · Risk: medium
  • Synchronous: waits for accomplished (waiter accomplished_after_copy, timeout 600s); use --no-wait to skip.
  • Idempotent via ClientToken.
APIWhen calledPurpose
CopySnapshotEvery time the command runs.Perform the resource operation.
DescribeSnapshotsWhen --no-wait is not specified.Poll until the resource reaches the target state. (repeated)
ParameterTypeRequiredDescription
--destination-regionstringdestination region for copy
--regionstringAlibaba Cloud region
--destination-descriptionstringdestination snapshot description for copy
--destination-namestringdestination snapshot name for copy
--encryptedbooleanencrypt the destination snapshot when copying
--kms-key-idstringKMS key ID used to encrypt the destination snapshot
--resource-groupstringresource group ID
--retention-daysintegersnapshot retention days
--tagkey_valuetag assignment key=value