閱讀926 返回首頁    go 阿裏雲


專有網絡API的鑒權規則__借助RAM實現子賬號對主賬號的VPC資源訪問_API參考_專有網絡 VPC-阿裏雲

當子賬號通過Open API 對主賬號的專有網絡資源進行訪問時,專有網絡後台向 RAM 進行權限檢查,以確保資源擁有者的確將相關資源的相關權限授予了調用者。

每個不同的Open API 會根據涉及到的資源以及 API 的語義來確定需要檢查哪些資源的權限。具體地,每個 API 的鑒權規則見下表:

Action Resource Condition
vpc:CreateVpc acs:vpc:$regionid:$accountid:vpc/*
vpc:DeleteVpc acs:vpc:$regionid:$accountid:vpc/$vpcid
vpc:DescribeVpcs acs:vpc:$regionid:$accountid:vpc/*
vpc:ModifyVpcAttribute acs:vpc:$regionid:$accountid:vpc/$vpcid
vpc:DescribeVRouters acs:vpc:$regionid:$accountid:vrouter/* 指定要查詢的VRouterId:
“vpc:Vpc”:”acs:vpc:$regionid:$accountid:vpc/$vpcid”
未指定VRouterId:
“vpc:Vpc”:”acs:vpc:$regionid:$accountid:vpc/*”
vpc:ModifyVRouterAttribute acs:vpc:$regionid:$accountid:vrouter/$vrouterid
vpc:CreateVSwitch acs:vpc:$regionid:$accountid:vswitch/*
acs:vpc:$regionid:$accountid:vpc/$vpcid
vpc:DeleteVSwitch acs:vpc:$regionid:$accountid:vswitch/$vswitchid
vpc:DescribeVSwitches acs:vpc:$regionid:$accountid:vswitch/* “vpc:Vpc”:”acs:vpc:$regionid:$accountid:vpc/$vpcid”
vpc:ModifyVSwitchAttribute acs:vpc:$regionid:$accountid:vswitch/$vswitchid
vpc:CreateRouteEntry acs:vpc:$regionid:$accountid:routetable/$routetableid
vpc:DeleteRouteEntry acs:vpc:$regionid:$accountid:routetable/$routetableid
vpc:DescribeRouteTables acs:ecs:$regionid:$accountid:routetable/* VRouter中的路由表:
“vpc:VRouter”:”acs:vpc$regionid:$accountid:vrouter/$vrouterid”
vpc:CreateHaVip acs:vpc:$regionid:$accountid:havip/*
acs:vpc:$regionid:$accountid:vswitch/$vswitchid
vpc:DeleteHaVip acs:vpc:$regionid:$accountid:havip/$havipid
vpc:AssociateHaVip acs:vpc:$regionid:$accountid:havip/$havipid
acs:ecs:$regionid:$accountid:instance/$instanceid
vpc:UnassociateHaVip acs:vpc:$regionid:$accountid:havip/$havipid
acs:ecs:$regionid:$accountid:instance/$instanceid
vpc:DescribeHaVips acs:vpc:$regionid:$accountid:havip/*
vpc:AllocateEipAddress acs:vpc:$regionid:$accountid:eip/*
vpc:AssociateEipAddres InstanceType為EcsInstance:
acs:vpc:$regionid:$accountid:eip/$allocationid
acs:ecs:$regionid:$accountid:instance/$instanceid
InstanceType為HaVip:
acs:vpc:$regionid:$accountid:eip/$allocationid
acs:vpc:$regionid:$accountid:havip/$havipid
vpc:DescribeEipAddresses acs:vpc:$regionid:$accountid:eip/*
vpc:ModifyEipAddressAttribute acs:vpc:$regionid:$accountid:eip/$allocationid
vpc:UnassociateEipAddress InstanceType為EcsInstance:
acs:vpc:$regionid:$accountid:eip/$allocationid
acs:ecs:$regionid:$accountid:instance/$instanceid
InstanceType為HaVip:
acs:vpc:$regionid:$accountid:eip/$allocationid
acs:vpc:$regionid:$accountid:havip/$havipid
vpc:ReleaseEipAddress acs:vpc:$regionid:$accountid:eip/$allocationid
vpc:DescribeEipMonitorData acs:vpc:$regionid:$accountid:eip/$allocationid
CreaeNatGateway acs:vpc:$regionid:$accountid:natgateway/*
DescribeNatGateways 查詢指定NAT網關:
acs:vpc:$regionid:$accountid:natgateway/$natgatewayid
查詢NAT網關列表:
acs:vpc:$regionid:$accountid:natgateway/*
ModifyNatGatewaySpec acs:vpc:$regionid:$accountid:natgateway/$natgatewayid
ModifyNatGatewayAttribute acs:vpc:$regionid:$accountid:natgateway/$natgatewayid
DeleteNatGateway acs:vpc:$regionid:$accountid:natgateway/$natgatewayid
CreateBandwidthPackage acs:vpc:$regionid:$accountid:bandwidthpackage/*
DescribeBandwidthPackages 查詢指定的共享帶寬包信息:
acs:vpc:$regionid:$accountid:bandwidthpackage/$bandwidthpackageid
查詢共享帶寬包列表:
acs:vpc:$regionid:$accountid:bandwidthpackage/*
ModifyBandwidthPackageSpec acs:vpc:$regionid:$accountid:bandwidthpackage/$bandwidthpackageid
ModifyBandwidthPackageAttribute acs:vpc:$regionid:$accountid:bandwidthpackage/$bandwidthpackageid
AddBandwidthPackageIps acs:vpc:$regionid:$accountid:bandwidthpackage/$bandwidthpackageid
RemoveBandwidthPackageIps acs:vpc:$regionid:$accountid:bandwidthpackage/$bandwidthpackageid
DeleteBandwidthPackage acs:vpc:$regionid:$accountid:bandwidthpackage/$bandwidthpackageid
CreateForwardEntry acs:vpc:$regionid:$accountid:forwardtable/$forwardtableid
DeleteForwardEntry acs:vpc:$regionid:$accountid:forwardtable/$forwardtableid
ModifyForwardEntry acs:vpc:$regionid:$accountid:forwardtable/$forwardtableid
DescribeForwardTableEntries acs:vpc:$regionid:$accountid:forwardtable/$forwardtableid
CreateSnatEntry acs:vpc:$regionid:$accountid:snattable/*
ModifySnatEntry acs:vpc:$regionid:$accountid:snattable/$snattableid
DescribeSnatTableEntries acs:vpc:$regionid:$accountid:snattable/$snattableid
DeleteSnatEntry acs:vpc:$regionid:$accountid:snattable/$snattableid

關於其他雲產品與VPC相關操作的說明

其他雲產品的使用涉及到對專有網絡資源(VPC、VSwitch等)的操作,需要相應專有網絡資源的操作權限。例如創建ECS到某個交換機中,需要創建ECS和該VSwitch的權限;而在修改實例VPC屬性時,如果將ECS從一個交換機遷移到另一個交換機時,需要同時具有該ECS實例和兩個交換機的授權。

例如ECS CreateInstance和ModifyInstanceVpcAttribute:

Action Resource
ecs:CreateInstance acs:ecs:$regionid:$accountid:instance/*
acs:ecs:$regionid:$accountid:securitygroup/$securitygroupid
acs:ecs:$regionid:$accountid:image/$imageid
[and acs:ecs:$regionid:$accountid:snapshot/$snapshotid(如果指定了 DataDisk.n.SnapshotId)]
[acs:vpc:$regionid:$accountid:vswitch/$vswitchid(如果指定了VSwitchId)]
ecs:ModifyInstanceVpcAttribute acs:ecs:$regionid:$accountid:instance/$instanceid
acs:vpc:$regionid:$accountid:vswitch/$vswitchid(當前ECS所在的VSwitchId)
acs:vpc:$regionid:$accountid:vswitch/$vswitchid(如果更換VSwitch,指定遷移到的VSwitchId)

最後更新:2016-11-23 16:04:13

  上一篇:go RAM中可對專有網絡資源進行授權的Action__借助RAM實現子賬號對主賬號的VPC資源訪問_API參考_專有網絡 VPC-阿裏雲
  下一篇:go 申請彈性公網IP__彈性公網IP相關接口_API參考_專有網絡 VPC-阿裏雲