Class: OCI::Identity::IdentityClient

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

Overview

APIs for managing users, groups, compartments, and policies.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

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

A region must be specified in either the config or the region parameter. If specified in both, then the region parameter will be used.

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.

  • 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



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

def initialize(config: nil, region: nil, signer: nil, proxy_settings: nil, retry_config: nil)
  # If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals)
  # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
  # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
  # pass it to this constructor.
  #
  # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
  # so try and load the config from the default file.
  config ||= OCI.config unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
  config ||= OCI::Config.new if signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
  config.validate unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)

  if signer.nil?
    signer = OCI::Signer.new(
      config.user,
      config.fingerprint,
      config.tenancy,
      config.key_file,
      pass_phrase: config.pass_phrase,
      private_key_content: config.key_content
    )
  end

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

  region ||= config.region
  region ||= signer.region if signer.respond_to?(:region)
  self.region = region
end

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



12
13
14
# File 'lib/oci/identity/identity_client.rb', line 12

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


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

def endpoint
  @endpoint
end

#regionString

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

Returns:

  • (String)


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

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



22
23
24
# File 'lib/oci/identity/identity_client.rb', line 22

def retry_config
  @retry_config
end

Instance Method Details

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

Adds the specified user to the specified group and returns a ‘UserGroupMembership` object with its own OCID.

After you send your request, the new object’s ‘lifecycleState` will temporarily be CREATING. Before using the object, first make sure its `lifecycleState` has changed to ACTIVE.

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:



118
119
120
121
122
123
124
125
126
127
128
129
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
# File 'lib/oci/identity/identity_client.rb', line 118

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

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

Creates a new auth token for the specified user. For information about what auth tokens are for, see [Managing User Credentials](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm).

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:



187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# File 'lib/oci/identity/identity_client.rb', line 187

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

Creates a new compartment in your tenancy.

Important: Compartments cannot be deleted.

You must specify your tenancy’s OCID as the compartment ID in the request object. Remember that the tenancy is simply the root compartment. For information about OCIDs, see [Resource Identifiers](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).

You must also specify a name for the compartment, which must be unique across all compartments in your tenancy. You can use this name or the OCID when writing policies that apply to the compartment. For more information about policies, see [How Policies Work](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm).

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

After you send your request, the new object’s ‘lifecycleState` will temporarily be CREATING. Before using the object, first make sure its `lifecycleState` has changed to ACTIVE.

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:



266
267
268
269
270
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
# File 'lib/oci/identity/identity_client.rb', line 266

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

Creates a new secret key for the specified user. Secret keys are used for authentication with the Object Storage Service’s Amazon S3 compatible API. For information, see [Managing User Credentials](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm).

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

Every user has permission to create a secret key for *their own user ID*. An administrator in your organization does not need to write a policy to give users this ability. To compare, administrators who have permission to the tenancy can use this operation to create a secret key for any user, including themselves.

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:



336
337
338
339
340
341
342
343
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
# File 'lib/oci/identity/identity_client.rb', line 336

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_dynamic_group(create_dynamic_group_details, opts = {}) ⇒ Response

Creates a new dynamic group in your tenancy.

You must specify your tenancy’s OCID as the compartment ID in the request object (remember that the tenancy is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies) reside within the tenancy itself, unlike cloud resources such as compute instances, which typically reside within compartments inside the tenancy. For information about OCIDs, see [Resource Identifiers](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).

You must also specify a name for the dynamic group, which must be unique across all dynamic groups in your tenancy, and cannot be changed. Note that this name has to be also unique accross all groups in your tenancy. You can use this name or the OCID when writing policies that apply to the dynamic group. For more information about policies, see [How Policies Work](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm).

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

After you send your request, the new object’s ‘lifecycleState` will temporarily be CREATING. Before using the object, first make sure its `lifecycleState` has changed to ACTIVE.

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:



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
448
449
450
# File 'lib/oci/identity/identity_client.rb', line 414

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

Creates a new group in your tenancy.

You must specify your tenancy’s OCID as the compartment ID in the request object (remember that the tenancy is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies) reside within the tenancy itself, unlike cloud resources such as compute instances, which typically reside within compartments inside the tenancy. For information about OCIDs, see [Resource Identifiers](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).

You must also specify a name for the group, which must be unique across all groups in your tenancy and cannot be changed. You can use this name or the OCID when writing policies that apply to the group. For more information about policies, see [How Policies Work](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm).

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

