RAM authorization
Resource Access Management (RAM) is a service provided by Alibaba Cloud to manage user identities and resource access permissions. Using RAM helps you avoid sharing your Alibaba Cloud account keys with other users and allows you to grant users the least privilege access. RAM uses permission policies to define authorizations. This topic describes the actions, resources, and conditions that Elastic Container Instance defines for RAM permission policies. The RamCode of Elastic Container Instance is eci , and the supported authorization granularity is RESOURCE . For the resource authorization scope of each action, see the Action table.
General structure of a policy
Permission policies support the JSON format. The following example shows the structure of a policy that uses the Action element. Values in angle brackets (<>) are placeholders. Replace them with actual values.
{
"Version": "1",
"Statement": [
{
"Effect": "<Effect>",
"Action": "<Action>",
"Resource": "<Resource>",
"Condition": {
"<Condition_operator>": {
"<Condition_key>": [
"<Condition_value>"
]
}
}
}
]
}
The following list describes the fields and placeholders in the policy:
-
Effect: Specifies the authorization result. Valid values: Allow and Deny.
-
Action: Specifies one or more operations that are allowed or denied.
-
Resource: Specifies the specific objects affected by the operations. You can use Alibaba Cloud Resource Names (ARNs) to describe specific resources.
-
Condition: Specifies the conditions for the authorization to take effect. This field is optional.
-
Condition operator: Specifies the conditional operators. Different types of conditions support different conditional operators.
-
Condition_key: Specifies the condition keys.
-
Condition_value: Specifies the condition values.
Action
The following table lists the RAM actions defined by Elastic Container Instance. These actions can be used in the Action element of RAM permission policies.
-
Action: A specific RAM permission point. In most cases, it has the same name as the corresponding OpenAPI.
-
OpenAPI: The OpenAPI associated with the RAM action.
-
Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.
-
Resource type: The type of the resource that support authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.
-
For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding ARN in the
Resourceelement of the policy. -
For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the
Resourceelement of the policy.
-
-
Condition key: The product-level condition keys supported by the action. Common condition keys are not included. For more information, see Common condition keys.
-
Dependent action: Other action permissions required to perform the action.
|
Action |
OpenAPI |
Access level |
Resource type |
Condition key |
Dependent action |
| eci:UpdateVirtualNode | UpdateVirtualNode | update |
*VirtualNode
|
eci:tag |
None |
| eci:DescribeContainerGroups | DescribeContainerGroups | get |
ContainerGroup
ContainerGroup
|
eci:tag |
None |
| eci:ResizeContainerGroupVolume | ResizeContainerGroupVolume | update |
*All Resource
|
eci:tag |
None |
| eci:CommitContainer | CommitContainer | create |
*CommitContainerTask
|
eci:tag |
None |
| eci:DeleteDataCache | DeleteDataCache | delete |
*DataCache
|
eci:tag |
None |
| eci:DescribeInstanceOpsRecords | DescribeInstanceOpsRecords | get |
*All Resource
|
eci:tag |
None |
| eci:UntagResources | UntagResources | update |
*All Resource
|
eci:tag |
None |
| eci:DescribeCommitContainerTask | DescribeCommitContainerTask | get |
*CommitContainerTask
|
eci:tag |
None |
| eci:DescribeImageCaches | DescribeImageCaches | get |
ImageCache
ImageCache
|
eci:tag |
None |
| eci:CreateInstanceOpsTask | CreateInstanceOpsTask | create |
*All Resource
|
eci:tag |
None |
| eci:UpdateContainerGroup | UpdateContainerGroup | update |
*containergroup
|
eci:tag |
None |
| eci:DeleteVirtualNode | DeleteVirtualNode | delete |
*VirtualNode
|
eci:tag |
None |
| eci:RestartContainerGroup | RestartContainerGroup | update |
*containergroup
|
eci:tag |
None |
| eci:ListTagResources | ListTagResources | list |
*All Resource
|
None | None |
| eci:CreateDataCache | CreateDataCache | create |
*DataCache
|
eci:tag |
None |
| eci:DescribeContainerGroupMetric | DescribeContainerGroupMetric | get |
*containergroup
|
eci:tag |
None |
| eci:DescribeVirtualNodes | DescribeVirtualNodes | get |
*VirtualNode
|
eci:tag |
None |
| eci:ListUsage | ListUsage | get |
*All Resource
|
None | None |
| eci:DescribeMultiContainerGroupMetric | DescribeMultiContainerGroupMetric | get |
*containergroup
|
eci:tag |
None |
| eci:DescribeContainerGroupStatus | DescribeContainerGroupStatus | get |
*containergroup
|
eci:tag |
None |
| eci:ExecContainerCommand | ExecContainerCommand | update |
*containergroup
|
eci:tag |
None |
| eci:DeleteImageCache | DeleteImageCache | delete |
*ImageCache
|
eci:tag |
None |
| eci:UpdateDataCache | UpdateDataCache | update |
*DataCache
|
eci:tag |
None |
| eci:DescribeDataCaches | DescribeDataCaches | list |
*DataCache
|
eci:tag |
None |
| eci:DescribeContainerGroupPrice | DescribeContainerGroupPrice | get |
*All Resource
|
None | None |
| eci:DeleteContainerGroup | DeleteContainerGroup | delete |
*containergroup
|
eci:tag |
None |
| eci:DescribeContainerLog | DescribeContainerLog | get |
*containergroup
|
eci:tag |
None |
| eci:CreateVirtualNode | CreateVirtualNode | create |
*VirtualNode
|
eci:tag |
None |
| eci:CreateImageCache | CreateImageCache | create |
*ImageCache
|
eci:tag |
None |
| eci:TagResources | TagResources | update |
*All Resource
|
eci:tag |
None |
| eci:DescribeContainerGroupEvents | DescribeContainerGroupEvents | get |
*containergroup
|
eci:tag |
None |
| eci:CreateContainerGroup | CreateContainerGroup | create |
*ContainerGroup
|
eci:tag |
None |
| eci:CopyDataCache | CopyDataCache | create |
*DataCache
|
eci:tag |
None |
| eci:UpdateImageCache | UpdateImageCache | update |
*ImageCache
|
eci:tag |
None |
Resource
The following table lists the resource types and ARN formats defined by Elastic Container Instance. The Resource element of RAM policy statements specifies the resources to which the statement applies. Notes:
-
{#}in an ARN is a variable placeholder. Replace it with the actual value. For example, replace{#ramcode}with the actual RAM code of the cloud service. -
*in an ARN indicates all. For example:-
{#resourceType}set to*: all resources. -
{#regionId}set to*: all regions. -
{#accountId}set to*: all Alibaba Cloud accounts.
-
Resource type |
ARN |
| VirtualNode |
|
| ContainerGroup |
|
| CommitContainerTask |
|
| DataCache |
|
| ImageCache |
|
| containergroup |
|
Condition
The following table lists the product-level condition keys defined by Elastic Container Instance. Specify them in the Condition element of RAM policy statements to define the conditions under which the statement takes effect. Use conditional operators that match the data type of the condition key. If the operator does not match, the statement does not take effect. For more information about conditional operators, see Condition operator.
Condition key |
Description |
Data type |
| eci:tag | The ECI tag information is no longer maintained as of January 1, 2023. Use the global condition keys acs:RequestTag and acs:ResourceTag instead. | String |
References
For information about conditional operators, custom policies, and authorization operations, see the following documents: