访问控制(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)未定义产品级别的条件关键字。如需查看适用于所有云产品的通用条件关键字,请参见通用条件关键字。