After you send your request, the new object’s ‘lifecycleState` will temporarily be CREATING. Before using the object, first make sure its `lifecycleState` has changed to ACTIVE.

After creating the group, you need to put users in it and write policies for it. See add_user_to_group and create_policy.

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:



493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
# File 'lib/oci/identity/identity_client.rb', line 493

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

Creates a new identity provider in your tenancy. For more information, see [Identity Providers and Federation](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/federation.htm).

You must specify your tenancy’s OCID as the compartment ID in the request object. Remember that the tenancy is simply the root compartment. For information about OCIDs, see [Resource Identifiers](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).

You must also specify a name for the ‘IdentityProvider`, which must be unique across all `IdentityProvider` objects in your tenancy and cannot be changed.

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

After you send your request, the new object’s ‘lifecycleState` will temporarily be CREATING. Before using the object, first make sure its `lifecycleState` has changed to ACTIVE.

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:



569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
# File 'lib/oci/identity/identity_client.rb', line 569

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

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:



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
667
668
# File 'lib/oci/identity/identity_client.rb', line 630

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_or_reset_ui_password(user_id, opts = {}) ⇒ Response

Creates a new Console one-time password for the specified user. For more information about user credentials, see [User Credentials](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/usercredentials.htm).

Use this operation after creating a new user, or if a user forgets their password. The new one-time password is returned to you in the response, and you must securely deliver it to the user. They’ll be prompted to change this password the next time they sign in to the Console. If they don’t change it within 7 days, the password will expire and you’ll need to create a new one-time password for the user.

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

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:



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

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

Creates a new policy in the specified compartment (either the tenancy or another of your compartments). If you’re new to policies, see [Getting Started with Policies](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).

You must specify a name for the policy, which must be unique across all policies in your tenancy and cannot be changed.

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

You must specify one or more policy statements in the statements array. For information about writing policies, see [How Policies Work](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm) and [Common Policies](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/commonpolicies.htm).

After you send your request, the new object’s ‘lifecycleState` will temporarily be CREATING. Before using the object, first make sure its `lifecycleState` has changed to ACTIVE.

New policies take effect typically within 10 seconds.

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:



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
812
813
# File 'lib/oci/identity/identity_client.rb', line 777

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

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:



837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
# File 'lib/oci/identity/identity_client.rb', line 837

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

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:



902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
# File 'lib/oci/identity/identity_client.rb', line 902

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

**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](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm).

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

Every user has permission to create a Swift password for *their own user ID*. An administrator in your organization does not need to write a policy to give users this ability. To compare, administrators who have permission to the tenancy can use this operation to create a Swift password for any user, including themselves.

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:



975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
# File 'lib/oci/identity/identity_client.rb', line 975

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

Creates a new tag in the specified tag namespace.

You must specify either the OCID or the name of the tag namespace that will contain this tag definition.

You must also specify a name for the tag, which must be unique across all tags in the tag namespace and cannot be changed. The name can contain any ASCII character except the space (_) or period (.) characters. Names are case insensitive. That means, for example, "myTag" and "mytag" are not allowed in the same namespace. If you specify a name that’s already in use in the tag namespace, a 409 error is returned.

You must also specify a description for the tag. It does not have to be unique, and you can change it with update_tag.

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

Returns:

  • (Response)

    A Response object with data of type Tag



1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
# File 'lib/oci/identity/identity_client.rb', line 1049

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 = {}

  # 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_namespace(create_tag_namespace_details, opts = {}) ⇒ Response

Creates a new tag namespace in the specified compartment.

You must specify the compartment ID in the request object (remember that the tenancy is simply the root compartment).

You must also specify a name for the namespace, which must be unique across all namespaces in your tenancy and cannot be changed. The name can contain any ASCII character except the space (_) or period (.). Names are case insensitive. That means, for example, "myNamespace" and "mynamespace" are not allowed in the same tenancy. Once you created a namespace, you cannot change the name. If you specify a name that’s already in use in the tenancy, a 409 error is returned.

You must also specify a description for the namespace. It does not have to be unique, and you can change it with update_tag_namespace.

Tag namespaces cannot be deleted, but they can be retired. See [Retiring Key Definitions and Namespace Definitions](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring) for more information.

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:



1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
# File 'lib/oci/identity/identity_client.rb', line 1126

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

