AliyunServiceRolePolicyForECSImageBuilder

AliyunServiceRolePolicyForECSImageBuilder 是专用于服务关联角色的授权策略,会在创建服务关联角色 AliyunServiceRoleForECSImageBuilder 时自动授权,以允许服务关联角色代您访问其他云服务。本策略由对应的阿里云服务按需更新,请勿将本策略授权给服务关联角色之外的 RAM 身份使用。

策略详情

  • 类型:系统策略

  • 创建时间:2025-09-17 10:58:14

  • 更新时间:2025-09-17 10:58:14

  • 当前版本:v1

策略内容

{
  "Version": "1",
  "Statement": [
    {
      "Action": [
        "oss:PutObject",
        "oss:GetObject"
      ],
      "Effect": "Allow",
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "oss:BucketTag/allowImageBuilderAccess": "true"
        }
      }
    },
    {
      "Action": [
        "oos:CreateTemplate",
        "oos:StartExecution",
        "oos:CancelExecution",
        "oos:ListExecutions",
        "oos:ListTaskExecutions",
        "oos:ListExecutionLogs",
        "oos:DeleteTemplate",
        "oos:ValidateTemplateContent",
        "oos:DeleteExecutions"
      ],
      "Effect": "Allow",
      "Resource": "*"
    },
    {
      "Action": [
        "ecs:DescribeAvailableResource",
        "ecs:DescribeInstances",
        "ecs:DescribeCloudAssistantStatus",
        "ecs:DescribeImages",
        "ecs:DescribeImageFromFamily",
        "ecs:DescribeInvocations",
        "ecs:DescribeInvocationResults",
        "ecs:DescribeSecurityGroups",
        "ecs:CancelCopyImage",
        "ecs:ModifyImageSharePermission",
        "ecs:CreateInstance",
        "ecs:RunInstances",
        "ecs:CopyImage",
        "ecs:DeleteSnapshot",
        "ecs:DescribeImageSupportInstanceTypes",
        "ecs:DescribeDisks",
        "ecs:CreateSecurityGroup",
        "ecs:CancelTask",
        "ecs:DescribeTaskAttribute"
      ],
      "Effect": "Allow",
      "Resource": "*"
    },
    {
      "Action": [
        "ecs:RebootInstance",
        "ecs:DeleteImage",
        "ecs:DescribeImageSharePermission",
        "ecs:InstallCloudAssistant",
        "ecs:CreateImage",
        "ecs:StartInstance",
        "ecs:StopInstance",
        "ecs:DeleteInstance",
        "ecs:AllocatePublicIpAddress",
        "ecs:AttachDisk",
        "ecs:DetachDisk",
        "ecs:RunCommand",
        "ecs:DeleteSecurityGroup",
        "ecs:ModifyImageAttribute",
        "ecs:DeleteDisk",
        "ecs:ImportImage",
        "ecs:ModifyInstanceAttribute"
      ],
      "Effect": "Allow",
      "Resource": "*",
      "Condition": {
        "StringLike": {
          "ecs:tag/imagepipelineid": "*"
        }
      }
    },
    {
      "Action": "ecs:InvokeCommand",
      "Effect": "Allow",
      "Resource": "acs:ecs:*:*:instance/*",
      "Condition": {
        "StringLike": {
          "ecs:tag/imagepipelineid": "*"
        }
      }
    },
    {
      "Action": "ecs:InvokeCommand",
      "Effect": "Allow",
      "Resource": "acs:ecs:*:*:command/*"
    },
    {
      "Action": [
        "vpc:DescribeVSwitches",
        "vpc:DescribeVpcs",
        "vpc:CreateVpc",
        "vpc:CreateVSwitch",
        "vpc:DeleteVSwitch",
        "vpc:DeleteVpc"
      ],
      "Effect": "Allow",
      "Resource": "*"
    },
    {
      "Action": "ram:DeleteServiceLinkedRole",
      "Effect": "Allow",
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "ram:ServiceName": "imagebuilder.ecs.aliyuncs.com"
        }
      }
    },
    {
      "Action": "ram:CreateServiceLinkedRole",
      "Resource": "*",
      "Effect": "Allow",
      "Condition": {
        "StringEquals": {
          "ram:ServiceName": "systemeventoperator.oos.aliyuncs.com"
        }
      }
    }
  ]
}

相关文档