Updated on 2025-11-06 GMT+08:00

Resource Access Manager (RAM)

IAM provides system-defined identity policies to define common actions supported by cloud services. You can also create custom identity policies using the actions supported by cloud services for more refined access control.

In addition to IAM, the Organizations service also provides Service Control Policies (SCPs) to set access control policies.

SCPs do not actually grant any permissions to an entity. They only set the permissions boundary for the entity. When SCPs are attached to an organizational unit (OU) or a member account, the SCPs do not directly grant permissions to that OU or member account. Instead, the SCPs only determine what permissions are available for that member account or those member accounts under that OU. The granted permissions can be applied only if they are allowed by the SCPs.

To learn more about how IAM is different from Organizations for access control, see How IAM Is Different from Organizations for Access Control?.

This section describes the elements used by IAM custom identity policies and Organizations SCPs. The elements include actions, resources, and conditions.

Actions

Actions are specific operations that are allowed or denied in an identity policy.

  • The Access Level column describes how the action is classified (List, Read, or Write). This classification helps you understand the level of access that an action grants when you use it in an identity policy.
  • The Resource Type column indicates whether the action supports resource-level permissions.
    • You can use a wildcard (*) to indicate all resource types. If this column is empty (-), the action does not support resource-level permissions and you must specify all resources ("*") in your identity policy statements.
    • If this column includes a resource type, you must specify the URN in the Resource element of your identity policy statements.
    • Required resources are marked with asterisks (*) in the table. If you specify a resource in a statement using this action, then it must be of this type.

    For details about the resource types defined by RAM, see Resources.

  • The Condition Key column contains keys that you can specify in the Condition element of an identity policy statement.
    • If the Resource Type column has values for an action, the condition key takes effect only for the listed resource types.
    • If the Resource Type column is empty (-) for an action, the condition key takes effect for all resources that action supports.
    • If the Condition Key column is empty (-) for an action, the action does not support any condition keys.

    For details about the condition keys defined by RAM, see Conditions.

  • The Alias column lists the policy actions that are configured in identity policies. With these actions, you can use APIs for policy-based authorization. For details, see Policies and Identity Policies.

The following table lists the actions that you can define in identity policy statements for RAM.

Table 1 Actions supported by RAM

Action

Description

Access Level

Resource Type (*: required)

Condition Key

Alias

ram:permissions:list

Grants permission to list the RAM permissions.

List

permission *

-

-

ram:permissions:get

Grants permission to get the contents of an RAM permission.

Read

permission *

-

-

ram:resourceShares:create

Grants permission to create a resource share with provided resource(s) and/or principal(s).

Write

-

-

ram:resourceShares:search

Grants permission to get a set of resource shares from a provided list or with a specified status.

Read

-

g:TagKeys

-

ram:resourceShares:update

Grants permission to update attributes of the resource share.

Write

resourceShare *

-

-

ram:RequestedAllowExternalPrincipals

ram:resourceShares:delete

Grants permission to delete resource share.

Write

resourceShare *

-

ram:resourceShares:associate

Grants permission to associate resource(s) and/or principal(s) to a resource share.

Write

resourceShare *

-

-

ram:resourceShares:disassociate

Grants permission to disassociate resource(s) and/or principal(s) from a resource share.

Write

resourceShare *

-

-

ram:resourceShares:searchResourceShareAssociations

Grants permission to get a set of resource share associations from a provided list or with a specified status of the specified type.

Read

-

-

-

ram:resourceShares:associatePermission

Grants permission to associate a permission with a resource share.

Write

resourceShare *

g:ResourceTag/<tag-key>

-

-

ram:PermissionUrn

ram:resourceShares:disassociatePermission

Grants permission to disassociate a permission from a resource share.

Write

resourceShare *

g:ResourceTag/<tag-key>

-

-

ram:PermissionUrn

ram:resourceShares:listAssociatedPermissions

Grants permission to list the permissions associated with a resource share.

List

resourceShare *

g:ResourceTag/<tag-key>

-

ram:resourceShares:tag

Grants permission to tag the specified resource share.

Tagging

resourceShare *

g:ResourceTag/<tag-key>

-

-

ram:resourceShares:untag