Creates a new user in your tenancy. For conceptual information about users, your tenancy, and other IAM Service components, see [Overview of the IAM Service](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm).

You must specify your tenancy’s OCID as the compartment ID in the request object (remember that the tenancy is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies) reside within the tenancy itself, unlike cloud resources such as compute instances, which typically reside within compartments inside the tenancy. For information about OCIDs, see [Resource Identifiers](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).

You must also specify a name for the user, which must be unique across all users in your tenancy and cannot be changed. Allowed characters: No spaces. Only letters, numerals, hyphens, periods, underscores, +, and @. If you specify a name that’s already in use, you’ll get a 409 error. This name will be the user’s login to the Console. You might want to pick a name that your company’s own identity system (e.g., Active Directory, LDAP, etc.) already uses. If you delete a user and then create a new user with the same name, they’ll be considered different users because they have different OCIDs.

You must also specify a description for the user (although it can be an empty string). It does not have to be unique, and you can change it anytime with update_user. You can use the field to provide the user’s full name, a description, a nickname, or other information to generally identify the user.

After you send your request, the new object’s ‘lifecycleState` will temporarily be CREATING. Before using the object, first make sure its `lifecycleState` has changed to ACTIVE.

A new user has no permissions until you place the user in one or more groups (see add_user_to_group). If the user needs to access the Console, you need to provide the user a password (see create_or_reset_ui_password). If the user needs to access the Oracle Cloud Infrastructure REST API, you need to upload a public API signing key for that user (see [Required Keys and OCIDs](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm) and also upload_api_key).

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

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:



1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
# File 'lib/oci/identity/identity_client.rb', line 1219

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

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

Deletes the specified API signing key for the specified user.

Every user has permission to use this operation to delete a key for *their own user ID*. An administrator in your organization does not need to write a policy to give users this ability. To compare, administrators who have permission to the tenancy can use this operation to delete a key for any user, including themselves.

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



1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
# File 'lib/oci/identity/identity_client.rb', line 1282

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

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



1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
# File 'lib/oci/identity/identity_client.rb', line 1341

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_customer_secret_key(user_id, customer_secret_key_id, opts = {}) ⇒ Response

Deletes the specified secret key for the specified user.

Parameters:

  • user_id (String)

    The OCID of the user.

  • customer_secret_key_id (String)

    The OCID 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



1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
# File 'lib/oci/identity/identity_client.rb', line 1400

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_dynamic_group(dynamic_group_id, opts = {}) ⇒ Response

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



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
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
# File 'lib/oci/identity/identity_client.rb', line 1458

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

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



1514
1515
1516
1517
1518
1519
1520
1521
1522
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
# File 'lib/oci/identity/identity_client.rb', line 1514

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

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



1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
# File 'lib/oci/identity/identity_client.rb', line 1571

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

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



1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
# File 'lib/oci/identity/identity_client.rb', line 1627

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_policy(policy_id, opts = {}) ⇒ Response

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



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
1719
# File 'lib/oci/identity/identity_client.rb', line 1684

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

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



1741
1742
1743
1744
1745
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
# File 'lib/oci/identity/identity_client.rb', line 1741

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

**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



1802
1803
1804
1805
1806
1807
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
# File 'lib/oci/identity/identity_client.rb', line 1802

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_user(user_id, opts = {}) ⇒ Response

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



1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
# File 'lib/oci/identity/identity_client.rb', line 1859

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

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

Gets the specified compartment’s information.

This operation does not return a list of all the resources inside the compartment. There is no single API operation that does that. Compartments can contain multiple types of resources (instances, block storage volumes, etc.). To find out what’s in a compartment, you must call the "List" operation for each resource type and specify the compartment’s OCID as a query parameter in the request. For example, call the list_instances operation in the Cloud Compute Service or the list_volumes operation in Cloud Block Storage.

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:



1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
# File 'lib/oci/identity/identity_client.rb', line 1919

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_dynamic_group(dynamic_group_id, opts = {}) ⇒ Response

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:



1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
# File 'lib/oci/identity/identity_client.rb', line 1973

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

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:



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
2064
2065
2066
# File 'lib/oci/identity/identity_client.rb', line 2031

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_identity_provider(identity_provider_id, opts = {}) ⇒ Response

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:



2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
# File 'lib/oci/identity/identity_client.rb', line 2084

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

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:



2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
# File 'lib/oci/identity/identity_client.rb', line 2138

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_policy(policy_id, opts = {}) ⇒ Response

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:



2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
# File 'lib/oci/identity/identity_client.rb', line 2193

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_tag(tag_namespace_id, tag_name, opts = {}) ⇒ Response

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



2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
# File 'lib/oci/identity/identity_client.rb', line 2249

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_namespace(tag_namespace_id, opts = {}) ⇒ Response

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:



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
# File 'lib/oci/identity/identity_client.rb', line 2306

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_tenancy(tenancy_id, opts = {}) ⇒ Response

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:



2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
# File 'lib/oci/identity/identity_client.rb', line 2359

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

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:



2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
# File 'lib/oci/identity/identity_client.rb', line 2412

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

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:



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 2465

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

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

Lists the API signing keys for the specified user. A user can have a maximum of three keys.

Every user has permission to use this API call for *their own user ID*. An administrator in your organization does not need to write a policy to give users this ability.

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:



2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
# File 'lib/oci/identity/identity_client.rb', line 2522

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

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:



2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
# File 'lib/oci/identity/identity_client.rb', line 2577

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

Lists the availability domains in your tenancy. Specify the OCID of either the tenancy or another of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment). See [Where to Get the Tenancy’s OCID and User’s OCID](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). 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:



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
2668
2669
2670
2671
# File 'lib/oci/identity/identity_client.rb', line 2636

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_compartments(compartment_id, opts = {}) ⇒ Response

Lists the compartments in your tenancy. You must specify your tenancy’s OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See [Where to Get the Tenancy’s OCID and User’s OCID](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).

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:



2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
# File 'lib/oci/identity/identity_client.rb', line 2696

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

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

  path = '/compartments/'
  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_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_customer_secret_keys(user_id, opts = {}) ⇒ Response

Lists the secret keys for the specified user. The returned object contains the secret key’s OCID, but not the secret key itself. The actual secret key is returned only upon creation.

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:



2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
# File 'lib/oci/identity/identity_client.rb', line 2752

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_dynamic_groups(compartment_id, opts = {}) ⇒ Response

Lists the dynamic groups in your tenancy. You must specify your tenancy’s OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See [Where to Get the Tenancy’s OCID and User’s OCID](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).

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:



2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
# File 'lib/oci/identity/identity_client.rb', line 2812

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

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

  path = '/dynamicGroups/'
  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_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

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](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).

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

  • 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:



2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
# File 'lib/oci/identity/identity_client.rb', line 2872

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

Lists the groups in your tenancy. You must specify your tenancy’s OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See [Where to Get the Tenancy’s OCID and User’s OCID](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).

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<Group>



2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
# File 'lib/oci/identity/identity_client.rb', line 2934

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

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

  path = '/groups/'
  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_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_identity_providers(protocol, compartment_id, opts = {}) ⇒ Response

Lists all the identity providers in your tenancy. You must specify the identity provider type (e.g., ‘SAML2` for identity providers using the SAML2.0 protocol). You must specify your tenancy’s OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See [Where to Get the Tenancy’s OCID and User’s OCID](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).

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.

