全部產品
Search
文件中心

Virtual Private Cloud:授權信息

更新時間:Nov 03, 2026

存取控制(RAM)是阿里雲提供的系統管理使用者身份與資源存取權限的服務。使用 RAM 可以讓您避免與其他使用者共用阿里雲帳號密鑰,並可按需為使用者授予最小許可權。RAM 中使用權限原則描述授權的具體內容。

本文為您介紹 Virtual Private Cloud 為 RAM 權限原則定義的操作(Action)、資源(Resource)和條件(Condition)。 Virtual Private Cloud 的 RAM 代碼(RamCode)為 vpc ,支援的授權粒度為 RESOURCE 。

權限原則通用結構

權限原則支援 JSON 格式,其通用結構如下:

{
  "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)

下表是Virtual Private Cloud定義的操作,這些操作可以在 RAM 權限原則語句的Action元素中使用,用來授予執行該操作的許可權。下面對錶中的具體項提供說明:

  • 操作:是指具體的許可權點。

  • API:是指操作對應的 API 介面。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。該列不體現適用於任何操作的通用條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

API

存取層級

資源類型

條件關鍵字

關聯操作

vpc:DescribeRouterInterfaceAttribute DescribeRouterInterfaceAttribute get

*RouterInterface。

acs:vpc:{#regionId}:{#accountId}:routerinterface/{#RouterInterfaceId}

無 無
vpc:ModifyRouterInterfaceSpec ModifyRouterInterfaceSpec update

*RouterInterface。

acs:vpc:{#regionId}:{#accountId}:routerinterface/{#RouterInterfaceId}

無 無
vpc:ModifyRouterInterfaceAttribute ModifyRouterInterfaceAttribute update

*RouterInterface。

acs:vpc:{#regionId}:{#accountId}:routerinterface/{#RouterInterfaceId}

vpc:TargetAccountRDId

無
vpc:DescribeTagKeysForExpressConnect DescribeTagKeysForExpressConnect list

*全部資源。

*

無 無
vpc:UntagResourcesForExpressConnect UntagResourcesForExpressConnect update

*PhysicalConnection。

acs:vpc:{#regionId}:{#accountId}:physicalconnection/{#PhysicalConnectionId}

*VirtualBorderRouter。

acs:vpc:{#regionId}:{#accountId}:virtualborderrouter/{#VbrId}

*RouterInterface。

acs:vpc:{#regionId}:{#accountId}:routerinterface/{#RouterInterfaceId}

*TrafficQos。

acs:vpc:{#regionId}:{#accountId}:trafficqos/{#QosId}

無 無
vpc:DeleteRouterInterface DeleteRouterInterface delete

*RouterInterface。

acs:vpc:{#regionId}:{#accountId}:routerinterface/{#RouterInterfaceId}

無 無
vpc:CreateRouterInterface CreateRouterInterface create

*VirtualBorderRouter。

acs:vpc:{#regionId}:{#accountId}:virtualborderrouter/{#VbrId}

*RouterInterface。

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

vpc:TargetAccountRDId

無
vpc:DescribeTagKeys DescribeTagKeys get

*全部資源。

*

無 無
vpc:UnTagResources UnTagResources update

Address

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

NatGateway。

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

RouteTable。

acs:vpc:{#regionId}:{#accountId}:routetable/{#RouteTableId}

VPC

acs:vpc:{#regionId}:{#accountId}:vpc/{#VpcId}

VSwitch

acs:vpc:{#regionId}:{#accountId}:vswitch/{#VSwitchId}

vpc:tag

無
vpc:RevokeInstanceFromVbr RevokeInstanceFromVbr update

*VPC

acs:vpc:{#regionId}:{#AccountId}:vpc/{#VpcId}

無 無
vpc:ActivateRouterInterface ActivateRouterInterface update

*RouterInterface。

acs:vpc:{#regionId}:{#accountId}:routerinterface/{#RouterInterfaceId}

無 無
vpc:DeactivateRouterInterface DeactivateRouterInterface update

*RouterInterface。

acs:vpc:{#regionId}:{#accountId}:routerinterface/{#RouterInterfaceId}

無 無
vpc:DeleteRouterInterface DeleteExpressConnect delete

*RouterInterface。

acs:vpc:{#regionId}:{#accountId}:routerinterface/{#RouterInterfaceId}

無 無
vpc:DescribeRouterInterfaces DescribeRouterInterfaces list

*RouterInterface。

acs:vpc:{#regionId}:{#accountId}:routerinterface/{#RouterInterfaceId}

無 無
vpc:GrantInstanceToVbr GrantInstanceToVbr update

*VPC

acs:vpc:{#regionId}:{#AccountId}:vpc/{#VpcId}

無 無
vpc:TagResourcesForExpressConnect TagResourcesForExpressConnect update

*PhysicalConnection。

acs:vpc:{#regionId}:{#accountId}:physicalconnection/{#PhysicalConnectionId}

*VirtualBorderRouter。

acs:vpc:{#regionId}:{#accountId}:virtualborderrouter/{#VbrId}

*RouterInterface。

acs:vpc:{#regionId}:{#accountId}:routerinterface/{#RouterInterfaceId}

*TrafficQos。

acs:vpc:{#regionId}:{#accountId}:trafficqos/{#QosId}

無 無
vpc:DescribeTags DescribeTags get

*全部資源。

*

vpc:tag

無
vpc:DescribeEcGrantRelation DescribeEcGrantRelation list

*VirtualBorderRouter。

acs:vpc:{#regionId}:{#accountId}:virtualborderrouter/{#VbrId}

無 無
vpc:MoveResourceGroup MoveResourceGroup update

BandwidthPackage。

acs:vpc:{#regionId}:{#accountId}:bandwidthpackage/{#BandwidthPackageId}

Eip

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

VPC

acs:vpc:{#regionId}:{#accountId}:vpc/{#VpcId}

PrefixList。

acs:vpc:{#regionId}:{#accountId}:prefixlist/{#PrefixListId}

GatewayEndpoint。

acs:vpc:{#regionId}:{#accountId}:gatewayendpoint/{#GatewayEndpointId}

DhcpOptionsSet。

acs:vpc:{#regionId}:{#accountId}:dhcpoptionsset/{#DhcpOptionsSetId}

FlowLog

acs:vpc:{#regionId}:{#accountId}:flowlog/{#FlowLogId}

HaVip

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

Ipv4Gateway

acs:vpc:{#regionId}:{#accountId}:ipv4gateway/{#Ipv4GatewayId}

Ipv6Gateway

acs:vpc:{#regionId}:{#accountId}:ipv6gateway/{#Ipv6GatewayId}

PublicIpAddressPool。

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

TrafficMirrorFilter。

acs:vpc:{#regionId}:{#accountId}:trafficmirrorfilter/{#TrafficMirrorFilterId}

TrafficMirrorSession。

acs:vpc:{#regionId}:{#accountId}:trafficmirrorsession/{#TrafficMirrorSessionId}

無 無
vpc:ListTagResourcesForExpressConnect ListTagResourcesForExpressConnect list

*全部資源。

*

無 無
vpc:ConnectRouterInterface ConnectRouterInterface update

*RouterInterface。

acs:vpc:{#regionId}:{#accountId}:routerinterface/{#RouterInterfaceId}

無 無
vpc:ListTagResources ListTagResources get

BandwidthPackage。

acs:vpc:{#regionId}:{#accountId}:combandwidthpackage/{#BandwidthPackageId}

Address

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

NatGateway。

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

RouteTable。

acs:vpc:{#regionId}:{#accountId}:routetable/{#RouteTable}

VPC

acs:vpc:{#regionId}:{#accountId}:vpc/{#VpcId}

VpnGateway。

acs:vpc:{#regionId}:{#accountId}:vpngateway/{#VpnGatewayId}

VSwitch

acs:vpc:{#regionId}:{#accountId}:vswitch/{#VSwitchId}

vpc:tag

無
vpc:TagResources TagResources update

BandwidthPackage。

acs:vpc:{#regionId}:{#accountId}:combandwidthpackage/{#BandwidthPackageId}

Address

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

NatGateway。

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

RouteTable。

acs:vpc:{#regionId}:{#accountId}:routetable/{#RouteTableId}

VPC

acs:vpc:{#regionId}:{#accountId}:vpc/{#VpcId}

VpnGateway。

acs:vpc:{#regionId}:{#accountId}:vpngateway/{#VpnGatewayId}

VSwitch

acs:vpc:{#regionId}:{#accountId}:vswitch/{#VSwitchId}

vpc:tag

無
vpc:ChangeResourceGroup ChangeResourceGroup update

*全部資源。

*

無 無

資源(Resource)

下表是Virtual Private Cloud定義的資源,這些資源可以在 RAM 權限原則語句的Resource元素中使用,用來授予對該資源執行具體操作的許可權。 其中,資源 ARN 是資源在阿里雲上的唯一標識。具體說明如下:

  • {#}為變數標識,需要您替換為實際值。例如:{#ramcode}需要您替換為實際的雲端服務RAM代碼。

  • *表示全部。例如:

    • {#resourceType}為*時:表示全部資源。

    • {#regionId}為*時:表示全部地區。

    • {#accountId}為*時:表示全部阿里雲帳號。

資源類型

資源 ARN

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

條件(Condition)

下表是Virtual Private Cloud 定義的產品級條件關鍵字,這些條件關鍵字可以在 RAM 權限原則語句的Condition元素中使用,用來描述授予許可權的條件。以下僅列舉產品級的條件關鍵字,阿里雲定義的通用條件關鍵字也同樣適用Virtual Private Cloud。

其中,資料類型決定了您可以使用哪些條件運算子將請求中的值與權限原則語句中的值進行比較。您必須使用與資料類型匹配的條件運算子,否則無法匹配策略語句,授權行為無效。資料類型與條件運算子的對應關係,請參見條件操作類型。

條件關鍵字

描述

類型

vpc:VRouter 路由器資訊。 String
vpc:VPC VPC資訊。 String
vpc:tag VPC的標籤。 String
vpc:TargetAccountRDId 對端使用者資源目錄ID資訊。 String
vpc:PhysicalConnection 實體專線資訊。 String
vpc:VBR 邊界路由器資訊。 String

相關操作

您可以建立自訂權限原則,並將權限原則授予 RAM 使用者、RAM 使用者組或 RAM 角色。具體操作如下: