This topic uses an example policy to demonstrate how to authorize a RAM user to create a snapshot.

The following policy indicates that the authorized RAM user can create a snapshot by granting ECS administrator permissions and disk permissions. In this example, the ECS instance ID is inst-01 and the disk ID is dist-01.

{
  "Statement": [
    {
      "Action": "ecs:*",
      "Effect": "Allow",
      "Resource": [
        "acs:ecs:*:*:instance/inst-01"
      ]
    },
    {
      "Action": "ecs:CreateSnapshot",
      "Effect": "Allow",
      "Resource": [
        "acs:ecs:*:*:disk/dist-01",
        "acs:ecs:*:*:snapshot/*"
      ]
    },
    {
      "Action": [
        "ecs:Describe*"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ],
  "Version": "1"
}