訪問控制(RAM)是阿里云提供的管理用戶身份與資源訪問權限的服務。使用RAM可以讓您避免與其他用戶共享阿里云賬號密鑰,并可按需為用戶授予最小權限。RAM中使用權限策略描述授權的具體內容。
本文為您介紹人工智能平臺 PAI(eas)為RAM權限策略定義的操作(Action)、資源(Resource)和條件(Condition)。人工智能平臺 PAI(eas)的RAM代碼(RamCode)為[{"popCode":"PaiPlugin","ramCodes":["paiplugin"]},{"popCode":"eas","ramCodes":["eas"]},{"popCode":"AIWorkSpace","ramCodes":["paiworkspace"]},{"popCode":"PAIElasticDatasetAccelerator","ramCodes":["datasetacc"]},{"popCode":"PaiStudio","ramCodes":["pai","paidesigner","paitraining","paiartlab"]},{"popCode":"OpenITag","ramCodes":["paiitag"]},{"popCode":"Itag","ramCodes":["paiitag"]},{"popCode":"pai-dlc","ramCodes":["paidlc"]}],支持的授權粒度為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)
下表是人工智能平臺 PAI(eas)定義的操作,這些操作可以在RAM權限策略語句的Action
元素中使用,用來授予執行該操作的權限。下面對表中的具體項提供說明:- 操作:是指具體的權限點。
- API:是指操作對應的API接口。
- 訪問級別:是指每個操作的訪問級別,取值為寫入(Write)、讀取(Read)或列出(List)。
- 資源類型:是指操作中支持授權的資源類型。具體說明如下:
- 對于必選的資源類型,用背景高亮的方式表示。
- 對于不支持資源級授權的操作,用
全部資源
表示。
- 條件關鍵字:是指云產品自身定義的條件關鍵字。該列不體現適用于任何操作的通用條件關鍵字。
- 關聯操作:是指成功執行操作所需要的其他權限。操作者必須同時具備關聯操作的權限,操作才能成功。
操作 | API | 訪問級別 | 資源類型 | 條件關鍵字 | 關聯操作 |
---|---|---|---|---|---|
eas:ListServiceVersions | ListServiceVersions | list | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:CloneService | CloneService | create | 全部資源 * | 無 | 無 |
eas:UpdateServiceLabel | UpdateServiceLabel | update | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:DescribeGateway | DescribeGateway | get | Gateway acs:eas:{#regionId}:{#accountId}:gateway/{#GatewayId} | 無 | 無 |
eas:UpdateServiceVersion | UpdateServiceVersion | update | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:UpdateServiceInstance | UpdateServiceInstance | update | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:DeleteGateway | DeleteGateway | delete | Gateway acs:eas:{#regionId}:{#accountId}:gateway/{#GatewayId} | 無 | 無 |
eas:StartService | StartService | update | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:DeleteResourceInstances | DeleteResourceInstances | delete | Resource acs:eas:{#regionId}:{#accountId}:resource/{#ResourceId} | 無 | 無 |
eas:ListGatewayIntranetLinkedVpc | ListGatewayIntranetLinkedVpc | list | Gateway acs:eas:{#regionId}:{#accountId}:gateway/{#GatewayId} | 無 | 無 |
eas:DeleteResourceDLink | DeleteResourceDLink | delete | Resource acs:eas:{#regionId}:{#accountId}:resource/{#ResourceId} | 無 | 無 |
eas:CreateGatewayIntranetLinkedVpc | CreateGatewayIntranetLinkedVpc | create | Gateway acs:eas:{#regionId}:{#accountId}:gateway/{#GatewayId} | 無 | 無 |
eas:DeleteServiceLabel | DeleteServiceLabel | update | 全部資源 * | 無 | 無 |
eas:CreateServiceAutoScaler | CreateServiceAutoScaler | create | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:ListGatewayDomains | ListGatewayDomains | list | 全部資源 * | 無 | 無 |
eas:DescribeService | DescribeService | get | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:DescribeResourceLog | DescribeResourceLog | get | Resource acs:eas:{#regionId}:{#accountId}:resource/{#ResourceId} | 無 | 無 |
eas:DeleteAclPolicy | DeleteAclPolicy | delete | Gateway acs:eas:{#regionId}:{#accountId}:gateway/{#GatewayId} | 無 | 無 |
eas:ListBenchmarkTask | ListBenchmarkTask | list | BenchmarkTask acs:eas:{#regionId}:{#accountId}:benchmarktask/* | 無 | 無 |
eas:UpdateServiceMirror | UpdateServiceMirror | update | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:UpdateServiceAutoScaler | UpdateServiceAutoScaler | update | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:DescribeVirtualResource | DescribeVirtualResource | get | VirtualResource acs:eas:{#regionId}:{#accountId}:virtualresource/{#VirtualResourceId} | 無 | 無 |
eas:StartBenchmarkTask | StartBenchmarkTask | Write | BenchmarkTask acs:eas:{#regionId}:{#accountId}:benchmarktask/{#BenchmarkTaskId} | 無 | 無 |
eas:ListResourceInstances | ListResourceInstances | get | Resource acs:eas:{#regionId}:{#accountId}:resource/{#ResourceId} | 無 | 無 |
eas:CreateService | CreateService | create | Service acs:eas:{#regionId}:{#accountId}:service/* | 無 | 無 |
eas:DescribeServiceLog | DescribeServiceLog | get | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:DeleteService | DeleteService | delete | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:DescribeServiceCronScaler | DescribeServiceCronScaler | get | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:ReleaseService | ReleaseService | update | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:CreateBenchmarkTask | CreateBenchmarkTask | Write | BenchmarkTask acs:eas:{#regionId}:{#accountId}:benchmarktask/* | 無 | 無 |
eas:DescribeResourceDLink | DescribeResourceDLink | get | Resource acs:eas:{#regionId}:{#accountId}:resource/{#ResourceId} | 無 | 無 |
eas:DescribeGroup | DescribeGroup | get | 全部資源 * | 無 | 無 |
eas:DescribeServiceMirror | DescribeServiceMirror | get | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:DeleteBenchmarkTask | DeleteBenchmarkTask | Write | BenchmarkTask acs:eas:{#regionId}:{#accountId}:benchmarktask/{#BenchmarkTaskId} | 無 | 無 |
eas:UpdateResource | UpdateResource | update | Resource acs:eas:{#regionId}:{#accountId}:resource/{#resourceId} | 無 | 無 |
eas:CreateAclPolicy | CreateAclPolicy | create | Gateway acs:eas:{#regionId}:{#accountId}:gateway/{#GatewayId} | 無 | 無 |
eas:CreateVirtualResource | CreateVirtualResource | create | VirtualResource acs:eas:{#regionId}:{#accountId}:virtualresource/* | 無 | 無 |
eas:DescribeServiceDiagnosis | DescribeServiceDiagnosis | get | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:DescribeBenchmarkTaskReport | DescribeBenchmarkTaskReport | get | BenchmarkTask acs:eas:{#regionId}:{#accountId}:benchmarktask/{#BenchmarkTaskId} | 無 | 無 |
eas:ListServices | ListServices | get | Service acs:eas:{#regionId}:{#accountId}:service/* | 無 | 無 |
eas:ListVirtualResources | ListVirtualResource | list | VirtualResource acs:eas:{#regionId}:{#accountId}:virtualresource/* | 無 | 無 |
eas:DeleteVirtualResource | DeleteVirtualResource | delete | VirtualResource acs:eas:{#regionId}:{#accountId}:virtualresource/{#VirtualResourceId} | 無 | 無 |
eas:ListResourceInstanceWorker | ListResourceInstanceWorker | get | Resource acs:eas:{#regionId}:{#accountId}:resource/{#ResourceId} | 無 | 無 |
eas:UpdateResourceDLink | UpdateResourceDLink | update | Resource acs:eas:{#regionId}:{#accountId}:resource/{#ResourceId} | 無 | 無 |
eas:UpdateVirtualResource | UpdateVirtualResource | update | VirtualResource acs:eas:{#regionId}:{#accountId}:virtualresource/{#VirtualResourceId} | 無 | 無 |
eas:ReinstallTenantAddon | ReinstallTenantAddon | update | 全部資源 * | 無 | 無 |
eas:ListServiceInstances | ListServiceInstances | get | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:DescribeServiceInstanceDiagnosis | DescribeServiceInstanceDiagnosis | get | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:DescribeServiceAutoScaler | DescribeServiceAutoScaler | get | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:UpdateServiceCronScaler | UpdateServiceCronScaler | update | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:DeleteServiceInstances | DeleteServiceInstances | delete | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:DeleteGatewayIntranetLinkedVpc | DeleteGatewayIntranetLinkedVpc | delete | Gateway acs:eas:{#regionId}:{#accountId}:gateway/{#GatewayId} | 無 | 無 |
eas:StopBenchmarkTask | StopBenchmarkTask | Write | BenchmarkTask acs:eas:{#regionId}:{#accountId}:benchmarktask/{#BenchmarkTaskId} | 無 | 無 |
eas:DescribeResource | DescribeResource | get | Resource acs:eas:{#regionId}:{#accountId}:resource/{#ResourceId} | 無 | 無 |
eas:UpdateAppService | UpdateAppService | update | 全部資源 * | 無 | 無 |
eas:DeleteGatewayIntranetLinkedVpcPeer | DeleteGatewayIntranetLinkedVpcPeer | delete | 全部資源 * | 無 | 無 |
eas:ListGroups | ListGroups | get | 全部資源 * | 無 | 無 |
eas:UpdateService | UpdateService | update | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:CommitService | CommitService | update | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:StopService | StopService | update | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:RestartService | RestartService | update | 全部資源 * | 無 | 無 |
eas:DeleteResource | DeleteResource | delete | Resource acs:eas:{#regionId}:{#accountId}:resource/{#ResourceId} | 無 | 無 |
eas:DetachGatewayDomain | DetachGatewayDomain | delete | 全部資源 * | 無 | 無 |
eas:ListResourceServices | ListResourceServices | get | Resource acs:eas:{#regionId}:{#accountId}:resource/{#ResourceId} | 無 | 無 |
eas:DeleteServiceAutoScaler | DeleteServiceAutoScaler | delete | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:CreateResourceInstances | CreateResourceInstances | create | Resource acs:eas:{#regionId}:{#accountId}:resource/{#ResourceId} | 無 | 無 |
eas:DescribeBenchmarkTask | DescribeBenchmarkTask | get | BenchmarkTask acs:eas:{#regionId}:{#accountId}:benchmarktask/{#BenchmarkTaskId} | 無 | 無 |
eas:CreateGateway | CreateGateway | create | 全部資源 * | 無 | 無 |
eas:ListTenantAddons | ListTenantAddons | get | 全部資源 * | 無 | 無 |
eas:ListGatewayIntranetLinkedVpcPeer | ListGatewayIntranetLinkedVpcPeer | list | 全部資源 * | 無 | 無 |
eas:DeleteServiceCronScaler | DeleteServiceCronScaler | delete | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:UpdateBenchmarkTask | UpdateBenchmarkTask | Write | BenchmarkTask acs:eas:{#regionId}:{#accountId}:benchmarktask/{#BenchmarkTaskId} | 無 | 無 |
eas:DescribeServiceEvent | DescribeServiceEvent | get | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:UpdateServiceSafetyLock | UpdateServiceSafetyLock | update | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:ListResources | ListResources | get | Resource acs:eas:{#regionId}:{#accountId}:resource/* | 無 | 無 |
eas:DeleteResourceLog | DeleteResourceLog | delete | Resource acs:eas:{#regionId}:{#accountId}:resource/{#ResourceId} | 無 | 無 |
eas:ListAclPolicy | ListAclPolicy | list | Gateway acs:eas:{#regionId}:{#accountId}:gateway/{#GatewayId} | 無 | 無 |
eas:UpdateGateway | UpdateGateway | update | Gateway acs:eas:{#regionId}:{#accountId}:gateway/{#GatewayId} | 無 | 無 |
eas:ListServiceContainers | ListServiceContainers | get | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:CreateServiceCronScaler | CreateServiceCronScaler | create | 全部資源 * | 無 | 無 |
eas:CreateGatewayIntranetLinkedVpcPeer | CreateGatewayIntranetLinkedVpcPeer | create | 全部資源 * | 無 | 無 |
eas:CreateResourceLog | CreateResourceLog | create | Resource acs:eas:{#regionId}:{#accountId}:resource/{#ResourceId} | 無 | 無 |
eas:CreateResource | CreateResource | create | Resource acs:eas:{#regionId}:{#accountId}:resource/* | 無 | 無 |
eas:ListGateway | ListGateway | list | 全部資源 * | 無 | 無 |
eas:DevelopService | DevelopService | update | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:DeleteServiceMirror | DeleteServiceMirror | delete | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:CreateAppService | CreateAppService | create | 全部資源 * | 無 | 無 |
eas:CreateServiceMirror | CreateServiceMirror | create | Service acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} | 無 | 無 |
eas:UpdateResourceInstance | UpdateResourceInstance | update | Resource acs:eas:{#regionId}:{#accountId}:resource/{#ResourceId} | 無 | 無 |
資源(Resource)
下表是人工智能平臺 PAI(eas)定義的資源,這些資源可以在RAM權限策略語句的Resource
元素中使用,用來授予對該資源執行具體操作的權限。 其中,資源ARN是資源在阿里云上的唯一標識。具體說明如下:{#}
為變量標識,需要您替換為實際值。例如:{#ramcode}
需要您替換為實際的云服務RAM代碼。-
*
表示全部。例如:{#resourceType}
為*
時:表示全部資源。{#regionId}
為*
時:表示全部地域。{#accountId}
為*
時:表示全部阿里云賬號。
資源類型 | 資源ARN |
---|---|
Service | acs:eas:{#regionId}:{#accountId}:service/{#ServiceName} |
Gateway | acs:eas:{#regionId}:{#accountId}:gateway/{#GatewayId} |
Resource | acs:eas:{#regionId}:{#accountId}:resource/{#ResourceId} |
BenchmarkTask | acs:eas:{#regionId}:{#accountId}:benchmarktask/* |
VirtualResource | acs:eas:{#regionId}:{#accountId}:virtualresource/{#VirtualResourceId} |
BenchmarkTask | acs:eas:{#regionId}:{#accountId}:benchmarktask/{#BenchmarkTaskId} |
Service | acs:eas:{#regionId}:{#accountId}:service/* |
VirtualResource | acs:eas:{#regionId}:{#accountId}:virtualresource/* |
Service | acs:paiplugin:{#regionId}:{#accountId}:service/{#ServiceName} |
Gateway | acs:eas:{#regionId}:{#accountId}:gateway/* |
Resource | acs:eas:{#regionId}:{#accountId}:resource/* |
條件(Condition)
人工智能平臺 PAI(eas)未定義產品級別的條件關鍵字。如需查看適用于所有云產品的通用條件關鍵字,請參見通用條件關鍵字。