Grants permission to untag the specified resource share.

Tagging

resourceShare *

g:ResourceTag/<tag-key>

-

-

ram:resourceShares:listTags

Grants permission to query resource share tags.

List

-

-

-

ram:resourceShares:listResourceSharesByTag

Grants permission to query the resource shares based on the tag.

List

-

g:TagKeys

-

ram:resourceShares:searchResourceShareCountByTag

Grants permission to query the number of resource shares based on the tag.

Read

-

g:TagKeys

-

ram:sharedResources:search

Grants permission to list the resources that you added to resource shares or the resources that are shared with you.

List

-

-

-

ram:sharedPrincipals:search

Grants permission to list the principals that you have shared resources with or that have shared resources with you.

List

-

-

-

ram:resourceShareInvitations:accept

Grants permission to accept the specified resource share invitation.

Write

resourceShareInvitation *

-

-

-

ram:ShareOwnerAccountId

ram:resourceShareInvitations:reject

Grants permission to reject the specified resource share invitation.

Write

resourceShareInvitation *

-

-

-

ram:ShareOwnerAccountId

ram:resourceShareInvitations:search

Grants permission to get resource share invitations by the specified invitation id or resource share id.

Read

-

-

-

ram:resourceShares:enableSharingWithOrganization

Grants permission to enable resource sharing with Organizations.

Permission_management

-

-

-

ram:resourceShares:disableSharingWithOrganization

Grants permission to disable resource sharing with Organizations.

Permission_management

-

-

-

ram:resourceShares:searchEnableSharingWithOrganization

Grants permission to check whether resource sharing with Organizations is enabled.

Read

-

-

-

ram:sharedResources:searchDistinctResource

Grants permission to list the distinct resources that you added to resource shares or the distinct resources that are shared with you.

List

-

-

-

ram:sharedPrincipals:searchDistinctPrincipal

Grants permission to list the distinct principals that you have shared resources with or that have shared resources with you.

List

-

-

-

ram:resourceShares:listQuota

Grants permission to list quotas.

List

-

-

-

ram:resourceTypes:list

Grants permission to list resource type.

List

-

-

-

ram:permission:listVersions

Grants permission to list all of the versions of specified RAM permission.

List

-

-

-

Each API of RAM usually supports one or more actions. Table 2 lists the supported actions and dependencies.

Table 2 Actions and dependencies supported by RAM APIs

API

Action

Dependencies

GET /v1/permissions

ram:permissions:list

-

GET /v1/permissions/{permission_id}

ram:permissions:get

-

POST /v1/resource-shares

ram:resourceShares:create

-

POST /v1/resource-shares/search

ram:resourceShares:search

-

PUT /v1/resource-shares/{resource_share_id}

ram:resourceShares:update

-

DELETE /v1/resource-shares/{resource_share_id}

ram:resourceShares:delete

-

POST /v1/resource-shares/{resource_share_id}/associate

ram:resourceShares:associate

-

POST /v1/resource-shares/{resource_share_id}/disassociate

ram:resourceShares:disassociate

-

POST /v1/resource-share-associations/search

ram:resourceShares:searchResourceShareAssociations

-

POST /v1/resource-shares/{resource_share_id}/associate-permission

ram:resourceShares:associatePermission

-

POST /v1/resource-shares/{resource_share_id}/disassociate-permission

ram:resourceShares:disassociatePermission

-

GET /v1/resource-shares/{resource_share_id}/associated-permissions

ram:resourceShares:listAssociatedPermissions

-

POST /v1/resource-shares/{resource_share_id}/tags/create

ram:resourceShares:tag

-

POST /v1/resource-shares/{resource_share_id}/tags/delete

ram:resourceShares:untag

-

GET /v1/resource-shares/tags

ram:resourceShares:listTags

-

POST /v1/resource-shares/resource-instances/filter

ram:resourceShares:listResourceSharesByTag

-

POST /v1/resource-shares/resource-instances/count

ram:resourceShares:searchResourceShareCountByTag

-

POST /v1/shared-resources/search

ram:sharedResources:search

-

POST /v1/shared-principals/search

ram:sharedPrincipals:search

-

POST /v1/resource-share-invitations/{resource_share_invitation_id}/accept

