All Products
Search
Document Center

Resource Access Management:Create snapshots

Last Updated:Nov 09, 2023

This topic provides an example of the Resource Access Management (RAM) policy for creating snapshots.

The following policy indicates that snapshots can be created for a specific disk that is attached to a specific Elastic Compute Service (ECS) instance. In this example, the ID of the ECS instance is i-bp14l21sgragk0sp**** and the ID of the disk is d-bp1hek8q2l5tqzde****. Replace the IDs with actual values.

{
  "Statement": [
    {
      "Action": "ecs:*",
      "Effect": "Allow",
      "Resource": [
        "acs:ecs:*:*:instance/i-bp14l21sgragk0sp****"
      ]
    },
    {
      "Action": "ecs:CreateSnapshot",
      "Effect": "Allow",
      "Resource": [
        "acs:ecs:*:*:disk/d-bp1hek8q2l5tqzde****",
        "acs:ecs:*:*:snapshot/*"
      ]
    },
    {
      "Action": [
        "ecs:Describe*"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ],
  "Version": "1"
}