授权信息

更新时间:
复制 MD 格式

访问控制(RAM)是阿里云提供的管理用户身份与资源访问权限的服务。使用 RAM 可以让您避免与其他用户共享阿里云账号密钥,并可按需为用户授予最小权限。RAM 中使用权限策略描述授权的具体内容。

本文为您介绍 专有网络VPC 为 RAM 权限策略定义的操作(Action)、资源(Resource)和条件(Condition)。 专有网络VPC 的 RAM 代码(RamCode)为 vpc ,支持的授权粒度为 资源级 。各操作的资源授权范围见操作表。

权限策略通用结构

权限策略支持 JSON 格式。以下为使用 Action 元素的权限策略结构示意,尖括号内为占位符,使用时需替换为实际值:

{
  "Version": "1",
  "Statement": [
    {
      "Effect": "<Effect>",
      "Action": "<Action>",
      "Resource": "<Resource>",
      "Condition": {
        "<Condition_operator>": {
          "<Condition_key>": [
            "<Condition_value>"
          ]
        }
      }
    }
  ]
}        

各字段及占位符含义如下:

  • Effect:权限策略效果。取值:Allow(允许)、Deny(拒绝)。

  • Action:允许或拒绝的具体操作。具体信息,请参见操作(Action)。

  • Resource:受操作影响的具体对象,您可以使用资源 ARN 来描述指定资源。具体信息,请参见资源(Resource)。

  • Condition:策略语句生效的条件。可选字段。具体信息,请参见条件(Condition)。

  • Condition_operator:条件运算符,不同类型的条件对应不同的条件运算符。具体信息,请参见权限策略基本元素。

  • Condition_key:条件关键字。

  • Condition_value:条件关键字对应的值。

操作(Action)

下表列出专有网络VPC的 RAM 操作,这些操作可以在 RAM 权限策略的 Action 元素中使用。

  • 操作:具体的 RAM 权限点,大部分情况下和 OpenAPI 同名。

  • OpenAPI:与该 RAM 操作关联的 OpenAPI。

  • 访问级别:是指每个操作的访问级别。取值:create、list、get、update、delete。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。显示“全部资源”且资源 ARN 为 * 时,权限策略中的 Resource 填写 *。

  • 条件关键字:操作支持的产品级条件关键字,不含通用条件关键字。

  • 关联操作:执行该操作还需要具备的其他操作权限。

操作

OpenAPI

访问级别

资源类型

条件关键字

关联操作

vpc:DescribeEipSegment DescribeEipSegment get

*SegmentAddress

acs:vpc:{#regionId}:{#accountId}:eip/*

无 无
vpc:ReleaseEipAddress ReleaseEipAddress update

*Address

acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId}

vpc:tag

无
vpc:CreatePublicIpAddressPool CreatePublicIpAddressPool create

*PublicIpAddressPool

