Class: OCI::Identity::IdentityClient
- Inherits:
-
Object
- Object
- OCI::Identity::IdentityClient
- Defined in:
- lib/oci/identity/identity_client.rb
Instance Attribute Summary collapse
-
#api_client ⇒ OCI::ApiClient
readonly
Client used to make HTTP requests.
-
#endpoint ⇒ String
readonly
Fully qualified endpoint URL.
-
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
Instance Method Summary collapse
-
#add_user_to_group(add_user_to_group_details, opts = {}) ⇒ Response
Adds the specified user to the specified group and returns a ‘UserGroupMembership` object with its own OCID.
-
#create_compartment(create_compartment_details, opts = {}) ⇒ Response
Creates a new compartment in your tenancy.
-
#create_customer_secret_key(create_customer_secret_key_details, user_id, opts = {}) ⇒ Response
Creates a new secret key for the specified user.
-
#create_dynamic_group(create_dynamic_group_details, opts = {}) ⇒ Response
Creates a new dynamic group in your tenancy.
-
#create_group(create_group_details, opts = {}) ⇒ Response
Creates a new group in your tenancy.
-
#create_identity_provider(create_identity_provider_details, opts = {}) ⇒ Response
Creates a new identity provider in your tenancy.
-
#create_idp_group_mapping(create_idp_group_mapping_details, identity_provider_id, opts = {}) ⇒ Response
Creates a single mapping between an IdP group and an IAM Service Group.
-
#create_or_reset_ui_password(user_id, opts = {}) ⇒ Response
Creates a new Console one-time password for the specified user.
-
#create_policy(create_policy_details, opts = {}) ⇒ Response
Creates a new policy in the specified compartment (either the tenancy or another of your compartments).
-
#create_region_subscription(create_region_subscription_details, tenancy_id, opts = {}) ⇒ Response
Creates a subscription to a region for a tenancy.
-
#create_smtp_credential(create_smtp_credential_details, user_id, opts = {}) ⇒ Response
Creates a new SMTP credential for the specified user.
-
#create_swift_password(create_swift_password_details, user_id, opts = {}) ⇒ Response
Creates a new Swift password for the specified user.
-
#create_tag(tag_namespace_id, create_tag_details, opts = {}) ⇒ Response
Creates a new tag in the specified tag namespace.
-
#create_tag_namespace(create_tag_namespace_details, opts = {}) ⇒ Response
Creates a new tag namespace in the specified compartment.
-
#create_user(create_user_details, opts = {}) ⇒ Response
Creates a new user in your tenancy.
-
#delete_api_key(user_id, fingerprint, opts = {}) ⇒ Response
Deletes the specified API signing key for the specified user.
-
#delete_customer_secret_key(user_id, customer_secret_key_id, opts = {}) ⇒ Response
Deletes the specified secret key for the specified user.
-
#delete_dynamic_group(dynamic_group_id, opts = {}) ⇒ Response
Deletes the specified dynamic group.
-
#delete_group(group_id, opts = {}) ⇒ Response
Deletes the specified group.
-
#delete_identity_provider(identity_provider_id, opts = {}) ⇒ Response
Deletes the specified identity provider.
-
#delete_idp_group_mapping(identity_provider_id, mapping_id, opts = {}) ⇒ Response
Deletes the specified group mapping.
-
#delete_policy(policy_id, opts = {}) ⇒ Response
Deletes the specified policy.
-
#delete_smtp_credential(user_id, smtp_credential_id, opts = {}) ⇒ Response
Deletes the specified SMTP credential for the specified user.
-
#delete_swift_password(user_id, swift_password_id, opts = {}) ⇒ Response
Deletes the specified Swift password for the specified user.
-
#delete_user(user_id, opts = {}) ⇒ Response
Deletes the specified user.
-
#get_compartment(compartment_id, opts = {}) ⇒ Response
Gets the specified compartment’s information.
-
#get_dynamic_group(dynamic_group_id, opts = {}) ⇒ Response
Gets the specified dynamic group’s information.
-
#get_group(group_id, opts = {}) ⇒ Response
Gets the specified group’s information.
-
#get_identity_provider(identity_provider_id, opts = {}) ⇒ Response
Gets the specified identity provider’s information.
-
#get_idp_group_mapping(identity_provider_id, mapping_id, opts = {}) ⇒ Response
Gets the specified group mapping.
-
#get_policy(policy_id, opts = {}) ⇒ Response
Gets the specified policy’s information.
-
#get_tag(tag_namespace_id, tag_name, opts = {}) ⇒ Response
Gets the specified tag’s information.
-
#get_tag_namespace(tag_namespace_id, opts = {}) ⇒ Response
Gets the specified tag namespace’s information.
-
#get_tenancy(tenancy_id, opts = {}) ⇒ Response
Get the specified tenancy’s information.
-
#get_user(user_id, opts = {}) ⇒ Response
Gets the specified user’s information.
-
#get_user_group_membership(user_group_membership_id, opts = {}) ⇒ Response
Gets the specified UserGroupMembership’s information.
-
#initialize(config: nil, region: nil, signer: nil) ⇒ IdentityClient
constructor
Creates a new IdentityClient.
-
#list_api_keys(user_id, opts = {}) ⇒ Response
Lists the API signing keys for the specified user.
-
#list_availability_domains(compartment_id, opts = {}) ⇒ Response
Lists the Availability Domains in your tenancy.
-
#list_compartments(compartment_id, opts = {}) ⇒ Response
Lists the compartments in your tenancy.
-
#list_customer_secret_keys(user_id, opts = {}) ⇒ Response
Lists the secret keys for the specified user.
-
#list_dynamic_groups(compartment_id, opts = {}) ⇒ Response
Lists the dynamic groups in your tenancy.
-
#list_groups(compartment_id, opts = {}) ⇒ Response
Lists the groups in your tenancy.
-
#list_identity_providers(protocol, compartment_id, opts = {}) ⇒ Response
Lists all the identity providers in your tenancy.
-
#list_idp_group_mappings(identity_provider_id, opts = {}) ⇒ Response
Lists the group mappings for the specified identity provider.
-
#list_policies(compartment_id, opts = {}) ⇒ Response
Lists the policies in the specified compartment (either the tenancy or another of your compartments).
-
#list_region_subscriptions(tenancy_id, opts = {}) ⇒ Response
Lists the region subscriptions for the specified tenancy.
-
#list_regions(opts = {}) ⇒ Response
Lists all the regions offered by Oracle Cloud Infrastructure.
-
#list_smtp_credentials(user_id, opts = {}) ⇒ Response
Lists the SMTP credentials for the specified user.
-
#list_swift_passwords(user_id, opts = {}) ⇒ Response
Lists the Swift passwords for the specified user.
-
#list_tag_namespaces(compartment_id, opts = {}) ⇒ Response
Lists the tag namespaces in the specified compartment.
-
#list_tags(tag_namespace_id, opts = {}) ⇒ Response
Lists the tag definitions in the specified tag namespace.
-
#list_user_group_memberships(compartment_id, opts = {}) ⇒ Response
Lists the ‘UserGroupMembership` objects in your tenancy.
-
#list_users(compartment_id, opts = {}) ⇒ Response
Lists the users in your tenancy.
-
#logger ⇒ Logger
The logger for this client.
-
#remove_user_from_group(user_group_membership_id, opts = {}) ⇒ Response
Removes a user from a group by deleting the corresponding ‘UserGroupMembership`.
-
#update_compartment(compartment_id, update_compartment_details, opts = {}) ⇒ Response
Updates the specified compartment’s description or name.
-
#update_customer_secret_key(user_id, customer_secret_key_id, update_customer_secret_key_details, opts = {}) ⇒ Response
Updates the specified secret key’s description.
-
#update_dynamic_group(dynamic_group_id, update_dynamic_group_details, opts = {}) ⇒ Response
Updates the specified dynamic group.
-
#update_group(group_id, update_group_details, opts = {}) ⇒ Response
Updates the specified group.
-
#update_identity_provider(identity_provider_id, update_identity_provider_details, opts = {}) ⇒ Response
Updates the specified identity provider.
-
#update_idp_group_mapping(identity_provider_id, mapping_id, update_idp_group_mapping_details, opts = {}) ⇒ Response
Updates the specified group mapping.
-
#update_policy(policy_id, update_policy_details, opts = {}) ⇒ Response
Updates the specified policy.
-
#update_smtp_credential(user_id, smtp_credential_id, update_smtp_credential_details, opts = {}) ⇒ Response
Updates the specified SMTP credential’s description.
-
#update_swift_password(user_id, swift_password_id, update_swift_password_details, opts = {}) ⇒ Response
Updates the specified Swift password’s description.
-
#update_tag(tag_namespace_id, tag_name, update_tag_details, opts = {}) ⇒ Response
Updates the the specified tag definition.
-
#update_tag_namespace(tag_namespace_id, update_tag_namespace_details, opts = {}) ⇒ Response
Updates the the specified tag namespace.
-
#update_user(user_id, update_user_details, opts = {}) ⇒ Response
Updates the description of the specified user.
-
#update_user_state(user_id, update_state_details, opts = {}) ⇒ Response
Updates the state of the specified user.
-
#upload_api_key(user_id, create_api_key_details, opts = {}) ⇒ Response
Uploads an API signing key for the specified user.
Constructor Details
#initialize(config: nil, region: nil, signer: nil) ⇒ IdentityClient
Creates a new IdentityClient. If a config is not specified, then the global OCI.config will be used.
A region must be specified in either the config or the region parameter. If specified in both, then the region parameter will be used.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/oci/identity/identity_client.rb', line 34 def initialize(config:nil, region:nil, signer:nil) # If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals) # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then # pass it to this constructor. # # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid # so try and load the config from the default file. config ||= OCI.config unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner) config ||= OCI::Config.new if signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner) config.validate unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner) if signer.nil? signer = Signer.new(config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase: config.pass_phrase, private_key_content: config.key_content) end @api_client = ApiClient.new(config, signer) region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end |
Instance Attribute Details
#api_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
12 13 14 |
# File 'lib/oci/identity/identity_client.rb', line 12 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
16 17 18 |
# File 'lib/oci/identity/identity_client.rb', line 16 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
20 21 22 |
# File 'lib/oci/identity/identity_client.rb', line 20 def region @region end |
Instance Method Details
#add_user_to_group(add_user_to_group_details, opts = {}) ⇒ Response
Adds the specified user to the specified group and returns a ‘UserGroupMembership` object with its own OCID.
After you send your request, the new object’s ‘lifecycleState` will temporarily be CREATING. Before using the object, first make sure its `lifecycleState` has changed to ACTIVE.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/oci/identity/identity_client.rb', line 89 def add_user_to_group(add_user_to_group_details, opts = {}) logger.debug "Calling operation IdentityClient#add_user_to_group." if logger raise "Missing the required parameter 'add_user_to_group_details' when calling add_user_to_group." if add_user_to_group_details.nil? path = "/userGroupMemberships/" # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token'] post_body = @api_client.object_to_http_body(add_user_to_group_details) return @api_client.call_api( :POST, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::UserGroupMembership') end |
#create_compartment(create_compartment_details, opts = {}) ⇒ Response
Creates a new compartment in your tenancy.
Important: Compartments cannot be deleted.
You must specify your tenancy’s OCID as the compartment ID in the request object. Remember that the tenancy is simply the root compartment. For information about OCIDs, see [Resource Identifiers](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
You must also specify a name for the compartment, which must be unique across all compartments in your tenancy. You can use this name or the OCID when writing policies that apply to the compartment. For more information about policies, see [How Policies Work](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm).
You must also specify a description for the compartment (although it can be an empty string). It does not have to be unique, and you can change it anytime with update_compartment.
After you send your request, the new object’s ‘lifecycleState` will temporarily be CREATING. Before using the object, first make sure its `lifecycleState` has changed to ACTIVE.
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/oci/identity/identity_client.rb', line 146 def create_compartment(create_compartment_details, opts = {}) logger.debug "Calling operation IdentityClient#create_compartment." if logger raise "Missing the required parameter 'create_compartment_details' when calling create_compartment." if create_compartment_details.nil? path = "/compartments/" # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token'] post_body = @api_client.object_to_http_body(create_compartment_details) return @api_client.call_api( :POST, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::Compartment') end |
#create_customer_secret_key(create_customer_secret_key_details, user_id, opts = {}) ⇒ Response
Creates a new secret key for the specified user. Secret keys are used for authentication with the Object Storage Service’s Amazon S3 compatible API. For information, see [Managing User Credentials](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm).
You must specify a description for the secret key (although it can be an empty string). It does not have to be unique, and you can change it anytime with update_customer_secret_key.
Every user has permission to create a secret key for *their own user ID*. An administrator in your organization does not need to write a policy to give users this ability. To compare, administrators who have permission to the tenancy can use this operation to create a secret key for any user, including themselves.
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'lib/oci/identity/identity_client.rb', line 196 def create_customer_secret_key(create_customer_secret_key_details, user_id, opts = {}) logger.debug "Calling operation IdentityClient#create_customer_secret_key." if logger raise "Missing the required parameter 'create_customer_secret_key_details' when calling create_customer_secret_key." if create_customer_secret_key_details.nil? raise "Missing the required parameter 'user_id' when calling create_customer_secret_key." if user_id.nil? path = "/users/{userId}/customerSecretKeys/".sub('{userId}', user_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token'] post_body = @api_client.object_to_http_body(create_customer_secret_key_details) return @api_client.call_api( :POST, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::CustomerSecretKey') end |
#create_dynamic_group(create_dynamic_group_details, opts = {}) ⇒ Response
Creates a new dynamic group in your tenancy.
You must specify your tenancy’s OCID as the compartment ID in the request object (remember that the tenancy is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies) reside within the tenancy itself, unlike cloud resources such as compute instances, which typically reside within compartments inside the tenancy. For information about OCIDs, see [Resource Identifiers](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
You must also specify a name for the dynamic group, which must be unique across all dynamic groups in your tenancy, and cannot be changed. Note that this name has to be also unique accross all groups in your tenancy. You can use this name or the OCID when writing policies that apply to the dynamic group. For more information about policies, see [How Policies Work](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm).
You must also specify a description for the dynamic group (although it can be an empty string). It does not have to be unique, and you can change it anytime with update_dynamic_group.
After you send your request, the new object’s ‘lifecycleState` will temporarily be CREATING. Before using the object, first make sure its `lifecycleState` has changed to ACTIVE.
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/oci/identity/identity_client.rb', line 253 def create_dynamic_group(create_dynamic_group_details, opts = {}) logger.debug "Calling operation IdentityClient#create_dynamic_group." if logger raise "Missing the required parameter 'create_dynamic_group_details' when calling create_dynamic_group." if create_dynamic_group_details.nil? path = "/dynamicGroups/" # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token'] post_body = @api_client.object_to_http_body(create_dynamic_group_details) return @api_client.call_api( :POST, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::DynamicGroup') end |
#create_group(create_group_details, opts = {}) ⇒ Response
Creates a new group in your tenancy.
You must specify your tenancy’s OCID as the compartment ID in the request object (remember that the tenancy is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies) reside within the tenancy itself, unlike cloud resources such as compute instances, which typically reside within compartments inside the tenancy. For information about OCIDs, see [Resource Identifiers](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
You must also specify a name for the group, which must be unique across all groups in your tenancy and cannot be changed. You can use this name or the OCID when writing policies that apply to the group. For more information about policies, see [How Policies Work](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm).
You must also specify a description for the group (although it can be an empty string). It does not have to be unique, and you can change it anytime with update_group.
After you send your request, the new object’s ‘lifecycleState` will temporarily be CREATING. Before using the object, first make sure its `lifecycleState` has changed to ACTIVE.
After creating the group, you need to put users in it and write policies for it. See add_user_to_group and create_policy.
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/oci/identity/identity_client.rb', line 312 def create_group(create_group_details, opts = {}) logger.debug "Calling operation IdentityClient#create_group." if logger raise "Missing the required parameter 'create_group_details' when calling create_group." if create_group_details.nil? path = "/groups/" # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token'] post_body = @api_client.object_to_http_body(create_group_details) return @api_client.call_api( :POST, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::Group') end |
#create_identity_provider(create_identity_provider_details, opts = {}) ⇒ Response
Creates a new identity provider in your tenancy. For more information, see [Identity Providers and Federation](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/federation.htm).
You must specify your tenancy’s OCID as the compartment ID in the request object. Remember that the tenancy is simply the root compartment. For information about OCIDs, see [Resource Identifiers](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
You must also specify a name for the ‘IdentityProvider`, which must be unique across all `IdentityProvider` objects in your tenancy and cannot be changed.
You must also specify a description for the ‘IdentityProvider` (although it can be an empty string). It does not have to be unique, and you can change it anytime with update_identity_provider.
After you send your request, the new object’s ‘lifecycleState` will temporarily be CREATING. Before using the object, first make sure its `lifecycleState` has changed to ACTIVE.
368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 |
# File 'lib/oci/identity/identity_client.rb', line 368 def create_identity_provider(create_identity_provider_details, opts = {}) logger.debug "Calling operation IdentityClient#create_identity_provider." if logger raise "Missing the required parameter 'create_identity_provider_details' when calling create_identity_provider." if create_identity_provider_details.nil? path = "/identityProviders/" # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token'] post_body = @api_client.object_to_http_body(create_identity_provider_details) return @api_client.call_api( :POST, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::IdentityProvider') end |
#create_idp_group_mapping(create_idp_group_mapping_details, identity_provider_id, opts = {}) ⇒ Response
Creates a single mapping between an IdP group and an IAM Service Group.
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 |
# File 'lib/oci/identity/identity_client.rb', line 409 def create_idp_group_mapping(create_idp_group_mapping_details, identity_provider_id, opts = {}) logger.debug "Calling operation IdentityClient#create_idp_group_mapping." if logger raise "Missing the required parameter 'create_idp_group_mapping_details' when calling create_idp_group_mapping." if create_idp_group_mapping_details.nil? raise "Missing the required parameter 'identity_provider_id' when calling create_idp_group_mapping." if identity_provider_id.nil? path = "/identityProviders/{identityProviderId}/groupMappings/".sub('{identityProviderId}', identity_provider_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token'] post_body = @api_client.object_to_http_body(create_idp_group_mapping_details) return @api_client.call_api( :POST, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::IdpGroupMapping') end |
#create_or_reset_ui_password(user_id, opts = {}) ⇒ Response
Creates a new Console one-time password for the specified user. For more information about user credentials, see [User Credentials](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/usercredentials.htm).
Use this operation after creating a new user, or if a user forgets their password. The new one-time password is returned to you in the response, and you must securely deliver it to the user. They’ll be prompted to change this password the next time they sign in to the Console. If they don’t change it within 7 days, the password will expire and you’ll need to create a new one-time password for the user.
Note: The user’s Console login is the unique name you specified when you created the user (see create_user).
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 |
# File 'lib/oci/identity/identity_client.rb', line 459 def create_or_reset_ui_password(user_id, opts = {}) logger.debug "Calling operation IdentityClient#create_or_reset_ui_password." if logger raise "Missing the required parameter 'user_id' when calling create_or_reset_ui_password." if user_id.nil? path = "/users/{userId}/uiPassword".sub('{userId}', user_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token'] post_body = nil return @api_client.call_api( :POST, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::UIPassword') end |
#create_policy(create_policy_details, opts = {}) ⇒ Response
Creates a new policy in the specified compartment (either the tenancy or another of your compartments). If you’re new to policies, see [Getting Started with Policies](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
You must specify a name for the policy, which must be unique across all policies in your tenancy and cannot be changed.
You must also specify a description for the policy (although it can be an empty string). It does not have to be unique, and you can change it anytime with update_policy.
You must specify one or more policy statements in the statements array. For information about writing policies, see [How Policies Work](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm) and [Common Policies](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/commonpolicies.htm).
After you send your request, the new object’s ‘lifecycleState` will temporarily be CREATING. Before using the object, first make sure its `lifecycleState` has changed to ACTIVE.
New policies take effect typically within 10 seconds.
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/oci/identity/identity_client.rb', line 514 def create_policy(create_policy_details, opts = {}) logger.debug "Calling operation IdentityClient#create_policy." if logger raise "Missing the required parameter 'create_policy_details' when calling create_policy." if create_policy_details.nil? path = "/policies/" # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token'] post_body = @api_client.object_to_http_body(create_policy_details) return @api_client.call_api( :POST, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::Policy') end |
#create_region_subscription(create_region_subscription_details, tenancy_id, opts = {}) ⇒ Response
Creates a subscription to a region for a tenancy.
554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 |
# File 'lib/oci/identity/identity_client.rb', line 554 def create_region_subscription(create_region_subscription_details, tenancy_id, opts = {}) logger.debug "Calling operation IdentityClient#create_region_subscription." if logger raise "Missing the required parameter 'create_region_subscription_details' when calling create_region_subscription." if create_region_subscription_details.nil? raise "Missing the required parameter 'tenancy_id' when calling create_region_subscription." if tenancy_id.nil? path = "/tenancies/{tenancyId}/regionSubscriptions".sub('{tenancyId}', tenancy_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token'] post_body = @api_client.object_to_http_body(create_region_subscription_details) return @api_client.call_api( :POST, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::RegionSubscription') end |
#create_smtp_credential(create_smtp_credential_details, user_id, opts = {}) ⇒ Response
Creates a new SMTP credential for the specified user. An SMTP credential has an SMTP user name and an SMTP password. You must specify a description for the SMTP credential (although it can be an empty string). It does not have to be unique, and you can change it anytime with update_smtp_credential.
598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 |
# File 'lib/oci/identity/identity_client.rb', line 598 def create_smtp_credential(create_smtp_credential_details, user_id, opts = {}) logger.debug "Calling operation IdentityClient#create_smtp_credential." if logger raise "Missing the required parameter 'create_smtp_credential_details' when calling create_smtp_credential." if create_smtp_credential_details.nil? raise "Missing the required parameter 'user_id' when calling create_smtp_credential." if user_id.nil? path = "/users/{userId}/smtpCredentials/".sub('{userId}', user_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token'] post_body = @api_client.object_to_http_body(create_smtp_credential_details) return @api_client.call_api( :POST, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::SmtpCredential') end |
#create_swift_password(create_swift_password_details, user_id, opts = {}) ⇒ Response
Creates a new Swift password for the specified user. For information about what Swift passwords are for, see [Managing User Credentials](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm).
You must specify a description for the Swift password (although it can be an empty string). It does not have to be unique, and you can change it anytime with update_swift_password.
Every user has permission to create a Swift password for *their own user ID*. An administrator in your organization does not need to write a policy to give users this ability. To compare, administrators who have permission to the tenancy can use this operation to create a Swift password for any user, including themselves.
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 |
# File 'lib/oci/identity/identity_client.rb', line 648 def create_swift_password(create_swift_password_details, user_id, opts = {}) logger.debug "Calling operation IdentityClient#create_swift_password." if logger raise "Missing the required parameter 'create_swift_password_details' when calling create_swift_password." if create_swift_password_details.nil? raise "Missing the required parameter 'user_id' when calling create_swift_password." if user_id.nil? path = "/users/{userId}/swiftPasswords/".sub('{userId}', user_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token'] post_body = @api_client.object_to_http_body(create_swift_password_details) return @api_client.call_api( :POST, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::SwiftPassword') end |
#create_tag(tag_namespace_id, create_tag_details, opts = {}) ⇒ Response
Creates a new tag in the specified tag namespace.
You must specify either the OCID or the name of the tag namespace that will contain this tag definition.
You must also specify a name for the tag, which must be unique across all tags in the tag namespace and cannot be changed. The name can contain any ASCII character except the space (_) or period (.) characters. Names are case insensitive. That means, for example, "myTag" and "mytag" are not allowed in the same namespace. If you specify a name that’s already in use in the tag namespace, a 409 error is returned.
You must also specify a description for the tag. It does not have to be unique, and you can change it with update_tag.
701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 |
# File 'lib/oci/identity/identity_client.rb', line 701 def create_tag(tag_namespace_id, create_tag_details, opts = {}) logger.debug "Calling operation IdentityClient#create_tag." if logger raise "Missing the required parameter 'tag_namespace_id' when calling create_tag." if tag_namespace_id.nil? raise "Missing the required parameter 'create_tag_details' when calling create_tag." if create_tag_details.nil? path = "/tagNamespaces/{tagNamespaceId}/tags".sub('{tagNamespaceId}', tag_namespace_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token'] post_body = @api_client.object_to_http_body(create_tag_details) return @api_client.call_api( :POST, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::Tag') end |
#create_tag_namespace(create_tag_namespace_details, opts = {}) ⇒ Response
Creates a new tag namespace in the specified compartment.
You must specify the compartment ID in the request object (remember that the tenancy is simply the root compartment).
You must also specify a name for the namespace, which must be unique across all namespaces in your tenancy and cannot be changed. The name can contain any ASCII character except the space (_) or period (.). Names are case insensitive. That means, for example, "myNamespace" and "mynamespace" are not allowed in the same tenancy. Once you created a namespace, you cannot change the name. If you specify a name that’s already in use in the tenancy, a 409 error is returned.
You must also specify a description for the namespace. It does not have to be unique, and you can change it with update_tag_namespace.
Tag namespaces cannot be deleted, but they can be retired. See [Retiring Key Definitions and Namespace Definitions](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring) for more information.
757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 |
# File 'lib/oci/identity/identity_client.rb', line 757 def create_tag_namespace(create_tag_namespace_details, opts = {}) logger.debug "Calling operation IdentityClient#create_tag_namespace." if logger raise "Missing the required parameter 'create_tag_namespace_details' when calling create_tag_namespace." if create_tag_namespace_details.nil? path = "/tagNamespaces" # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token'] post_body = @api_client.object_to_http_body(create_tag_namespace_details) return @api_client.call_api( :POST, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::TagNamespace') end |
#create_user(create_user_details, opts = {}) ⇒ Response
Creates a new user in your tenancy. For conceptual information about users, your tenancy, and other IAM Service components, see [Overview of the IAM Service](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm).
You must specify your tenancy’s OCID as the compartment ID in the request object (remember that the tenancy is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies) reside within the tenancy itself, unlike cloud resources such as compute instances, which typically reside within compartments inside the tenancy. For information about OCIDs, see [Resource Identifiers](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
You must also specify a name for the user, which must be unique across all users in your tenancy and cannot be changed. Allowed characters: No spaces. Only letters, numerals, hyphens, periods, underscores, +, and @. If you specify a name that’s already in use, you’ll get a 409 error. This name will be the user’s login to the Console. You might want to pick a name that your company’s own identity system (e.g., Active Directory, LDAP, etc.) already uses. If you delete a user and then create a new user with the same name, they’ll be considered different users because they have different OCIDs.
You must also specify a description for the user (although it can be an empty string). It does not have to be unique, and you can change it anytime with update_user. You can use the field to provide the user’s full name, a description, a nickname, or other information to generally identify the user.
After you send your request, the new object’s ‘lifecycleState` will temporarily be CREATING. Before using the object, first make sure its `lifecycleState` has changed to ACTIVE.
A new user has no permissions until you place the user in one or more groups (see add_user_to_group). If the user needs to access the Console, you need to provide the user a password (see create_or_reset_ui_password). If the user needs to access the Oracle Cloud Infrastructure REST API, you need to upload a public API signing key for that user (see [Required Keys and OCIDs](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm) and also upload_api_key).
Important: Make sure to inform the new user which compartment(s) they have access to.
830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 |
# File 'lib/oci/identity/identity_client.rb', line 830 def create_user(create_user_details, opts = {}) logger.debug "Calling operation IdentityClient#create_user." if logger raise "Missing the required parameter 'create_user_details' when calling create_user." if create_user_details.nil? path = "/users/" # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token'] post_body = @api_client.object_to_http_body(create_user_details) return @api_client.call_api( :POST, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::User') end |
#delete_api_key(user_id, fingerprint, opts = {}) ⇒ Response
Deletes the specified API signing key for the specified user.
Every user has permission to use this operation to delete a key for *their own user ID*. An administrator in your organization does not need to write a policy to give users this ability. To compare, administrators who have permission to the tenancy can use this operation to delete a key for any user, including themselves.
873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 |
# File 'lib/oci/identity/identity_client.rb', line 873 def delete_api_key(user_id, fingerprint, opts = {}) logger.debug "Calling operation IdentityClient#delete_api_key." if logger raise "Missing the required parameter 'user_id' when calling delete_api_key." if user_id.nil? raise "Missing the required parameter 'fingerprint' when calling delete_api_key." if fingerprint.nil? path = "/users/{userId}/apiKeys/{fingerprint}".sub('{userId}', user_id.to_s).sub('{fingerprint}', fingerprint.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = nil return @api_client.call_api( :DELETE, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body) end |
#delete_customer_secret_key(user_id, customer_secret_key_id, opts = {}) ⇒ Response
Deletes the specified secret key for the specified user.
911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 |
# File 'lib/oci/identity/identity_client.rb', line 911 def delete_customer_secret_key(user_id, customer_secret_key_id, opts = {}) logger.debug "Calling operation IdentityClient#delete_customer_secret_key." if logger raise "Missing the required parameter 'user_id' when calling delete_customer_secret_key." if user_id.nil? raise "Missing the required parameter 'customer_secret_key_id' when calling delete_customer_secret_key." if customer_secret_key_id.nil? path = "/users/{userId}/customerSecretKeys/{customerSecretKeyId}".sub('{userId}', user_id.to_s).sub('{customerSecretKeyId}', customer_secret_key_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = nil return @api_client.call_api( :DELETE, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body) end |
#delete_dynamic_group(dynamic_group_id, opts = {}) ⇒ Response
Deletes the specified dynamic group.
948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 |
# File 'lib/oci/identity/identity_client.rb', line 948 def delete_dynamic_group(dynamic_group_id, opts = {}) logger.debug "Calling operation IdentityClient#delete_dynamic_group." if logger raise "Missing the required parameter 'dynamic_group_id' when calling delete_dynamic_group." if dynamic_group_id.nil? path = "/dynamicGroups/{dynamicGroupId}".sub('{dynamicGroupId}', dynamic_group_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = nil return @api_client.call_api( :DELETE, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body) end |
#delete_group(group_id, opts = {}) ⇒ Response
Deletes the specified group. The group must be empty.
984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 |
# File 'lib/oci/identity/identity_client.rb', line 984 def delete_group(group_id, opts = {}) logger.debug "Calling operation IdentityClient#delete_group." if logger raise "Missing the required parameter 'group_id' when calling delete_group." if group_id.nil? path = "/groups/{groupId}".sub('{groupId}', group_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = nil return @api_client.call_api( :DELETE, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body) end |
#delete_identity_provider(identity_provider_id, opts = {}) ⇒ Response
Deletes the specified identity provider. The identity provider must not have any group mappings (see IdpGroupMapping).
1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 |
# File 'lib/oci/identity/identity_client.rb', line 1021 def delete_identity_provider(identity_provider_id, opts = {}) logger.debug "Calling operation IdentityClient#delete_identity_provider." if logger raise "Missing the required parameter 'identity_provider_id' when calling delete_identity_provider." if identity_provider_id.nil? path = "/identityProviders/{identityProviderId}".sub('{identityProviderId}', identity_provider_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = nil return @api_client.call_api( :DELETE, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body) end |
#delete_idp_group_mapping(identity_provider_id, mapping_id, opts = {}) ⇒ Response
Deletes the specified group mapping.
1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 |
# File 'lib/oci/identity/identity_client.rb', line 1057 def delete_idp_group_mapping(identity_provider_id, mapping_id, opts = {}) logger.debug "Calling operation IdentityClient#delete_idp_group_mapping." if logger raise "Missing the required parameter 'identity_provider_id' when calling delete_idp_group_mapping." if identity_provider_id.nil? raise "Missing the required parameter 'mapping_id' when calling delete_idp_group_mapping." if mapping_id.nil? path = "/identityProviders/{identityProviderId}/groupMappings/{mappingId}".sub('{identityProviderId}', identity_provider_id.to_s).sub('{mappingId}', mapping_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = nil return @api_client.call_api( :DELETE, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body) end |
#delete_policy(policy_id, opts = {}) ⇒ Response
Deletes the specified policy. The deletion takes effect typically within 10 seconds.
1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 |
# File 'lib/oci/identity/identity_client.rb', line 1093 def delete_policy(policy_id, opts = {}) logger.debug "Calling operation IdentityClient#delete_policy." if logger raise "Missing the required parameter 'policy_id' when calling delete_policy." if policy_id.nil? path = "/policies/{policyId}".sub('{policyId}', policy_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = nil return @api_client.call_api( :DELETE, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body) end |
#delete_smtp_credential(user_id, smtp_credential_id, opts = {}) ⇒ Response
Deletes the specified SMTP credential for the specified user.
1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 |
# File 'lib/oci/identity/identity_client.rb', line 1130 def delete_smtp_credential(user_id, smtp_credential_id, opts = {}) logger.debug "Calling operation IdentityClient#delete_smtp_credential." if logger raise "Missing the required parameter 'user_id' when calling delete_smtp_credential." if user_id.nil? raise "Missing the required parameter 'smtp_credential_id' when calling delete_smtp_credential." if smtp_credential_id.nil? path = "/users/{userId}/smtpCredentials/{smtpCredentialId}".sub('{userId}', user_id.to_s).sub('{smtpCredentialId}', smtp_credential_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = nil return @api_client.call_api( :DELETE, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body) end |
#delete_swift_password(user_id, swift_password_id, opts = {}) ⇒ Response
Deletes the specified Swift password for the specified user.
1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 |
# File 'lib/oci/identity/identity_client.rb', line 1168 def delete_swift_password(user_id, swift_password_id, opts = {}) logger.debug "Calling operation IdentityClient#delete_swift_password." if logger raise "Missing the required parameter 'user_id' when calling delete_swift_password." if user_id.nil? raise "Missing the required parameter 'swift_password_id' when calling delete_swift_password." if swift_password_id.nil? path = "/users/{userId}/swiftPasswords/{swiftPasswordId}".sub('{userId}', user_id.to_s).sub('{swiftPasswordId}', swift_password_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = nil return @api_client.call_api( :DELETE, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body) end |
#delete_user(user_id, opts = {}) ⇒ Response
Deletes the specified user. The user must not be in any groups.
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 |
# File 'lib/oci/identity/identity_client.rb', line 1204 def delete_user(user_id, opts = {}) logger.debug "Calling operation IdentityClient#delete_user." if logger raise "Missing the required parameter 'user_id' when calling delete_user." if user_id.nil? path = "/users/{userId}".sub('{userId}', user_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = nil return @api_client.call_api( :DELETE, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body) end |
#get_compartment(compartment_id, opts = {}) ⇒ Response
Gets the specified compartment’s information.
This operation does not return a list of all the resources inside the compartment. There is no single API operation that does that. Compartments can contain multiple types of resources (instances, block storage volumes, etc.). To find out what’s in a compartment, you must call the "List" operation for each resource type and specify the compartment’s OCID as a query parameter in the request. For example, call the list_instances operation in the Cloud Compute Service or the list_volumes operation in Cloud Block Storage.
1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 |
# File 'lib/oci/identity/identity_client.rb', line 1243 def get_compartment(compartment_id, opts = {}) logger.debug "Calling operation IdentityClient#get_compartment." if logger raise "Missing the required parameter 'compartment_id' when calling get_compartment." if compartment_id.nil? path = "/compartments/{compartmentId}".sub('{compartmentId}', compartment_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::Compartment') end |
#get_dynamic_group(dynamic_group_id, opts = {}) ⇒ Response
Gets the specified dynamic group’s information.
1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 |
# File 'lib/oci/identity/identity_client.rb', line 1275 def get_dynamic_group(dynamic_group_id, opts = {}) logger.debug "Calling operation IdentityClient#get_dynamic_group." if logger raise "Missing the required parameter 'dynamic_group_id' when calling get_dynamic_group." if dynamic_group_id.nil? path = "/dynamicGroups/{dynamicGroupId}".sub('{dynamicGroupId}', dynamic_group_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::DynamicGroup') end |
#get_group(group_id, opts = {}) ⇒ Response
Gets the specified group’s information.
This operation does not return a list of all the users in the group. To do that, use list_user_group_memberships and provide the group’s OCID as a query parameter in the request.
1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 |
# File 'lib/oci/identity/identity_client.rb', line 1311 def get_group(group_id, opts = {}) logger.debug "Calling operation IdentityClient#get_group." if logger raise "Missing the required parameter 'group_id' when calling get_group." if group_id.nil? path = "/groups/{groupId}".sub('{groupId}', group_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::Group') end |
#get_identity_provider(identity_provider_id, opts = {}) ⇒ Response
Gets the specified identity provider’s information.
1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 |
# File 'lib/oci/identity/identity_client.rb', line 1342 def get_identity_provider(identity_provider_id, opts = {}) logger.debug "Calling operation IdentityClient#get_identity_provider." if logger raise "Missing the required parameter 'identity_provider_id' when calling get_identity_provider." if identity_provider_id.nil? path = "/identityProviders/{identityProviderId}".sub('{identityProviderId}', identity_provider_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::IdentityProvider') end |
#get_idp_group_mapping(identity_provider_id, mapping_id, opts = {}) ⇒ Response
Gets the specified group mapping.
1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 |
# File 'lib/oci/identity/identity_client.rb', line 1374 def get_idp_group_mapping(identity_provider_id, mapping_id, opts = {}) logger.debug "Calling operation IdentityClient#get_idp_group_mapping." if logger raise "Missing the required parameter 'identity_provider_id' when calling get_idp_group_mapping." if identity_provider_id.nil? raise "Missing the required parameter 'mapping_id' when calling get_idp_group_mapping." if mapping_id.nil? path = "/identityProviders/{identityProviderId}/groupMappings/{mappingId}".sub('{identityProviderId}', identity_provider_id.to_s).sub('{mappingId}', mapping_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::IdpGroupMapping') end |
#get_policy(policy_id, opts = {}) ⇒ Response
Gets the specified policy’s information.
1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 |
# File 'lib/oci/identity/identity_client.rb', line 1406 def get_policy(policy_id, opts = {}) logger.debug "Calling operation IdentityClient#get_policy." if logger raise "Missing the required parameter 'policy_id' when calling get_policy." if policy_id.nil? path = "/policies/{policyId}".sub('{policyId}', policy_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::Policy') end |
#get_tag(tag_namespace_id, tag_name, opts = {}) ⇒ Response
Gets the specified tag’s information.
1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 |
# File 'lib/oci/identity/identity_client.rb', line 1440 def get_tag(tag_namespace_id, tag_name, opts = {}) logger.debug "Calling operation IdentityClient#get_tag." if logger raise "Missing the required parameter 'tag_namespace_id' when calling get_tag." if tag_namespace_id.nil? raise "Missing the required parameter 'tag_name' when calling get_tag." if tag_name.nil? path = "/tagNamespaces/{tagNamespaceId}/tags/{tagName}".sub('{tagNamespaceId}', tag_namespace_id.to_s).sub('{tagName}', tag_name.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::Tag') end |
#get_tag_namespace(tag_namespace_id, opts = {}) ⇒ Response
Gets the specified tag namespace’s information.
1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 |
# File 'lib/oci/identity/identity_client.rb', line 1474 def get_tag_namespace(tag_namespace_id, opts = {}) logger.debug "Calling operation IdentityClient#get_tag_namespace." if logger raise "Missing the required parameter 'tag_namespace_id' when calling get_tag_namespace." if tag_namespace_id.nil? path = "/tagNamespaces/{tagNamespaceId}".sub('{tagNamespaceId}', tag_namespace_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::TagNamespace') end |
#get_tenancy(tenancy_id, opts = {}) ⇒ Response
Get the specified tenancy’s information.
1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 |
# File 'lib/oci/identity/identity_client.rb', line 1505 def get_tenancy(tenancy_id, opts = {}) logger.debug "Calling operation IdentityClient#get_tenancy." if logger raise "Missing the required parameter 'tenancy_id' when calling get_tenancy." if tenancy_id.nil? path = "/tenancies/{tenancyId}".sub('{tenancyId}', tenancy_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::Tenancy') end |
#get_user(user_id, opts = {}) ⇒ Response
Gets the specified user’s information.
1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 |
# File 'lib/oci/identity/identity_client.rb', line 1536 def get_user(user_id, opts = {}) logger.debug "Calling operation IdentityClient#get_user." if logger raise "Missing the required parameter 'user_id' when calling get_user." if user_id.nil? path = "/users/{userId}".sub('{userId}', user_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::User') end |
#get_user_group_membership(user_group_membership_id, opts = {}) ⇒ Response
Gets the specified UserGroupMembership’s information.
1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 |
# File 'lib/oci/identity/identity_client.rb', line 1567 def get_user_group_membership(user_group_membership_id, opts = {}) logger.debug "Calling operation IdentityClient#get_user_group_membership." if logger raise "Missing the required parameter 'user_group_membership_id' when calling get_user_group_membership." if user_group_membership_id.nil? path = "/userGroupMemberships/{userGroupMembershipId}".sub('{userGroupMembershipId}', user_group_membership_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::UserGroupMembership') end |
#list_api_keys(user_id, opts = {}) ⇒ Response
Lists the API signing keys for the specified user. A user can have a maximum of three keys.
Every user has permission to use this API call for *their own user ID*. An administrator in your organization does not need to write a policy to give users this ability.
1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 |
# File 'lib/oci/identity/identity_client.rb', line 1602 def list_api_keys(user_id, opts = {}) logger.debug "Calling operation IdentityClient#list_api_keys." if logger raise "Missing the required parameter 'user_id' when calling list_api_keys." if user_id.nil? path = "/users/{userId}/apiKeys/".sub('{userId}', user_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'Array<OCI::Identity::Models::ApiKey>') end |
#list_availability_domains(compartment_id, opts = {}) ⇒ Response
Lists the Availability Domains in your tenancy. Specify the OCID of either the tenancy or another of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment). See [Where to Get the Tenancy’s OCID and User’s OCID](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).
1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 |
# File 'lib/oci/identity/identity_client.rb', line 1637 def list_availability_domains(compartment_id, opts = {}) logger.debug "Calling operation IdentityClient#list_availability_domains." if logger raise "Missing the required parameter 'compartment_id' when calling list_availability_domains." if compartment_id.nil? path = "/availabilityDomains/" # Query Params query_params = {} query_params[:'compartmentId'] = compartment_id # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'Array<OCI::Identity::Models::AvailabilityDomain>') end |
#list_compartments(compartment_id, opts = {}) ⇒ Response
Lists the compartments in your tenancy. You must specify your tenancy’s OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See [Where to Get the Tenancy’s OCID and User’s OCID](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).
1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 |
# File 'lib/oci/identity/identity_client.rb', line 1677 def list_compartments(compartment_id, opts = {}) logger.debug "Calling operation IdentityClient#list_compartments." if logger raise "Missing the required parameter 'compartment_id' when calling list_compartments." if compartment_id.nil? path = "/compartments/" # Query Params query_params = {} query_params[:'compartmentId'] = compartment_id query_params[:'page'] = opts[:'page'] if opts[:'page'] query_params[:'limit'] = opts[:'limit'] if opts[:'limit'] # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'Array<OCI::Identity::Models::Compartment>') end |
#list_customer_secret_keys(user_id, opts = {}) ⇒ Response
Lists the secret keys for the specified user. The returned object contains the secret key’s OCID, but not the secret key itself. The actual secret key is returned only upon creation.
1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 |
# File 'lib/oci/identity/identity_client.rb', line 1713 def list_customer_secret_keys(user_id, opts = {}) logger.debug "Calling operation IdentityClient#list_customer_secret_keys." if logger raise "Missing the required parameter 'user_id' when calling list_customer_secret_keys." if user_id.nil? path = "/users/{userId}/customerSecretKeys/".sub('{userId}', user_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'Array<OCI::Identity::Models::CustomerSecretKeySummary>') end |
#list_dynamic_groups(compartment_id, opts = {}) ⇒ Response
Lists the dynamic groups in your tenancy. You must specify your tenancy’s OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See [Where to Get the Tenancy’s OCID and User’s OCID](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).
1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 |
# File 'lib/oci/identity/identity_client.rb', line 1752 def list_dynamic_groups(compartment_id, opts = {}) logger.debug "Calling operation IdentityClient#list_dynamic_groups." if logger raise "Missing the required parameter 'compartment_id' when calling list_dynamic_groups." if compartment_id.nil? path = "/dynamicGroups/" # Query Params query_params = {} query_params[:'compartmentId'] = compartment_id query_params[:'page'] = opts[:'page'] if opts[:'page'] query_params[:'limit'] = opts[:'limit'] if opts[:'limit'] # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'Array<OCI::Identity::Models::DynamicGroup>') end |
#list_groups(compartment_id, opts = {}) ⇒ Response
Lists the groups in your tenancy. You must specify your tenancy’s OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See [Where to Get the Tenancy’s OCID and User’s OCID](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).
1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 |
# File 'lib/oci/identity/identity_client.rb', line 1794 def list_groups(compartment_id, opts = {}) logger.debug "Calling operation IdentityClient#list_groups." if logger raise "Missing the required parameter 'compartment_id' when calling list_groups." if compartment_id.nil? path = "/groups/" # Query Params query_params = {} query_params[:'compartmentId'] = compartment_id query_params[:'page'] = opts[:'page'] if opts[:'page'] query_params[:'limit'] = opts[:'limit'] if opts[:'limit'] # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'Array<OCI::Identity::Models::Group>') end |
#list_identity_providers(protocol, compartment_id, opts = {}) ⇒ Response
Lists all the identity providers in your tenancy. You must specify the identity provider type (e.g., ‘SAML2` for identity providers using the SAML2.0 protocol). You must specify your tenancy’s OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See [Where to Get the Tenancy’s OCID and User’s OCID](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).
1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 |
# File 'lib/oci/identity/identity_client.rb', line 1839 def list_identity_providers(protocol, compartment_id, opts = {}) logger.debug "Calling operation IdentityClient#list_identity_providers." if logger raise "Missing the required parameter 'protocol' when calling list_identity_providers." if protocol.nil? unless ['SAML2'].include?(protocol) raise "Invalid value for 'protocol', must be one of SAML2." end raise "Missing the required parameter 'compartment_id' when calling list_identity_providers." if compartment_id.nil? path = "/identityProviders/" # Query Params query_params = {} query_params[:'protocol'] = protocol query_params[:'compartmentId'] = compartment_id query_params[:'page'] = opts[:'page'] if opts[:'page'] query_params[:'limit'] = opts[:'limit'] if opts[:'limit'] # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'Array<OCI::Identity::Models::IdentityProvider>') end |
#list_idp_group_mappings(identity_provider_id, opts = {}) ⇒ Response
Lists the group mappings for the specified identity provider.
1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 |
# File 'lib/oci/identity/identity_client.rb', line 1883 def list_idp_group_mappings(identity_provider_id, opts = {}) logger.debug "Calling operation IdentityClient#list_idp_group_mappings." if logger raise "Missing the required parameter 'identity_provider_id' when calling list_idp_group_mappings." if identity_provider_id.nil? path = "/identityProviders/{identityProviderId}/groupMappings/".sub('{identityProviderId}', identity_provider_id.to_s) # Query Params query_params = {} query_params[:'page'] = opts[:'page'] if opts[:'page'] query_params[:'limit'] = opts[:'limit'] if opts[:'limit'] # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'Array<OCI::Identity::Models::IdpGroupMapping>') end |
#list_policies(compartment_id, opts = {}) ⇒ Response
Lists the policies in the specified compartment (either the tenancy or another of your compartments). See [Where to Get the Tenancy’s OCID and User’s OCID](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).
To determine which policies apply to a particular group or compartment, you must view the individual statements inside all your policies. There isn’t a way to automatically obtain that information via the API.
1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 |
# File 'lib/oci/identity/identity_client.rb', line 1926 def list_policies(compartment_id, opts = {}) logger.debug "Calling operation IdentityClient#list_policies." if logger raise "Missing the required parameter 'compartment_id' when calling list_policies." if compartment_id.nil? path = "/policies/" # Query Params query_params = {} query_params[:'compartmentId'] = compartment_id query_params[:'page'] = opts[:'page'] if opts[:'page'] query_params[:'limit'] = opts[:'limit'] if opts[:'limit'] # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'Array<OCI::Identity::Models::Policy>') end |
#list_region_subscriptions(tenancy_id, opts = {}) ⇒ Response
Lists the region subscriptions for the specified tenancy.
1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 |
# File 'lib/oci/identity/identity_client.rb', line 1960 def list_region_subscriptions(tenancy_id, opts = {}) logger.debug "Calling operation IdentityClient#list_region_subscriptions." if logger raise "Missing the required parameter 'tenancy_id' when calling list_region_subscriptions." if tenancy_id.nil? path = "/tenancies/{tenancyId}/regionSubscriptions".sub('{tenancyId}', tenancy_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'Array<OCI::Identity::Models::RegionSubscription>') end |
#list_regions(opts = {}) ⇒ Response
Lists all the regions offered by Oracle Cloud Infrastructure.
1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 |
# File 'lib/oci/identity/identity_client.rb', line 1990 def list_regions(opts = {}) logger.debug "Calling operation IdentityClient#list_regions." if logger path = "/regions" # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'Array<OCI::Identity::Models::Region>') end |
#list_smtp_credentials(user_id, opts = {}) ⇒ Response
Lists the SMTP credentials for the specified user. The returned object contains the credential’s OCID, the SMTP user name but not the SMTP password. The SMTP password is returned only upon creation.
2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 |
# File 'lib/oci/identity/identity_client.rb', line 2022 def list_smtp_credentials(user_id, opts = {}) logger.debug "Calling operation IdentityClient#list_smtp_credentials." if logger raise "Missing the required parameter 'user_id' when calling list_smtp_credentials." if user_id.nil? path = "/users/{userId}/smtpCredentials/".sub('{userId}', user_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'Array<OCI::Identity::Models::SmtpCredentialSummary>') end |
#list_swift_passwords(user_id, opts = {}) ⇒ Response
Lists the Swift passwords for the specified user. The returned object contains the password’s OCID, but not the password itself. The actual password is returned only upon creation.
2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 |
# File 'lib/oci/identity/identity_client.rb', line 2055 def list_swift_passwords(user_id, opts = {}) logger.debug "Calling operation IdentityClient#list_swift_passwords." if logger raise "Missing the required parameter 'user_id' when calling list_swift_passwords." if user_id.nil? path = "/users/{userId}/swiftPasswords/".sub('{userId}', user_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'Array<OCI::Identity::Models::SwiftPassword>') end |
#list_tag_namespaces(compartment_id, opts = {}) ⇒ Response
Lists the tag namespaces in the specified compartment.
2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 |
# File 'lib/oci/identity/identity_client.rb', line 2095 def list_tag_namespaces(compartment_id, opts = {}) logger.debug "Calling operation IdentityClient#list_tag_namespaces." if logger raise "Missing the required parameter 'compartment_id' when calling list_tag_namespaces." if compartment_id.nil? path = "/tagNamespaces" # Query Params query_params = {} query_params[:'compartmentId'] = compartment_id query_params[:'page'] = opts[:'page'] if opts[:'page'] query_params[:'limit'] = opts[:'limit'] if opts[:'limit'] query_params[:'includeSubcompartments'] = opts[:'include_subcompartments'] if opts[:'include_subcompartments'] # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'Array<OCI::Identity::Models::TagNamespaceSummary>') end |
#list_tags(tag_namespace_id, opts = {}) ⇒ Response
Lists the tag definitions in the specified tag namespace.
2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 |
# File 'lib/oci/identity/identity_client.rb', line 2136 def (tag_namespace_id, opts = {}) logger.debug "Calling operation IdentityClient#list_tags." if logger raise "Missing the required parameter 'tag_namespace_id' when calling list_tags." if tag_namespace_id.nil? path = "/tagNamespaces/{tagNamespaceId}/tags".sub('{tagNamespaceId}', tag_namespace_id.to_s) # Query Params query_params = {} query_params[:'page'] = opts[:'page'] if opts[:'page'] query_params[:'limit'] = opts[:'limit'] if opts[:'limit'] # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'Array<OCI::Identity::Models::TagSummary>') end |
#list_user_group_memberships(compartment_id, opts = {}) ⇒ Response
Lists the ‘UserGroupMembership` objects in your tenancy. You must specify your tenancy’s OCID as the value for the compartment ID (see [Where to Get the Tenancy’s OCID and User’s OCID](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five)). You must also then filter the list in one of these ways:
-
You can limit the results to just the memberships for a given user by specifying a ‘userId`.
-
Similarly, you can limit the results to just the memberships for a given group by specifying a ‘groupId`.
-
You can set both the ‘userId` and `groupId` to determine if the specified user is in the specified group.
If the answer is no, the response is an empty list.
-
Although`userId` and ‘groupId` are not indvidually required, you must set one of them.
2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 |
# File 'lib/oci/identity/identity_client.rb', line 2186 def list_user_group_memberships(compartment_id, opts = {}) logger.debug "Calling operation IdentityClient#list_user_group_memberships." if logger raise "Missing the required parameter 'compartment_id' when calling list_user_group_memberships." if compartment_id.nil? path = "/userGroupMemberships/" # Query Params query_params = {} query_params[:'compartmentId'] = compartment_id query_params[:'userId'] = opts[:'user_id'] if opts[:'user_id'] query_params[:'groupId'] = opts[:'group_id'] if opts[:'group_id'] query_params[:'page'] = opts[:'page'] if opts[:'page'] query_params[:'limit'] = opts[:'limit'] if opts[:'limit'] # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'Array<OCI::Identity::Models::UserGroupMembership>') end |
#list_users(compartment_id, opts = {}) ⇒ Response
Lists the users in your tenancy. You must specify your tenancy’s OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See [Where to Get the Tenancy’s OCID and User’s OCID](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).
2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 |
# File 'lib/oci/identity/identity_client.rb', line 2230 def list_users(compartment_id, opts = {}) logger.debug "Calling operation IdentityClient#list_users." if logger raise "Missing the required parameter 'compartment_id' when calling list_users." if compartment_id.nil? path = "/users/" # Query Params query_params = {} query_params[:'compartmentId'] = compartment_id query_params[:'page'] = opts[:'page'] if opts[:'page'] query_params[:'limit'] = opts[:'limit'] if opts[:'limit'] # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = nil return @api_client.call_api( :GET, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'Array<OCI::Identity::Models::User>') end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
70 71 72 |
# File 'lib/oci/identity/identity_client.rb', line 70 def logger @api_client.config.logger end |
#remove_user_from_group(user_group_membership_id, opts = {}) ⇒ Response
Removes a user from a group by deleting the corresponding ‘UserGroupMembership`.
2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 |
# File 'lib/oci/identity/identity_client.rb', line 2268 def remove_user_from_group(user_group_membership_id, opts = {}) logger.debug "Calling operation IdentityClient#remove_user_from_group." if logger raise "Missing the required parameter 'user_group_membership_id' when calling remove_user_from_group." if user_group_membership_id.nil? path = "/userGroupMemberships/{userGroupMembershipId}".sub('{userGroupMembershipId}', user_group_membership_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = nil return @api_client.call_api( :DELETE, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body) end |
#update_compartment(compartment_id, update_compartment_details, opts = {}) ⇒ Response
Updates the specified compartment’s description or name. You can’t update the root compartment.
2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 |
# File 'lib/oci/identity/identity_client.rb', line 2304 def update_compartment(compartment_id, update_compartment_details, opts = {}) logger.debug "Calling operation IdentityClient#update_compartment." if logger raise "Missing the required parameter 'compartment_id' when calling update_compartment." if compartment_id.nil? raise "Missing the required parameter 'update_compartment_details' when calling update_compartment." if update_compartment_details.nil? path = "/compartments/{compartmentId}".sub('{compartmentId}', compartment_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = @api_client.object_to_http_body(update_compartment_details) return @api_client.call_api( :PUT, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::Compartment') end |
#update_customer_secret_key(user_id, customer_secret_key_id, update_customer_secret_key_details, opts = {}) ⇒ Response
Updates the specified secret key’s description.
2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 |
# File 'lib/oci/identity/identity_client.rb', line 2344 def update_customer_secret_key(user_id, customer_secret_key_id, update_customer_secret_key_details, opts = {}) logger.debug "Calling operation IdentityClient#update_customer_secret_key." if logger raise "Missing the required parameter 'user_id' when calling update_customer_secret_key." if user_id.nil? raise "Missing the required parameter 'customer_secret_key_id' when calling update_customer_secret_key." if customer_secret_key_id.nil? raise "Missing the required parameter 'update_customer_secret_key_details' when calling update_customer_secret_key." if update_customer_secret_key_details.nil? path = "/users/{userId}/customerSecretKeys/{customerSecretKeyId}".sub('{userId}', user_id.to_s).sub('{customerSecretKeyId}', customer_secret_key_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = @api_client.object_to_http_body(update_customer_secret_key_details) return @api_client.call_api( :PUT, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::CustomerSecretKeySummary') end |
#update_dynamic_group(dynamic_group_id, update_dynamic_group_details, opts = {}) ⇒ Response
Updates the specified dynamic group.
2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 |
# File 'lib/oci/identity/identity_client.rb', line 2383 def update_dynamic_group(dynamic_group_id, update_dynamic_group_details, opts = {}) logger.debug "Calling operation IdentityClient#update_dynamic_group." if logger raise "Missing the required parameter 'dynamic_group_id' when calling update_dynamic_group." if dynamic_group_id.nil? raise "Missing the required parameter 'update_dynamic_group_details' when calling update_dynamic_group." if update_dynamic_group_details.nil? path = "/dynamicGroups/{dynamicGroupId}".sub('{dynamicGroupId}', dynamic_group_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = @api_client.object_to_http_body(update_dynamic_group_details) return @api_client.call_api( :PUT, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::DynamicGroup') end |
#update_group(group_id, update_group_details, opts = {}) ⇒ Response
Updates the specified group.
2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 |
# File 'lib/oci/identity/identity_client.rb', line 2421 def update_group(group_id, update_group_details, opts = {}) logger.debug "Calling operation IdentityClient#update_group." if logger raise "Missing the required parameter 'group_id' when calling update_group." if group_id.nil? raise "Missing the required parameter 'update_group_details' when calling update_group." if update_group_details.nil? path = "/groups/{groupId}".sub('{groupId}', group_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = @api_client.object_to_http_body(update_group_details) return @api_client.call_api( :PUT, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::Group') end |
#update_identity_provider(identity_provider_id, update_identity_provider_details, opts = {}) ⇒ Response
Updates the specified identity provider.
2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 |
# File 'lib/oci/identity/identity_client.rb', line 2459 def update_identity_provider(identity_provider_id, update_identity_provider_details, opts = {}) logger.debug "Calling operation IdentityClient#update_identity_provider." if logger raise "Missing the required parameter 'identity_provider_id' when calling update_identity_provider." if identity_provider_id.nil? raise "Missing the required parameter 'update_identity_provider_details' when calling update_identity_provider." if update_identity_provider_details.nil? path = "/identityProviders/{identityProviderId}".sub('{identityProviderId}', identity_provider_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = @api_client.object_to_http_body(update_identity_provider_details) return @api_client.call_api( :PUT, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::IdentityProvider') end |
#update_idp_group_mapping(identity_provider_id, mapping_id, update_idp_group_mapping_details, opts = {}) ⇒ Response
Updates the specified group mapping.
2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 |
# File 'lib/oci/identity/identity_client.rb', line 2498 def update_idp_group_mapping(identity_provider_id, mapping_id, update_idp_group_mapping_details, opts = {}) logger.debug "Calling operation IdentityClient#update_idp_group_mapping." if logger raise "Missing the required parameter 'identity_provider_id' when calling update_idp_group_mapping." if identity_provider_id.nil? raise "Missing the required parameter 'mapping_id' when calling update_idp_group_mapping." if mapping_id.nil? raise "Missing the required parameter 'update_idp_group_mapping_details' when calling update_idp_group_mapping." if update_idp_group_mapping_details.nil? path = "/identityProviders/{identityProviderId}/groupMappings/{mappingId}".sub('{identityProviderId}', identity_provider_id.to_s).sub('{mappingId}', mapping_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = @api_client.object_to_http_body(update_idp_group_mapping_details) return @api_client.call_api( :PUT, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::IdpGroupMapping') end |
#update_policy(policy_id, update_policy_details, opts = {}) ⇒ Response
Updates the specified policy. You can update the description or the policy statements themselves.
Policy changes take effect typically within 10 seconds.
2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 |
# File 'lib/oci/identity/identity_client.rb', line 2540 def update_policy(policy_id, update_policy_details, opts = {}) logger.debug "Calling operation IdentityClient#update_policy." if logger raise "Missing the required parameter 'policy_id' when calling update_policy." if policy_id.nil? raise "Missing the required parameter 'update_policy_details' when calling update_policy." if update_policy_details.nil? path = "/policies/{policyId}".sub('{policyId}', policy_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = @api_client.object_to_http_body(update_policy_details) return @api_client.call_api( :PUT, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::Policy') end |
#update_smtp_credential(user_id, smtp_credential_id, update_smtp_credential_details, opts = {}) ⇒ Response
Updates the specified SMTP credential’s description.
2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 |
# File 'lib/oci/identity/identity_client.rb', line 2580 def update_smtp_credential(user_id, smtp_credential_id, update_smtp_credential_details, opts = {}) logger.debug "Calling operation IdentityClient#update_smtp_credential." if logger raise "Missing the required parameter 'user_id' when calling update_smtp_credential." if user_id.nil? raise "Missing the required parameter 'smtp_credential_id' when calling update_smtp_credential." if smtp_credential_id.nil? raise "Missing the required parameter 'update_smtp_credential_details' when calling update_smtp_credential." if update_smtp_credential_details.nil? path = "/users/{userId}/smtpCredentials/{smtpCredentialId}".sub('{userId}', user_id.to_s).sub('{smtpCredentialId}', smtp_credential_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = @api_client.object_to_http_body(update_smtp_credential_details) return @api_client.call_api( :PUT, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::SmtpCredentialSummary') end |
#update_swift_password(user_id, swift_password_id, update_swift_password_details, opts = {}) ⇒ Response
Updates the specified Swift password’s description.
2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 |
# File 'lib/oci/identity/identity_client.rb', line 2621 def update_swift_password(user_id, swift_password_id, update_swift_password_details, opts = {}) logger.debug "Calling operation IdentityClient#update_swift_password." if logger raise "Missing the required parameter 'user_id' when calling update_swift_password." if user_id.nil? raise "Missing the required parameter 'swift_password_id' when calling update_swift_password." if swift_password_id.nil? raise "Missing the required parameter 'update_swift_password_details' when calling update_swift_password." if update_swift_password_details.nil? path = "/users/{userId}/swiftPasswords/{swiftPasswordId}".sub('{userId}', user_id.to_s).sub('{swiftPasswordId}', swift_password_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = @api_client.object_to_http_body(update_swift_password_details) return @api_client.call_api( :PUT, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::SwiftPassword') end |
#update_tag(tag_namespace_id, tag_name, update_tag_details, opts = {}) ⇒ Response
Updates the the specified tag definition. You can update ‘description`, and `isRetired`.
2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 |
# File 'lib/oci/identity/identity_client.rb', line 2660 def update_tag(tag_namespace_id, tag_name, update_tag_details, opts = {}) logger.debug "Calling operation IdentityClient#update_tag." if logger raise "Missing the required parameter 'tag_namespace_id' when calling update_tag." if tag_namespace_id.nil? raise "Missing the required parameter 'tag_name' when calling update_tag." if tag_name.nil? raise "Missing the required parameter 'update_tag_details' when calling update_tag." if update_tag_details.nil? path = "/tagNamespaces/{tagNamespaceId}/tags/{tagName}".sub('{tagNamespaceId}', tag_namespace_id.to_s).sub('{tagName}', tag_name.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = @api_client.object_to_http_body(update_tag_details) return @api_client.call_api( :PUT, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::Tag') end |
#update_tag_namespace(tag_namespace_id, update_tag_namespace_details, opts = {}) ⇒ Response
Updates the the specified tag namespace. You can’t update the namespace name.
Updating ‘isRetired` to ’true’ retires the namespace and all the tag definitions in the namespace. Reactivating a namespace (changing ‘isRetired` from ’true’ to ‘false’) does not reactivate tag definitions. To reactivate the tag definitions, you must reactivate each one indvidually after you reactivate the namespace, using update_tag. For more information about retiring tag namespaces, see [Retiring Key Definitions and Namespace Definitions](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring).
You can’t add a namespace with the same name as a retired namespace in the same tenancy.
2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 |
# File 'lib/oci/identity/identity_client.rb', line 2704 def update_tag_namespace(tag_namespace_id, update_tag_namespace_details, opts = {}) logger.debug "Calling operation IdentityClient#update_tag_namespace." if logger raise "Missing the required parameter 'tag_namespace_id' when calling update_tag_namespace." if tag_namespace_id.nil? raise "Missing the required parameter 'update_tag_namespace_details' when calling update_tag_namespace." if update_tag_namespace_details.nil? path = "/tagNamespaces/{tagNamespaceId}".sub('{tagNamespaceId}', tag_namespace_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' post_body = @api_client.object_to_http_body(update_tag_namespace_details) return @api_client.call_api( :PUT, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::TagNamespace') end |
#update_user(user_id, update_user_details, opts = {}) ⇒ Response
Updates the description of the specified user.
2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 |
# File 'lib/oci/identity/identity_client.rb', line 2741 def update_user(user_id, update_user_details, opts = {}) logger.debug "Calling operation IdentityClient#update_user." if logger raise "Missing the required parameter 'user_id' when calling update_user." if user_id.nil? raise "Missing the required parameter 'update_user_details' when calling update_user." if update_user_details.nil? path = "/users/{userId}".sub('{userId}', user_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = @api_client.object_to_http_body(update_user_details) return @api_client.call_api( :PUT, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::User') end |
#update_user_state(user_id, update_state_details, opts = {}) ⇒ Response
Updates the state of the specified user.
2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 |
# File 'lib/oci/identity/identity_client.rb', line 2780 def update_user_state(user_id, update_state_details, opts = {}) logger.debug "Calling operation IdentityClient#update_user_state." if logger raise "Missing the required parameter 'user_id' when calling update_user_state." if user_id.nil? raise "Missing the required parameter 'update_state_details' when calling update_user_state." if update_state_details.nil? path = "/users/{userId}/state/".sub('{userId}', user_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match'] post_body = @api_client.object_to_http_body(update_state_details) return @api_client.call_api( :PUT, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::User') end |
#upload_api_key(user_id, create_api_key_details, opts = {}) ⇒ Response
Uploads an API signing key for the specified user.
Every user has permission to use this operation to upload a key for *their own user ID*. An administrator in your organization does not need to write a policy to give users this ability. To compare, administrators who have permission to the tenancy can use this operation to upload a key for any user, including themselves.
Important: Even though you have permission to upload an API key, you might not yet have permission to do much else. If you try calling an operation unrelated to your own credential management (e.g., ‘ListUsers`, `LaunchInstance`) and receive an "unauthorized" error, check with an administrator to confirm which IAM Service group(s) you’re in and what access you have. Also confirm you’re working in the correct compartment.
After you send your request, the new object’s ‘lifecycleState` will temporarily be CREATING. Before using the object, first make sure its `lifecycleState` has changed to ACTIVE.
2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 |
# File 'lib/oci/identity/identity_client.rb', line 2835 def upload_api_key(user_id, create_api_key_details, opts = {}) logger.debug "Calling operation IdentityClient#upload_api_key." if logger raise "Missing the required parameter 'user_id' when calling upload_api_key." if user_id.nil? raise "Missing the required parameter 'create_api_key_details' when calling upload_api_key." if create_api_key_details.nil? path = "/users/{userId}/apiKeys/".sub('{userId}', user_id.to_s) # Query Params query_params = {} # Header Params header_params = {} header_params['accept'] = 'application/json' header_params['content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token'] post_body = @api_client.object_to_http_body(create_api_key_details) return @api_client.call_api( :POST, path, endpoint, :header_params => header_params, :query_params => query_params, :body => post_body, :return_type => 'OCI::Identity::Models::ApiKey') end |