This topic describes how to call the CancelAutoSnapshotPolicy operation by using Alibaba Cloud CLI to cancel the automatic snapshot policy for one or more disks.

Background information

We recommend that you read the description of the operation before you call the operation. For more information, see CancelAutoSnapshotPolicy.

When you call an API operation through Alibaba Cloud CLI, make sure that request parameter values of different data types are in required formats. For more information, see Parameter format overview.

Request examples

  1. Call the DescribeDisks operation to query the ID of the disk for which you want to cancel the automatic snapshot policy. For more information, see DescribeDisks.
    In this example, the disk name is used to query the ID of the disk.
    aliyun ecs DescribeDisks --RegionId cn-hangzhou --DiskName demoname --output cols=Disks.Disk[].DiskId
    Sample response:
    Disks.Disk[].DiskId
    -------------------
    [d-bp15hfgq0pb85p37****]
  2. In this example, the automatic snapshot policy of the d-bp15hfgq0pb85p37**** disk is canceled.
    aliyun ecs CancelAutoSnapshotPolicy --regionId cn-hangzhou --diskIds '["d-bp15hfgq0pb85p37****"]'

Result

{
        "RequestId": "7D453425-5229-4D50-BE06-D16CD92A3E7C"
}