ram:resourceShareInvitations:accept

-

POST /v1/resource-share-invitations/{resource_share_invitation_id}/reject

ram:resourceShareInvitations:reject

-

POST /v1/resource-share-invitations/search

ram:resourceShareInvitations:search

-

POST /v1/organization-share/enable

ram:resourceShares:enableSharingWithOrganization

-

POST /v1/organization-share/disable

ram:resourceShares:disableSharingWithOrganization

-

GET /v1/organization-share

ram:resourceShares:searchEnableSharingWithOrganization

-

POST /v1/shared-resources/search-distinct-resource

ram:sharedResources:searchDistinctResource

-

POST /v1/shared-principals/search-distinct-principal

ram:sharedPrincipals:searchDistinctPrincipal

-

GET /v1/resource-shares/quotas

ram:resourceShares:listQuota

-

GET /v1/resource-types

ram:resourceTypes:list

-

GET /v1/permissions/{permission_id}/versions

ram:permission:listVersions

-

Resources

A resource type indicates the resources that an identity policy applies to. If you specify a resource type for any action in Table 3, the resource URN must be specified in the identity policy statements using that action, and the identity policy applies only to resources of this type. If no resource type is specified, the Resource element is marked with an asterisk (*) and the identity policy applies to all resources. You can also set condition keys in an identity policy to define resource types.

The following table lists the resource types that you can define in identity policy statements for RAM.

Table 3 Resource types supported by RAM

Resource Type

URN

resourceShare

ram::<account-id>:resourceShare:<resource-share-id>

resourceShareInvitation

ram::<account-id>:resourceShareInvitation:<resource-share-invitation-id>

permission

ram::system:permission:<permission-id>

Conditions

Condition Key Overview

A Condition element lets you specify conditions for when an identity policy is in effect. It contains condition keys and operators.

  • The condition key that you specify can be a global condition key or a service-specific condition key.
    • Global condition keys (with the g: prefix) apply to all actions. Cloud services do not need to provide user identity information. Instead, the system automatically obtains such information and authenticates users. For details, see Global Condition Keys.
    • Service-specific condition keys (with the abbreviation of a service name plus a colon as the prefix, for example, ram) apply only to operations of the xx service. For details, see Table 4.
    • The number of values associated with a condition key in the request context of an API call makes the condition key single-valued or multivalued. Single-valued condition keys have at most one value in the request context of an API call. Multivalued condition keys can have multiple values in the request context of an API call. For example, a request can originate from at most one VPC endpoint, so g:SourceVpce is a single-valued condition key. You can tag resources and include multiple tag key-value pairs in a request, so g:TagKeys is a multivalued condition key.
  • A condition operator, condition key, and a condition value together constitute a complete condition statement. An identity policy can be applied only when its request conditions are met. For supported condition operators, see operators.

Service-specific condition keys supported by RAM

The following table lists the condition keys that you can define in identity policies for RAM. You can include these condition keys to specify conditions for when your identity policy is in effect.

Table 4 Service-specific condition keys supported by RAM

Service-specific Condition Key

Type

Single-valued/Multivalued

Description

ram:RequestedResourceType

string

Multivalued

Filters access based on the specified resource type.

ram:ResourceUrn

string

Multivalued

Filters access based on a resource with the specified URN.

ram:Principal

string

Multivalued

Filters access based on the format of the specified principal.

ram:TargetOrgPaths

string

Multivalued

Filters access based on the specified organization path of principals.

ram:PermissionUrn

string

Single-valued

Filters access based on the specified Permission URN.

ram:ShareOwnerAccountId

string

Single-valued

Filters access based on resource shares owned by a specific account. For example, you can use this condition key to specify which resource share invitations can be accepted or rejected based on the resource share owner's account ID.

ram:AllowExternalPrincipals

boolean

Single-valued

Filters access by resource shares that allow or deny sharing with external principals. For example, specify true if the action can only be performed on resource shares that allow sharing with external principals. External principals are accounts that are outside of its Organization.

ram:RequestedAllowExternalPrincipals

boolean

Single-valued

Filters access by the specified value for 'allow_external_principals'. External principals are accounts that are outside of its Organization.