Class: OCI::Identity::IdentityClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/identity/identity_client.rb

Overview

Use the Identity and Access Management Service API to manage users, groups, identity domains, compartments, policies, tagging, and limits. For information about managing users, groups, compartments, and policies, see Identity and Access Management (without identity domains). For information about tagging and service limits, see Tagging and Service Limits. For information about creating, modifying, and deleting identity domains, see Identity and Access Management (with identity domains).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ IdentityClient

Creates a new IdentityClient. Notes: If a config is not specified, then the global OCI.config will be used.

This client is not thread-safe

Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the region. A region may be specified in the config or via or the region parameter. If specified in both, then the region parameter will be used.

Parameters:

  • config (Config) (defaults to: nil)

    A Config object.

  • region (String) (defaults to: nil)

    A region used to determine the service endpoint. This will usually correspond to a value in Regions::REGION_ENUM, but may be an arbitrary string.

  • endpoint (String) (defaults to: nil)

    The fully qualified endpoint URL

  • signer (OCI::BaseSigner) (defaults to: nil)

    A signer implementation which can be used by this client. If this is not provided then a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication, so that the instance principals signer can be provided to the client

  • proxy_settings (OCI::ApiClientProxySettings) (defaults to: nil)

    If your environment requires you to use a proxy server for outgoing HTTP requests the details for the proxy can be provided in this parameter

  • retry_config (OCI::Retry::RetryConfig) (defaults to: nil)

    The retry configuration for this service client. This represents the default retry configuration to apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/oci/identity/identity_client.rb', line 55

def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
  # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers)
  # 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.validate_and_build_config_with_signer(config, signer)

  signer = OCI::Signer.config_file_auth_builder(config) if signer.nil?

  @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
  @retry_config = retry_config

  if endpoint
    @endpoint = endpoint + '/20160918'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "IdentityClient endpoint set to '#{@endpoint}'." if logger
end

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



15
16
17
# File 'lib/oci/identity/identity_client.rb', line 15

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


19
20
21
# File 'lib/oci/identity/identity_client.rb', line 19

def endpoint
  @endpoint
end

#regionString

The region, which will usually correspond to a value in Regions::REGION_ENUM.

Returns:

  • (String)


29
30
31
# File 'lib/oci/identity/identity_client.rb', line 29

def region
  @region
end

#retry_configOCI::Retry::RetryConfig (readonly)

The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries



25
26
27
# File 'lib/oci/identity/identity_client.rb', line 25

def retry_config
  @retry_config
end

Instance Method Details

#activate_domain(domain_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use activate_domain API.

(For tenancies that support identity domains) Activates a deactivated identity domain. You can only activate identity domains that your user account is not a part of.

After you send the request, the lifecycleDetails of the identity domain is set to ACTIVATING. When the operation completes, the lifecycleDetails is set to null and the lifecycleState of the identity domain is set to ACTIVE.

To track the progress of the request, submitting an HTTP GET on the /iamWorkRequests/iamWorkRequestsId endpoint retrieves the operation's status.

Parameters:

  • domain_id (String)

    The OCID of the identity domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/oci/identity/identity_client.rb', line 130