Returns:



2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
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
# File 'lib/oci/identity/identity_client.rb', line 2998

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?

  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]

  # 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

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:



3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
# File 'lib/oci/identity/identity_client.rb', line 3061

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_policies(compartment_id, opts = {}) ⇒ Response

Lists the policies in the specified compartment (either the tenancy or another of your compartments). See [Where to Get the Tenancy’s OCID and User’s OCID](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).

To determine which policies apply to a particular group or compartment, you must view the individual statements inside all your policies. There isn’t a way to automatically obtain that information via the API.

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:



3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
# File 'lib/oci/identity/identity_client.rb', line 3124

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

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

  path = '/policies/'
  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_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

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:



3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
# File 'lib/oci/identity/identity_client.rb', line 3178

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

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:



3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
# File 'lib/oci/identity/identity_client.rb', line 3230

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

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:



3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
# File 'lib/oci/identity/identity_client.rb', line 3283

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_swift_passwords(user_id, opts = {}) ⇒ Response

**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:



3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
# File 'lib/oci/identity/identity_client.rb', line 3340

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_namespaces(compartment_id, opts = {}) ⇒ Response

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.

Returns:



3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
# File 'lib/oci/identity/identity_client.rb', line 3401

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

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

  path = '/tagNamespaces'
  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?

  # 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_tags(tag_namespace_id, opts = {}) ⇒ Response

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.

