Class: OCI::CloudGuard::CloudGuardClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/cloud_guard/cloud_guard_client.rb

Overview

A description of the Cloud Guard APIs

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) ⇒ CloudGuardClient

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



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

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 + '/20200131'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "CloudGuardClient endpoint set to '#{@endpoint}'." if logger
end

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



13
14
15
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 13

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


17
18
19
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 17

def endpoint
  @endpoint
end

#regionString

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

Returns:

  • (String)


27
28
29
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 27

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



23
24
25
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 23

def retry_config
  @retry_config
end

Instance Method Details

#change_detector_recipe_compartment(detector_recipe_id, change_detector_recipe_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves the DetectorRecipe from current compartment to another.

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.

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

Returns:

  • (Response)

    A Response object with data of type nil



122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 122

def change_detector_recipe_compartment(detector_recipe_id, change_detector_recipe_compartment_details, opts = {})
  logger.debug 'Calling operation CloudGuardClient#change_detector_recipe_compartment.' if logger

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

  path = '/detectorRecipes/{detectorRecipeId}/actions/changeCompartment'.sub('{detectorRecipeId}', detector_recipe_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(change_detector_recipe_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CloudGuardClient#change_detector_recipe_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_managed_list_compartment(managed_list_id, change_managed_list_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves the ManagedList from current compartment to another.

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.

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

Returns:

  • (Response)

    A Response object with data of type nil



192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 192

def change_managed_list_compartment(managed_list_id, change_managed_list_compartment_details, opts = {})
  logger.debug 'Calling operation CloudGuardClient#change_managed_list_compartment.' if logger

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

  path = '/managedLists/{managedListId}/actions/changeCompartment'.sub('{managedListId}', managed_list_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(change_managed_list_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CloudGuardClient#change_managed_list_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_responder_recipe_compartment(responder_recipe_id, change_responder_recipe_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves the ResponderRecipe from current compartment to another.

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.

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

Returns:

  • (Response)

    A Response object with data of type nil



262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 262

def change_responder_recipe_compartment(responder_recipe_id, change_responder_recipe_compartment_details, opts = {})
  logger.debug 'Calling operation CloudGuardClient#change_responder_recipe_compartment.' if logger

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

  path = '/responderRecipes/{responderRecipeId}/actions/changeCompartment'.sub('{responderRecipeId}', responder_recipe_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(change_responder_recipe_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CloudGuardClient#change_responder_recipe_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_data_mask_rule(create_data_mask_rule_details, opts = {}) ⇒ Response

Note:

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

Creates a new Data Mask Rule Definition

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:



326
327
328
329
330
331
332
333
334
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
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 326

def create_data_mask_rule(create_data_mask_rule_details, opts = {})
  logger.debug 'Calling operation CloudGuardClient#create_data_mask_rule.' if logger

  raise "Missing the required parameter 'create_data_mask_rule_details' when calling create_data_mask_rule." if create_data_mask_rule_details.nil?

  path = '/dataMaskRules'
  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_data_mask_rule_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CloudGuardClient#create_data_mask_rule') 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::CloudGuard::Models::DataMaskRule'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_detector_recipe(create_detector_recipe_details, opts = {}) ⇒ Response

Note:

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

Creates a DetectorRecipe

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:



388
389
390
391
392
393
394
395
396
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
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 388

def create_detector_recipe(create_detector_recipe_details, opts = {})
  logger.debug 'Calling operation CloudGuardClient#create_detector_recipe.' if logger

  raise "Missing the required parameter 'create_detector_recipe_details' when calling create_detector_recipe." if create_detector_recipe_details.nil?

  path = '/detectorRecipes'
  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_detector_recipe_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CloudGuardClient#create_detector_recipe') 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::CloudGuard::Models::DetectorRecipe'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_managed_list(create_managed_list_details, opts = {}) ⇒ Response

Note:

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

Creates a new ManagedList.

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:



450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 450

def create_managed_list(create_managed_list_details, opts = {})
  logger.debug 'Calling operation CloudGuardClient#create_managed_list.' if logger

  raise "Missing the required parameter 'create_managed_list_details' when calling create_managed_list." if create_managed_list_details.nil?

  path = '/managedLists'
  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_managed_list_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CloudGuardClient#create_managed_list') 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::CloudGuard::Models::ManagedList'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_responder_recipe(create_responder_recipe_details, opts = {}) ⇒ Response

Note:

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

Create a ResponderRecipe.

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:



512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 512

def create_responder_recipe(create_responder_recipe_details, opts = {})
  logger.debug 'Calling operation CloudGuardClient#create_responder_recipe.' if logger

  raise "Missing the required parameter 'create_responder_recipe_details' when calling create_responder_recipe." if create_responder_recipe_details.nil?

  path = '/responderRecipes'
  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_responder_recipe_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CloudGuardClient#create_responder_recipe') 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::CloudGuard::Models::ResponderRecipe'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_target(create_target_details, opts = {}) ⇒ Response

Note:

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

Creates a new Target

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:



574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 574

def create_target(create_target_details, opts = {})
  logger.debug 'Calling operation CloudGuardClient#create_target.' if logger

  raise "Missing the required parameter 'create_target_details' when calling create_target." if create_target_details.nil?

  path = '/targets'
  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_target_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CloudGuardClient#create_target') 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::CloudGuard::Models::Target'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_target_detector_recipe(target_id, attach_target_detector_recipe_details, opts = {}) ⇒ Response

Note:

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

Attach a DetectorRecipe with the Target

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:



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
672
673
674
675
676
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 637

def create_target_detector_recipe(target_id, attach_target_detector_recipe_details, opts = {})
  logger.debug 'Calling operation CloudGuardClient#create_target_detector_recipe.' if logger

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

  path = '/targets/{targetId}/targetDetectorRecipes'.sub('{targetId}', target_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[:'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(attach_target_detector_recipe_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CloudGuardClient#create_target_detector_recipe') 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::CloudGuard::Models::TargetDetectorRecipe'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_target_responder_recipe(target_id, attach_target_responder_recipe_details, opts = {}) ⇒ Response

Note:

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

Attach a ResponderRecipe with the Target

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:



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

def create_target_responder_recipe(target_id, attach_target_responder_recipe_details, opts = {})
  logger.debug 'Calling operation CloudGuardClient#create_target_responder_recipe.' if logger

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

  path = '/targets/{targetId}/targetResponderRecipes'.sub('{targetId}', target_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[:'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(attach_target_responder_recipe_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CloudGuardClient#create_target_responder_recipe') 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::CloudGuard::Models::TargetResponderRecipe'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_data_mask_rule(data_mask_rule_id, opts = {}) ⇒ Response

Note:

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

Deletes a DataMaskRule identified by dataMaskRuleId

Parameters:

  • data_mask_rule_id (String)

    OCID of dataMaskRule

  • 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



765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 765

def delete_data_mask_rule(data_mask_rule_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#delete_data_mask_rule.' if logger

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

  path = '/dataMaskRules/{dataMaskRuleId}'.sub('{dataMaskRuleId}', data_mask_rule_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: 'CloudGuardClient#delete_data_mask_rule') 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_detector_recipe(detector_recipe_id, opts = {}) ⇒ Response

Note:

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

Deletes a DetectorRecipe identified by detectorRecipeId

Parameters:

  • detector_recipe_id (String)

    DetectorRecipe OCID

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

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

Returns:

  • (Response)

    A Response object with data of type nil



831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 831

def delete_detector_recipe(detector_recipe_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#delete_detector_recipe.' if logger

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

  path = '/detectorRecipes/{detectorRecipeId}'.sub('{detectorRecipeId}', detector_recipe_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CloudGuardClient#delete_detector_recipe') 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_managed_list(managed_list_id, opts = {}) ⇒ Response

Note:

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

Deletes a managed list identified by managedListId

Parameters:

  • managed_list_id (String)

    The cloudguard list OCID to be passed in the request.

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

    the optional parameters

Options Hash (opts):

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

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

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

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

Returns:

  • (Response)

    A Response object with data of type nil



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

def delete_managed_list(managed_list_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#delete_managed_list.' if logger

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

  path = '/managedLists/{managedListId}'.sub('{managedListId}', managed_list_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CloudGuardClient#delete_managed_list') 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_responder_recipe(responder_recipe_id, opts = {}) ⇒ Response

Note:

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

Delete the ResponderRecipe resource by identifier

Parameters:

  • responder_recipe_id (String)

    OCID of ResponderRecipe

  • 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



961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 961

def delete_responder_recipe(responder_recipe_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#delete_responder_recipe.' if logger

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

  path = '/responderRecipes/{responderRecipeId}'.sub('{responderRecipeId}', responder_recipe_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: 'CloudGuardClient#delete_responder_recipe') 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_target(target_id, opts = {}) ⇒ Response

Note:

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

Deletes a Target identified by targetId

Parameters:

  • target_id (String)

    OCID of target

  • 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



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
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 1021

def delete_target(target_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#delete_target.' if logger

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

  path = '/targets/{targetId}'.sub('{targetId}', target_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: 'CloudGuardClient#delete_target') 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_target_detector_recipe(target_id, target_detector_recipe_id, opts = {}) ⇒ Response

Note:

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

Delete the TargetDetectorRecipe resource by identifier

Parameters:

  • target_id (String)

    OCID of target

  • target_detector_recipe_id (String)

    OCID of TargetDetectorRecipe

  • 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



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
1119
1120
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 1082

def delete_target_detector_recipe(target_id, target_detector_recipe_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#delete_target_detector_recipe.' if logger

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

  path = '/targets/{targetId}/targetDetectorRecipes/{targetDetectorRecipeId}'.sub('{targetId}', target_id.to_s).sub('{targetDetectorRecipeId}', target_detector_recipe_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: 'CloudGuardClient#delete_target_detector_recipe') 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_target_responder_recipe(target_id, target_responder_recipe_id, opts = {}) ⇒ Response

Note:

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

Delete the TargetResponderRecipe resource by identifier

Parameters:

  • target_id (String)

    OCID of target

  • target_responder_recipe_id (String)

    OCID of TargetResponderRecipe

  • 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



1145
1146
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
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 1145

def delete_target_responder_recipe(target_id, target_responder_recipe_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#delete_target_responder_recipe.' if logger

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

  path = '/targets/{targetId}/targetResponderRecipes/{targetResponderRecipeId}'.sub('{targetId}', target_id.to_s).sub('{targetResponderRecipeId}', target_responder_recipe_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: 'CloudGuardClient#delete_target_responder_recipe') 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

#execute_responder_execution(responder_execution_id, compartment_id, opts = {}) ⇒ Response

Note:

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

Executes the responder execution. When provided, If-Match is checked against ETag values of the resource.

Parameters:

  • responder_execution_id (String)

    The identifier of the responder execution.

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

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

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

  • :execute_responder_execution_details (OCI::CloudGuard::Models::ExecuteResponderExecutionDetails)

    Details for Responder Configuration

Returns:

  • (Response)

    A Response object with data of type nil



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

def execute_responder_execution(responder_execution_id, compartment_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#execute_responder_execution.' if logger

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

  path = '/responderExecutions/{responderExecutionId}/actions/execute'.sub('{responderExecutionId}', responder_execution_id.to_s)
  operation_signing_strategy = :standard

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

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

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

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'CloudGuardClient#execute_responder_execution') 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

#get_condition_metadata_type(condition_metadata_type_id, opts = {}) ⇒ Response

Note:

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

Returns ConditionType with its details.

Parameters:

  • condition_metadata_type_id (String)

    The type of the condition meta data.

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

  • :service_type (String)

    ServiceType filter for the condition meta data.

  • :resource_type (String)

    Resource filter for the condition meta data.

Returns:



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

def (, opts = {})
  logger.debug 'Calling operation CloudGuardClient#get_condition_metadata_type.' if logger

  raise "Missing the required parameter 'condition_metadata_type_id' when calling get_condition_metadata_type." if .nil?
  unless OCI::CloudGuard::Models::CONDITION_TYPE_ENUM_ENUM.include?()
    raise 'Invalid value for "condition_metadata_type_id", must be one of the values in OCI::CloudGuard::Models::CONDITION_TYPE_ENUM_ENUM.'
  end

  raise "Parameter value for 'condition_metadata_type_id' must not be blank" if OCI::Internal::Util.blank_string?()

  path = '/conditionMetadataTypes/{conditionMetadataTypeId}'.sub('{conditionMetadataTypeId}', .to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:serviceType] = opts[:service_type] if opts[:service_type]
  query_params[:resourceType] = opts[:resource_type] if opts[:resource_type]

  # 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: 'CloudGuardClient#get_condition_metadata_type') 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::CloudGuard::Models::ConditionMetadataType'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

GET Cloud Guard Configuration Details for a Tenancy.

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 1336

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

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

  path = '/configuration'
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  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: 'CloudGuardClient#get_configuration') 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::CloudGuard::Models::Configuration'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_data_mask_rule(data_mask_rule_id, opts = {}) ⇒ Response

Note:

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

Returns a DataMaskRule identified by DataMaskRuleId

Parameters:

  • data_mask_rule_id (String)

    OCID of dataMaskRule

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



1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 1390

def get_data_mask_rule(data_mask_rule_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#get_data_mask_rule.' if logger

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

  path = '/dataMaskRules/{dataMaskRuleId}'.sub('{dataMaskRuleId}', data_mask_rule_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: 'CloudGuardClient#get_data_mask_rule') 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::CloudGuard::Models::DataMaskRule'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_detector(detector_id, opts = {}) ⇒ Response

Note:

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

Returns a Detector identified by detectorId.

Parameters:

  • detector_id (String)

    The Name of Detector.

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



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

def get_detector(detector_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#get_detector.' if logger

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

  path = '/detectors/{detectorId}'.sub('{detectorId}', detector_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: 'CloudGuardClient#get_detector') 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::CloudGuard::Models::Detector'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_detector_recipe(detector_recipe_id, opts = {}) ⇒ Response

Note:

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

Returns a DetectorRecipe identified by detectorRecipeId

Parameters:

  • detector_recipe_id (String)

    DetectorRecipe OCID

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



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
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 1499

def get_detector_recipe(detector_recipe_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#get_detector_recipe.' if logger

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

  path = '/detectorRecipes/{detectorRecipeId}'.sub('{detectorRecipeId}', detector_recipe_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: 'CloudGuardClient#get_detector_recipe') 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::CloudGuard::Models::DetectorRecipe'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_detector_recipe_detector_rule(detector_recipe_id, detector_rule_id, opts = {}) ⇒ Response

Note:

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

Get DetectorRule by identifier

Parameters:

  • detector_recipe_id (String)

    DetectorRecipe OCID

  • detector_rule_id (String)

    The key of Detector Rule.

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



1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 1554

def get_detector_recipe_detector_rule(detector_recipe_id, detector_rule_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#get_detector_recipe_detector_rule.' if logger

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

  path = '/detectorRecipes/{detectorRecipeId}/detectorRules/{detectorRuleId}'.sub('{detectorRecipeId}', detector_recipe_id.to_s).sub('{detectorRuleId}', detector_rule_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: 'CloudGuardClient#get_detector_recipe_detector_rule') 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::CloudGuard::Models::DetectorRecipeDetectorRule'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_detector_rule(detector_id, detector_rule_id, opts = {}) ⇒ Response

Note:

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

Returns a Detector Rule identified by detectorRuleId

Parameters:

  • detector_id (String)

    The Name of Detector.

  • detector_rule_id (String)

    The key of Detector Rule.

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



1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 1612

def get_detector_rule(detector_id, detector_rule_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#get_detector_rule.' if logger

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

  path = '/detectors/{detectorId}/detectorRules/{detectorRuleId}'.sub('{detectorId}', detector_id.to_s).sub('{detectorRuleId}', detector_rule_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: 'CloudGuardClient#get_detector_rule') 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::CloudGuard::Models::DetectorRule'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_managed_list(managed_list_id, opts = {}) ⇒ Response

Note:

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

Returns a managed list identified by managedListId

Parameters:

  • managed_list_id (String)

    The cloudguard list OCID to be passed in the request.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 1668

def get_managed_list(managed_list_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#get_managed_list.' if logger

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

  path = '/managedLists/{managedListId}'.sub('{managedListId}', managed_list_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: 'CloudGuardClient#get_managed_list') 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::CloudGuard::Models::ManagedList'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_problem(problem_id, opts = {}) ⇒ Response

Note:

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

Returns a Problems response

Parameters:

  • problem_id (String)

    OCId of the problem.

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



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
1754
1755
1756
1757
1758
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 1722

def get_problem(problem_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#get_problem.' if logger

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

  path = '/problems/{problemId}'.sub('{problemId}', problem_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: 'CloudGuardClient#get_problem') 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::CloudGuard::Models::Problem'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_responder_execution(responder_execution_id, opts = {}) ⇒ Response

Note:

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

Returns a Responder Execution identified by responderExecutionId

Parameters:

  • responder_execution_id (String)

    The identifier of the responder execution.

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



1777
1778
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
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 1777

def get_responder_execution(responder_execution_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#get_responder_execution.' if logger

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

  path = '/responderExecutions/{responderExecutionId}'.sub('{responderExecutionId}', responder_execution_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: 'CloudGuardClient#get_responder_execution') 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::CloudGuard::Models::ResponderExecution'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_responder_recipe(responder_recipe_id, opts = {}) ⇒ Response

Note:

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

Get a ResponderRecipe by identifier

Parameters:

  • responder_recipe_id (String)

    OCID of ResponderRecipe

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



1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 1831

def get_responder_recipe(responder_recipe_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#get_responder_recipe.' if logger

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

  path = '/responderRecipes/{responderRecipeId}'.sub('{responderRecipeId}', responder_recipe_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: 'CloudGuardClient#get_responder_recipe') 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::CloudGuard::Models::ResponderRecipe'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_responder_recipe_responder_rule(responder_recipe_id, responder_rule_id, opts = {}) ⇒ Response

Note:

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

Get ResponderRule by identifier

Parameters:

  • responder_recipe_id (String)

    OCID of ResponderRecipe

  • responder_rule_id (String)

    The id of ResponderRule

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



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

def get_responder_recipe_responder_rule(responder_recipe_id, responder_rule_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#get_responder_recipe_responder_rule.' if logger

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

  path = '/responderRecipes/{responderRecipeId}/responderRules/{responderRuleId}'.sub('{responderRecipeId}', responder_recipe_id.to_s).sub('{responderRuleId}', responder_rule_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: 'CloudGuardClient#get_responder_recipe_responder_rule') 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::CloudGuard::Models::ResponderRecipeResponderRule'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_responder_rule(responder_rule_id, opts = {}) ⇒ Response

Note:

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

Get a ResponderRule by identifier

Parameters:

  • responder_rule_id (String)

    The id of ResponderRule

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



1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 1942

def get_responder_rule(responder_rule_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#get_responder_rule.' if logger

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

  path = '/responderRules/{responderRuleId}'.sub('{responderRuleId}', responder_rule_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: 'CloudGuardClient#get_responder_rule') 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::CloudGuard::Models::ResponderRule'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_target(target_id, opts = {}) ⇒ Response

Note:

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

Returns a Target identified by targetId

Parameters:

  • target_id (String)

    OCID of target

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



1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 1996

def get_target(target_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#get_target.' if logger

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

  path = '/targets/{targetId}'.sub('{targetId}', target_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: 'CloudGuardClient#get_target') 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::CloudGuard::Models::Target'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_target_detector_recipe(target_id, target_detector_recipe_id, opts = {}) ⇒ Response

Note:

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

Get a TargetDetectorRecipe by identifier

Parameters:

  • target_id (String)

    OCID of target

  • target_detector_recipe_id (String)

    OCID of TargetDetectorRecipe

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



2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 2051

def get_target_detector_recipe(target_id, target_detector_recipe_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#get_target_detector_recipe.' if logger

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

  path = '/targets/{targetId}/targetDetectorRecipes/{targetDetectorRecipeId}'.sub('{targetId}', target_id.to_s).sub('{targetDetectorRecipeId}', target_detector_recipe_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: 'CloudGuardClient#get_target_detector_recipe') 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::CloudGuard::Models::TargetDetectorRecipe'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_target_detector_recipe_detector_rule(target_id, target_detector_recipe_id, detector_rule_id, opts = {}) ⇒ Response

Note:

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

Get DetectorRule by identifier

Parameters:

  • target_id (String)

    OCID of target

  • target_detector_recipe_id (String)

    OCID of TargetDetectorRecipe

  • detector_rule_id (String)

    The id of DetectorRule

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



2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 2109

def get_target_detector_recipe_detector_rule(target_id, target_detector_recipe_id, detector_rule_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#get_target_detector_recipe_detector_rule.' if logger

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

  path = '/targets/{targetId}/targetDetectorRecipes/{targetDetectorRecipeId}/detectorRules/{detectorRuleId}'.sub('{targetId}', target_id.to_s).sub('{targetDetectorRecipeId}', target_detector_recipe_id.to_s).sub('{detectorRuleId}', detector_rule_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: 'CloudGuardClient#get_target_detector_recipe_detector_rule') 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::CloudGuard::Models::TargetDetectorRecipeDetectorRule'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_target_responder_recipe(target_id, target_responder_recipe_id, opts = {}) ⇒ Response

Note:

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

Get a TargetResponderRecipe by identifier

Parameters:

  • target_id (String)

    OCID of target

  • target_responder_recipe_id (String)

    OCID of TargetResponderRecipe

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



2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 2168

def get_target_responder_recipe(target_id, target_responder_recipe_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#get_target_responder_recipe.' if logger

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

  path = '/targets/{targetId}/targetResponderRecipes/{targetResponderRecipeId}'.sub('{targetId}', target_id.to_s).sub('{targetResponderRecipeId}', target_responder_recipe_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: 'CloudGuardClient#get_target_responder_recipe') 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::CloudGuard::Models::TargetResponderRecipe'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_target_responder_recipe_responder_rule(target_id, target_responder_recipe_id, responder_rule_id, opts = {}) ⇒ Response

Note:

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

Get ResponderRule by identifier

Parameters:

  • target_id (String)

    OCID of target

  • target_responder_recipe_id (String)

    OCID of TargetResponderRecipe

  • responder_rule_id (String)

    The id of ResponderRule

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



2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 2226

def get_target_responder_recipe_responder_rule(target_id, target_responder_recipe_id, responder_rule_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#get_target_responder_recipe_responder_rule.' if logger

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

  path = '/targets/{targetId}/targetResponderRecipes/{targetResponderRecipeId}/responderRules/{responderRuleId}'.sub('{targetId}', target_id.to_s).sub('{targetResponderRecipeId}', target_responder_recipe_id.to_s).sub('{responderRuleId}', responder_rule_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: 'CloudGuardClient#get_target_responder_recipe_responder_rule') 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::CloudGuard::Models::TargetResponderRecipeResponderRule'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a list of condition types.

Allowed values are: timeCreated, displayName

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :lifecycle_state (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to ACTIVE)

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

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



2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 2292

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

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

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

  if opts[:sort_order] && !OCI::CloudGuard::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::CloudGuard::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 = '/conditionMetadataTypes'
  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[: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: 'CloudGuardClient#list_condition_metadata_types') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudGuard::Models::ConditionMetadataTypeCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a list of all Data Mask Rules in the root 'compartmentId' passed.

Allowed values are: timeCreated, displayName

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

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

  • :lifecycle_state (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to ACTIVE)

  • :access_level (String)

    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. (default to RESTRICTED) Allowed values are: RESTRICTED, ACCESSIBLE

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

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

  • :data_mask_rule_status (String)

    The status of the dataMaskRule. (default to ENABLED)

  • :target_id (String)

    OCID of target (default to null)

  • :iam_group_id (String)

    OCID of iamGroup (default to null)

  • :target_type (String)

    Type of target (default to null)

Returns:



2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 2383

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

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

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

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

  if opts[:sort_order] && !OCI::CloudGuard::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::CloudGuard::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

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

  path = '/dataMaskRules'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:accessLevel] = opts[:access_level] if opts[:access_level]
  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]
  query_params[:dataMaskRuleStatus] = opts[:data_mask_rule_status] if opts[:data_mask_rule_status]
  query_params[:targetId] = opts[:target_id] if opts[:target_id]
  query_params[:iamGroupId] = opts[:iam_group_id] if opts[:iam_group_id]
  query_params[:targetType] = opts[:target_type] if opts[:target_type]

  # 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: 'CloudGuardClient#list_data_mask_rules') 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::CloudGuard::Models::DataMaskRuleCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_detector_recipe_detector_rules(detector_recipe_id, compartment_id, opts = {}) ⇒ Response

Note:

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

Returns a list of DetectorRule associated with DetectorRecipe.

Allowed values are: displayName, riskLevel

Parameters:

  • detector_recipe_id (String)

    DetectorRecipe OCID

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

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

  • :lifecycle_state (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to ACTIVE)

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

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 2478

def list_detector_recipe_detector_rules(detector_recipe_id, compartment_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#list_detector_recipe_detector_rules.' if logger

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

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

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

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

  path = '/detectorRecipes/{detectorRecipeId}/detectorRules'.sub('{detectorRecipeId}', detector_recipe_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[: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: 'CloudGuardClient#list_detector_recipe_detector_rules') 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::CloudGuard::Models::DetectorRecipeDetectorRuleCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a list of all Detector Recipes in a compartment

The ListDetectorRecipes operation returns only the detector recipes in compartmentId passed. The list does not include any subcompartments of the compartmentId passed.

The parameter accessLevel specifies whether to return only those compartments for which the requestor has INSPECT permissions on at least one resource directly or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if Principal doesn't have access to even one of the child compartments. This is valid only when compartmentIdInSubtree is set to true.

The parameter compartmentIdInSubtree applies when you perform ListDetectorRecipes on the compartmentId passed and when it is set to true, the entire hierarchy of compartments can be returned. To get a full list of all compartments and subcompartments in the tenancy (root compartment), set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE.

Allowed values are: timeCreated, displayName

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

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

  • :resource_metadata_only (BOOLEAN)

    Default is false. When set to true, the list of all Oracle Managed Resources Metadata supported by Cloud Guard are returned. (default to false)

  • :lifecycle_state (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to ACTIVE)

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

  • :compartment_id_in_subtree (BOOLEAN)

    Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel. (default to false)

  • :access_level (String)

    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. (default to RESTRICTED) Allowed values are: RESTRICTED, ACCESSIBLE

  • :sort_order (String)

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

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



2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 2591

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

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

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

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

  if opts[:sort_order] && !OCI::CloudGuard::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::CloudGuard::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 = '/detectorRecipes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:resourceMetadataOnly] = opts[:resource_metadata_only] if !opts[:resource_metadata_only].nil?
  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[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?
  query_params[:accessLevel] = opts[:access_level] if opts[:access_level]
  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: 'CloudGuardClient#list_detector_recipes') 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::CloudGuard::Models::DetectorRecipeCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_detector_rules(detector_id, compartment_id, opts = {}) ⇒ Response

Note:

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

Returns a list of detector rules for the detectorId passed.

Allowed values are: timeCreated, displayName

Parameters:

  • detector_id (String)

    The Name of Detector.

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

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

  • :limit (Integer)

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

  • :lifecycle_state (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to ACTIVE)

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

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



2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 2680

def list_detector_rules(detector_id, compartment_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#list_detector_rules.' if logger

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

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

  if opts[:sort_order] && !OCI::CloudGuard::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::CloudGuard::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
  raise "Parameter value for 'detector_id' must not be blank" if OCI::Internal::Util.blank_string?(detector_id)

  path = '/detectors/{detectorId}/detectorRules'.sub('{detectorId}', detector_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  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: 'CloudGuardClient#list_detector_rules') 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::CloudGuard::Models::DetectorRuleCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns detector catalog - list of detectors supported by Cloud Guard

Allowed values are: timeCreated, displayName

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :limit (Integer)

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

  • :lifecycle_state (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to ACTIVE)

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

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



2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 2762

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

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

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

  if opts[:sort_order] && !OCI::CloudGuard::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::CloudGuard::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 = '/detectors'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  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: 'CloudGuardClient#list_detectors') 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::CloudGuard::Models::DetectorCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_impacted_resources(problem_id, opts = {}) ⇒ Response

Note:

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

Returns a list of Impacted Resources for a CloudGuard Problem

Allowed values are: timeCreated

Parameters:

  • problem_id (String)

    OCId of the problem.

  • 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 ASC)

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 2840

def list_impacted_resources(problem_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#list_impacted_resources.' if logger

  raise "Missing the required parameter 'problem_id' when calling list_impacted_resources." if problem_id.nil?

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

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

  path = '/problems/{problemId}/impactedResources'.sub('{problemId}', problem_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: 'CloudGuardClient#list_impacted_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::CloudGuard::Models::ImpactedResourceCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns all ManagedList types supported by Cloud Guard Allowed values are: displayName, riskLevel

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :lifecycle_state (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to ACTIVE)

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

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 2913

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

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

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

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

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

  path = '/managedListTypes'
  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[: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: 'CloudGuardClient#list_managed_list_types') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudGuard::Models::ManagedListTypeCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a list of ListManagedLists. The ListManagedLists operation returns only the managed lists in compartmentId passed. The list does not include any subcompartments of the compartmentId passed.

The parameter accessLevel specifies whether to return ManagedLists in only those compartments for which the requestor has INSPECT permissions on at least one resource directly or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if Principal doesn't have access to even one of the child compartments. This is valid only when compartmentIdInSubtree is set to true.

The parameter compartmentIdInSubtree applies when you perform ListManagedLists on the compartmentId passed and when it is set to true, the entire hierarchy of compartments can be returned. To get a full list of all compartments and subcompartments in the tenancy (root compartment), set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE.

Allowed values are: timeCreated, displayName

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

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

  • :resource_metadata_only (BOOLEAN)

    Default is false. When set to true, the list of all Oracle Managed Resources Metadata supported by Cloud Guard are returned. (default to false)

  • :lifecycle_state (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to ACTIVE)

  • :list_type (String)

    The type of the ManagedList.

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

  • :compartment_id_in_subtree (BOOLEAN)

    Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel. (default to false)

  • :access_level (String)

    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. (default to RESTRICTED) Allowed values are: RESTRICTED, ACCESSIBLE

  • :sort_order (String)

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

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



3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 3023

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

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

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

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

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

  if opts[:sort_order] && !OCI::CloudGuard::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::CloudGuard::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 = '/managedLists'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:resourceMetadataOnly] = opts[:resource_metadata_only] if !opts[:resource_metadata_only].nil?
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:listType] = opts[:list_type] if opts[:list_type]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?
  query_params[:accessLevel] = opts[:access_level] if opts[:access_level]
  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: 'CloudGuardClient#list_managed_lists') 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::CloudGuard::Models::ManagedListCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns the list of global policy statements needed by Cloud Guard when enabling

Allowed values are: timeCreated, displayName

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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

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

Returns:



3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 3114

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

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

  if opts[:sort_order] && !OCI::CloudGuard::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::CloudGuard::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 = '/policies'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_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: 'CloudGuardClient#list_policies') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudGuard::Models::PolicyCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_problem_histories(compartment_id, problem_id, opts = {}) ⇒ Response

Note:

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

Returns a list of Actions done on CloudGuard Problem

Allowed values are: timeCreated

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • problem_id (String)

    OCId of the problem.

  • 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 ASC)

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 3188

def list_problem_histories(compartment_id, problem_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#list_problem_histories.' if logger

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

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

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

  path = '/problems/{problemId}/histories'.sub('{problemId}', problem_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_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: 'CloudGuardClient#list_problem_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::CloudGuard::Models::ProblemHistoryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a list of all Problems identified by the Cloud Guard

The ListProblems operation returns only the problems in compartmentId passed. The list does not include any subcompartments of the compartmentId passed.

The parameter accessLevel specifies whether to return only those compartments for which the requestor has INSPECT permissions on at least one resource directly or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if Principal doesn't have access to even one of the child compartments. This is valid only when compartmentIdInSubtree is set to true.

The parameter compartmentIdInSubtree applies when you perform ListProblems on the compartmentId passed and when it is set to true, the entire hierarchy of compartments can be returned. To get a full list of all compartments and subcompartments in the tenancy (root compartment), set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE.

Allowed values are: riskLevel, timeLastDetected, resourceName

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :time_last_detected_greater_than_or_equal_to (DateTime)

    Start time for a filter. If start time is not specified, start time will be set to current time - 30 days.

  • :time_last_detected_less_than_or_equal_to (DateTime)

    End time for a filter. If end time is not specified, end time will be set to current time.

  • :time_first_detected_greater_than_or_equal_to (DateTime)

    Start time for a filter. If start time is not specified, start time will be set to current time - 30 days.

  • :time_first_detected_less_than_or_equal_to (DateTime)

    End time for a filter. If end time is not specified, end time will be set to current time.

  • :lifecycle_detail (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to OPEN)

  • :lifecycle_state (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to ACTIVE)

  • :region (String)

    OCI Monitoring region.

  • :risk_level (String)

    Risk level of the Problem.

  • :resource_type (String)

    Resource Type associated with the resource.

  • :city (String)

    City of the problem.

  • :state (String)

    State of the problem.

  • :country (String)

    Country of the problem.

  • :label (String)

    Label associated with the Problem.

  • :detector_rule_id_list (Array<String>)

    Comma seperated list of detector rule ids to be passed in to match against Problems. (default to [])

  • :detector_type (String)

    The field to list the Problems by Detector Type. Valid values are IAAS_ACTIVITY_DETECTOR and IAAS_CONFIGURATION_DETECTOR

  • :target_id (String)

    The ID of the target in which to list resources.

  • :compartment_id_in_subtree (BOOLEAN)

    Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel. (default to false)

  • :access_level (String)

    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. (default to RESTRICTED) Allowed values are: RESTRICTED, ACCESSIBLE

  • :resource_id (String)

    The ID of the resource associated with the problem.

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

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 3307

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

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

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

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

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

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

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

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

  path = '/problems'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:timeLastDetectedGreaterThanOrEqualTo] = opts[:time_last_detected_greater_than_or_equal_to] if opts[:time_last_detected_greater_than_or_equal_to]
  query_params[:timeLastDetectedLessThanOrEqualTo] = opts[:time_last_detected_less_than_or_equal_to] if opts[:time_last_detected_less_than_or_equal_to]
  query_params[:timeFirstDetectedGreaterThanOrEqualTo] = opts[:time_first_detected_greater_than_or_equal_to] if opts[:time_first_detected_greater_than_or_equal_to]
  query_params[:timeFirstDetectedLessThanOrEqualTo] = opts[:time_first_detected_less_than_or_equal_to] if opts[:time_first_detected_less_than_or_equal_to]
  query_params[:lifecycleDetail] = opts[:lifecycle_detail] if opts[:lifecycle_detail]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:region] = opts[:region] if opts[:region]
  query_params[:riskLevel] = opts[:risk_level] if opts[:risk_level]
  query_params[:resourceType] = opts[:resource_type] if opts[:resource_type]
  query_params[:city] = opts[:city] if opts[:city]
  query_params[:state] = opts[:state] if opts[:state]
  query_params[:country] = opts[:country] if opts[:country]
  query_params[:label] = opts[:label] if opts[:label]
  query_params[:detectorRuleIdList] = OCI::ApiClient.build_collection_params(opts[:detector_rule_id_list], :multi) if opts[:detector_rule_id_list] && !opts[:detector_rule_id_list].empty?
  query_params[:detectorType] = opts[:detector_type] if opts[:detector_type]
  query_params[:targetId] = opts[:target_id] if opts[:target_id]
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?
  query_params[:accessLevel] = opts[:access_level] if opts[:access_level]
  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: 'CloudGuardClient#list_problems') 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::CloudGuard::Models::ProblemCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a list of all Recommendations.

Allowed values are: riskLevel, timeCreated

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :sort_order (String)

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

  • :sort_by (String)

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

  • :target_id (String)

    The ID of the target in which to list resources.

  • :compartment_id_in_subtree (BOOLEAN)

    Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel. (default to false)

  • :access_level (String)

    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. (default to RESTRICTED) Allowed values are: RESTRICTED, ACCESSIBLE

  • :lifecycle_state (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to ACTIVE)

  • :lifecycle_detail (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to OPEN)

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



3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 3430

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

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

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

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

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

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

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

  path = '/recommendations'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:targetId] = opts[:target_id] if opts[:target_id]
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?
  query_params[:accessLevel] = opts[:access_level] if opts[:access_level]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:lifecycleDetail] = opts[:lifecycle_detail] if opts[:lifecycle_detail]
  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: 'CloudGuardClient#list_recommendations') 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::CloudGuard::Models::RecommendationSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a list of resource types.

Allowed values are: displayName, riskLevel

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :lifecycle_state (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to ACTIVE)

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

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 3521

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

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

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

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

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

  path = '/resourceTypes'
  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[: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: 'CloudGuardClient#list_resource_types') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::CloudGuard::Models::ResourceTypeCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_responder_activities(problem_id, opts = {}) ⇒ Response

Note:

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

Returns a list of Responder activities done on CloudGuard Problem

Allowed values are: timeCreated, responderRuleName

Parameters:

  • problem_id (String)

    OCId of the problem.

  • 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 ASC)

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 3599

def list_responder_activities(problem_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#list_responder_activities.' if logger

  raise "Missing the required parameter 'problem_id' when calling list_responder_activities." if problem_id.nil?

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

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

  path = '/problems/{problemId}/responderActivities'.sub('{problemId}', problem_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: 'CloudGuardClient#list_responder_activities') 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::CloudGuard::Models::ResponderActivityCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a list of Responder Executions. A Responder Execution is an entity that tracks the collective execution of multiple Responder Rule Executions for a given Problem.

Allowed values are: timeCreated, responderRuleName, resourceName, timeCompleted

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :compartment_id_in_subtree (BOOLEAN)

    Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel. (default to false)

  • :access_level (String)

    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. (default to RESTRICTED) Allowed values are: RESTRICTED, ACCESSIBLE

  • :responder_rule_ids (Array<String>)

    Responder Rule Ids filter for the Responder Executions. (default to [])

  • :time_created_greater_than_or_equal_to (DateTime)

    Creation Start time for filtering

  • :time_created_less_than_or_equal_to (DateTime)

    Creation End time for filtering

  • :time_completed_greater_than_or_equal_to (DateTime)

    Completion End Time

  • :time_completed_less_than_or_equal_to (DateTime)

    Completion Start Time

  • :target_id (String)

    The ID of the target in which to list resources.

  • :resource_type (String)

    Resource Type associated with the resource.

  • :responder_type (String)

    The field to list the Responder Executions by Responder Type. Valid values are REMEDIATION and NOTIFICATION

    Allowed values are: REMEDIATION, NOTIFICATION

  • :responder_execution_status (String)

    The status of the responder execution in which to list responders. (default to ALL)

  • :responder_execution_mode (String)

    The mode of the responder execution in which to list responders. (default to ALL)

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

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 3696

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

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

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

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

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

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

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

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

  path = '/responderExecutions'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?
  query_params[:accessLevel] = opts[:access_level] if opts[:access_level]
  query_params[:responderRuleIds] = OCI::ApiClient.build_collection_params(opts[:responder_rule_ids], :multi) if opts[:responder_rule_ids] && !opts[:responder_rule_ids].empty?
  query_params[:timeCreatedGreaterThanOrEqualTo] = opts[:time_created_greater_than_or_equal_to] if opts[:time_created_greater_than_or_equal_to]
  query_params[:timeCreatedLessThanOrEqualTo] = opts[:time_created_less_than_or_equal_to] if opts[:time_created_less_than_or_equal_to]
  query_params[:timeCompletedGreaterThanOrEqualTo] = opts[:time_completed_greater_than_or_equal_to] if opts[:time_completed_greater_than_or_equal_to]
  query_params[:timeCompletedLessThanOrEqualTo] = opts[:time_completed_less_than_or_equal_to] if opts[:time_completed_less_than_or_equal_to]
  query_params[:targetId] = opts[:target_id] if opts[:target_id]
  query_params[:resourceType] = opts[:resource_type] if opts[:resource_type]
  query_params[:responderType] = opts[:responder_type] if opts[:responder_type]
  query_params[:responderExecutionStatus] = opts[:responder_execution_status] if opts[:responder_execution_status]
  query_params[:responderExecutionMode] = opts[:responder_execution_mode] if opts[:responder_execution_mode]
  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: 'CloudGuardClient#list_responder_executions') 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::CloudGuard::Models::ResponderExecutionCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_responder_recipe_responder_rules(responder_recipe_id, compartment_id, opts = {}) ⇒ Response

Note:

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

Returns a list of ResponderRule associated with ResponderRecipe.

Allowed values are: displayName, riskLevel

Parameters:

  • responder_recipe_id (String)

    OCID of ResponderRecipe

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

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

  • :lifecycle_state (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to ACTIVE)

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

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 3800

def list_responder_recipe_responder_rules(responder_recipe_id, compartment_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#list_responder_recipe_responder_rules.' if logger

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

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

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

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

  path = '/responderRecipes/{responderRecipeId}/responderRules'.sub('{responderRecipeId}', responder_recipe_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[: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: 'CloudGuardClient#list_responder_recipe_responder_rules') 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::CloudGuard::Models::ResponderRecipeResponderRuleCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a list of all ResponderRecipes in a compartment The ListResponderRecipe operation returns only the targets in compartmentId passed. The list does not include any subcompartments of the compartmentId passed.

The parameter accessLevel specifies whether to return only those compartments for which the requestor has INSPECT permissions on at least one resource directly or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if Principal doesn't have access to even one of the child compartments. This is valid only when compartmentIdInSubtree is set to true.

The parameter compartmentIdInSubtree applies when you perform ListResponderRecipe on the compartmentId passed and when it is set to true, the entire hierarchy of compartments can be returned. To get a full list of all compartments and subcompartments in the tenancy (root compartment), set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE.

Allowed values are: timeCreated, displayName

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :resource_metadata_only (BOOLEAN)

    Default is false. When set to true, the list of all Oracle Managed Resources Metadata supported by Cloud Guard are returned. (default to false)

  • :display_name (String)

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

  • :lifecycle_state (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to ACTIVE)

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

  • :compartment_id_in_subtree (BOOLEAN)

    Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel. (default to false)

  • :access_level (String)

    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. (default to RESTRICTED) Allowed values are: RESTRICTED, ACCESSIBLE

  • :sort_order (String)

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

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



3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 3912

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

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

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

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

  if opts[:sort_order] && !OCI::CloudGuard::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::CloudGuard::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 = '/responderRecipes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:resourceMetadataOnly] = opts[:resource_metadata_only] if !opts[:resource_metadata_only].nil?
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  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[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?
  query_params[:accessLevel] = opts[:access_level] if opts[:access_level]
  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: 'CloudGuardClient#list_responder_recipes') 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::CloudGuard::Models::ResponderRecipeCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a list of ResponderRule.

Allowed values are: timeCreated, displayName

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

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

  • :lifecycle_state (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to ACTIVE)

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

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



4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 4000

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

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

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

  if opts[:sort_order] && !OCI::CloudGuard::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::CloudGuard::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 = '/responderRules'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[: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: 'CloudGuardClient#list_responder_rules') 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::CloudGuard::Models::ResponderRuleCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_target_detector_recipe_detector_rules(target_id, target_detector_recipe_id, compartment_id, opts = {}) ⇒ Response

Note:

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

Returns a list of DetectorRule associated with DetectorRecipe within a Target.

Allowed values are: displayName, riskLevel

Parameters:

  • target_id (String)

    OCID of target

  • target_detector_recipe_id (String)

    OCID of TargetDetectorRecipe

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

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

  • :lifecycle_state (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to ACTIVE)

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

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 4083

def list_target_detector_recipe_detector_rules(target_id, target_detector_recipe_id, compartment_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#list_target_detector_recipe_detector_rules.' if logger

  raise "Missing the required parameter 'target_id' when calling list_target_detector_recipe_detector_rules." if target_id.nil?
  raise "Missing the required parameter 'target_detector_recipe_id' when calling list_target_detector_recipe_detector_rules." if target_detector_recipe_id.nil?
  raise "Missing the required parameter 'compartment_id' when calling list_target_detector_recipe_detector_rules." if compartment_id.nil?

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

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

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

  path = '/targets/{targetId}/targetDetectorRecipes/{targetDetectorRecipeId}/detectorRules'.sub('{targetId}', target_id.to_s).sub('{targetDetectorRecipeId}', target_detector_recipe_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[: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: 'CloudGuardClient#list_target_detector_recipe_detector_rules') 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::CloudGuard::Models::TargetDetectorRecipeDetectorRuleCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_target_detector_recipes(target_id, compartment_id, opts = {}) ⇒ Response

Note:

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

Returns a list of all detector recipes associated with the target identified by targetId Allowed values are: timeCreated, displayName

Parameters:

  • target_id (String)

    OCID of target

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

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

  • :lifecycle_state (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to ACTIVE)

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

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



4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 4168

def list_target_detector_recipes(target_id, compartment_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#list_target_detector_recipes.' if logger

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

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

  if opts[:sort_order] && !OCI::CloudGuard::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::CloudGuard::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
  raise "Parameter value for 'target_id' must not be blank" if OCI::Internal::Util.blank_string?(target_id)

  path = '/targets/{targetId}/targetDetectorRecipes'.sub('{targetId}', target_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[: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: 'CloudGuardClient#list_target_detector_recipes') 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::CloudGuard::Models::TargetDetectorRecipeCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_target_responder_recipe_responder_rules(target_id, target_responder_recipe_id, compartment_id, opts = {}) ⇒ Response

Note:

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

Returns a list of ResponderRule associated with ResponderRecipe within a Target.

Allowed values are: displayName, riskLevel

Parameters:

  • target_id (String)

    OCID of target

  • target_responder_recipe_id (String)

    OCID of TargetResponderRecipe

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

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

  • :lifecycle_state (String)

    The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active. (default to ACTIVE)

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

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
# File 'lib/oci/cloud_guard/cloud_guard_client.rb', line 4253

def list_target_responder_recipe_responder_rules(target_id, target_responder_recipe_id, compartment_id, opts = {})
  logger.debug 'Calling operation CloudGuardClient#list_target_responder_recipe_responder_rules.' if logger

  raise "Missing the required parameter 'target_id' when calling list_target_responder_recipe_responder_rules." if target_id.nil?
  raise "Missing the required parameter 'target_responder_recipe_id' when calling list_target_responder_recipe_responder_rules." if target_responder_recipe_id.nil?
  raise "Missing the required parameter 'compartment_id' when calling list_target_responder_recipe_responder_rules." if compartment_id.nil?

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

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

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