def activate_domain(domain_id, opts = {})
  logger.debug 'Calling operation IdentityClient#activate_domain.' if logger

  raise "Missing the required parameter 'domain_id' when calling activate_domain." if domain_id.nil?
  raise "Parameter value for 'domain_id' must not be blank" if OCI::Internal::Util.blank_string?(domain_id)

  path = '/domains/{domainId}/actions/activate'.sub('{domainId}', domain_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#activate_domain') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#activate_mfa_totp_device(user_id, mfa_totp_device_id, mfa_totp_token, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use activate_mfa_totp_device API.

Activates the specified MFA TOTP device for the user. Activation requires manual interaction with the Console.

Parameters:

  • user_id (String)

    The OCID of the user.

  • mfa_totp_device_id (String)

    The OCID of the MFA TOTP device.

  • mfa_totp_token (OCI::Identity::Models::MfaTotpToken)

    MFA TOTP token

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# File 'lib/oci/identity/identity_client.rb', line 198

def activate_mfa_totp_device(user_id, mfa_totp_device_id, mfa_totp_token, opts = {})
  logger.debug 'Calling operation IdentityClient#activate_mfa_totp_device.' if logger

  raise "Missing the required parameter 'user_id' when calling activate_mfa_totp_device." if user_id.nil?
  raise "Missing the required parameter 'mfa_totp_device_id' when calling activate_mfa_totp_device." if mfa_totp_device_id.nil?
  raise "Missing the required parameter 'mfa_totp_token' when calling activate_mfa_totp_device." if mfa_totp_token.nil?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)
  raise "Parameter value for 'mfa_totp_device_id' must not be blank" if OCI::Internal::Util.blank_string?(mfa_totp_device_id)

  path = '/users/{userId}/mfaTotpDevices/{mfaTotpDeviceId}/actions/activate'.sub('{userId}', user_id.to_s).sub('{mfaTotpDeviceId}', mfa_totp_device_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(mfa_totp_token)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#activate_mfa_totp_device') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::MfaTotpDeviceSummary'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#add_tag_default_lock(tag_default_id, add_lock_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use add_tag_default_lock API.

Add a resource lock to a tag default.

Parameters:

  • tag_default_id (String)

    The OCID of the tag default.

  • add_lock_details (OCI::Identity::Models::AddLockDetails)

    Lock that is going to be added to resource

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
# File 'lib/oci/identity/identity_client.rb', line 271

def add_tag_default_lock(tag_default_id, add_lock_details, opts = {})
  logger.debug 'Calling operation IdentityClient#add_tag_default_lock.' if logger

  raise "Missing the required parameter 'tag_default_id' when calling add_tag_default_lock." if tag_default_id.nil?
  raise "Missing the required parameter 'add_lock_details' when calling add_tag_default_lock." if add_lock_details.nil?
  raise "Parameter value for 'tag_default_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_default_id)

  path = '/tagDefaults/{tagDefaultId}/actions/addLock'.sub('{tagDefaultId}', tag_default_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(add_lock_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#add_tag_default_lock') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::TagDefault'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#add_tag_namespace_lock(tag_namespace_id, add_lock_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use add_tag_namespace_lock API.

Add a resource lock to a tag namespace.

Parameters:

  • tag_namespace_id (String)

    The OCID of the tag namespace.

  • add_lock_details (OCI::Identity::Models::AddLockDetails)

    Lock that is going to be added to resource

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
# File 'lib/oci/identity/identity_client.rb', line 344

def add_tag_namespace_lock(tag_namespace_id, add_lock_details, opts = {})
  logger.debug 'Calling operation IdentityClient#add_tag_namespace_lock.' if logger

  raise "Missing the required parameter 'tag_namespace_id' when calling add_tag_namespace_lock." if tag_namespace_id.nil?
  raise "Missing the required parameter 'add_lock_details' when calling add_tag_namespace_lock." if add_lock_details.nil?
  raise "Parameter value for 'tag_namespace_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_namespace_id)

  path = '/tagNamespaces/{tagNamespaceId}/actions/addLock'.sub('{tagNamespaceId}', tag_namespace_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(add_lock_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#add_tag_namespace_lock') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::TagNamespace'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#add_user_to_group(add_user_to_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use add_user_to_group API.

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.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



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
437
438
439
440
441
442
443
444
445
446
447
# File 'lib/oci/identity/identity_client.rb', line 411

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/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(add_user_to_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#add_user_to_group') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::UserGroupMembership'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#assemble_effective_tag_set(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use assemble_effective_tag_set API.

Assembles tag defaults in the specified compartment and any parent compartments to determine the tags to apply. Tag defaults from parent compartments do not override tag defaults referencing the same tag in a compartment lower down the hierarchy. This set of tag defaults includes all tag defaults from the current compartment back to the root compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
# File 'lib/oci/identity/identity_client.rb', line 471

def assemble_effective_tag_set(compartment_id, opts = {})
  logger.debug 'Calling operation IdentityClient#assemble_effective_tag_set.' if logger

  raise "Missing the required parameter 'compartment_id' when calling assemble_effective_tag_set." if compartment_id.nil?

  if opts[:lifecycle_state] && !OCI::Identity::Models::TagDefaultSummary::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Identity::Models::TagDefaultSummary::LIFECYCLE_STATE_ENUM.'
  end

  path = '/tagDefaults/actions/assembleEffectiveTagSet'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#assemble_effective_tag_set') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::TagDefaultSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#bulk_delete_resources(compartment_id, bulk_delete_resources_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use bulk_delete_resources API.

Deletes multiple resources in the compartment. All resources must be in the same compartment. You must have the appropriate permissions to delete the resources in the request. This API can only be invoked from the tenancy's home region. This operation creates a WorkRequest. Use the get_work_request API to monitor the status of the bulk action.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • bulk_delete_resources_details (OCI::Identity::Models::BulkDeleteResourcesDetails)

    Request object for bulk delete resources in a compartment.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



543
544
545
546
547
548
549
550
551
552
553
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 543

def bulk_delete_resources(compartment_id, bulk_delete_resources_details, opts = {})
  logger.debug 'Calling operation IdentityClient#bulk_delete_resources.' if logger

  raise "Missing the required parameter 'compartment_id' when calling bulk_delete_resources." if compartment_id.nil?
  raise "Missing the required parameter 'bulk_delete_resources_details' when calling bulk_delete_resources." if bulk_delete_resources_details.nil?
  raise "Parameter value for 'compartment_id' must not be blank" if OCI::Internal::Util.blank_string?(compartment_id)

  path = '/compartments/{compartmentId}/actions/bulkDeleteResources'.sub('{compartmentId}', compartment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(bulk_delete_resources_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#bulk_delete_resources') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#bulk_delete_tags(bulk_delete_tags_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use bulk_delete_tags API.

Deletes the specified tag key definitions. This operation triggers a process that removes the tags from all resources in your tenancy. The tag key definitions must be within the same tag namespace.

The following actions happen immediately:

  • If the tag is a cost-tracking tag, the tag no longer counts against your 10 cost-tracking tags limit, even if you do not disable the tag before running this operation.

  • If the tag is used with dynamic groups, the rules that contain the tag are no longer evaluated against the tag.

After you start this operation, the state of the tag changes to DELETING, and tag removal from resources begins. This process can take up to 48 hours depending on the number of resources that are tagged and the regions in which those resources reside.

When all tags have been removed, the state changes to DELETED. You cannot restore a deleted tag. After the tag state changes to DELETED, you can use the same tag name again.

After you start this operation, you cannot start either the delete_tag or the cascade_delete_tag_namespace operation until this process completes.

In order to delete tags, you must first retire the tags. Use update_tag to retire a tag.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :is_lock_override (BOOLEAN)

    Whether to override locks (if any exist). (default to false)

Returns:

  • (Response)

    A Response object with data of type nil



629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
# File 'lib/oci/identity/identity_client.rb', line 629

def bulk_delete_tags(bulk_delete_tags_details, opts = {})
  logger.debug 'Calling operation IdentityClient#bulk_delete_tags.' if logger

  raise "Missing the required parameter 'bulk_delete_tags_details' when calling bulk_delete_tags." if bulk_delete_tags_details.nil?

  path = '/tags/actions/bulkDelete'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:isLockOverride] = opts[:is_lock_override] if !opts[:is_lock_override].nil?

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(bulk_delete_tags_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#bulk_delete_tags') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#bulk_edit_tags(opts = {}) ⇒ Response

Note:

Click here to see an example of how to use bulk_edit_tags API.

Edits the specified list of tag key definitions for the selected resources. This operation triggers a process that edits the tags on all selected resources. The possible actions are:

  • Add a defined tag when the tag does not already exist on the resource.

  • Update the value for a defined tag when the tag is present on the resource.

  • Add a defined tag when it does not already exist on the resource or update the value for a defined tag when the tag is present on the resource.

  • Remove a defined tag from a resource. The tag is removed from the resource regardless of the tag value.

See bulk_edit_operation_details for more information.

The edits can include a combination of operations and tag sets. However, multiple operations cannot apply to one key definition in the same request. For example, if one request adds tag set-1 to a resource and sets a tag value to tag set-2, tag set-1 and tag set-2 cannot have any common tag definitions.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :bulk_edit_tags_details (OCI::Identity::Models::BulkEditTagsDetails)

    The request object for bulk editing tags on resources in the compartment.

Returns:

  • (Response)

    A Response object with data of type nil



706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
# File 'lib/oci/identity/identity_client.rb', line 706

def bulk_edit_tags(opts = {})
  logger.debug 'Calling operation IdentityClient#bulk_edit_tags.' if logger


  path = '/tags/actions/bulkEdit'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(opts[:bulk_edit_tags_details])

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#bulk_edit_tags') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#bulk_move_resources(compartment_id, bulk_move_resources_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use bulk_move_resources API.

Moves multiple resources from one compartment to another. All resources must be in the same compartment. This API can only be invoked from the tenancy's home region. To move resources, you must have the appropriate permissions to move the resource in both the source and target compartments. This operation creates a WorkRequest. Use the get_work_request API to monitor the status of the bulk action.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • bulk_move_resources_details (OCI::Identity::Models::BulkMoveResourcesDetails)

    Request object for bulk move resources in the compartment.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
# File 'lib/oci/identity/identity_client.rb', line 773

def bulk_move_resources(compartment_id, bulk_move_resources_details, opts = {})
  logger.debug 'Calling operation IdentityClient#bulk_move_resources.' if logger

  raise "Missing the required parameter 'compartment_id' when calling bulk_move_resources." if compartment_id.nil?
  raise "Missing the required parameter 'bulk_move_resources_details' when calling bulk_move_resources." if bulk_move_resources_details.nil?
  raise "Parameter value for 'compartment_id' must not be blank" if OCI::Internal::Util.blank_string?(compartment_id)

  path = '/compartments/{compartmentId}/actions/bulkMoveResources'.sub('{compartmentId}', compartment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(bulk_move_resources_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#bulk_move_resources') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#cascade_delete_tag_namespace(tag_namespace_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use cascade_delete_tag_namespace API.

Deletes the specified tag namespace. This operation triggers a process that removes all of the tags defined in the specified tag namespace from all resources in your tenancy and then deletes the tag namespace.

After you start the delete operation:

  • New tag key definitions cannot be created under the namespace.

  • The state of the tag namespace changes to DELETING.

  • Tag removal from the resources begins.

This process can take up to 48 hours depending on the number of tag definitions in the namespace, the number of resources that are tagged, and the locations of the regions in which those resources reside.

After all tags are removed, the state changes to DELETED. You cannot restore a deleted tag namespace. After the deleted tag namespace changes its state to DELETED, you can use the name of the deleted tag namespace again.

After you start this operation, you cannot start either the delete_tag or the bulk_delete_tags operation until this process completes.

To delete a tag namespace, you must first retire it. Use update_tag_namespace to retire a tag namespace.

Parameters:

  • tag_namespace_id (String)

    The OCID of the tag namespace.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :is_lock_override (BOOLEAN)

    Whether to override locks (if any exist). (default to false)

Returns:

  • (Response)

    A Response object with data of type nil



862
863
864
865
866
867
868
869
870
871
872
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
900
901
# File 'lib/oci/identity/identity_client.rb', line 862

def cascade_delete_tag_namespace(tag_namespace_id, opts = {})
  logger.debug 'Calling operation IdentityClient#cascade_delete_tag_namespace.' if logger

  raise "Missing the required parameter 'tag_namespace_id' when calling cascade_delete_tag_namespace." if tag_namespace_id.nil?
  raise "Parameter value for 'tag_namespace_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_namespace_id)

  path = '/tagNamespaces/{tagNamespaceId}/actions/cascadeDelete'.sub('{tagNamespaceId}', tag_namespace_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:isLockOverride] = opts[:is_lock_override] if !opts[:is_lock_override].nil?

  # 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]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#cascade_delete_tag_namespace') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_domain_compartment(domain_id, change_domain_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_domain_compartment API.

(For tenancies that support identity domains) Moves the identity domain to a different compartment in the tenancy.

To track the progress of the request, submitting an HTTP GET on the /iamWorkRequests/iamWorkRequestsId endpoint retrieves the operation's status.

Parameters:

  • domain_id (String)

    The OCID of the identity domain.

  • change_domain_compartment_details (OCI::Identity::Models::ChangeDomainCompartmentDetails)

    The request object for moving the identity domain to a different compartment.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



936
937
938
939
940
941
942
943
944
945
946
947
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
974
975
# File 'lib/oci/identity/identity_client.rb', line 936

def change_domain_compartment(domain_id, change_domain_compartment_details, opts = {})
  logger.debug 'Calling operation IdentityClient#change_domain_compartment.' if logger

  raise "Missing the required parameter 'domain_id' when calling change_domain_compartment." if domain_id.nil?
  raise "Missing the required parameter 'change_domain_compartment_details' when calling change_domain_compartment." if change_domain_compartment_details.nil?
  raise "Parameter value for 'domain_id' must not be blank" if OCI::Internal::Util.blank_string?(domain_id)

  path = '/domains/{domainId}/actions/changeCompartment'.sub('{domainId}', domain_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_domain_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#change_domain_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_domain_license_type(domain_id, change_domain_license_type_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_domain_license_type API.

(For tenancies that support identity domains) Changes the license type of the given identity domain. The identity domain's lifecycleState must be set to ACTIVE and the requested licenseType must be allowed. To retrieve the allowed licenseType for the identity domain, use list_allowed_domain_license_types.

After you send your request, the lifecycleDetails of this identity domain is set to UPDATING. When the update of the identity domain completes, then the lifecycleDetails is set to null.

To track the progress of the request, submitting an HTTP GET on the /iamWorkRequests/iamWorkRequestsId endpoint retrieves the operation's status.

Parameters:

  • domain_id (String)

    The OCID of the identity domain.

  • change_domain_license_type_details (OCI::Identity::Models::ChangeDomainLicenseTypeDetails)

    The request object for an update to the license type of the identity domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



1015
1016
1017
1018
1019
1020
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
1047
1048
1049
1050
1051
1052
1053
1054
# File 'lib/oci/identity/identity_client.rb', line 1015

def change_domain_license_type(domain_id, change_domain_license_type_details, opts = {})
  logger.debug 'Calling operation IdentityClient#change_domain_license_type.' if logger

  raise "Missing the required parameter 'domain_id' when calling change_domain_license_type." if domain_id.nil?
  raise "Missing the required parameter 'change_domain_license_type_details' when calling change_domain_license_type." if change_domain_license_type_details.nil?
  raise "Parameter value for 'domain_id' must not be blank" if OCI::Internal::Util.blank_string?(domain_id)

  path = '/domains/{domainId}/actions/changeLicenseType'.sub('{domainId}', domain_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_domain_license_type_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#change_domain_license_type') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_tag_namespace_compartment(tag_namespace_id, change_tag_namespace_compartment_detail, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_tag_namespace_compartment API.

Moves the specified tag namespace to the specified compartment within the same tenancy.

To move the tag namespace, you must have the manage tag-namespaces permission on both compartments. For more information about IAM policies, see Details for IAM.

Moving a tag namespace moves all the tag key definitions contained in the tag namespace.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :is_lock_override (BOOLEAN)

    Whether to override locks (if any exist). (default to false)

Returns:

  • (Response)

    A Response object with data of type nil



1086
1087
1088
1089
1090
1091
1092
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
1119
1120
1121
1122
1123
1124
# File 'lib/oci/identity/identity_client.rb', line 1086

def change_tag_namespace_compartment(tag_namespace_id, change_tag_namespace_compartment_detail, opts = {})
  logger.debug 'Calling operation IdentityClient#change_tag_namespace_compartment.' if logger

  raise "Missing the required parameter 'tag_namespace_id' when calling change_tag_namespace_compartment." if tag_namespace_id.nil?
  raise "Missing the required parameter 'change_tag_namespace_compartment_detail' when calling change_tag_namespace_compartment." if change_tag_namespace_compartment_detail.nil?
  raise "Parameter value for 'tag_namespace_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_namespace_id)

  path = '/tagNamespaces/{tagNamespaceId}/actions/changeCompartment'.sub('{tagNamespaceId}', tag_namespace_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:isLockOverride] = opts[:is_lock_override] if !opts[:is_lock_override].nil?

  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_tag_namespace_compartment_detail)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#change_tag_namespace_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_auth_token(create_auth_token_details, user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_auth_token API.

Creates a new auth token for the specified user. For information about what auth tokens are for, see Managing User Credentials.

You must specify a description for the auth token (although it can be an empty string). It does not have to be unique, and you can change it anytime with update_auth_token.

Every user has permission to create an auth token 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 an auth token for any user, including themselves.

Parameters:

  • create_auth_token_details (OCI::Identity::Models::CreateAuthTokenDetails)

    Request object for creating a new auth token.

  • user_id (String)

    The OCID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
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
1195
1196
# File 'lib/oci/identity/identity_client.rb', line 1158

def create_auth_token(create_auth_token_details, user_id, opts = {})
  logger.debug 'Calling operation IdentityClient#create_auth_token.' if logger

  raise "Missing the required parameter 'create_auth_token_details' when calling create_auth_token." if create_auth_token_details.nil?
  raise "Missing the required parameter 'user_id' when calling create_auth_token." if user_id.nil?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/authTokens/'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_auth_token_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_auth_token') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::AuthToken'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_compartment(create_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_compartment API.

Creates a new compartment in the specified compartment.

Specify the parent compartment'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.

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.

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.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1236
1237
1238
1239
1240
1241
1242
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
1269
1270
1271
1272
# File 'lib/oci/identity/identity_client.rb', line 1236

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/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::Compartment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_customer_secret_key(create_customer_secret_key_details, user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_customer_secret_key API.

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. The secret key consists of an Access Key/Secret Key pair. For information, see Managing User Credentials.

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.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1307
1308
1309
1310
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
1337
1338
1339
1340
1341
1342
1343
1344
1345
# File 'lib/oci/identity/identity_client.rb', line 1307

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/customerSecretKeys/'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_customer_secret_key_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_customer_secret_key') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::CustomerSecretKey'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_db_credential(create_db_credential_details, user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_db_credential API.

Creates a new DB credential for the specified user.

Parameters:

  • create_db_credential_details (OCI::Identity::Models::CreateDbCredentialDetails)

    Request object for creating a new DB credential with the user.

  • user_id (String)

    The OCID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1373
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
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
# File 'lib/oci/identity/identity_client.rb', line 1373

def create_db_credential(create_db_credential_details, user_id, opts = {})
  logger.debug 'Calling operation IdentityClient#create_db_credential.' if logger

  raise "Missing the required parameter 'create_db_credential_details' when calling create_db_credential." if create_db_credential_details.nil?
  raise "Missing the required parameter 'user_id' when calling create_db_credential." if user_id.nil?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/dbCredentials/'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_db_credential_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_db_credential') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::DbCredential'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_domain(create_domain_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_domain API.

(For tenancies that support identity domains) Creates a new identity domain in the tenancy with the identity domain home in homeRegion. After you send your request, the temporary lifecycleState of this identity domain is set to CREATING and lifecycleDetails to UPDATING. When creation of the identity domain completes, this identity domain's lifecycleState is set to ACTIVE and lifecycleDetails to null.

To track the progress of the request, submitting an HTTP GET on the /iamWorkRequests/iamWorkRequestsId endpoint retrieves the operation's status.

After creating an identity domain, first make sure its lifecycleState changes from CREATING to ACTIVE before you use it.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
# File 'lib/oci/identity/identity_client.rb', line 1446

def create_domain(create_domain_details, opts = {})
  logger.debug 'Calling operation IdentityClient#create_domain.' if logger

  raise "Missing the required parameter 'create_domain_details' when calling create_domain." if create_domain_details.nil?

  path = '/domains/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_domain_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_domain') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_dynamic_group(create_dynamic_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_dynamic_group API.

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.

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 across 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.

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.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
# File 'lib/oci/identity/identity_client.rb', line 1523

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/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_dynamic_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_dynamic_group') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::DynamicGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_group(create_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_group API.

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.

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.

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.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



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
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
# File 'lib/oci/identity/identity_client.rb', line 1603

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/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_group') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::Group'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_identity_provider(create_identity_provider_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_identity_provider API.

Deprecated. For more information, see Deprecated IAM Service APIs.

Creates a new identity provider in your tenancy. For more information, see Identity Providers and Federation.

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.

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.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
# File 'lib/oci/identity/identity_client.rb', line 1682

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/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_identity_provider_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_identity_provider') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::IdentityProvider'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_idp_group_mapping(create_idp_group_mapping_details, identity_provider_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_idp_group_mapping API.

Deprecated. For more information, see Deprecated IAM Service APIs.

Creates a single mapping between an IdP group and an IAM Service Group.

Parameters:

  • create_idp_group_mapping_details (OCI::Identity::Models::CreateIdpGroupMappingDetails)

    Add a mapping from an SAML2.0 identity provider group to a BMC group.

  • identity_provider_id (String)

    The OCID of the identity provider.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1746
1747
1748
1749
1750
1751
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
1781
1782
1783
1784
# File 'lib/oci/identity/identity_client.rb', line 1746

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?
  raise "Parameter value for 'identity_provider_id' must not be blank" if OCI::Internal::Util.blank_string?(identity_provider_id)

  path = '/identityProviders/{identityProviderId}/groupMappings/'.sub('{identityProviderId}', identity_provider_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_idp_group_mapping_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_idp_group_mapping') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::IdpGroupMapping'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_mfa_totp_device(user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_mfa_totp_device API.

Creates a new MFA TOTP device for the user. A user can have one MFA TOTP device.

Parameters:

  • user_id (String)

    The OCID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
# File 'lib/oci/identity/identity_client.rb', line 1808

def create_mfa_totp_device(user_id, opts = {})
  logger.debug 'Calling operation IdentityClient#create_mfa_totp_device.' if logger

  raise "Missing the required parameter 'user_id' when calling create_mfa_totp_device." if user_id.nil?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/mfaTotpDevices'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_mfa_totp_device') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::MfaTotpDevice'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_network_source(create_network_source_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_network_source API.

Creates a new network source 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.

You must also specify a name for the network source, which must be unique across all network sources in your tenancy, and cannot be changed. You can use this name or the OCID when writing policies that apply to the network source. For more information about policies, see How Policies Work.

You must also specify a description for the network source (although it can be an empty string). It does not have to be unique, and you can change it anytime with update_network_source.

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 your network resource is created, you can use it in policy to restrict access to only requests made from an allowed IP address specified in your network source. For more information, see Managing Network Sources.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
# File 'lib/oci/identity/identity_client.rb', line 1889

def create_network_source(create_network_source_details, opts = {})
  logger.debug 'Calling operation IdentityClient#create_network_source.' if logger

  raise "Missing the required parameter 'create_network_source_details' when calling create_network_source." if create_network_source_details.nil?

  path = '/networkSources'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_network_source_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_network_source') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::NetworkSources'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_o_auth_client_credential(user_id, create_o_auth2_client_credential_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_o_auth_client_credential API.

Creates Oauth token for the user

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
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
1986
1987
1988
# File 'lib/oci/identity/identity_client.rb', line 1950

def create_o_auth_client_credential(user_id, create_o_auth2_client_credential_details, opts = {})
  logger.debug 'Calling operation IdentityClient#create_o_auth_client_credential.' if logger

  raise "Missing the required parameter 'user_id' when calling create_o_auth_client_credential." if user_id.nil?
  raise "Missing the required parameter 'create_o_auth2_client_credential_details' when calling create_o_auth_client_credential." if create_o_auth2_client_credential_details.nil?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/oauth2ClientCredentials'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_o_auth2_client_credential_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_o_auth_client_credential') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::OAuth2ClientCredential'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_or_reset_ui_password(user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_or_reset_ui_password API.

Creates a new Console one-time password for the specified user. For more information about user credentials, see User Credentials.

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.

(For tenancies that support identity domains) Resetting a user's password generates a reset password email with a link that the user must follow to reset their password. If the user does not reset their password before the link expires, you'll need to reset the user's password again.

Note: The user's Console login is the unique name you specified when you created the user (see create_user).

Parameters:

  • user_id (String)

    The OCID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
# File 'lib/oci/identity/identity_client.rb', line 2026

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/uiPassword'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_or_reset_ui_password') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::UIPassword'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_policy(create_policy_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_policy API.

Creates a new policy in the specified compartment (either the tenancy or another of your compartments). If you're new to policies, see Get Started with Policies.

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 and Common Policies.

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.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
# File 'lib/oci/identity/identity_client.rb', line 2103

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/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_policy_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_policy') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::Policy'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_region_subscription(create_region_subscription_details, tenancy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_region_subscription API.

Creates a subscription to a region for a tenancy.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
# File 'lib/oci/identity/identity_client.rb', line 2164

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?
  raise "Parameter value for 'tenancy_id' must not be blank" if OCI::Internal::Util.blank_string?(tenancy_id)

  path = '/tenancies/{tenancyId}/regionSubscriptions'.sub('{tenancyId}', tenancy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_region_subscription_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_region_subscription') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::RegionSubscription'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_smtp_credential(create_smtp_credential_details, user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_smtp_credential API.

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.

Parameters:

  • create_smtp_credential_details (OCI::Identity::Models::CreateSmtpCredentialDetails)

    Request object for creating a new SMTP credential with the user.

  • user_id (String)

    The OCID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



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
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
# File 'lib/oci/identity/identity_client.rb', line 2230

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/smtpCredentials/'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_smtp_credential_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_smtp_credential') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::SmtpCredential'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_swift_password(create_swift_password_details, user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_swift_password API.

Deprecated. Use create_auth_token instead.

Creates a new Swift password for the specified user. For information about what Swift passwords are for, see Managing User Credentials.

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.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



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
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
# File 'lib/oci/identity/identity_client.rb', line 2304

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/swiftPasswords/'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_swift_password_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_swift_password') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::SwiftPassword'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_tag(tag_namespace_id, create_tag_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_tag API.

Creates a new tag in the specified tag namespace.

The tag requires either the OCID or the name of the tag namespace that will contain this tag definition.

You must 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.

The tag must have a description. It does not have to be unique, and you can change it with update_tag.

The tag must have a value type, which is specified with a validator. Tags can use either a static value or a list of possible values. Static values are entered by a user applying the tag to a resource. Lists are created by you and the user must apply a value from the list. Lists are validiated.

  • If no validator is set, the user applying the tag to a resource can type in a static value or leave the tag value empty.

  • If a validator is set, the user applying the tag to a resource must select from a list of values that you supply with enum_tag_definition_validator.

Parameters:

  • tag_namespace_id (String)

    The OCID of the tag namespace.

  • create_tag_details (OCI::Identity::Models::CreateTagDetails)

    Request object for creating a new tag in the specified tag namespace.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :is_lock_override (BOOLEAN)

    Whether to override locks (if any exist). (default to false)

Returns:

  • (Response)

    A Response object with data of type Tag



2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
# File 'lib/oci/identity/identity_client.rb', line 2390

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?
  raise "Parameter value for 'tag_namespace_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_namespace_id)

  path = '/tagNamespaces/{tagNamespaceId}/tags'.sub('{tagNamespaceId}', tag_namespace_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:isLockOverride] = opts[:is_lock_override] if !opts[:is_lock_override].nil?

  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_tag_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_tag') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::Tag'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_tag_default(create_tag_default_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_tag_default API.

Creates a new tag default in the specified compartment for the specified tag definition.

If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.

  • If the isRequired flag is set to "true", the value is set during resource creation.

  • If the isRequired flag is set to "false", the value you enter is set during resource creation.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
# File 'lib/oci/identity/identity_client.rb', line 2463

def create_tag_default(create_tag_default_details, opts = {})
  logger.debug 'Calling operation IdentityClient#create_tag_default.' if logger

  raise "Missing the required parameter 'create_tag_default_details' when calling create_tag_default." if create_tag_default_details.nil?

  path = '/tagDefaults'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_tag_default_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_tag_default') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::TagDefault'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_tag_namespace(create_tag_namespace_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_tag_namespace API.

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.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



2537
2538
2539
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
2568
2569
2570
2571
2572
2573
# File 'lib/oci/identity/identity_client.rb', line 2537

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'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_tag_namespace_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_tag_namespace') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::TagNamespace'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_user(create_user_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_user API.

Creates a new user in your tenancy. For conceptual information about users, your tenancy, and other IAM Service components, see Overview of IAM.

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.

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 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 Keys and OCIDs and also {#upload_api_key upload_api_key).

Important: Make sure to inform the new user which compartment(s) they have access to.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
# File 'lib/oci/identity/identity_client.rb', line 2631

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/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_user_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_user') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::User'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#deactivate_domain(domain_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use deactivate_domain API.

(For tenancies that support identity domains) Deactivates the specified identity domain. Identity domains must be in an ACTIVE lifecycleState and have no active apps present in the domain or underlying Identity Cloud Service stripe. You cannot deactivate the default identity domain.

After you send your request, the lifecycleDetails of this identity domain is set to DEACTIVATING. When the operation completes, then the lifecycleDetails is set to null and the lifecycleState is set to INACTIVE.

To track the progress of the request, submitting an HTTP GET on the /iamWorkRequests/iamWorkRequestsId endpoint retrieves the operation's status.

Parameters:

  • domain_id (String)

    The OCID of the identity domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



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
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
# File 'lib/oci/identity/identity_client.rb', line 2706

def deactivate_domain(domain_id, opts = {})
  logger.debug 'Calling operation IdentityClient#deactivate_domain.' if logger

  raise "Missing the required parameter 'domain_id' when calling deactivate_domain." if domain_id.nil?
  raise "Parameter value for 'domain_id' must not be blank" if OCI::Internal::Util.blank_string?(domain_id)

  path = '/domains/{domainId}/actions/deactivate'.sub('{domainId}', domain_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#deactivate_domain') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_api_key(user_id, fingerprint, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_api_key API.

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.

Parameters:

  • user_id (String)

    The OCID of the user.

  • fingerprint (String)

    The key's fingerprint.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



2772
2773
2774
2775
2776
2777
2778
2779
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
2808
2809
# File 'lib/oci/identity/identity_client.rb', line 2772

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)
  raise "Parameter value for 'fingerprint' must not be blank" if OCI::Internal::Util.blank_string?(fingerprint)

  path = '/users/{userId}/apiKeys/{fingerprint}'.sub('{userId}', user_id.to_s).sub('{fingerprint}', fingerprint.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_api_key') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_auth_token(user_id, auth_token_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_auth_token API.

Deletes the specified auth token for the specified user.

Parameters:

  • user_id (String)

    The OCID of the user.

  • auth_token_id (String)

    The OCID of the auth token.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



2832
2833
2834
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
2863
2864
2865
2866
2867
2868
2869
# File 'lib/oci/identity/identity_client.rb', line 2832

def delete_auth_token(user_id, auth_token_id, opts = {})
  logger.debug 'Calling operation IdentityClient#delete_auth_token.' if logger

  raise "Missing the required parameter 'user_id' when calling delete_auth_token." if user_id.nil?
  raise "Missing the required parameter 'auth_token_id' when calling delete_auth_token." if auth_token_id.nil?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)
  raise "Parameter value for 'auth_token_id' must not be blank" if OCI::Internal::Util.blank_string?(auth_token_id)

  path = '/users/{userId}/authTokens/{authTokenId}'.sub('{userId}', user_id.to_s).sub('{authTokenId}', auth_token_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_auth_token') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_compartment(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_compartment API.

Deletes the specified compartment. The compartment must be empty.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
# File 'lib/oci/identity/identity_client.rb', line 2891

def delete_compartment(compartment_id, opts = {})
  logger.debug 'Calling operation IdentityClient#delete_compartment.' if logger

  raise "Missing the required parameter 'compartment_id' when calling delete_compartment." if compartment_id.nil?
  raise "Parameter value for 'compartment_id' must not be blank" if OCI::Internal::Util.blank_string?(compartment_id)

  path = '/compartments/{compartmentId}'.sub('{compartmentId}', compartment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_compartment') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_customer_secret_key(user_id, customer_secret_key_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_customer_secret_key API.

Deletes the specified secret key for the specified user.

Parameters:

  • user_id (String)

    The OCID of the user.

  • customer_secret_key_id (String)

    The access token of the secret key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
# File 'lib/oci/identity/identity_client.rb', line 2949

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)
  raise "Parameter value for 'customer_secret_key_id' must not be blank" if OCI::Internal::Util.blank_string?(customer_secret_key_id)

  path = '/users/{userId}/customerSecretKeys/{customerSecretKeyId}'.sub('{userId}', user_id.to_s).sub('{customerSecretKeyId}', customer_secret_key_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_customer_secret_key') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_db_credential(user_id, db_credential_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_db_credential API.

Deletes the specified DB credential for the specified user.

Parameters:

  • user_id (String)

    The OCID of the user.

  • db_credential_id (String)

    The OCID of the DB credential.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
# File 'lib/oci/identity/identity_client.rb', line 3012

def delete_db_credential(user_id, db_credential_id, opts = {})
  logger.debug 'Calling operation IdentityClient#delete_db_credential.' if logger

  raise "Missing the required parameter 'user_id' when calling delete_db_credential." if user_id.nil?
  raise "Missing the required parameter 'db_credential_id' when calling delete_db_credential." if db_credential_id.nil?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)
  raise "Parameter value for 'db_credential_id' must not be blank" if OCI::Internal::Util.blank_string?(db_credential_id)

  path = '/users/{userId}/dbCredentials/{dbCredentialId}'.sub('{userId}', user_id.to_s).sub('{dbCredentialId}', db_credential_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_db_credential') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_domain(domain_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_domain API.

(For tenancies that support identity domains) Deletes an identity domain. The identity domain must have no active apps present in the underlying IDCS stripe. You must also deactivate the identity domain, rendering the lifecycleState of the identity domain INACTIVE. Furthermore, as the authenticated user performing the operation, you cannot be a member of the identity domain you are deleting. Lastly, you cannot delete the default identity domain. A tenancy must always have at least the default identity domain.

To track the progress of the request, submitting an HTTP GET on the /iamWorkRequests/iamWorkRequestsId endpoint retrieves the operation's status.

Parameters:

  • domain_id (String)

    The OCID of the identity domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
# File 'lib/oci/identity/identity_client.rb', line 3081

def delete_domain(domain_id, opts = {})
  logger.debug 'Calling operation IdentityClient#delete_domain.' if logger

  raise "Missing the required parameter 'domain_id' when calling delete_domain." if domain_id.nil?
  raise "Parameter value for 'domain_id' must not be blank" if OCI::Internal::Util.blank_string?(domain_id)

  path = '/domains/{domainId}'.sub('{domainId}', domain_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_domain') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_dynamic_group(dynamic_group_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_dynamic_group API.

Deletes the specified dynamic group.

Parameters:

  • dynamic_group_id (String)

    The OCID of the dynamic group.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
# File 'lib/oci/identity/identity_client.rb', line 3139

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?
  raise "Parameter value for 'dynamic_group_id' must not be blank" if OCI::Internal::Util.blank_string?(dynamic_group_id)

  path = '/dynamicGroups/{dynamicGroupId}'.sub('{dynamicGroupId}', dynamic_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_dynamic_group') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_group(group_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_group API.

Deletes the specified group. The group must be empty.

Parameters:

  • group_id (String)

    The OCID of the group.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
# File 'lib/oci/identity/identity_client.rb', line 3196

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?
  raise "Parameter value for 'group_id' must not be blank" if OCI::Internal::Util.blank_string?(group_id)

  path = '/groups/{groupId}'.sub('{groupId}', group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_group') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_identity_provider(identity_provider_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_identity_provider API.

Deprecated. For more information, see Deprecated IAM Service APIs.

Deletes the specified identity provider. The identity provider must not have any group mappings (see IdpGroupMapping).

Parameters:

  • identity_provider_id (String)

    The OCID of the identity provider.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
# File 'lib/oci/identity/identity_client.rb', line 3256

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?
  raise "Parameter value for 'identity_provider_id' must not be blank" if OCI::Internal::Util.blank_string?(identity_provider_id)

  path = '/identityProviders/{identityProviderId}'.sub('{identityProviderId}', identity_provider_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_identity_provider') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_idp_group_mapping(identity_provider_id, mapping_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_idp_group_mapping API.

Deprecated. For more information, see Deprecated IAM Service APIs.

Deletes the specified group mapping.

Parameters:

  • identity_provider_id (String)

    The OCID of the identity provider.

  • mapping_id (String)

    The OCID of the group mapping.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
# File 'lib/oci/identity/identity_client.rb', line 3316

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?
  raise "Parameter value for 'identity_provider_id' must not be blank" if OCI::Internal::Util.blank_string?(identity_provider_id)
  raise "Parameter value for 'mapping_id' must not be blank" if OCI::Internal::Util.blank_string?(mapping_id)

  path = '/identityProviders/{identityProviderId}/groupMappings/{mappingId}'.sub('{identityProviderId}', identity_provider_id.to_s).sub('{mappingId}', mapping_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_idp_group_mapping') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_mfa_totp_device(user_id, mfa_totp_device_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_mfa_totp_device API.

Deletes the specified MFA TOTP device for the specified user.

Parameters:

  • user_id (String)

    The OCID of the user.

  • mfa_totp_device_id (String)

    The OCID of the MFA TOTP device.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
# File 'lib/oci/identity/identity_client.rb', line 3376

def delete_mfa_totp_device(user_id, mfa_totp_device_id, opts = {})
  logger.debug 'Calling operation IdentityClient#delete_mfa_totp_device.' if logger

  raise "Missing the required parameter 'user_id' when calling delete_mfa_totp_device." if user_id.nil?
  raise "Missing the required parameter 'mfa_totp_device_id' when calling delete_mfa_totp_device." if mfa_totp_device_id.nil?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)
  raise "Parameter value for 'mfa_totp_device_id' must not be blank" if OCI::Internal::Util.blank_string?(mfa_totp_device_id)

  path = '/users/{userId}/mfaTotpDevices/{mfaTotpDeviceId}'.sub('{userId}', user_id.to_s).sub('{mfaTotpDeviceId}', mfa_totp_device_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_mfa_totp_device') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_network_source(network_source_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_network_source API.

Deletes the specified network source.

Parameters:

  • network_source_id (String)

    The OCID of the network source.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
# File 'lib/oci/identity/identity_client.rb', line 3435

def delete_network_source(network_source_id, opts = {})
  logger.debug 'Calling operation IdentityClient#delete_network_source.' if logger

  raise "Missing the required parameter 'network_source_id' when calling delete_network_source." if network_source_id.nil?
  raise "Parameter value for 'network_source_id' must not be blank" if OCI::Internal::Util.blank_string?(network_source_id)

  path = '/networkSources/{networkSourceId}'.sub('{networkSourceId}', network_source_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_network_source') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_o_auth_client_credential(user_id, oauth2_client_credential_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_o_auth_client_credential API.

Delete Oauth token for the user

Parameters:

  • user_id (String)

    The OCID of the user.

  • oauth2_client_credential_id (String)

    The ID of the Oauth credential.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
# File 'lib/oci/identity/identity_client.rb', line 3493

def delete_o_auth_client_credential(user_id, oauth2_client_credential_id, opts = {})
  logger.debug 'Calling operation IdentityClient#delete_o_auth_client_credential.' if logger

  raise "Missing the required parameter 'user_id' when calling delete_o_auth_client_credential." if user_id.nil?
  raise "Missing the required parameter 'oauth2_client_credential_id' when calling delete_o_auth_client_credential." if oauth2_client_credential_id.nil?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)
  raise "Parameter value for 'oauth2_client_credential_id' must not be blank" if OCI::Internal::Util.blank_string?(oauth2_client_credential_id)

  path = '/users/{userId}/oauth2ClientCredentials/{oauth2ClientCredentialId}'.sub('{userId}', user_id.to_s).sub('{oauth2ClientCredentialId}', oauth2_client_credential_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_o_auth_client_credential') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_policy(policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_policy API.

Deletes the specified policy. The deletion takes effect typically within 10 seconds.

Parameters:

  • policy_id (String)

    The OCID of the policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
# File 'lib/oci/identity/identity_client.rb', line 3551

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?
  raise "Parameter value for 'policy_id' must not be blank" if OCI::Internal::Util.blank_string?(policy_id)

  path = '/policies/{policyId}'.sub('{policyId}', policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_policy') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_smtp_credential(user_id, smtp_credential_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_smtp_credential API.

Deletes the specified SMTP credential for the specified user.

Parameters:

  • user_id (String)

    The OCID of the user.

  • smtp_credential_id (String)

    The OCID of the SMTP credential.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
# File 'lib/oci/identity/identity_client.rb', line 3609

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)
  raise "Parameter value for 'smtp_credential_id' must not be blank" if OCI::Internal::Util.blank_string?(smtp_credential_id)

  path = '/users/{userId}/smtpCredentials/{smtpCredentialId}'.sub('{userId}', user_id.to_s).sub('{smtpCredentialId}', smtp_credential_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_smtp_credential') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_swift_password(user_id, swift_password_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_swift_password API.

Deprecated. Use delete_auth_token instead.

Deletes the specified Swift password for the specified user.

Parameters:

  • user_id (String)

    The OCID of the user.

  • swift_password_id (String)

    The OCID of the Swift password.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
# File 'lib/oci/identity/identity_client.rb', line 3671

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)
  raise "Parameter value for 'swift_password_id' must not be blank" if OCI::Internal::Util.blank_string?(swift_password_id)

  path = '/users/{userId}/swiftPasswords/{swiftPasswordId}'.sub('{userId}', user_id.to_s).sub('{swiftPasswordId}', swift_password_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_swift_password') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_tag(tag_namespace_id, tag_name, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_tag API.

Deletes the specified tag definition. This operation triggers a process that removes the tag from all resources in your tenancy.

These things happen immediately: * If the tag was a cost-tracking tag, it no longer counts against your 10 cost-tracking tags limit, whether you first disabled it or not. * If the tag was used with dynamic groups, none of the rules that contain the tag will be evaluated against the tag.

When you start the delete operation, the state of the tag changes to DELETING and tag removal from resources begins. This can take up to 48 hours depending on the number of resources that were tagged as well as the regions in which those resources reside.

When all tags have been removed, the state changes to DELETED. You cannot restore a deleted tag. Once the deleted tag changes its state to DELETED, you can use the same tag name again.

After you start this operation, you cannot start either the bulk_delete_tags or the cascade_delete_tag_namespace operation until this process completes.

To delete a tag, you must first retire it. Use update_tag to retire a tag.

Parameters:

  • tag_namespace_id (String)

    The OCID of the tag namespace.

  • tag_name (String)

    The name of the tag.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :is_lock_override (BOOLEAN)

    Whether to override locks (if any exist). (default to false)

Returns:

  • (Response)

    A Response object with data of type nil



3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
# File 'lib/oci/identity/identity_client.rb', line 3753

def delete_tag(tag_namespace_id, tag_name, opts = {})
  logger.debug 'Calling operation IdentityClient#delete_tag.' if logger

  raise "Missing the required parameter 'tag_namespace_id' when calling delete_tag." if tag_namespace_id.nil?
  raise "Missing the required parameter 'tag_name' when calling delete_tag." if tag_name.nil?
  raise "Parameter value for 'tag_namespace_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_namespace_id)
  raise "Parameter value for 'tag_name' must not be blank" if OCI::Internal::Util.blank_string?(tag_name)

  path = '/tagNamespaces/{tagNamespaceId}/tags/{tagName}'.sub('{tagNamespaceId}', tag_namespace_id.to_s).sub('{tagName}', tag_name.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:isLockOverride] = opts[:is_lock_override] if !opts[:is_lock_override].nil?

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_tag') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_tag_default(tag_default_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_tag_default API.

Deletes the the specified tag default.

Parameters:

  • tag_default_id (String)

    The OCID of the tag default.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :is_lock_override (BOOLEAN)

    Whether to override locks (if any exist). (default to false)

Returns:

  • (Response)

    A Response object with data of type nil



3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
# File 'lib/oci/identity/identity_client.rb', line 3817

def delete_tag_default(tag_default_id, opts = {})
  logger.debug 'Calling operation IdentityClient#delete_tag_default.' if logger

  raise "Missing the required parameter 'tag_default_id' when calling delete_tag_default." if tag_default_id.nil?
  raise "Parameter value for 'tag_default_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_default_id)

  path = '/tagDefaults/{tagDefaultId}'.sub('{tagDefaultId}', tag_default_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:isLockOverride] = opts[:is_lock_override] if !opts[:is_lock_override].nil?

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_tag_default') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_tag_namespace(tag_namespace_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_tag_namespace API.

Deletes the specified tag namespace. Only an empty tag namespace can be deleted with this operation. To use this operation to delete a tag namespace that contains tag definitions, first delete all of its tag definitions.

Use cascade_delete_tag_namespace to delete a tag namespace along with all of the tag definitions contained within that namespace.

Use delete_tag to delete a tag definition.

Parameters:

  • tag_namespace_id (String)

    The OCID of the tag namespace.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :is_lock_override (BOOLEAN)

    Whether to override locks (if any exist). (default to false)

Returns:

  • (Response)

    A Response object with data of type nil



3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
# File 'lib/oci/identity/identity_client.rb', line 3887

def delete_tag_namespace(tag_namespace_id, opts = {})
  logger.debug 'Calling operation IdentityClient#delete_tag_namespace.' if logger

  raise "Missing the required parameter 'tag_namespace_id' when calling delete_tag_namespace." if tag_namespace_id.nil?
  raise "Parameter value for 'tag_namespace_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_namespace_id)

  path = '/tagNamespaces/{tagNamespaceId}'.sub('{tagNamespaceId}', tag_namespace_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:isLockOverride] = opts[:is_lock_override] if !opts[:is_lock_override].nil?

  # 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]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_tag_namespace') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_user(user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_user API.

Deletes the specified user. The user must not be in any groups.

Parameters:

  • user_id (String)

    The OCID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
# File 'lib/oci/identity/identity_client.rb', line 3945

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#delete_user') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#enable_replication_to_region(domain_id, enable_replication_to_region_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use enable_replication_to_region API.

(For tenancies that support identity domains) Replicates the identity domain to a new region (provided that the region is the tenancy home region or other region that the tenancy subscribes to). You can only replicate identity domains that are in an ACTIVE lifecycleState and not currently updating or already replicating. You also can only trigger the replication of secondary identity domains. The default identity domain is automatically replicated to all regions that the tenancy subscribes to.

After you send the request, the state of the identity domain in the replica region is set to ENABLING_REPLICATION. When the operation completes, the state is set to REPLICATION_ENABLED.

To track the progress of the request, submitting an HTTP GET on the /iamWorkRequests/iamWorkRequestsId endpoint retrieves the operation's status.

Parameters:

  • domain_id (String)

    The OCID of the identity domain.

  • enable_replication_to_region_details (OCI::Identity::Models::EnableReplicationToRegionDetails)

    The request object for replicating the identity domain to another region.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
# File 'lib/oci/identity/identity_client.rb', line 4021

def enable_replication_to_region(domain_id, enable_replication_to_region_details, opts = {})
  logger.debug 'Calling operation IdentityClient#enable_replication_to_region.' if logger

  raise "Missing the required parameter 'domain_id' when calling enable_replication_to_region." if domain_id.nil?
  raise "Missing the required parameter 'enable_replication_to_region_details' when calling enable_replication_to_region." if enable_replication_to_region_details.nil?
  raise "Parameter value for 'domain_id' must not be blank" if OCI::Internal::Util.blank_string?(domain_id)

  path = '/domains/{domainId}/actions/enableReplicationToRegion'.sub('{domainId}', domain_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(enable_replication_to_region_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#enable_replication_to_region') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#generate_totp_seed(user_id, mfa_totp_device_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use generate_totp_seed API.

Generate seed for the MFA TOTP device.

Parameters:

  • user_id (String)

    The OCID of the user.

  • mfa_totp_device_id (String)

    The OCID of the MFA TOTP device.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:



4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
# File 'lib/oci/identity/identity_client.rb', line 4083

def generate_totp_seed(user_id, mfa_totp_device_id, opts = {})
  logger.debug 'Calling operation IdentityClient#generate_totp_seed.' if logger

  raise "Missing the required parameter 'user_id' when calling generate_totp_seed." if user_id.nil?
  raise "Missing the required parameter 'mfa_totp_device_id' when calling generate_totp_seed." if mfa_totp_device_id.nil?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)
  raise "Parameter value for 'mfa_totp_device_id' must not be blank" if OCI::Internal::Util.blank_string?(mfa_totp_device_id)

  path = '/users/{userId}/mfaTotpDevices/{mfaTotpDeviceId}/actions/generateSeed'.sub('{userId}', user_id.to_s).sub('{mfaTotpDeviceId}', mfa_totp_device_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#generate_totp_seed') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::MfaTotpDevice'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_authentication_policy(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_authentication_policy API.

Gets the authentication policy for the given tenancy. You must specify your tenant's OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment).

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
# File 'lib/oci/identity/identity_client.rb', line 4141

def get_authentication_policy(compartment_id, opts = {})
  logger.debug 'Calling operation IdentityClient#get_authentication_policy.' if logger

  raise "Missing the required parameter 'compartment_id' when calling get_authentication_policy." if compartment_id.nil?
  raise "Parameter value for 'compartment_id' must not be blank" if OCI::Internal::Util.blank_string?(compartment_id)

  path = '/authenticationPolicies/{compartmentId}'.sub('{compartmentId}', compartment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_authentication_policy') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::AuthenticationPolicy'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_compartment(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_compartment API.

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.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
# File 'lib/oci/identity/identity_client.rb', line 4203

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?
  raise "Parameter value for 'compartment_id' must not be blank" if OCI::Internal::Util.blank_string?(compartment_id)

  path = '/compartments/{compartmentId}'.sub('{compartmentId}', compartment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_compartment') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::Compartment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_domain(domain_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_domain API.

(For tenancies that support identity domains) Gets the specified identity domain's information.

Parameters:

  • domain_id (String)

    The OCID of the identity domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
# File 'lib/oci/identity/identity_client.rb', line 4260

def get_domain(domain_id, opts = {})
  logger.debug 'Calling operation IdentityClient#get_domain.' if logger

  raise "Missing the required parameter 'domain_id' when calling get_domain." if domain_id.nil?
  raise "Parameter value for 'domain_id' must not be blank" if OCI::Internal::Util.blank_string?(domain_id)

  path = '/domains/{domainId}'.sub('{domainId}', domain_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_domain') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::Domain'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_dynamic_group(dynamic_group_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_dynamic_group API.

Gets the specified dynamic group's information.

Parameters:

  • dynamic_group_id (String)

    The OCID of the dynamic group.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
# File 'lib/oci/identity/identity_client.rb', line 4315

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?
  raise "Parameter value for 'dynamic_group_id' must not be blank" if OCI::Internal::Util.blank_string?(dynamic_group_id)

  path = '/dynamicGroups/{dynamicGroupId}'.sub('{dynamicGroupId}', dynamic_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_dynamic_group') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::DynamicGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_group(group_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_group API.

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.

Parameters:

  • group_id (String)

    The OCID of the group.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
# File 'lib/oci/identity/identity_client.rb', line 4374

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?
  raise "Parameter value for 'group_id' must not be blank" if OCI::Internal::Util.blank_string?(group_id)

  path = '/groups/{groupId}'.sub('{groupId}', group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_group') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::Group'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_iam_work_request(iam_work_request_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_iam_work_request API.

Gets the details of a specified IAM work request. The workRequestID is returned in the opc-workrequest-id header for any asynchronous operation in the Identity and Access Management service.

Parameters:

  • iam_work_request_id (String)

    The OCID of the IAM work request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
# File 'lib/oci/identity/identity_client.rb', line 4431

def get_iam_work_request(iam_work_request_id, opts = {})
  logger.debug 'Calling operation IdentityClient#get_iam_work_request.' if logger

  raise "Missing the required parameter 'iam_work_request_id' when calling get_iam_work_request." if iam_work_request_id.nil?
  raise "Parameter value for 'iam_work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(iam_work_request_id)

  path = '/iamWorkRequests/{iamWorkRequestId}'.sub('{iamWorkRequestId}', iam_work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_iam_work_request') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::IamWorkRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_identity_provider(identity_provider_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_identity_provider API.

Deprecated. For more information, see Deprecated IAM Service APIs.

Gets the specified identity provider's information.

Parameters:

  • identity_provider_id (String)

    The OCID of the identity provider.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
# File 'lib/oci/identity/identity_client.rb', line 4488

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?
  raise "Parameter value for 'identity_provider_id' must not be blank" if OCI::Internal::Util.blank_string?(identity_provider_id)

  path = '/identityProviders/{identityProviderId}'.sub('{identityProviderId}', identity_provider_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_identity_provider') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::IdentityProvider'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_idp_group_mapping(identity_provider_id, mapping_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_idp_group_mapping API.

Deprecated. For more information, see Deprecated IAM Service APIs.

Gets the specified group mapping.

Parameters:

  • identity_provider_id (String)

    The OCID of the identity provider.

  • mapping_id (String)

    The OCID of the group mapping.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
# File 'lib/oci/identity/identity_client.rb', line 4546

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?
  raise "Parameter value for 'identity_provider_id' must not be blank" if OCI::Internal::Util.blank_string?(identity_provider_id)
  raise "Parameter value for 'mapping_id' must not be blank" if OCI::Internal::Util.blank_string?(mapping_id)

  path = '/identityProviders/{identityProviderId}/groupMappings/{mappingId}'.sub('{identityProviderId}', identity_provider_id.to_s).sub('{mappingId}', mapping_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_idp_group_mapping') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::IdpGroupMapping'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_mfa_totp_device(user_id, mfa_totp_device_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_mfa_totp_device API.

Get the specified MFA TOTP device for the specified user.

Parameters:

  • user_id (String)

    The OCID of the user.

  • mfa_totp_device_id (String)

    The OCID of the MFA TOTP device.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
# File 'lib/oci/identity/identity_client.rb', line 4604

def get_mfa_totp_device(user_id, mfa_totp_device_id, opts = {})
  logger.debug 'Calling operation IdentityClient#get_mfa_totp_device.' if logger

  raise "Missing the required parameter 'user_id' when calling get_mfa_totp_device." if user_id.nil?
  raise "Missing the required parameter 'mfa_totp_device_id' when calling get_mfa_totp_device." if mfa_totp_device_id.nil?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)
  raise "Parameter value for 'mfa_totp_device_id' must not be blank" if OCI::Internal::Util.blank_string?(mfa_totp_device_id)

  path = '/users/{userId}/mfaTotpDevices/{mfaTotpDeviceId}'.sub('{userId}', user_id.to_s).sub('{mfaTotpDeviceId}', mfa_totp_device_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_mfa_totp_device') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::MfaTotpDeviceSummary'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_network_source(network_source_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_network_source API.

Gets the specified network source's information.

Parameters:

  • network_source_id (String)

    The OCID of the network source.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
# File 'lib/oci/identity/identity_client.rb', line 4661

def get_network_source(network_source_id, opts = {})
  logger.debug 'Calling operation IdentityClient#get_network_source.' if logger

  raise "Missing the required parameter 'network_source_id' when calling get_network_source." if network_source_id.nil?
  raise "Parameter value for 'network_source_id' must not be blank" if OCI::Internal::Util.blank_string?(network_source_id)

  path = '/networkSources/{networkSourceId}'.sub('{networkSourceId}', network_source_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_network_source') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::NetworkSources'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_policy(policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_policy API.

Gets the specified policy's information.

Parameters:

  • policy_id (String)

    The OCID of the policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
# File 'lib/oci/identity/identity_client.rb', line 4715

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?
  raise "Parameter value for 'policy_id' must not be blank" if OCI::Internal::Util.blank_string?(policy_id)

  path = '/policies/{policyId}'.sub('{policyId}', policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_policy') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::Policy'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_standard_tag_template(compartment_id, standard_tag_namespace_name, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_standard_tag_template API.

Retrieve the standard tag namespace template given the standard tag namespace name.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • standard_tag_namespace_name (String)

    The name of the standard tag namespace tempate that is requested

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
# File 'lib/oci/identity/identity_client.rb', line 4773

def get_standard_tag_template(compartment_id, standard_tag_namespace_name, opts = {})
  logger.debug 'Calling operation IdentityClient#get_standard_tag_template.' if logger

  raise "Missing the required parameter 'compartment_id' when calling get_standard_tag_template." if compartment_id.nil?
  raise "Missing the required parameter 'standard_tag_namespace_name' when calling get_standard_tag_template." if standard_tag_namespace_name.nil?
  raise "Parameter value for 'standard_tag_namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(standard_tag_namespace_name)

  path = '/tags/standardTagNamespaceTemplates/{standardTagNamespaceName}'.sub('{standardTagNamespaceName}', standard_tag_namespace_name.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_standard_tag_template') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::StandardTagNamespaceTemplate'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_tag(tag_namespace_id, tag_name, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_tag API.

Gets the specified tag's information.

Parameters:

  • tag_namespace_id (String)

    The OCID of the tag namespace.

  • tag_name (String)

    The name of the tag.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:

  • (Response)

    A Response object with data of type Tag



4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
# File 'lib/oci/identity/identity_client.rb', line 4832

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?
  raise "Parameter value for 'tag_namespace_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_namespace_id)
  raise "Parameter value for 'tag_name' must not be blank" if OCI::Internal::Util.blank_string?(tag_name)

  path = '/tagNamespaces/{tagNamespaceId}/tags/{tagName}'.sub('{tagNamespaceId}', tag_namespace_id.to_s).sub('{tagName}', tag_name.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_tag') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::Tag'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_tag_default(tag_default_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_tag_default API.

Retrieves the specified tag default.

Parameters:

  • tag_default_id (String)

    The OCID of the tag default.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
# File 'lib/oci/identity/identity_client.rb', line 4889

def get_tag_default(tag_default_id, opts = {})
  logger.debug 'Calling operation IdentityClient#get_tag_default.' if logger

  raise "Missing the required parameter 'tag_default_id' when calling get_tag_default." if tag_default_id.nil?
  raise "Parameter value for 'tag_default_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_default_id)

  path = '/tagDefaults/{tagDefaultId}'.sub('{tagDefaultId}', tag_default_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_tag_default') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::TagDefault'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_tag_namespace(tag_namespace_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_tag_namespace API.

Gets the specified tag namespace's information.

Parameters:

  • tag_namespace_id (String)

    The OCID of the tag namespace.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
# File 'lib/oci/identity/identity_client.rb', line 4945

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?
  raise "Parameter value for 'tag_namespace_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_namespace_id)

  path = '/tagNamespaces/{tagNamespaceId}'.sub('{tagNamespaceId}', tag_namespace_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_tag_namespace') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::TagNamespace'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_tagging_work_request(work_request_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_tagging_work_request API.

Gets details on a specified work request. The workRequestID is returned in the opc-workrequest-id header for any asynchronous operation in tagging service.

Parameters:

  • work_request_id (String)

    The OCID of the work request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
# File 'lib/oci/identity/identity_client.rb', line 5001

def get_tagging_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation IdentityClient#get_tagging_work_request.' if logger

  raise "Missing the required parameter 'work_request_id' when calling get_tagging_work_request." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/taggingWorkRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_tagging_work_request') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::TaggingWorkRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_tenancy(tenancy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_tenancy API.

Get the specified tenancy's information.

Parameters:

  • tenancy_id (String)

    The OCID of the tenancy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
# File 'lib/oci/identity/identity_client.rb', line 5055

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?
  raise "Parameter value for 'tenancy_id' must not be blank" if OCI::Internal::Util.blank_string?(tenancy_id)

  path = '/tenancies/{tenancyId}'.sub('{tenancyId}', tenancy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_tenancy') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::Tenancy'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_user(user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_user API.

Gets the specified user's information.

Parameters:

  • user_id (String)

    The OCID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
# File 'lib/oci/identity/identity_client.rb', line 5109

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_user') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::User'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_user_group_membership(user_group_membership_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_user_group_membership API.

Gets the specified UserGroupMembership's information.

Parameters:

  • user_group_membership_id (String)

    The OCID of the userGroupMembership.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
# File 'lib/oci/identity/identity_client.rb', line 5163

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?
  raise "Parameter value for 'user_group_membership_id' must not be blank" if OCI::Internal::Util.blank_string?(user_group_membership_id)

  path = '/userGroupMemberships/{userGroupMembershipId}'.sub('{userGroupMembershipId}', user_group_membership_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_user_group_membership') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::UserGroupMembership'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_user_ui_password_information(user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_user_ui_password_information API.

Gets the specified user's console password information. The returned object contains the user's OCID, but not the password itself. The actual password is returned only when created or reset.

Parameters:

  • user_id (String)

    The OCID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
# File 'lib/oci/identity/identity_client.rb', line 5219

def get_user_ui_password_information(user_id, opts = {})
  logger.debug 'Calling operation IdentityClient#get_user_ui_password_information.' if logger

  raise "Missing the required parameter 'user_id' when calling get_user_ui_password_information." if user_id.nil?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/uiPassword'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_user_ui_password_information') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::UIPasswordInformation'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_work_request(work_request_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_work_request API.

Gets details on a specified work request. The workRequestID is returned in the opc-workrequest-id header for any asynchronous operation in the compartment service.

Parameters:

  • work_request_id (String)

    The OCID of the work request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
# File 'lib/oci/identity/identity_client.rb', line 5275

def get_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation IdentityClient#get_work_request.' if logger

  raise "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#get_work_request') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::WorkRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#import_standard_tags(opts = {}) ⇒ Response

Note:

Click here to see an example of how to use import_standard_tags API.

OCI will release Tag Namespaces that our customers can import. These Tag Namespaces will provide Tags for our customers and Partners to provide consistency and enable data reporting.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

  • :import_standard_tags_details (OCI::Identity::Models::ImportStandardTagsDetails)

    The request object for creating or updating standard tag namespace.

Returns:

  • (Response)

    A Response object with data of type nil



5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
# File 'lib/oci/identity/identity_client.rb', line 5339

def import_standard_tags(opts = {})
  logger.debug 'Calling operation IdentityClient#import_standard_tags.' if logger


  path = '/tags/actions/importStandardTags'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(opts[:import_standard_tags_details])

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#import_standard_tags') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_allowed_domain_license_types(opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_allowed_domain_license_types API.

(For tenancies that support identity domains) Lists the license types for identity domains supported by Oracle Cloud Infrastructure. (License types are also referred to as domain types.)

If currentLicenseTypeName is provided, then the request returns license types that the identity domain with the specified license type name can change to. Otherwise, the request returns all valid license types currently supported.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :current_license_type_name (String)

    The license type of the identity domain.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
# File 'lib/oci/identity/identity_client.rb', line 5399

def list_allowed_domain_license_types(opts = {})
  logger.debug 'Calling operation IdentityClient#list_allowed_domain_license_types.' if logger


  path = '/allowedDomainLicenseTypes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:currentLicenseTypeName] = opts[:current_license_type_name] if opts[:current_license_type_name]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_allowed_domain_license_types') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::AllowedDomainLicenseTypeSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_api_keys(user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_api_keys API.

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.

Parameters:

  • user_id (String)

    The OCID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
# File 'lib/oci/identity/identity_client.rb', line 5456

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/apiKeys/'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_api_keys') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::ApiKey>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_auth_tokens(user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_auth_tokens API.

Lists the auth tokens for the specified user. The returned object contains the token's OCID, but not the token itself. The actual token is returned only upon creation.

Parameters:

  • user_id (String)

    The OCID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
# File 'lib/oci/identity/identity_client.rb', line 5512

def list_auth_tokens(user_id, opts = {})
  logger.debug 'Calling operation IdentityClient#list_auth_tokens.' if logger

  raise "Missing the required parameter 'user_id' when calling list_auth_tokens." if user_id.nil?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/authTokens/'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_auth_tokens') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::AuthToken>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_availability_domains(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_availability_domains API.

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. Note that the order of the results returned can change if availability domains are added or removed; therefore, do not create a dependency on the list order.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
# File 'lib/oci/identity/identity_client.rb', line 5572

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/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_availability_domains') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::AvailabilityDomain>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_bulk_action_resource_types(bulk_action_type, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_bulk_action_resource_types API.

Lists the resource-types supported by compartment bulk actions. Use this API to help you provide the correct resource-type information to the #bulk_delete_resources bulk_delete_resources} and bulk_move_resources operations. The returned list of resource-types provides the appropriate resource-type names to use with the bulk action operations along with the type of identifying information you’ll need to provide for each resource-type. Most resource-types just require an {OCID to identify a specific resource, but some resource-types, such as buckets, require you to provide other identifying information.

Parameters:

  • bulk_action_type (String)

    The type of bulk action.

    Allowed values are: BULK_MOVE_RESOURCES, BULK_DELETE_RESOURCES

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

Returns:



5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
# File 'lib/oci/identity/identity_client.rb', line 5638

def list_bulk_action_resource_types(bulk_action_type, opts = {})
  logger.debug 'Calling operation IdentityClient#list_bulk_action_resource_types.' if logger

  raise "Missing the required parameter 'bulk_action_type' when calling list_bulk_action_resource_types." if bulk_action_type.nil?
  unless %w[BULK_MOVE_RESOURCES BULK_DELETE_RESOURCES].include?(bulk_action_type)
    raise "Invalid value for 'bulk_action_type', must be one of BULK_MOVE_RESOURCES, BULK_DELETE_RESOURCES."
  end

  path = '/compartments/bulkActionResourceTypes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:bulkActionType] = bulk_action_type
  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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_bulk_action_resource_types') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::BulkActionResourceTypeCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_bulk_edit_tags_resource_types(opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_bulk_edit_tags_resource_types API.

Lists the resource types that support bulk tag editing.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

Returns:



5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
# File 'lib/oci/identity/identity_client.rb', line 5699

def list_bulk_edit_tags_resource_types(opts = {})
  logger.debug 'Calling operation IdentityClient#list_bulk_edit_tags_resource_types.' if logger


  path = '/tags/bulkEditResourceTypes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_bulk_edit_tags_resource_types') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::BulkEditTagsResourceTypeCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_compartments(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_compartments API.

Lists the compartments in a specified compartment. The members of the list returned depends on the values set for several parameters.

With the exception of the tenancy (root compartment), the ListCompartments operation returns only the first-level child compartments in the parent compartment specified in compartmentId. The list does not include any subcompartments of the child compartments (grandchildren).

The parameter accessLevel specifies whether to return only those compartments for which the requestor has INSPECT permissions on at least one resource directly or indirectly (the resource can be in a subcompartment).

The parameter compartmentIdInSubtree applies only when you perform ListCompartments on the tenancy (root compartment). When set to true, the entire hierarchy of compartments can be returned. To get a full list of all compartments and subcompartments in the tenancy (root compartment), set the parameter compartmentIdInSubtree to true and accessLevel to ANY.

See Where to Get the Tenancy’s OCID and User’s OCID.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :access_level (String)

    Valid values are ANY and ACCESSIBLE. Default is ANY. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). For the compartments on which the user indirectly has INSPECT permissions, a restricted set of fields is returned.

    When set to ANY permissions are not checked.

    Allowed values are: ANY, ACCESSIBLE

  • :compartment_id_in_subtree (BOOLEAN)

    Default is false. Can only be set to true when performing ListCompartments on the tenancy (root compartment). When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel.

  • :name (String)

    A filter to only return resources that match the given name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by Availability Domain if the scope of the resource type is within a single Availability Domain. If you call one of these "List" operations without specifying an Availability Domain, the resources are grouped by Availability Domain, then sorted.

    Allowed values are: TIMECREATED, NAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The NAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
# File 'lib/oci/identity/identity_client.rb', line 5807

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?

  if opts[:access_level] && !%w[ANY ACCESSIBLE].include?(opts[:access_level])
    raise 'Invalid value for "access_level", must be one of ANY, ACCESSIBLE.'
  end

  if opts[:sort_by] && !%w[TIMECREATED NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, NAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Identity::Models::Compartment::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Identity::Models::Compartment::LIFECYCLE_STATE_ENUM.'
  end

  path = '/compartments/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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[:accessLevel] = opts[:access_level] if opts[:access_level]
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_compartments') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::Compartment>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_cost_tracking_tags(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_cost_tracking_tags API.

Lists all the tags enabled for cost-tracking in the specified tenancy. For information about cost-tracking tags, see Using Cost-tracking Tags.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

Returns:

  • (Response)

    A Response object with data of type Array<Tag>



5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
# File 'lib/oci/identity/identity_client.rb', line 5890

def list_cost_tracking_tags(compartment_id, opts = {})
  logger.debug 'Calling operation IdentityClient#list_cost_tracking_tags.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_cost_tracking_tags." if compartment_id.nil?

  path = '/tagNamespaces/actions/listCostTrackingTags'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_cost_tracking_tags') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::Tag>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_customer_secret_keys(user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_customer_secret_keys API.

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.

Parameters:

  • user_id (String)

    The OCID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
# File 'lib/oci/identity/identity_client.rb', line 5947

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/customerSecretKeys/'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_customer_secret_keys') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::CustomerSecretKeySummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_db_credentials(user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_db_credentials API.

Lists the DB credentials for the specified user. The returned object contains the credential's OCID

Parameters:

  • user_id (String)

    The OCID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :name (String)

    A filter to only return resources that match the given name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by Availability Domain if the scope of the resource type is within a single Availability Domain. If you call one of these "List" operations without specifying an Availability Domain, the resources are grouped by Availability Domain, then sorted.

    Allowed values are: TIMECREATED, NAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The NAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
# File 'lib/oci/identity/identity_client.rb', line 6026

def list_db_credentials(user_id, opts = {})
  logger.debug 'Calling operation IdentityClient#list_db_credentials.' if logger

  raise "Missing the required parameter 'user_id' when calling list_db_credentials." if user_id.nil?

  if opts[:sort_by] && !%w[TIMECREATED NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, NAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Identity::Models::DbCredential::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Identity::Models::DbCredential::LIFECYCLE_STATE_ENUM.'
  end
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/dbCredentials/'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_db_credentials') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::DbCredentialSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_domains(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_domains API.

(For tenancies that support identity domains) Lists all identity domains within a tenancy.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :display_name (String)

    The mutable display name of the identity domain.

  • :url (String)

    The region-agnostic identity domain URL.

  • :home_region_url (String)

    The region-specific identity domain URL.

  • :type (String)

    The identity domain type.

  • :license_type (String)

    The license type of the identity domain.

  • :is_hidden_on_login (BOOLEAN)

    Indicates whether or not the identity domain is visible at the sign-in screen.

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :name (String)

    A filter to only return resources that match the given name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by Availability Domain if the scope of the resource type is within a single Availability Domain. If you call one of these "List" operations without specifying an Availability Domain, the resources are grouped by Availability Domain, then sorted.

    Allowed values are: TIMECREATED, NAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The NAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
# File 'lib/oci/identity/identity_client.rb', line 6130

def list_domains(compartment_id, opts = {})
  logger.debug 'Calling operation IdentityClient#list_domains.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_domains." if compartment_id.nil?

  if opts[:sort_by] && !%w[TIMECREATED NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, NAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Identity::Models::Domain::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Identity::Models::Domain::LIFECYCLE_STATE_ENUM.'
  end

  path = '/domains/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:url] = opts[:url] if opts[:url]
  query_params[:homeRegionUrl] = opts[:home_region_url] if opts[:home_region_url]
  query_params[:type] = opts[:type] if opts[:type]
  query_params[:licenseType] = opts[:license_type] if opts[:license_type]
  query_params[:isHiddenOnLogin] = opts[:is_hidden_on_login] if !opts[:is_hidden_on_login].nil?
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_domains') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::DomainSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_dynamic_groups(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_dynamic_groups API.

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.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :name (String)

    A filter to only return resources that match the given name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by Availability Domain if the scope of the resource type is within a single Availability Domain. If you call one of these "List" operations without specifying an Availability Domain, the resources are grouped by Availability Domain, then sorted.

    Allowed values are: TIMECREATED, NAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The NAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
# File 'lib/oci/identity/identity_client.rb', line 6233

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?

  if opts[:sort_by] && !%w[TIMECREATED NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, NAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Identity::Models::DynamicGroup::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Identity::Models::DynamicGroup::LIFECYCLE_STATE_ENUM.'
  end

  path = '/dynamicGroups/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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[:name] = opts[:name] if opts[:name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_dynamic_groups') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::DynamicGroup>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_fault_domains(compartment_id, availability_domain, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_fault_domains API.

Lists the Fault 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.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • availability_domain (String)

    The name of the availabilityDomain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
# File 'lib/oci/identity/identity_client.rb', line 6310

def list_fault_domains(compartment_id, availability_domain, opts = {})
  logger.debug 'Calling operation IdentityClient#list_fault_domains.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_fault_domains." if compartment_id.nil?
  raise "Missing the required parameter 'availability_domain' when calling list_fault_domains." if availability_domain.nil?

  path = '/faultDomains/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:availabilityDomain] = availability_domain

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_fault_domains') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::FaultDomain>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_groups(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_groups API.

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.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :name (String)

    A filter to only return resources that match the given name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by Availability Domain if the scope of the resource type is within a single Availability Domain. If you call one of these "List" operations without specifying an Availability Domain, the resources are grouped by Availability Domain, then sorted.

    Allowed values are: TIMECREATED, NAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The NAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:

  • (Response)

    A Response object with data of type Array<Group>



6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
# File 'lib/oci/identity/identity_client.rb', line 6391

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?

  if opts[:sort_by] && !%w[TIMECREATED NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, NAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Identity::Models::Group::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Identity::Models::Group::LIFECYCLE_STATE_ENUM.'
  end

  path = '/groups/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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[:name] = opts[:name] if opts[:name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_groups') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::Group>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_iam_work_request_errors(iam_work_request_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_iam_work_request_errors API.

Gets error details for a specified IAM work request. The workRequestID is returned in the opc-workrequest-id header for any asynchronous operation in the Identity and Access Management service.

Parameters:

  • iam_work_request_id (String)

    The OCID of the IAM work request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The NAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
# File 'lib/oci/identity/identity_client.rb', line 6473

def list_iam_work_request_errors(iam_work_request_id, opts = {})
  logger.debug 'Calling operation IdentityClient#list_iam_work_request_errors.' if logger

  raise "Missing the required parameter 'iam_work_request_id' when calling list_iam_work_request_errors." if iam_work_request_id.nil?

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end
  raise "Parameter value for 'iam_work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(iam_work_request_id)

  path = '/iamWorkRequests/{iamWorkRequestId}/errors'.sub('{iamWorkRequestId}', iam_work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_iam_work_request_errors') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::IamWorkRequestErrorSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_iam_work_request_logs(iam_work_request_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_iam_work_request_logs API.

Gets logs for a specified IAM work request. The workRequestID is returned in the opc-workrequest-id header for any asynchronous operation in the Identity and Access Management service.

Parameters:

  • iam_work_request_id (String)

    The OCID of the IAM work request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The NAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
# File 'lib/oci/identity/identity_client.rb', line 6545

def list_iam_work_request_logs(iam_work_request_id, opts = {})
  logger.debug 'Calling operation IdentityClient#list_iam_work_request_logs.' if logger

  raise "Missing the required parameter 'iam_work_request_id' when calling list_iam_work_request_logs." if iam_work_request_id.nil?

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end
  raise "Parameter value for 'iam_work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(iam_work_request_id)

  path = '/iamWorkRequests/{iamWorkRequestId}/logs'.sub('{iamWorkRequestId}', iam_work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_iam_work_request_logs') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::IamWorkRequestLogSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_iam_work_requests(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_iam_work_requests API.

Lists the IAM work requests in compartment. The workRequestID is returned in the opc-workrequest-id header for any asynchronous operation in the Identity and Access Management service.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :resource_identifier (String)

    The identifier of the resource the work request affects.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
# File 'lib/oci/identity/identity_client.rb', line 6615

def list_iam_work_requests(compartment_id, opts = {})
  logger.debug 'Calling operation IdentityClient#list_iam_work_requests.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_iam_work_requests." if compartment_id.nil?

  path = '/iamWorkRequests'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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[:resourceIdentifier] = opts[:resource_identifier] if opts[:resource_identifier]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_iam_work_requests') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::IamWorkRequestSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_identity_provider_groups(identity_provider_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_identity_provider_groups API.

Deprecated. For more information, see Deprecated IAM Service APIs.

Lists the identity provider groups.

Parameters:

  • identity_provider_id (String)

    The OCID of the identity provider.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :name (String)

    A filter to only return resources that match the given name exactly.

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
# File 'lib/oci/identity/identity_client.rb', line 6682

def list_identity_provider_groups(identity_provider_id, opts = {})
  logger.debug 'Calling operation IdentityClient#list_identity_provider_groups.' if logger

  raise "Missing the required parameter 'identity_provider_id' when calling list_identity_provider_groups." if identity_provider_id.nil?

  if opts[:lifecycle_state] && !OCI::Identity::Models::IdentityProvider::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Identity::Models::IdentityProvider::LIFECYCLE_STATE_ENUM.'
  end
  raise "Parameter value for 'identity_provider_id' must not be blank" if OCI::Internal::Util.blank_string?(identity_provider_id)

  path = '/identityProviders/{identityProviderId}/groups/'.sub('{identityProviderId}', identity_provider_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_identity_provider_groups') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::IdentityProviderGroupSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_identity_providers(protocol, compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_identity_providers API.

Deprecated. For more information, see Deprecated IAM Service APIs.

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.

Parameters:

  • protocol (String)

    The protocol used for federation. Allowed values are: SAML2

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :name (String)

    A filter to only return resources that match the given name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by Availability Domain if the scope of the resource type is within a single Availability Domain. If you call one of these "List" operations without specifying an Availability Domain, the resources are grouped by Availability Domain, then sorted.

    Allowed values are: TIMECREATED, NAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The NAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
# File 'lib/oci/identity/identity_client.rb', line 6773

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 %w[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?

  if opts[:sort_by] && !%w[TIMECREATED NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, NAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Identity::Models::IdentityProvider::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Identity::Models::IdentityProvider::LIFECYCLE_STATE_ENUM.'
  end

  path = '/identityProviders/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_identity_providers') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::IdentityProvider>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_idp_group_mappings(identity_provider_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_idp_group_mappings API.

Deprecated. For more information, see Deprecated IAM Service APIs.

Lists the group mappings for the specified identity provider.

Parameters:

  • identity_provider_id (String)

    The OCID of the identity provider.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

Returns:



6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
# File 'lib/oci/identity/identity_client.rb', line 6855

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?
  raise "Parameter value for 'identity_provider_id' must not be blank" if OCI::Internal::Util.blank_string?(identity_provider_id)

  path = '/identityProviders/{identityProviderId}/groupMappings/'.sub('{identityProviderId}', identity_provider_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_idp_group_mappings') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::IdpGroupMapping>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_mfa_totp_devices(user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_mfa_totp_devices API.

Lists the MFA TOTP devices for the specified user. The returned object contains the device's OCID, but not the seed. The seed is returned only upon creation or when the IAM service regenerates the MFA seed for the device.

Parameters:

  • user_id (String)

    The OCID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by Availability Domain if the scope of the resource type is within a single Availability Domain. If you call one of these "List" operations without specifying an Availability Domain, the resources are grouped by Availability Domain, then sorted.

    Allowed values are: TIMECREATED, NAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The NAME sort order is case sensitive.

    Allowed values are: ASC, DESC

Returns:



6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
# File 'lib/oci/identity/identity_client.rb', line 6929

def list_mfa_totp_devices(user_id, opts = {})
  logger.debug 'Calling operation IdentityClient#list_mfa_totp_devices.' if logger

  raise "Missing the required parameter 'user_id' when calling list_mfa_totp_devices." if user_id.nil?

  if opts[:sort_by] && !%w[TIMECREATED NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, NAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/mfaTotpDevices'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_mfa_totp_devices') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::MfaTotpDeviceSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_network_sources(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_network_sources API.

Lists the network sources 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.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :name (String)

    A filter to only return resources that match the given name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by Availability Domain if the scope of the resource type is within a single Availability Domain. If you call one of these "List" operations without specifying an Availability Domain, the resources are grouped by Availability Domain, then sorted.

    Allowed values are: TIMECREATED, NAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The NAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
# File 'lib/oci/identity/identity_client.rb', line 7019

def list_network_sources(compartment_id, opts = {})
  logger.debug 'Calling operation IdentityClient#list_network_sources.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_network_sources." if compartment_id.nil?

  if opts[:sort_by] && !%w[TIMECREATED NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, NAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Identity::Models::NetworkSources::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Identity::Models::NetworkSources::LIFECYCLE_STATE_ENUM.'
  end

  path = '/networkSources'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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[:name] = opts[:name] if opts[:name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_network_sources') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::NetworkSourcesSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_o_auth_client_credentials(user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_o_auth_client_credentials API.

List of Oauth tokens for the user

Parameters:

  • user_id (String)

    The OCID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
# File 'lib/oci/identity/identity_client.rb', line 7096

def list_o_auth_client_credentials(user_id, opts = {})
  logger.debug 'Calling operation IdentityClient#list_o_auth_client_credentials.' if logger

  raise "Missing the required parameter 'user_id' when calling list_o_auth_client_credentials." if user_id.nil?

  if opts[:lifecycle_state] && !OCI::Identity::Models::OAuth2ClientCredentialSummary::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Identity::Models::OAuth2ClientCredentialSummary::LIFECYCLE_STATE_ENUM.'
  end
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/oauth2ClientCredentials'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_o_auth_client_credentials') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::OAuth2ClientCredentialSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_policies(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_policies API.

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.

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.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :name (String)

    A filter to only return resources that match the given name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by Availability Domain if the scope of the resource type is within a single Availability Domain. If you call one of these "List" operations without specifying an Availability Domain, the resources are grouped by Availability Domain, then sorted.

    Allowed values are: TIMECREATED, NAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The NAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
# File 'lib/oci/identity/identity_client.rb', line 7183

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?

  if opts[:sort_by] && !%w[TIMECREATED NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, NAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Identity::Models::Policy::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Identity::Models::Policy::LIFECYCLE_STATE_ENUM.'
  end

  path = '/policies/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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[:name] = opts[:name] if opts[:name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_policies') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::Policy>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_region_subscriptions(tenancy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_region_subscriptions API.

Lists the region subscriptions for the specified tenancy.

Parameters:

  • tenancy_id (String)

    The OCID of the tenancy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
# File 'lib/oci/identity/identity_client.rb', line 7254

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?
  raise "Parameter value for 'tenancy_id' must not be blank" if OCI::Internal::Util.blank_string?(tenancy_id)

  path = '/tenancies/{tenancyId}/regionSubscriptions'.sub('{tenancyId}', tenancy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_region_subscriptions') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::RegionSubscription>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_regions(opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_regions API.

Lists all the regions offered by Oracle Cloud Infrastructure.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
# File 'lib/oci/identity/identity_client.rb', line 7307

def list_regions(opts = {})
  logger.debug 'Calling operation IdentityClient#list_regions.' if logger


  path = '/regions'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_regions') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::Region>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_smtp_credentials(user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_smtp_credentials API.

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.

Parameters:

  • user_id (String)

    The OCID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
# File 'lib/oci/identity/identity_client.rb', line 7361

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/smtpCredentials/'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_smtp_credentials') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::SmtpCredentialSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_standard_tag_namespaces(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_standard_tag_namespaces API.

Lists available standard tag namespaces that users can create.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

Returns:



7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
# File 'lib/oci/identity/identity_client.rb', line 7420

def list_standard_tag_namespaces(compartment_id, opts = {})
  logger.debug 'Calling operation IdentityClient#list_standard_tag_namespaces.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_standard_tag_namespaces." if compartment_id.nil?

  path = '/tags/standardTagNamespaceTemplates'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_standard_tag_namespaces') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::StandardTagNamespaceTemplateSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_swift_passwords(user_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_swift_passwords API.

Deprecated. Use list_auth_tokens instead.

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.

Parameters:

  • user_id (String)

    The OCID of the user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
# File 'lib/oci/identity/identity_client.rb', line 7479

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/swiftPasswords/'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_swift_passwords') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::SwiftPassword>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_tag_defaults(opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_tag_defaults API.

Lists the tag defaults for tag definitions in the specified compartment.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :id (String)

    A filter to only return resources that match the specified OCID exactly.

  • :compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • :tag_definition_id (String)

    The OCID of the tag definition.

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
# File 'lib/oci/identity/identity_client.rb', line 7544

def list_tag_defaults(opts = {})
  logger.debug 'Calling operation IdentityClient#list_tag_defaults.' if logger


  if opts[:lifecycle_state] && !OCI::Identity::Models::TagDefaultSummary::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Identity::Models::TagDefaultSummary::LIFECYCLE_STATE_ENUM.'
  end

  path = '/tagDefaults'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:tagDefinitionId] = opts[:tag_definition_id] if opts[:tag_definition_id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_tag_defaults') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::TagDefaultSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_tag_namespaces(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_tag_namespaces API.

Lists the tag namespaces in the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :include_subcompartments (BOOLEAN)

    An optional boolean parameter indicating whether to retrieve all tag namespaces in subcompartments. If this parameter is not specified, only the tag namespaces defined in the specified compartment are retrieved.

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
# File 'lib/oci/identity/identity_client.rb', line 7615

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?

  if opts[:lifecycle_state] && !OCI::Identity::Models::TagNamespace::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Identity::Models::TagNamespace::LIFECYCLE_STATE_ENUM.'
  end

  path = '/tagNamespaces'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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].nil?
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_tag_namespaces') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::TagNamespaceSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_tagging_work_request_errors(work_request_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_tagging_work_request_errors API.

Gets the errors for a work request.

Parameters:

  • work_request_id (String)

    The OCID of the work request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

Returns:



7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
# File 'lib/oci/identity/identity_client.rb', line 7680

def list_tagging_work_request_errors(work_request_id, opts = {})
  logger.debug 'Calling operation IdentityClient#list_tagging_work_request_errors.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_tagging_work_request_errors." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/taggingWorkRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_tagging_work_request_errors') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::TaggingWorkRequestErrorSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_tagging_work_request_logs(work_request_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_tagging_work_request_logs API.

Gets the logs for a work request.

Parameters:

  • work_request_id (String)

    The OCID of the work request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

Returns:



7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
# File 'lib/oci/identity/identity_client.rb', line 7739

def list_tagging_work_request_logs(work_request_id, opts = {})
  logger.debug 'Calling operation IdentityClient#list_tagging_work_request_logs.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_tagging_work_request_logs." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/taggingWorkRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_tagging_work_request_logs') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::TaggingWorkRequestLogSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_tagging_work_requests(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_tagging_work_requests API.

Lists the tagging work requests in compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :resource_identifier (String)

    The identifier of the resource the work request affects.

Returns:



7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
# File 'lib/oci/identity/identity_client.rb', line 7800

def list_tagging_work_requests(compartment_id, opts = {})
  logger.debug 'Calling operation IdentityClient#list_tagging_work_requests.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_tagging_work_requests." if compartment_id.nil?

  path = '/taggingWorkRequests/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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[:resourceIdentifier] = opts[:resource_identifier] if opts[:resource_identifier]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_tagging_work_requests') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::TaggingWorkRequestSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_tags(tag_namespace_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_tags API.

Lists the tag definitions in the specified tag namespace.

Parameters:

  • tag_namespace_id (String)

    The OCID of the tag namespace.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
# File 'lib/oci/identity/identity_client.rb', line 7863

def list_tags(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?

  if opts[:lifecycle_state] && !OCI::Identity::Models::Tag::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Identity::Models::Tag::LIFECYCLE_STATE_ENUM.'
  end
  raise "Parameter value for 'tag_namespace_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_namespace_id)

  path = '/tagNamespaces/{tagNamespaceId}/tags'.sub('{tagNamespaceId}', tag_namespace_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_tags') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::TagSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_user_group_memberships(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_user_group_memberships API.

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). 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.

  • AlthoughuserId and groupId are not individually required, you must set one of them.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :user_id (String)

    The OCID of the user.

  • :group_id (String)

    The OCID of the group.

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

Returns:



7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
# File 'lib/oci/identity/identity_client.rb', line 7939

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/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_user_group_memberships') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::UserGroupMembership>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_users(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_users API.

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.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :identity_provider_id (String)

    The id of the identity provider.

  • :external_identifier (String)

    The id of a user in the identity provider.

  • :name (String)

    A filter to only return resources that match the given name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by Availability Domain if the scope of the resource type is within a single Availability Domain. If you call one of these "List" operations without specifying an Availability Domain, the resources are grouped by Availability Domain, then sorted.

    Allowed values are: TIMECREATED, NAME

  • :sort_order (String)

    The sort order to use, either ascending (ASC) or descending (DESC). The NAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:

  • (Response)

    A Response object with data of type Array<User>



8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
# File 'lib/oci/identity/identity_client.rb', line 8025

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?

  if opts[:sort_by] && !%w[TIMECREATED NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, NAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Identity::Models::User::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Identity::Models::User::LIFECYCLE_STATE_ENUM.'
  end

  path = '/users/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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[:identityProviderId] = opts[:identity_provider_id] if opts[:identity_provider_id]
  query_params[:externalIdentifier] = opts[:external_identifier] if opts[:external_identifier]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_users') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::User>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_requests(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_work_requests API.

Lists the work requests in compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment (remember that the tenancy is simply the root compartment).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The value of the opc-next-page response header from the previous "List" call.

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

  • :resource_identifier (String)

    The identifier of the resource the work request affects.

Returns:



8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
# File 'lib/oci/identity/identity_client.rb', line 8104

def list_work_requests(compartment_id, opts = {})
  logger.debug 'Calling operation IdentityClient#list_work_requests.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil?

  path = '/workRequests/'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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[:resourceIdentifier] = opts[:resource_identifier] if opts[:resource_identifier]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_work_requests') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Identity::Models::WorkRequestSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



94
95
96
# File 'lib/oci/identity/identity_client.rb', line 94

def logger
  @api_client.config.logger
end

#move_compartment(compartment_id, move_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use move_compartment API.

Move the compartment to a different parent compartment in the same tenancy. When you move a compartment, all its contents (subcompartments and resources) are moved with it. Note that the CompartmentId that you specify in the path is the compartment that you want to move.

IMPORTANT: After you move a compartment to a new parent compartment, the access policies of the new parent take effect and the policies of the previous parent no longer apply. Ensure that you are aware of the implications for the compartment contents before you move it. For more information, see Moving a Compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • move_compartment_details (OCI::Identity::Models::MoveCompartmentDetails)

    Request object for moving a compartment.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
# File 'lib/oci/identity/identity_client.rb', line 8181

def move_compartment(compartment_id, move_compartment_details, opts = {})
  logger.debug 'Calling operation IdentityClient#move_compartment.' if logger

  raise "Missing the required parameter 'compartment_id' when calling move_compartment." if compartment_id.nil?
  raise "Missing the required parameter 'move_compartment_details' when calling move_compartment." if move_compartment_details.nil?
  raise "Parameter value for 'compartment_id' must not be blank" if OCI::Internal::Util.blank_string?(compartment_id)

  path = '/compartments/{compartmentId}/actions/moveCompartment'.sub('{compartmentId}', compartment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(move_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#move_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#recover_compartment(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use recover_compartment API.

Recover the compartment from DELETED state to ACTIVE state.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
# File 'lib/oci/identity/identity_client.rb', line 8245

def recover_compartment(compartment_id, opts = {})
  logger.debug 'Calling operation IdentityClient#recover_compartment.' if logger

  raise "Missing the required parameter 'compartment_id' when calling recover_compartment." if compartment_id.nil?
  raise "Parameter value for 'compartment_id' must not be blank" if OCI::Internal::Util.blank_string?(compartment_id)

  path = '/compartments/{compartmentId}/actions/recoverCompartment'.sub('{compartmentId}', compartment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#recover_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::Compartment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#remove_tag_default_lock(tag_default_id, remove_lock_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use remove_tag_default_lock API.

Remove a resource lock from a tag default.

Parameters:

  • tag_default_id (String)

    The OCID of the tag default.

  • remove_lock_details (OCI::Identity::Models::RemoveLockDetails)

    Lock that is going to be removed from resource

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
# File 'lib/oci/identity/identity_client.rb', line 8314

def remove_tag_default_lock(tag_default_id, remove_lock_details, opts = {})
  logger.debug 'Calling operation IdentityClient#remove_tag_default_lock.' if logger

  raise "Missing the required parameter 'tag_default_id' when calling remove_tag_default_lock." if tag_default_id.nil?
  raise "Missing the required parameter 'remove_lock_details' when calling remove_tag_default_lock." if remove_lock_details.nil?
  raise "Parameter value for 'tag_default_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_default_id)

  path = '/tagDefaults/{tagDefaultId}/actions/removeLock'.sub('{tagDefaultId}', tag_default_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(remove_lock_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#remove_tag_default_lock') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::TagDefault'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#remove_tag_namespace_lock(tag_namespace_id, remove_lock_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use remove_tag_namespace_lock API.

Remove a resource lock from a tag namespace.

Parameters:

  • tag_namespace_id (String)

    The OCID of the tag namespace.

  • remove_lock_details (OCI::Identity::Models::RemoveLockDetails)

    Lock that is going to be removed from resource

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
# File 'lib/oci/identity/identity_client.rb', line 8387

def remove_tag_namespace_lock(tag_namespace_id, remove_lock_details, opts = {})
  logger.debug 'Calling operation IdentityClient#remove_tag_namespace_lock.' if logger

  raise "Missing the required parameter 'tag_namespace_id' when calling remove_tag_namespace_lock." if tag_namespace_id.nil?
  raise "Missing the required parameter 'remove_lock_details' when calling remove_tag_namespace_lock." if remove_lock_details.nil?
  raise "Parameter value for 'tag_namespace_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_namespace_id)

  path = '/tagNamespaces/{tagNamespaceId}/actions/removeLock'.sub('{tagNamespaceId}', tag_namespace_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(remove_lock_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#remove_tag_namespace_lock') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::TagNamespace'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#remove_user_from_group(user_group_membership_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use remove_user_from_group API.

Removes a user from a group by deleting the corresponding UserGroupMembership.

Parameters:

  • user_group_membership_id (String)

    The OCID of the userGroupMembership.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
# File 'lib/oci/identity/identity_client.rb', line 8448

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?
  raise "Parameter value for 'user_group_membership_id' must not be blank" if OCI::Internal::Util.blank_string?(user_group_membership_id)

  path = '/userGroupMemberships/{userGroupMembershipId}'.sub('{userGroupMembershipId}', user_group_membership_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#remove_user_from_group') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#reset_idp_scim_client(identity_provider_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use reset_idp_scim_client API.

Resets the OAuth2 client credentials for the SCIM client associated with this identity provider.

Parameters:

  • identity_provider_id (String)

    The OCID of the identity provider.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

Returns:



8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
# File 'lib/oci/identity/identity_client.rb', line 8502

def reset_idp_scim_client(identity_provider_id, opts = {})
  logger.debug 'Calling operation IdentityClient#reset_idp_scim_client.' if logger

  raise "Missing the required parameter 'identity_provider_id' when calling reset_idp_scim_client." if identity_provider_id.nil?
  raise "Parameter value for 'identity_provider_id' must not be blank" if OCI::Internal::Util.blank_string?(identity_provider_id)

  path = '/identityProviders/{identityProviderId}/actions/resetScimClient/'.sub('{identityProviderId}', identity_provider_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#reset_idp_scim_client') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::ScimClientCredentials'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_auth_token(user_id, auth_token_id, update_auth_token_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_auth_token API.

Updates the specified auth token's description.

Parameters:

  • user_id (String)

    The OCID of the user.

  • auth_token_id (String)

    The OCID of the auth token.

  • update_auth_token_details (OCI::Identity::Models::UpdateAuthTokenDetails)

    Request object for updating an auth token.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:



8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
# File 'lib/oci/identity/identity_client.rb', line 8562

def update_auth_token(user_id, auth_token_id, update_auth_token_details, opts = {})
  logger.debug 'Calling operation IdentityClient#update_auth_token.' if logger

  raise "Missing the required parameter 'user_id' when calling update_auth_token." if user_id.nil?
  raise "Missing the required parameter 'auth_token_id' when calling update_auth_token." if auth_token_id.nil?
  raise "Missing the required parameter 'update_auth_token_details' when calling update_auth_token." if update_auth_token_details.nil?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)
  raise "Parameter value for 'auth_token_id' must not be blank" if OCI::Internal::Util.blank_string?(auth_token_id)

  path = '/users/{userId}/authTokens/{authTokenId}'.sub('{userId}', user_id.to_s).sub('{authTokenId}', auth_token_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_auth_token_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_auth_token') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::AuthToken'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_authentication_policy(compartment_id, update_authentication_policy_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_authentication_policy API.

Updates authentication policy for the specified tenancy.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:



8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
# File 'lib/oci/identity/identity_client.rb', line 8624

def update_authentication_policy(compartment_id, update_authentication_policy_details, opts = {})
  logger.debug 'Calling operation IdentityClient#update_authentication_policy.' if logger

  raise "Missing the required parameter 'compartment_id' when calling update_authentication_policy." if compartment_id.nil?
  raise "Missing the required parameter 'update_authentication_policy_details' when calling update_authentication_policy." if update_authentication_policy_details.nil?
  raise "Parameter value for 'compartment_id' must not be blank" if OCI::Internal::Util.blank_string?(compartment_id)

  path = '/authenticationPolicies/{compartmentId}'.sub('{compartmentId}', compartment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_authentication_policy_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_authentication_policy') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::AuthenticationPolicy'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_compartment(compartment_id, update_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_compartment API.

Updates the specified compartment's description or name. You can't update the root compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • update_compartment_details (OCI::Identity::Models::UpdateCompartmentDetails)

    Request object for updating a compartment.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:



8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
# File 'lib/oci/identity/identity_client.rb', line 8683

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?
  raise "Parameter value for 'compartment_id' must not be blank" if OCI::Internal::Util.blank_string?(compartment_id)

  path = '/compartments/{compartmentId}'.sub('{compartmentId}', compartment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_compartment') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::Compartment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_customer_secret_key(user_id, customer_secret_key_id, update_customer_secret_key_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_customer_secret_key API.

Updates the specified secret key's description.

Parameters:

  • user_id (String)

    The OCID of the user.

  • customer_secret_key_id (String)

    The access token of the secret key.

  • update_customer_secret_key_details (OCI::Identity::Models::UpdateCustomerSecretKeyDetails)

    Request object for updating a secret key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:



8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
# File 'lib/oci/identity/identity_client.rb', line 8744

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)
  raise "Parameter value for 'customer_secret_key_id' must not be blank" if OCI::Internal::Util.blank_string?(customer_secret_key_id)

  path = '/users/{userId}/customerSecretKeys/{customerSecretKeyId}'.sub('{userId}', user_id.to_s).sub('{customerSecretKeyId}', customer_secret_key_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_customer_secret_key_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_customer_secret_key') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::CustomerSecretKeySummary'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_domain(domain_id, update_domain_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_domain API.

(For tenancies that support identity domains) Updates identity domain information and the associated Identity Cloud Service (IDCS) stripe.

To track the progress of the request, submitting an HTTP GET on the /iamWorkRequests/iamWorkRequestsId endpoint retrieves the operation's status.

Parameters:

  • domain_id (String)

    The OCID of the identity domain.

  • update_domain_details (OCI::Identity::Models::UpdateDomainDetails)

    Request object for updating the identity domain.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
# File 'lib/oci/identity/identity_client.rb', line 8812

def update_domain(domain_id, update_domain_details, opts = {})
  logger.debug 'Calling operation IdentityClient#update_domain.' if logger

  raise "Missing the required parameter 'domain_id' when calling update_domain." if domain_id.nil?
  raise "Missing the required parameter 'update_domain_details' when calling update_domain." if update_domain_details.nil?
  raise "Parameter value for 'domain_id' must not be blank" if OCI::Internal::Util.blank_string?(domain_id)

  path = '/domains/{domainId}'.sub('{domainId}', domain_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_domain_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_domain') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_dynamic_group(dynamic_group_id, update_dynamic_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_dynamic_group API.

Updates the specified dynamic group.

Parameters:

  • dynamic_group_id (String)

    The OCID of the dynamic group.

  • update_dynamic_group_details (OCI::Identity::Models::UpdateDynamicGroupDetails)

    Request object for updating an dynamic group.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:



8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
# File 'lib/oci/identity/identity_client.rb', line 8871

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?
  raise "Parameter value for 'dynamic_group_id' must not be blank" if OCI::Internal::Util.blank_string?(dynamic_group_id)

  path = '/dynamicGroups/{dynamicGroupId}'.sub('{dynamicGroupId}', dynamic_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_dynamic_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_dynamic_group') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::DynamicGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_group(group_id, update_group_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_group API.

Updates the specified group.

Parameters:

  • group_id (String)

    The OCID of the group.

  • update_group_details (OCI::Identity::Models::UpdateGroupDetails)

    Request object for updating a group.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:



8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
# File 'lib/oci/identity/identity_client.rb', line 8930

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?
  raise "Parameter value for 'group_id' must not be blank" if OCI::Internal::Util.blank_string?(group_id)

  path = '/groups/{groupId}'.sub('{groupId}', group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_group') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::Group'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_identity_provider(identity_provider_id, update_identity_provider_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_identity_provider API.

Deprecated. For more information, see Deprecated IAM Service APIs.

Updates the specified identity provider.

Parameters:

  • identity_provider_id (String)

    The OCID of the identity provider.

  • update_identity_provider_details (OCI::Identity::Models::UpdateIdentityProviderDetails)

    Request object for updating a identity provider.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:



8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
# File 'lib/oci/identity/identity_client.rb', line 8992

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?
  raise "Parameter value for 'identity_provider_id' must not be blank" if OCI::Internal::Util.blank_string?(identity_provider_id)

  path = '/identityProviders/{identityProviderId}'.sub('{identityProviderId}', identity_provider_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_identity_provider_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_identity_provider') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::IdentityProvider'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_idp_group_mapping(identity_provider_id, mapping_id, update_idp_group_mapping_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_idp_group_mapping API.

Deprecated. For more information, see Deprecated IAM Service APIs.

Updates the specified group mapping.

Parameters:

  • identity_provider_id (String)

    The OCID of the identity provider.

  • mapping_id (String)

    The OCID of the group mapping.

  • update_idp_group_mapping_details (OCI::Identity::Models::UpdateIdpGroupMappingDetails)

    Request object for updating an identity provider group mapping

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:



9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
# File 'lib/oci/identity/identity_client.rb', line 9055

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?
  raise "Parameter value for 'identity_provider_id' must not be blank" if OCI::Internal::Util.blank_string?(identity_provider_id)
  raise "Parameter value for 'mapping_id' must not be blank" if OCI::Internal::Util.blank_string?(mapping_id)

  path = '/identityProviders/{identityProviderId}/groupMappings/{mappingId}'.sub('{identityProviderId}', identity_provider_id.to_s).sub('{mappingId}', mapping_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_idp_group_mapping_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_idp_group_mapping') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::IdpGroupMapping'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_network_source(network_source_id, update_network_source_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_network_source API.

Updates the specified network source.

Parameters:

  • network_source_id (String)

    The OCID of the network source.

  • update_network_source_details (OCI::Identity::Models::UpdateNetworkSourceDetails)

    Request object for updating a network source.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:



9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
# File 'lib/oci/identity/identity_client.rb', line 9117

def update_network_source(network_source_id, update_network_source_details, opts = {})
  logger.debug 'Calling operation IdentityClient#update_network_source.' if logger

  raise "Missing the required parameter 'network_source_id' when calling update_network_source." if network_source_id.nil?
  raise "Missing the required parameter 'update_network_source_details' when calling update_network_source." if update_network_source_details.nil?
  raise "Parameter value for 'network_source_id' must not be blank" if OCI::Internal::Util.blank_string?(network_source_id)

  path = '/networkSources/{networkSourceId}'.sub('{networkSourceId}', network_source_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_network_source_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_network_source') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::NetworkSources'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_o_auth_client_credential(user_id, oauth2_client_credential_id, update_o_auth2_client_credential_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_o_auth_client_credential API.

Updates Oauth token for the user

Parameters:

  • user_id (String)

    The OCID of the user.

  • oauth2_client_credential_id (String)

    The ID of the Oauth credential.

  • update_o_auth2_client_credential_details (OCI::Identity::Models::UpdateOAuth2ClientCredentialDetails)

    Request object containing the information required to generate an Oauth token.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:



9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
# File 'lib/oci/identity/identity_client.rb', line 9178

def update_o_auth_client_credential(user_id, oauth2_client_credential_id, update_o_auth2_client_credential_details, opts = {})
  logger.debug 'Calling operation IdentityClient#update_o_auth_client_credential.' if logger

  raise "Missing the required parameter 'user_id' when calling update_o_auth_client_credential." if user_id.nil?
  raise "Missing the required parameter 'oauth2_client_credential_id' when calling update_o_auth_client_credential." if oauth2_client_credential_id.nil?
  raise "Missing the required parameter 'update_o_auth2_client_credential_details' when calling update_o_auth_client_credential." if update_o_auth2_client_credential_details.nil?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)
  raise "Parameter value for 'oauth2_client_credential_id' must not be blank" if OCI::Internal::Util.blank_string?(oauth2_client_credential_id)

  path = '/users/{userId}/oauth2ClientCredentials/{oauth2ClientCredentialId}'.sub('{userId}', user_id.to_s).sub('{oauth2ClientCredentialId}', oauth2_client_credential_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_o_auth2_client_credential_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_o_auth_client_credential') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::OAuth2ClientCredential'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_policy(policy_id, update_policy_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_policy API.

Updates the specified policy. You can update the description or the policy statements themselves.

Policy changes take effect typically within 10 seconds.

Parameters:

  • policy_id (String)

    The OCID of the policy.

  • update_policy_details (OCI::Identity::Models::UpdatePolicyDetails)

    Request object for updating a policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:



9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
# File 'lib/oci/identity/identity_client.rb', line 9242

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?
  raise "Parameter value for 'policy_id' must not be blank" if OCI::Internal::Util.blank_string?(policy_id)

  path = '/policies/{policyId}'.sub('{policyId}', policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_policy_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_policy') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::Policy'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_smtp_credential(user_id, smtp_credential_id, update_smtp_credential_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_smtp_credential API.

Updates the specified SMTP credential's description.

Parameters:

  • user_id (String)

    The OCID of the user.

  • smtp_credential_id (String)

    The OCID of the SMTP credential.

  • update_smtp_credential_details (OCI::Identity::Models::UpdateSmtpCredentialDetails)

    Request object for updating a SMTP credential.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:



9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
# File 'lib/oci/identity/identity_client.rb', line 9303

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)
  raise "Parameter value for 'smtp_credential_id' must not be blank" if OCI::Internal::Util.blank_string?(smtp_credential_id)

  path = '/users/{userId}/smtpCredentials/{smtpCredentialId}'.sub('{userId}', user_id.to_s).sub('{smtpCredentialId}', smtp_credential_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_smtp_credential_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_smtp_credential') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::SmtpCredentialSummary'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_swift_password(user_id, swift_password_id, update_swift_password_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_swift_password API.

Deprecated. Use update_auth_token instead.

Updates the specified Swift password's description.

Parameters:

  • user_id (String)

    The OCID of the user.

  • swift_password_id (String)

    The OCID of the Swift password.

  • update_swift_password_details (OCI::Identity::Models::UpdateSwiftPasswordDetails)

    Request object for updating a Swift password.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:



9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
# File 'lib/oci/identity/identity_client.rb', line 9368

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)
  raise "Parameter value for 'swift_password_id' must not be blank" if OCI::Internal::Util.blank_string?(swift_password_id)

  path = '/users/{userId}/swiftPasswords/{swiftPasswordId}'.sub('{userId}', user_id.to_s).sub('{swiftPasswordId}', swift_password_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_swift_password_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_swift_password') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::SwiftPassword'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_tag(tag_namespace_id, tag_name, update_tag_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_tag API.

Updates the specified tag definition.

Setting validator determines the value type. Tags can use either a static value or a list of possible values. Static values are entered by a user applying the tag to a resource. Lists are created by you and the user must apply a value from the list. On update, any values in a list that were previously set do not change, but new values must pass validation. Values already applied to a resource do not change.

You cannot remove list values that appear in a TagDefault. To remove a list value that appears in a TagDefault, first update the TagDefault to use a different value.

Parameters:

  • tag_namespace_id (String)

    The OCID of the tag namespace.

  • tag_name (String)

    The name of the tag.

  • update_tag_details (OCI::Identity::Models::UpdateTagDetails)

    Request object for updating a tag.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :is_lock_override (BOOLEAN)

    Whether to override locks (if any exist). (default to false)

Returns:

  • (Response)

    A Response object with data of type Tag



9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
# File 'lib/oci/identity/identity_client.rb', line 9443

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?
  raise "Parameter value for 'tag_namespace_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_namespace_id)
  raise "Parameter value for 'tag_name' must not be blank" if OCI::Internal::Util.blank_string?(tag_name)

  path = '/tagNamespaces/{tagNamespaceId}/tags/{tagName}'.sub('{tagNamespaceId}', tag_namespace_id.to_s).sub('{tagName}', tag_name.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:isLockOverride] = opts[:is_lock_override] if !opts[:is_lock_override].nil?

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_tag_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_tag') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::Tag'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_tag_default(tag_default_id, update_tag_default_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_tag_default API.

Updates the specified tag default. If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.

  • If the isRequired flag is set to "true", the value is set during resource creation.

  • If the isRequired flag is set to "false", the value you enter is set during resource creation.

Parameters:

  • tag_default_id (String)

    The OCID of the tag default.

  • update_tag_default_details (OCI::Identity::Models::UpdateTagDefaultDetails)

    Request object for updating a tag default.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :is_lock_override (BOOLEAN)

    Whether to override locks (if any exist). (default to false)

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
# File 'lib/oci/identity/identity_client.rb', line 9515

def update_tag_default(tag_default_id, update_tag_default_details, opts = {})
  logger.debug 'Calling operation IdentityClient#update_tag_default.' if logger

  raise "Missing the required parameter 'tag_default_id' when calling update_tag_default." if tag_default_id.nil?
  raise "Missing the required parameter 'update_tag_default_details' when calling update_tag_default." if update_tag_default_details.nil?
  raise "Parameter value for 'tag_default_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_default_id)

  path = '/tagDefaults/{tagDefaultId}'.sub('{tagDefaultId}', tag_default_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:isLockOverride] = opts[:is_lock_override] if !opts[:is_lock_override].nil?

  # 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]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_tag_default_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_tag_default') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::TagDefault'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_tag_namespace(tag_namespace_id, update_tag_namespace_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_tag_namespace API.

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 individually after you reactivate the namespace, using #update_tag update_tag}. For more information about retiring tag namespaces, see {Retiring Key Definitions and Namespace Definitions.

You can't add a namespace with the same name as a retired namespace in the same tenancy.

Parameters:

  • tag_namespace_id (String)

    The OCID of the tag namespace.

  • update_tag_namespace_details (OCI::Identity::Models::UpdateTagNamespaceDetails)

    Request object for updating a namespace.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :is_lock_override (BOOLEAN)

    Whether to override locks (if any exist). (default to false)

Returns:



9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
# File 'lib/oci/identity/identity_client.rb', line 9583

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?
  raise "Parameter value for 'tag_namespace_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_namespace_id)

  path = '/tagNamespaces/{tagNamespaceId}'.sub('{tagNamespaceId}', tag_namespace_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:isLockOverride] = opts[:is_lock_override] if !opts[:is_lock_override].nil?

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_tag_namespace_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_tag_namespace') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::TagNamespace'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_user(user_id, update_user_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_user API.

Updates the description of the specified user.

Parameters:

  • user_id (String)

    The OCID of the user.

  • update_user_details (OCI::Identity::Models::UpdateUserDetails)

    Request object for updating a user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:



9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
# File 'lib/oci/identity/identity_client.rb', line 9642

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_user_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_user') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::User'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_user_capabilities(user_id, update_user_capabilities_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_user_capabilities API.

Updates the capabilities of the specified user.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:



9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
# File 'lib/oci/identity/identity_client.rb', line 9702

def update_user_capabilities(user_id, update_user_capabilities_details, opts = {})
  logger.debug 'Calling operation IdentityClient#update_user_capabilities.' if logger

  raise "Missing the required parameter 'user_id' when calling update_user_capabilities." if user_id.nil?
  raise "Missing the required parameter 'update_user_capabilities_details' when calling update_user_capabilities." if update_user_capabilities_details.nil?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/capabilities/'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_user_capabilities_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_user_capabilities') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::User'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_user_state(user_id, update_state_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_user_state API.

Updates the state of the specified user.

Parameters:

  • user_id (String)

    The OCID of the user.

  • update_state_details (OCI::Identity::Models::UpdateStateDetails)

    Request object for updating a user state.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:



9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
# File 'lib/oci/identity/identity_client.rb', line 9762

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/state/'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_state_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_user_state') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::User'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#upload_api_key(user_id, create_api_key_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use upload_api_key API.

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.

Parameters:

  • user_id (String)

    The OCID of the user.

  • create_api_key_details (OCI::Identity::Models::CreateApiKeyDetails)

    Request object for uploading an API key for a user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
# File 'lib/oci/identity/identity_client.rb', line 9838

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?
  raise "Parameter value for 'user_id' must not be blank" if OCI::Internal::Util.blank_string?(user_id)

  path = '/users/{userId}/apiKeys/'.sub('{userId}', user_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_api_key_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#upload_api_key') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Identity::Models::ApiKey'
    )
  end
  # rubocop:enable Metrics/BlockLength
end