Returns:



3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
# File 'lib/oci/identity/identity_client.rb', line 3461

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?
  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]

  # 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

Lists the ‘UserGroupMembership` objects in your tenancy. You must specify your tenancy’s OCID as the value for the compartment ID (see [Where to Get the Tenancy’s OCID and User’s OCID](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five)). You must also then filter the list in one of these ways:

  • You can limit the results to just the memberships for a given user by specifying a ‘userId`.

  • Similarly, you can limit the results to just the memberships for a given group by specifying a ‘groupId`.

  • You can set both the ‘userId` and `groupId` to determine if the specified user is in the specified group.

If the answer is no, the response is an empty list.

  • Although`userId` and ‘groupId` are not indvidually required, you must set one of them.

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:



3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
# File 'lib/oci/identity/identity_client.rb', line 3531

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

Lists the users in your tenancy. You must specify your tenancy’s OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See [Where to Get the Tenancy’s OCID and User’s OCID](docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).

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<User>



3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
# File 'lib/oci/identity/identity_client.rb', line 3594

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

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

  path = '/users/'
  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_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

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



93
94
95
# File 'lib/oci/identity/identity_client.rb', line 93

def logger
  @api_client.config.logger
end

#remove_user_from_group(user_group_membership_id, opts = {}) ⇒ Response

Removes a user from a group by deleting the corresponding ‘UserGroupMembership`.

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



3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
# File 'lib/oci/identity/identity_client.rb', line 3651

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

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

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:



3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
# File 'lib/oci/identity/identity_client.rb', line 3709

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_compartment(compartment_id, update_compartment_details, opts = {}) ⇒ Response

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:



3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
# File 'lib/oci/identity/identity_client.rb', line 3769

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

Updates the specified secret key’s description.

Parameters:

  • user_id (String)

    The OCID of the user.

  • customer_secret_key_id (String)

    The OCID 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:



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
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
# File 'lib/oci/identity/identity_client.rb', line 3829

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_dynamic_group(dynamic_group_id, update_dynamic_group_details, opts = {}) ⇒ Response

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:



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
3925
3926
# File 'lib/oci/identity/identity_client.rb', line 3889

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

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:



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
3981
3982
3983
3984
# File 'lib/oci/identity/identity_client.rb', line 3947

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

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:



4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
# File 'lib/oci/identity/identity_client.rb', line 4005

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

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:



4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
# File 'lib/oci/identity/identity_client.rb', line 4064

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_policy(policy_id, update_policy_details, opts = {}) ⇒ Response

Updates the specified policy. You can update the description or the policy statements themselves.

Policy changes take effect typically within 10 seconds.

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:



4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
# File 'lib/oci/identity/identity_client.rb', line 4127

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

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:



4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
# File 'lib/oci/identity/identity_client.rb', line 4187

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

**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:



4251
4252
4253
4254
4255
4256
4257
4258
4259
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
# File 'lib/oci/identity/identity_client.rb', line 4251

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

Updates the the specified tag definition. You can update ‘description`, and `isRetired`.

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

Returns:

  • (Response)

    A Response object with data of type Tag



4312
4313
4314
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 4312

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 = {}

  # 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_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_namespace(tag_namespace_id, update_tag_namespace_details, opts = {}) ⇒ Response

Updates the the specified tag namespace. You can’t update the namespace name.

Updating ‘isRetired` to ’true’ retires the namespace and all the tag definitions in the namespace. Reactivating a namespace (changing ‘isRetired` from ’true’ to ‘false’) does not reactivate tag definitions. To reactivate the tag definitions, you must reactivate each one indvidually after you reactivate the namespace, using update_tag. For more information about retiring tag namespaces, see [Retiring Key Definitions and Namespace Definitions](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/taggingoverview.htm#Retiring).

You can’t add a namespace with the same name as a retired namespace in the same tenancy.

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

Returns:



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
4410
4411
4412
4413
4414
4415
# File 'lib/oci/identity/identity_client.rb', line 4379

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 = {}

  # 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

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:



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
4468
4469
4470
4471
4472
4473
4474
# File 'lib/oci/identity/identity_client.rb', line 4437

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_state(user_id, update_state_details, opts = {}) ⇒ Response

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:



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
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
# File 'lib/oci/identity/identity_client.rb', line 4496

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

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:



4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
# File 'lib/oci/identity/identity_client.rb', line 4571

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