Oracle Cloud Infrastructure Documentation

Details for IAM

This topic covers details for writing policies to control access to IAM.

Resource-Types

compartments

users

groups

dynamic-groups

policies

identity-providers

tenancies

tag-namespaces

tagdefinitions

workrequest

Supported Variables

IAM supports all the general variables (see General Variables for All Requests), plus additional ones listed here:

Operations for This Resource-Type... Can Use These Variables... Variable Type Comments
users target.user.id Entity (OCID) Not available to use with CreateUser.
target.user.name String  
groups target.group.id Entity (OCID) Not available to use with CreateGroup.
target.group.name String  
target.group.member Boolean True if request.user is a member of target.group.
policies

target.policy.id

Entity (OCID) Not available to use with CreatePolicy.
target.policy.name String  
target.policy.autoupdate Boolean Whether the policy being acted upon uses "Keep policy current" as its version date (i.e., either null or an empty string for the versionDate parameter in CreatePolicy and UpdatePolicy).
compartments

target.compartment.id

Entity (OCID)

For CreateCompartment, this will be the value of the parent compartment (e.g., the root compartment).

This is a universal variable available to use with any request across all services (see General Variables for All Requests).

target.compartment.name String  

Details for Verbs + Resource-Type Combinations

The following tables show the permissions and API operations covered by each verb. The level of access is cumulative as you go from inspect > read > use > manage. A plus sign (+) in a table cell indicates incremental access compared to the cell directly above it, whereas "no extra" indicates no incremental access.

For example, the read verb for compartments covers no extra permissions or API operations compared to the inspect verb. The use verb includes the same ones as the read verb, plus the COMPARTMENT_UPDATE permission and UpdateCompartment API operation. The manage verb includes the same permissions and API operations as the use verb, plus the COMPARTMENT_CREATE permission and two API operations: CreateCompartment and DeleteCompartment

compartments
users
groups
dynamic-groups
policies
identity-providers
tenancies
tag-namespaces
tagdefinitions

Permissions Required for Each API Operation

The following table lists the API operations in a logical order, grouped by resource type.

For information about permissions, see Permissions.

API Operation Permissions Required to Use the Operation
ListRegions TENANCY_INSPECT
ListRegionSubscriptions TENANCY_INSPECT
CreateRegionSubscription TENANCY_UPDATE
GetTenancy TENANCY_INSPECT
ListAvailabilityDomains COMPARTMENT_INSPECT
ListCompartments COMPARTMENT_INSPECT
GetCompartment COMPARTMENT_INSPECT
UpdateCompartment COMPARTMENT_UPDATE
CreateCompartment COMPARTMENT_CREATE
DeleteCompartment COMPARTMENT_DELETE
GetWorkRequest COMPARTMENT_READ
ListUsers USER_INSPECT
GetUser USER_INSPECT
UpdateUser USER_UPDATE
UpdateUserState USER_UPDATE and USER_UNBLOCK
CreateUser

USER_CREATE

DeleteUser USER_DELETE
CreateOrResetUIPassword USER_UPDATE and USER_UIPASS_RESET
ListApiKeys USER_READ
UploadApiKey

USER_UPDATE and USER_APIKEY_ADD

DeleteApiKey USER_UPDATE and USER_APIKEY_REMOVE
ListAuthTokens USER_READ
UpdateAuthToken USER_UPDATE and USER_AUTHTOKEN_RESET
CreateAuthToken USER_UPDATE and USER_AUTHTOKEN_SET
DeleteAuthToken USER_UPDATE and USER_AUTHTOKEN_REMOVE
ListSwiftPasswords USER_READ
UpdateSwiftPassword USER_UPDATE and USER_SWIFTPASS_RESET
CreateSwiftPassword USER_UPDATE and USER_SWIFTPASS_SET
DeleteSwiftPassword USER_UPDATE and USER_SWIFTPASS_REMOVE
ListCustomerSecretKeys USER_READ
CreateSecretKey USER_UPDATE and USER_SECRETKEY_ADD
UpdateCustomerSecretKey USER_UPDATE and USER_SECRETKEY_UPDATE
DeleteCustomerSecretKey USER_UPDATE and USER_SECRETKEY_REMOVE
ListUserGroupMemberships GROUP_INSPECT and USER_INSPECT
GetUserGroupMembership USER_INSPECT and GROUP_INSPECT
AddUserToGroup GROUP_UPDATE and USER_UPDATE
RemoveUserFromGroup GROUP_UPDATE and USER_UPDATE
ListGroups GROUP_INSPECT
GetGroup GROUP_INSPECT
UpdateGroup GROUP_UPDATE
CreateGroup GROUP_CREATE
DeleteGroup GROUP_DELETE
ListDynamicGroups DYNAMIC_GROUP_INSPECT
GetDynamicGroup DYNAMIC_GROUP_INSPECT
UpdateDynamicGroup DYNAMIC_GROUP_UPDATE
CreateDynamicGroup DYNAMIC_GROUP_CREATE
DeleteDynamicGroup DYNAMIC_GROUP_DELETE
ListPolicies POLICY_READ
GetPolicy POLICY_READ
UpdatePolicy POLICY_UPDATE
CreatePolicy POLICY_CREATE
DeletePolicy POLICY_DELETE
ListIdentityProviders IDENTITY_PROVIDER_INSPECT
GetIdentityProvider IDENTITY_PROVIDER_INSPECT
UpdateIdentityProvider IDENTITY_PROVIDER_UPDATE
CreateIdentityProvider IDENTITY_PROVIDER_CREATE
DeleteIdentityProvider IDENTITY_PROVIDER_DELETE
ListIdpGroupMappings IDENTITY_PROVIDER_INSPECT and GROUP_INSPECT
GetIdpGroupMapping IDENTITY_PROVIDER_INSPECT and GROUP_INSPECT
AddIdpGroupMapping IDENTITY_PROVIDER_UPDATE and GROUP_UPDATE
DeleteIdpGroupMapping IDENTITY_PROVIDER_UPDATE and GROUP_UPDATE
ListTagNamespaces TAG_NAMESPACE_INSPECT
GetTagNamespace TAG_NAMESPACE_INSPECT
CreateTagNamespace TAG_NAMESPACE_CREATE
UpdateTagNamespace TAG_NAMESPACE_UPDATE
ListTagDefinitions TAG_DEFINITION_INSPECT
GetTagDefinition TAG_DEFINITION_INSPECT
CreateTagDefinition TAG_DEFINITION_CREATE
UpdateTagDefinition TAG_DEFINITION_UPDATE