acs:vpc:{#regionId}:{#accountId}:publicipaddresspool/*

无 无
vpc:ListPublicIpAddressPoolCidrBlocks ListPublicIpAddressPoolCidrBlocks get

*PublicIpAddressPool

acs:vpc:{#regionId}:{#accountId}:publicipaddresspool/{#PublicIpAddressPoolId}

无 无
vpc:ListPublicIpAddressPools ListPublicIpAddressPools get

*PublicIpAddressPool

acs:vpc:{#regionId}:{#accountId}:publicipaddresspool/*

无 无
vpc:AddPublicIpAddressPoolCidrBlock AddPublicIpAddressPoolCidrBlock create

*PublicIpAddressPool

acs:vpc:{#regionId}:{#accountId}:publicipaddresspool/{#PublicIpAddressPoolId}

无 无
vpc:ModifyEipAddressAttribute ModifyEipAddressAttribute update

*Address

acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId}

无 无
vpc:OpenPublicIpAddressPoolService OpenPublicIpAddressPoolService create

*全部资源

*

无 无
vpc:AssociateEipAddressBatch AssociateEipAddressBatch update

*Address

acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId}

Instance

acs:vpc:{#regionId}:{#accountId}:instance/{#InstanceId}

NatGateway

acs:vpc:{#regionId}:{#accountId}:natgateway/{#NatGatewayId}

无 无
vpc:DescribeEipAddresses DescribeEipAddresses list

*Address

acs:vpc:{#regionId}:{#accountId}:eip/*

vpc:tag

无
vpc:DeletePublicIpAddressPool DeletePublicIpAddressPool delete

*PublicIpAddressPool

acs:vpc:{#regionId}:{#accountId}:publicipaddresspool/{#PublicIpAddressPoolId}

无 无
vpc:AllocateEipAddressPro AllocateEipAddressPro create

*Address

acs:vpc:{#regionId}:{#accountId}:eip/*

无 无
vpc:ReleaseEipSegmentAddress ReleaseEipSegmentAddress delete

*SegmentAddress

acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId}

无 无
vpc:SetHighDefinitionMonitorLogStatus SetHighDefinitionMonitorLogStatus update

*Address

acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId}

无 无
vpc:ModifyEipForwardMode ModifyEipForwardMode update

*Address

acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId}

无 无
vpc:AllocateEipAddress AllocateEipAddress create

*Address

acs:vpc:{#regionId}:{#accountId}:eip/*

无 无
vpc:DescribeEipMonitorData DescribeEipMonitorData get

*Address

acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId}

无 无
vpc:UpdatePublicIpAddressPoolAttribute UpdatePublicIpAddressPoolAttribute update

*PublicIpAddressPool

acs:vpc:{#regionId}:{#accountId}:publicipaddresspool/{#PublicIpAddressPoolId}

无 无
vpc:UnassociateEipAddress UnassociateEipAddress delete

Instance

acs:ecs:{#regionId}:{#accountId}:instance/{#InstanceId}

*Address

acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId}

HaVip

acs:vpc:{#regionId}:{#accountId}:havip/{#HaVipId}

无 无
vpc:DescribePublicIpAddress DescribePublicIpAddress list

*全部资源

*

无 无
vpc:TransformEipSegmentToPublicIpAddressPool TransformEipSegmentToPublicIpAddressPool create

*全部资源

*

无 无
vpc:DescribeEipGatewayInfo DescribeEipGatewayInfo list

*GatewayInfo

acs:vpc:{#regionId}:{#accountId}:eip/*

无 无
vpc:AssociateEipAddress AssociateEipAddress update

*Address

acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId}

NatGateway

acs:vpc:{#regionId}:{#accountId}:natgateway/{#NatGatewayId}

Instance

acs:vpc:{#regionId}:{#accountId}:instance/{#InstanceId}

Association

acs:vpc:{#regionId}:{#accountId}:havip/{#HaVipId}

无 无
vpc:DescribeHighDefinitionMonitorLogAttribute DescribeHighDefinitionMonitorLogAttribute get

*Address

acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId}

无 无
vpc:DeletePublicIpAddressPoolCidrBlock DeletePublicIpAddressPoolCidrBlock delete

*PublicIpAddressPool

acs:vpc:{#regionId}:{#accountId}:publicipaddresspool/{#PublicIpAddressPoolId}

无 无
vpc:GetPublicIpAddressPoolServiceStatus GetPublicIpAddressPoolServiceStatus get

*全部资源

*

无 无
vpc:AllocateEipSegmentAddress AllocateEipSegmentAddress create

*SegmentAddress

acs:vpc:{#regionId}:{#accountId}:eip/*

无 无

资源(Resource)

下表列出专有网络VPC的资源类型及其 ARN 格式。RAM 权限策略语句的 Resource 元素用于指定该语句适用的资源。具体说明如下:

  • {#}为变量标识,需要您替换为实际值。例如:{#ramcode}需要您替换为实际的云服务RAM代码。

  • *表示全部。例如:

    • {#resourceType}为*时:表示全部资源。

    • {#regionId}为*时:表示全部地域。

    • {#accountId}为*时:表示全部阿里云账号。

资源类型

资源 ARN

Ipv6Gateway
  • acs:vpc:{#regionId}:{#accountId}:ipv6gateway/{#Ipv6GatewayId}
  • acs:vpc:{#regionId}:{#accountId}:ipv6gateway/*
SslVpnServer
  • acs:vpc:{#regionId}:{#accountId}:sslvpnserver/{#SslVpnServerId}
  • acs:vpc:{#regionId}:{#accountId}:sslvpnserver/*
  • acs:vpc:{#Region}:{#AccountId}:sslvpnserver/{#SslVpnServerId}
TrafficQos
  • acs:vpc:{#regionId}:{#accountId}:TrafficQos/*
  • acs:vpc:{#regionId}:{#accountId}:trafficqos/{#QosId}
Ipv6Translator
  • acs:vpc:{#regionId}:{#accountId}:ipv6trans/{#Ipv6TranslatorId}
  • acs:vpc:{#regionId}:{#accountId}:ipv6trans/*
VRouter
  • acs:vpc:{#regionId}:{#accountId}:vrouter/{#VRouterId}
  • acs:vpc:{#regionId}:{#accountId}:vrouter/*
SnatEntry
  • acs:vpc:{#regionId}:{#accountId}:snattable/*
PrefixList
  • acs:vpc:{#regionId}:{#accountId}:prefixlist/{#PrefixListId}
  • acs:vpc:{#regionId}:{#accountId}:prefixlist/*
NatGateway
  • acs:vpc:{#regionId}:{#accountId}:natgateway/{#NatGatewayId}
  • acs:natgateway:{#regionId}:{#accountId}:natgateway/{#NatGatewayId}
  • acs:vpc:{#regionId}:{#accountId}:natgateway/*
RouteTable
  • acs:vpc:{#regionId}:{#accountId}:routetable/{#RouteTableId}
  • acs:vpc:{#regionId}:{#accountId}:routetable/*
  • acs:vpc:{#regionId}:{#accountId}:routetable/{#RouteTable}
DhcpOptionsSet
  • acs:vpc:{#regionId}:{#accountId}:dhcpoptionsset/{#DhcpOptionsSetId}
  • acs:vpc:{#regionId}:{#accountId}:dhcpoptionsset/*
physicalconnection
  • acs:vpc:{#regionId}:{#accountId}:physicalconnection/*
RouteTargetGroup
  • acs:vpc:{#regionId}:{#accountId}:routetargetgroup/*
  • acs:vpc:{#regionId}:{#accountId}:routetargetgroup/{#RouteTargetGroupId}
VirtualBorderRouter
  • acs:vpc:{#regionId}:{#accountId}:virtualborderrouter/{#virtualborderrouterId}
  • acs:vpc:{#regionId}:{#accountId}:virtualborderrouter/{#VbrId}
  • acs:vpc:*:{#accountId}:virtualborderrouter/{#VirtualBorderRouterId}
  • acs:vpc:{#regionId}:{#accountId}:virtualborderrouter/{#InstanceId}
  • acs:vpc:{#regionId}:{#AccountId}:virtualborderrouter/*
VPC
  • acs:vpc:{#regionId}:{#accountId}:vpc/{#VpcId}
  • acs:vpc:{#regionId}:{#accountId}:vpc/{#InstanceId}
  • acs:vpc:{#regionId}:{#accountId}:vpc/*
BandwidthPackage
  • acs:vpc:{#regionId}:{#accountId}:combandwidthpackage/{#BandwidthPackageId}
  • acs:vpc:{#regionId}:{#accountId}:bandwidthpackage/{#BandwidthPackageId}
HaVip
  • acs:vpc:{#regionId}:{#accountId}:havip/{#HaVipId}
  • acs:vpc:{#regionId}:{#accountId}:havip/*
PhysicalConnection
  • acs:vpc:{#regionId}:{#accountId}:physicalconnection/{#PhysicalConnectionId}
  • acs:vpc:{#regionId}:{#accountId}:physicalconnection/*
CustomerGateway
  • acs:vpc:{#regionId}:{#accountId}:customergateway/{#CustomerGatewayId}
  • acs:vpc:{#Region}:{#AccountId}:customergateway/{#CustomerGatewayId}
  • acs:vpc:{#regionId}:{#accountId}:customergateway/*
VpnConnection
  • acs:vpc:{#regionId}:{#accountId}:vpnconnection/*
  • acs:vpc:{#regionId}:{#accountId}:vpnconnection/{#VpnConnectionId}
  • acs:vpc:{#regionId}:{#accountId}:*
  • acs:vpc:{#Region}:{#AccountId}:vpnconnection/{#VpnConnectionId}
VpnGateway
  • acs:vpc:{#regionId}:{#accountId}:vpngateway/{#VpnGatewayId}
  • acs:vpc:{#regionId}:{#accountId}:vpngateway/*
  • acs:vpc:{#regionId}:{#accountId}:vpngateway/{#VpnInstanceId}
  • acs:vpc:{#Region}:{#AccountId}:vpngateway/{#VpnInstanceId}
  • acs:vpc:{#regionId}:{#accountId}:
RouterInterface
  • acs:vpc:{#regionId}:{#accountId}:routerinterface/{#RouterInterfaceId}
  • acs:vpc:{#regionId}:{#accountId}:routerinterface/*
VpnCertificateAttachment
  • acs:vpc:{#regionId}:{#accountId}:vpncertificateattachment/{#VpnGatewayId}/{#CertificateType}/{#CertificateId}
VpnConnections
  • acs:vpc:{#regionId}:{#accountId}:vpnconnection/{#VpnConnectionId}
CommonBandwidthPackage
  • acs:vpc:{#regionId}:{#accountId}:combandwidthpackage/{#CommonBandwidthPackageId}
  • acs:vpc:{#regionId}:{#accountId}:combandwidthpackage/*
GlobalAccelerationInstance
  • acs:vpc:{#regionId}:{#accountId}:globalaccelerationinstance/*
  • acs:vpc:{#regionId}:{#accountId}:GlobalAccelerationInstance/*
  • acs:vpc:{#regionId}:{#accountId}:globalaccelerationinstance/{#GlobalAccelerationInstanceId}
FullNat
  • acs:vpc:{#regionId}:{#accountId}:vpcfullnattable/{#FullNatTableId}
FlowLog
  • acs:vpc:{#regionId}:{#accountId}:flowlog/{#FlowLogId}
  • acs:vpc:{#regionId}:{#accountId}:flowlog/*
NetworkAcl
  • acs:vpc:{#regionId}:{#accountId}:networkacl/{#NetworkAclId}
  • acs:vpc:{#regionId}:{#accountId}:networkacl/*
IPv6Translator
  • acs:vpc:{#regionId}:{#accountId}:ipv6trans/*
  • acs:vpc:{#regionId}:{#accountId}:ipv6trans/{#IPv6TranslatorId}
TrafficMirrorFilter
  • acs:vpc:{#regionId}:{#accountId}:trafficmirrorfilter/{#TrafficMirrorFilterId}
  • acs:vpc:{#regionId}:{#accountId}:trafficmirrorfilter/*
VSwitch
  • acs:vpc:{#regionId}:{#accountId}:vswitch/{#VSwitchId}
  • acs:vpc:{#regionid}:{#accountId}:vswitch/*
SegmentAddress
  • acs:vpc:{#regionId}:{#accountId}:eip/*
  • acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId}
  • acs:eip:{#regionId}:{#accountId}:eipsegment/{#SegmentInstanceId}
Ipv6Address
  • acs:vpc:{#regionId}:{#accountId}:ipv6address/{#Ipv6AddressId}
  • acs:vpc:{#regionId}:{#accountId}:ipv6address/*
GatewayEndpoint
  • acs:vpc:{#regionId}:{#accountId}:gatewayendpoint/*
  • acs:vpc:{#regionId}:{#accountId}:gatewayendpoint/{#GatewayEndpointId}
Ipv4Gateway
  • acs:vpc:{#regionId}:{#accountId}:ipv4gateway/*
  • acs:vpc:{#regionId}:{#accountId}:ipv4gateway/{#ipv4gatewayId}
ForwardTable
  • acs:vpc:{#regionId}:{#accountId}:forwardtable/{#ForwardTableId}
Address
  • acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId}
  • acs:vpc:{#regionId}:{#accountId}:eip/*
TrafficMirrorSession
  • acs:vpc:{#regionId}:{#accountId}:trafficmirrorsession/*
  • acs:vpc:{#regionId}:{#accountId}:trafficmirrorsession/{#TrafficMirrorSessionId}
PublicIpAddressPool
  • acs:vpc:{#regionId}:{#accountId}:publicipaddresspool/*
  • acs:vpc:{#regionId}:{#accountId}:publicipaddresspool/{#PublicIpAddressPoolId}
SslVpnClientCert
  • acs:vpc:{#regionId}:{#accountId}:sslvpnclientcert/*
  • acs:vpc:{#regionId}:{#accountId}:sslvpnclientcert/{#SslVpnClientCertId}
IpsecServer
  • acs:vpc:{#Region}:{#AccountId}: vpnipsecserver/{#IpsecServerId}
  • acs:vpc:{#regionId}:{#accountId}:vpnipsecserver/{#IpsecServerId}
  • acs:vpc:{#regionId}:{#accountId}:ipsecserver/*
  • acs:vpc:{#regionId}:{#accountId}: vpnipsecserver/{#IpsecServerId}
Ipv6InternetBandwidth
  • acs:vpc:{#regionId}:{#accountId}:ipv6bandwidth/*
  • acs:vpc:{#regionId}:{#accountId}:ipv6bandwidth/{#Ipv6InternetBandwidthId}
  • acs:vpc:{#regionId}:{#accountId}:vpc/*
Eip
  • acs:vpc:{#regionId}:{#accountId}:eip/{#EipId}
  • acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId}
RouteEntry
  • acs:vpc:{#regionId}:{#accountId}:routetable/{#RouteTableId}
GrantRuleToCen
  • acs:vpc:{#regionId}:{#accountId}:vpc/{#InstanceId}
PublicIpAddressPoolService
  • acs:vpc:{#regionId}:{#accountId}:publicipaddresspoolservice/*
VSwitchCidrReservation
  • acs:vpc:{#regionId}:{#accountId}:vswitchcidrreservation/{#VSwitchCidrReservationId}
  • acs:vpc:{#regionId}:{#accountId}:vswitchcidrreservation/*
Instance
  • acs:vpc:{#regionId}:{#accountId}:instance/{#InstanceId}
  • acs:ecs:{#regionId}:{#accountId}:instance/*
  • acs:ecs:{#regionId}:{#accountId}:instance/{#Instanceid}
SnatTable
  • acs:vpc:{#regionId}:{#accountId}:snattable/{#SnatTableId}
TrafficMirrorService
  • acs:vpc:{#regionId}:{#accountId}:trafficmirror/*
FlowLogService
  • acs:vpc:{#regionId}:{#accountId}:flowlog/*
Ipv6EgressRule
  • acs:vpc:{#regionId}:{#accountId}:ipv6gateway/{#Ipv6GatewayId}
VpnAttachment
  • acs:vpc:{#Region}:{#AccountId}:vpnattachment/{#VpnConnectionId}
GatewayInfo
  • acs:vpc:{#regionId}:{#accountId}:eip/*
Association
  • acs:vpc:{#regionId}:{#accountId}:havip/{#HaVipId}

条件(Condition)

下表列出专有网络VPC定义的产品级条件关键字,可在 RAM 权限策略语句的 Condition 元素中指定策略语句生效的条件。请使用与条件关键字的数据类型相适用的条件运算符。条件运算符不匹配时,该策略语句不生效。条件运算符的说明,请参见条件运算符。

条件关键字

描述

类型

vpc:VRouter 路由器信息 String
vpc:VPC VPC信息 String
vpc:tag VPC的标签 String
vpc:TargetAccountRDId 对端用户资源目录ID信息 String
vpc:PhysicalConnection 物理专线信息 String
vpc:VBR 边界路由器信息 String

相关文档

关于条件运算符、自定义权限策略与授权操作,请参见以下文档: