Class: OCI::DelegateAccessControl::DelegateAccessControlClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/delegate_access_control/delegate_access_control_client.rb

Overview

Oracle Delegate Access Control allows ExaCC and ExaCS customers to delegate management of their Exadata resources operators outside their tenancies. With Delegate Access Control, Support Providers can deliver managed services using comprehensive and robust tooling built on the OCI platform. Customers maintain control over who has access to the delegated resources in their tenancy and what actions can be taken. Enterprises managing resources across multiple tenants can use Delegate Access Control to streamline management tasks. Using logging service, customers can view a near real-time audit report of all actions performed by a Service Provider operator.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

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

This client is not thread-safe

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

Parameters:

  • config (Config) (defaults to: nil)

    A Config object.

  • region (String) (defaults to: nil)

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

  • endpoint (String) (defaults to: nil)

    The fully qualified endpoint URL

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

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

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

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

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

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



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 59

def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
  # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers)
  # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
  # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
  # pass it to this constructor.
  #
  # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
  # so try and load the config from the default file.
  config = OCI::Config.validate_and_build_config_with_signer(config, signer)

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

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

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

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



19
20
21
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 19

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


23
24
25
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 23

def endpoint
  @endpoint
end

#regionString

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

Returns:

  • (String)


33
34
35
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 33

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



29
30
31
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 29

def retry_config
  @retry_config
end

Instance Method Details

#approve_delegated_resource_access_request(delegated_resource_access_request_id, approve_delegated_resource_access_request_details, opts = {}) ⇒ Response

Note:

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

Approves a Delegated Resource Access Request.

Parameters:

  • delegated_resource_access_request_id (String)

    Unique Delegated Resource Access Request identifier

  • approve_delegated_resource_access_request_details (OCI::DelegateAccessControl::Models::ApproveDelegatedResourceAccessRequestDetails)

    Details regarding the approval of a Delegated Resource Access Request created by the support operator.

  • 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. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 129

def approve_delegated_resource_access_request(delegated_resource_access_request_id, approve_delegated_resource_access_request_details, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#approve_delegated_resource_access_request.' if logger

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

  path = '/delegatedResourceAccessRequests/{delegatedResourceAccessRequestId}/actions/approve'.sub('{delegatedResourceAccessRequestId}', delegated_resource_access_request_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(approve_delegated_resource_access_request_details)

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

#change_delegation_control_compartment(delegation_control_id, change_delegation_control_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves the Delegation Control resource into a different compartment. When provided, 'If-Match' is checked against 'ETag' values of the resource.

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. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 200

def change_delegation_control_compartment(delegation_control_id, change_delegation_control_compartment_details, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#change_delegation_control_compartment.' if logger

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

  path = '/delegationControls/{delegationControlId}/actions/changeCompartment'.sub('{delegationControlId}', delegation_control_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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_delegation_control_compartment_details)

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

#change_delegation_subscription_compartment(delegation_subscription_id, change_delegation_subscription_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves the Delegation Subscription resource into a different compartment. When provided, 'If-Match' is checked against 'ETag' values of the resource.

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. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



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

def change_delegation_subscription_compartment(delegation_subscription_id, change_delegation_subscription_compartment_details, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#change_delegation_subscription_compartment.' if logger

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

  path = '/delegationSubscriptions/{delegationSubscriptionId}/actions/changeCompartment'.sub('{delegationSubscriptionId}', delegation_subscription_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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_delegation_subscription_compartment_details)

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

#create_delegation_control(create_delegation_control_details, opts = {}) ⇒ Response

Note:

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

Creates a Delegation Control.

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. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



335
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
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 335

def create_delegation_control(create_delegation_control_details, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#create_delegation_control.' if logger

  raise "Missing the required parameter 'create_delegation_control_details' when calling create_delegation_control." if create_delegation_control_details.nil?

  path = '/delegationControls'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_delegation_control_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#create_delegation_control') 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::DelegateAccessControl::Models::DelegationControl'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_delegation_subscription(create_delegation_subscription_details, opts = {}) ⇒ Response

Note:

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

Creates Delegation Subscription in Delegation Control.

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. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 397

def create_delegation_subscription(create_delegation_subscription_details, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#create_delegation_subscription.' if logger

  raise "Missing the required parameter 'create_delegation_subscription_details' when calling create_delegation_subscription." if create_delegation_subscription_details.nil?

  path = '/delegationSubscriptions'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_delegation_subscription_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#create_delegation_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::DelegateAccessControl::Models::DelegationSubscription'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_delegation_control(delegation_control_id, opts = {}) ⇒ Response

Note:

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

Deletes a Delegation Control. You cannot delete a Delegation Control if it is assigned to govern any target resource currently or in the future. In that case, first, delete all of the current and future assignments before deleting the Delegation Control. A Delegation Control that was previously assigned to a target resource is marked as DELETED following a successful deletion. However, it is not completely deleted from the system. This is to ensure auditing information for the accesses done under the Delegation Control is preserved for future needs. The system purges the deleted Delegation Control only when all of the audit data associated with the Delegation Control are also deleted. Therefore, you cannot reuse the name of the deleted Delegation Control until the system purges the Delegation Control.

Parameters:

  • delegation_control_id (String)

    unique Delegation Control identifier

  • 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

  • :description (String)

    Reason why this Delegation Control is deleted.

  • :if_match (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 464

def delete_delegation_control(delegation_control_id, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#delete_delegation_control.' if logger

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

  path = '/delegationControls/{delegationControlId}'.sub('{delegationControlId}', delegation_control_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:description] = opts[:description] if opts[:description]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#delete_delegation_control') 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_delegation_subscription(delegation_subscription_id, opts = {}) ⇒ Response

Note:

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

eletes an Delegation Subscription in Delegation Control.

Parameters:

  • delegation_subscription_id (String)

    unique Delegation Subscription identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 525

def delete_delegation_subscription(delegation_subscription_id, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#delete_delegation_subscription.' if logger

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

  path = '/delegationSubscriptions/{delegationSubscriptionId}'.sub('{delegationSubscriptionId}', delegation_subscription_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#delete_delegation_subscription') 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_delegated_resource_access_request(delegated_resource_access_request_id, opts = {}) ⇒ Response

Note:

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

Gets details of a Delegated Resource Access Request.

Parameters:

  • delegated_resource_access_request_id (String)

    Unique Delegated Resource Access Request identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
606
607
608
609
610
611
612
613
614
615
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 579

def get_delegated_resource_access_request(delegated_resource_access_request_id, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#get_delegated_resource_access_request.' if logger

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

  path = '/delegatedResourceAccessRequests/{delegatedResourceAccessRequestId}'.sub('{delegatedResourceAccessRequestId}', delegated_resource_access_request_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#get_delegated_resource_access_request') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::DelegateAccessControl::Models::DelegatedResourceAccessRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_delegated_resource_access_request_audit_log_report(delegated_resource_access_request_id, opts = {}) ⇒ Response

Note:

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

Gets the audit log report for the given Delegated Resource Access Request.

Parameters:

  • delegated_resource_access_request_id (String)

    Unique Delegated Resource Access Request identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :is_process_tree_enabled (BOOLEAN)

    Set to true to enable process tree computation in audit report (default to false)

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
669
670
671
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 634

def get_delegated_resource_access_request_audit_log_report(delegated_resource_access_request_id, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#get_delegated_resource_access_request_audit_log_report.' if logger

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

  path = '/delegatedResourceAccessRequests/{delegatedResourceAccessRequestId}/delegatedResourceAccessRequestAuditLogReport'.sub('{delegatedResourceAccessRequestId}', delegated_resource_access_request_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#get_delegated_resource_access_request_audit_log_report') 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::DelegateAccessControl::Models::DelegatedResourceAccessRequestAuditLogReport'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_delegation_control(delegation_control_id, opts = {}) ⇒ Response

Note:

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

Gets the Delegation Control associated with the specified Delegation Control ID.

Parameters:

  • delegation_control_id (String)

    unique Delegation Control identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



689
690
691
692
693
694
695
696
697
698
699
700
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
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 689

def get_delegation_control(delegation_control_id, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#get_delegation_control.' if logger

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

  path = '/delegationControls/{delegationControlId}'.sub('{delegationControlId}', delegation_control_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#get_delegation_control') 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::DelegateAccessControl::Models::DelegationControl'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_delegation_subscription(delegation_subscription_id, opts = {}) ⇒ Response

Note:

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

Gets a DelegationSubscription by identifier

Parameters:

  • delegation_subscription_id (String)

    unique Delegation Subscription identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 743

def get_delegation_subscription(delegation_subscription_id, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#get_delegation_subscription.' if logger

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

  path = '/delegationSubscriptions/{delegationSubscriptionId}'.sub('{delegationSubscriptionId}', delegation_subscription_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#get_delegation_subscription') 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::DelegateAccessControl::Models::DelegationSubscription'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_service_provider(service_provider_id, opts = {}) ⇒ Response

Note:

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

Gets a ServiceProvider by identifier

Parameters:

  • service_provider_id (String)

    unique Service Provider identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 797

def get_service_provider(service_provider_id, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#get_service_provider.' if logger

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

  path = '/serviceProviders/{serviceProviderId}'.sub('{serviceProviderId}', service_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-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#get_service_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::DelegateAccessControl::Models::ServiceProvider'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_service_provider_action(service_provider_action_id, opts = {}) ⇒ Response

Note:

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

Gets the Service Provider Action associated with the specified Service Provider Action ID.

Parameters:

  • service_provider_action_id (String)

    Unique Oracle supplied identifier associated with the Service Provider Action.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
876
877
878
879
880
881
882
883
884
885
886
887
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 851

def get_service_provider_action(service_provider_action_id, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#get_service_provider_action.' if logger

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

  path = '/serviceProviderActions/{serviceProviderActionId}'.sub('{serviceProviderActionId}', service_provider_action_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#get_service_provider_action') 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::DelegateAccessControl::Models::ServiceProviderAction'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_delegated_resource_access_request_histories(delegated_resource_access_request_id, opts = {}) ⇒ Response

Note:

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

Returns a history of all status associated with the Delegated Resource Access RequestId.

Allowed values are: timestamp

Parameters:

  • delegated_resource_access_request_id (String)

    Unique Delegated Resource Access Request identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. If no value is specified, timestamp is default. (default to timestamp)

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 912

def list_delegated_resource_access_request_histories(delegated_resource_access_request_id, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#list_delegated_resource_access_request_histories.' if logger

  raise "Missing the required parameter 'delegated_resource_access_request_id' when calling list_delegated_resource_access_request_histories." if delegated_resource_access_request_id.nil?

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

  if opts[:sort_by] && !%w[timestamp].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timestamp.'
  end
  raise "Parameter value for 'delegated_resource_access_request_id' must not be blank" if OCI::Internal::Util.blank_string?(delegated_resource_access_request_id)

  path = '/delegatedResourceAccessRequests/{delegatedResourceAccessRequestId}/history'.sub('{delegatedResourceAccessRequestId}', delegated_resource_access_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#list_delegated_resource_access_request_histories') 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::DelegateAccessControl::Models::DelegatedResourceAccessRequestHistoryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Lists all Delegated Resource Access Requests in the compartment. Note that only one of lifecycleState or requestStatus query parameter can be used.

Allowed values are: timeCreated, displayName

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

  • :delegation_control_id (String)

    unique Delegation Control identifier

  • :resource_id (String)

    A filter to return only Delegated Resource Access Requests for the given resource identifier.

  • :lifecycle_state (String)

    A filter to return only Delegated Resource Access Requests whose lifecycleState matches the given Delegated Resource Access Request lifecycleState.

  • :request_status (String)

    A filter to return only Delegated Resource Access Requests whose status matches the given Delegated Resource Access Request status.

  • :time_start (DateTime)

    Query start time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd parameters cannot be used together.

  • :time_end (DateTime)

    Query end time in UTC in ISO 8601 format(inclusive). Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). timeIntervalStart and timeIntervalEnd parameters cannot be used together.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, default is timeCreated. (default to timeCreated)

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 997

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

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

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

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

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

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end

  path = '/delegatedResourceAccessRequests'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:delegationControlId] = opts[:delegation_control_id] if opts[:delegation_control_id]
  query_params[:resourceId] = opts[:resource_id] if opts[:resource_id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:requestStatus] = opts[:request_status] if opts[:request_status]
  query_params[:timeStart] = opts[:time_start] if opts[:time_start]
  query_params[:timeEnd] = opts[:time_end] if opts[:time_end]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#list_delegated_resource_access_requests') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::DelegateAccessControl::Models::DelegatedResourceAccessRequestSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_delegation_control_resources(delegation_control_id, opts = {}) ⇒ Response

Note:

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

Returns a list of resources associated with the Delegation Control.

Parameters:

  • delegation_control_id (String)

    unique Delegation Control identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 1080

def list_delegation_control_resources(delegation_control_id, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#list_delegation_control_resources.' if logger

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

  path = '/delegationControls/{delegationControlId}/resources'.sub('{delegationControlId}', delegation_control_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#list_delegation_control_resources') 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::DelegateAccessControl::Models::DelegationControlResourceCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Lists the Delegation Controls in the compartment.

Allowed values are: timeCreated, displayName

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

  • :lifecycle_state (String)

    A filter to return only Delegation Control resources whose lifecycleState matches the given Delegation Control lifecycle state.

  • :display_name (String)

    A filter to return Delegation Control resources that match the given display name.

  • :resource_type (String)

    A filter to return only resources that match the given resource type.

  • :resource_id (String)

    A filter to return Delegation Control resources that match the given resource ID.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, default is timeCreated. (default to timeCreated)

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 1147

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

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

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

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

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

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end

  path = '/delegationControls'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:resourceType] = opts[:resource_type] if opts[:resource_type]
  query_params[:resourceId] = opts[:resource_id] if opts[:resource_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#list_delegation_controls') 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::DelegateAccessControl::Models::DelegationControlSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Lists the Delegation Subscriptions in Delegation Control.

Allowed values are: timeCreated, displayName

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

  • :lifecycle_state (String)

    A filter to return only Delegation Subscription resources whose lifecycleState matches the given Delegation Subscription lifecycle state.

  • :display_name (String)

    A filter to return Delegation Subscription resources that match the given display name.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified, timeCreated is default. (default to timeCreated)

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 1234

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

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

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

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

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end

  path = '/delegationSubscriptions'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#list_delegation_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: 'OCI::DelegateAccessControl::Models::DelegationSubscriptionSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Lists all the ServiceProviderActions available in the system.

Allowed values are: timeCreated, name

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

  • :name (String)

    A filter to return only resources that match the entire name given.

  • :resource_type (String)

    A filter to return only resources that match the given resource type.

  • :service_provider_service_type (Array<String>)

    A filter to return only resources that match the given Service Provider service type. Allowed values are: TROUBLESHOOTING, ASSISTED_PATCHING

  • :lifecycle_state (String)

    A filter to return only resources whose lifecycleState matches the given Service Provider Action lifecycleState.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified, default is timeCreated. (default to timeCreated)

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
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
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 1318

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

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

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


  service_provider_service_type_allowable_values = %w[TROUBLESHOOTING ASSISTED_PATCHING]
  if opts[:service_provider_service_type] && !opts[:service_provider_service_type].empty?
    opts[:service_provider_service_type].each do |val_to_check|
      unless service_provider_service_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "service_provider_service_type", must be one of TROUBLESHOOTING, ASSISTED_PATCHING.'
      end
    end
  end

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

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

  if opts[:sort_by] && !%w[timeCreated name].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, name.'
  end

  path = '/serviceProviderActions'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:resourceType] = opts[:resource_type] if opts[:resource_type]
  query_params[:serviceProviderServiceType] = OCI::ApiClient.build_collection_params(opts[:service_provider_service_type], :multi) if opts[:service_provider_service_type] && !opts[:service_provider_service_type].empty?
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#list_service_provider_actions') 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::DelegateAccessControl::Models::ServiceProviderActionSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_service_provider_interactions(delegated_resource_access_request_id, opts = {}) ⇒ Response

Note:

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

Lists the MoreInformation interaction between customer and support operators.

Parameters:

  • delegated_resource_access_request_id (String)

    Unique Delegated Resource Access Request identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 1409

def list_service_provider_interactions(delegated_resource_access_request_id, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#list_service_provider_interactions.' if logger

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

  path = '/delegatedResourceAccessRequests/{delegatedResourceAccessRequestId}/serviceProviderInteractions'.sub('{delegatedResourceAccessRequestId}', delegated_resource_access_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#list_service_provider_interactions') 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::DelegateAccessControl::Models::ServiceProviderInteractionCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Lists the Service Providers.

Allowed values are: timeCreated, displayName

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

  • :lifecycle_state (String)

    A filter to return only Service Provider resources whose lifecycleState matches the given Service Provider lifecycle state.

  • :name (String)

    A filter to return Service Provider resources that match the given name.

  • :supported_resource_type (String)

    A filter to return only Service Provider resources whose supported resource type matches the given resource type.

  • :service_provider_type (String)

    A filter to return only Service Provider resources whose provider type matches the given provider type.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending. If no value is specified, timeCreated is default. (default to timeCreated)

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 1476

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

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

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

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

  if opts[:service_provider_type] && !OCI::DelegateAccessControl::Models::ServiceProvider::SERVICE_PROVIDER_TYPE_ENUM.include?(opts[:service_provider_type])
    raise 'Invalid value for "service_provider_type", must be one of the values in OCI::DelegateAccessControl::Models::ServiceProvider::SERVICE_PROVIDER_TYPE_ENUM.'
  end

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

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end

  path = '/serviceProviders'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:supportedResourceType] = opts[:supported_resource_type] if opts[:supported_resource_type]
  query_params[:serviceProviderType] = opts[:service_provider_type] if opts[:service_provider_type]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#list_service_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: 'OCI::DelegateAccessControl::Models::ServiceProviderSummaryCollection'
    )
  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.



98
99
100
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 98

def logger
  @api_client.config.logger
end

#reject_delegated_resource_access_request(delegated_resource_access_request_id, reject_delegated_resource_access_request_details, opts = {}) ⇒ Response

Note:

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

Rejects a Delegated Resource Access Request.

Parameters:

  • delegated_resource_access_request_id (String)

    Unique Delegated Resource Access Request identifier

  • reject_delegated_resource_access_request_details (OCI::DelegateAccessControl::Models::RejectDelegatedResourceAccessRequestDetails)

    Details regarding the rejection of a Delegated Resource Access Request created by the support operator.

  • 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. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



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
1607
1608
1609
1610
1611
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 1572

def reject_delegated_resource_access_request(delegated_resource_access_request_id, reject_delegated_resource_access_request_details, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#reject_delegated_resource_access_request.' if logger

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

  path = '/delegatedResourceAccessRequests/{delegatedResourceAccessRequestId}/actions/reject'.sub('{delegatedResourceAccessRequestId}', delegated_resource_access_request_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(reject_delegated_resource_access_request_details)

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

#revoke_delegated_resource_access_request(delegated_resource_access_request_id, revoke_delegated_resource_access_request_details, opts = {}) ⇒ Response

Note:

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

Revokes an already approved Delegated Resource Access Request.

Parameters:

  • delegated_resource_access_request_id (String)

    Unique Delegated Resource Access Request identifier

  • revoke_delegated_resource_access_request_details (OCI::DelegateAccessControl::Models::RevokeDelegatedResourceAccessRequestDetails)

    Details regarding the revocation of a Delegated Resource Access Request created by the support operator.

  • 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. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 1643

def revoke_delegated_resource_access_request(delegated_resource_access_request_id, revoke_delegated_resource_access_request_details, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#revoke_delegated_resource_access_request.' if logger

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

  path = '/delegatedResourceAccessRequests/{delegatedResourceAccessRequestId}/actions/revoke'.sub('{delegatedResourceAccessRequestId}', delegated_resource_access_request_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(revoke_delegated_resource_access_request_details)

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

#service_provider_interaction_request(delegated_resource_access_request_id, service_provider_interaction_request_details, opts = {}) ⇒ Response

Note:

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

Posts query for additional information for the given Delegated Resource Access Request.

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. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :if_match (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 1714

def service_provider_interaction_request(delegated_resource_access_request_id, service_provider_interaction_request_details, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#service_provider_interaction_request.' if logger

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

  path = '/delegatedResourceAccessRequests/{delegatedResourceAccessRequestId}/actions/serviceProviderInteractionRequest'.sub('{delegatedResourceAccessRequestId}', delegated_resource_access_request_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(service_provider_interaction_request_details)

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

#update_delegation_control(delegation_control_id, update_delegation_control_details, opts = {}) ⇒ Response

Note:

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

Updates the existing DelegationControl for a given Delegation Control ID.

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 1779

def update_delegation_control(delegation_control_id, update_delegation_control_details, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#update_delegation_control.' if logger

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

  path = '/delegationControls/{delegationControlId}'.sub('{delegationControlId}', delegation_control_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_delegation_control_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#update_delegation_control') 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::DelegateAccessControl::Models::DelegationControl'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_delegation_subscription(delegation_subscription_id, update_delegation_subscription_details, opts = {}) ⇒ Response

Note:

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

Updates the existing DelegationSubscription for a given Delegation Subscription ID.

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
# File 'lib/oci/delegate_access_control/delegate_access_control_client.rb', line 1843

def update_delegation_subscription(delegation_subscription_id, update_delegation_subscription_details, opts = {})
  logger.debug 'Calling operation DelegateAccessControlClient#update_delegation_subscription.' if logger

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

  path = '/delegationSubscriptions/{delegationSubscriptionId}'.sub('{delegationSubscriptionId}', delegation_subscription_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_delegation_subscription_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DelegateAccessControlClient#update_delegation_subscription') 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::DelegateAccessControl::Models::DelegationSubscription'
    )
  end
  # rubocop:enable Metrics/BlockLength
end