Skip to main content

ecs auto-snapshot-policy

Manage automatic snapshot policies

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

create

ecctl ecs auto-snapshot-policy create [flags]

Create auto snapshot policy

  • Kind: mutation · Risk: medium
APIWhen calledPurpose
CreateAutoSnapshotPolicyEvery time the command runs.Perform the resource operation.
DescribeAutoSnapshotPolicyExWhen --no-wait is not specified.Read the resource view.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--repeat-weekdaysstringJSON array of repeat weekdays, e.g. '["1","7"]'
--retention-daysintegersnapshot retention days (-1 for permanent)
--time-pointsstringJSON array of snapshot time points, e.g. '["0","12"]'
--copied-snapshots-retention-daysintegercross-region copied snapshot retention days
--enable-cross-region-copybooleanenable cross-region snapshot copy
--namestringauto snapshot policy name
--resource-groupstringresource group ID
--tagkey_valuetag assignment key=value
--target-copy-regionsstringJSON array of target copy regions

update

ecctl ecs auto-snapshot-policy update <id> [flags]

Update an auto snapshot policy or its disk associations

  • Kind: mutation · Risk: medium
APIWhen calledPurpose
ModifyAutoSnapshotPolicyExWhen --name is specified or --time-points is specified or --repeat-weekdays is specified or --retention-days is specified or --copied-snapshots-retention-days is specified or --enable-cross-region-copy is specified or --target-copy-regions is specified.Perform the resource operation.
ApplyAutoSnapshotPolicyWhen --attach-disk-id is specified.Perform the resource operation.
CancelAutoSnapshotPolicyWhen --detach-disk-id is specified.Perform the resource operation.
DescribeAutoSnapshotPolicyExWhen --no-wait is not specified.Read the resource view.
DescribeAutoSnapshotPolicyAssociationsWhen --with-associations is specified and --no-wait is not specified.Read the resource view.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--attach-disk-idarraydisk IDs to apply this policy to
--copied-snapshots-retention-daysintegercross-region copied snapshot retention days
--detach-disk-idarraydisk IDs to cancel this policy from
--enable-cross-region-copybooleanenable cross-region snapshot copy
--namestringauto snapshot policy name
--repeat-weekdaysstringJSON array of repeat weekdays, e.g. '["1","7"]'
--retention-daysintegersnapshot retention days (-1 for permanent)
--target-copy-regionsstringJSON array of target copy regions
--time-pointsstringJSON array of snapshot time points, e.g. '["0","12"]'
--with-associationsbooleaninclude disk association information

delete

ecctl ecs auto-snapshot-policy delete <id> [flags]

Delete auto snapshot policy

  • Kind: mutation · Risk: high
APIWhen calledPurpose
DeleteAutoSnapshotPolicyEvery time the command runs.Perform the resource operation.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region

get

ecctl ecs auto-snapshot-policy get <id> [flags]

Get auto snapshot policy

  • Kind: read · Risk: low
APIWhen calledPurpose
DescribeAutoSnapshotPolicyExEvery time the command runs.Read the resource view.
DescribeAutoSnapshotPolicyAssociationsWhen --with-associations is specified.Read the resource view.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--fieldsstringcomma-separated resource fields to include
--with-associationsbooleaninclude disk association information

list

ecctl ecs auto-snapshot-policy list <id> [flags]

List auto snapshot policies

  • Kind: read · Risk: low
APIWhen calledPurpose
DescribeAutoSnapshotPolicyExEvery 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)
--pageintegerresults page to return (default: 1)