Class: OCI::Adm::ApplicationDependencyManagementClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/adm/application_dependency_management_client.rb

Overview

Use the Application Dependency Management API to create knowledge bases and vulnerability audits. For more information, see ADM.

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

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

This client is not thread-safe

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

Parameters:

  • config (Config) (defaults to: nil)

    A Config object.

  • region (String) (defaults to: nil)

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

  • endpoint (String) (defaults to: nil)

    The fully qualified endpoint URL

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

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

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

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

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

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



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

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

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

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

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

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



15
16
17
# File 'lib/oci/adm/application_dependency_management_client.rb', line 15

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


19
20
21
# File 'lib/oci/adm/application_dependency_management_client.rb', line 19

def endpoint
  @endpoint
end

#regionString

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

Returns:

  • (String)


29
30
31
# File 'lib/oci/adm/application_dependency_management_client.rb', line 29

def region
  @region
end

#retry_configOCI::Retry::RetryConfig (readonly)

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



25
26
27
# File 'lib/oci/adm/application_dependency_management_client.rb', line 25

def retry_config
  @retry_config
end

Instance Method Details

#activate_remediation_recipe(remediation_recipe_id, opts = {}) ⇒ Response

Note:

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

Activates the specified Remediation Recipe.

Parameters:

  • remediation_recipe_id (String)

    The Oracle Cloud Identifier (OCID) of a Remediation Recipe, as a URL path parameter.

  • 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



117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# File 'lib/oci/adm/application_dependency_management_client.rb', line 117

def activate_remediation_recipe(remediation_recipe_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#activate_remediation_recipe.' if logger

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

  path = '/remediationRecipes/{remediationRecipeId}/actions/activate'.sub('{remediationRecipeId}', remediation_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: 'ApplicationDependencyManagementClient#activate_remediation_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
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#cancel_remediation_run(remediation_run_id, opts = {}) ⇒ Response

Note:

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

Cancels the specified remediation run.

Parameters:

  • remediation_run_id (String)

    Unique Remediation Run identifier path parameter.

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



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

def cancel_remediation_run(remediation_run_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#cancel_remediation_run.' if logger

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

  path = '/remediationRuns/{remediationRunId}/actions/cancel'.sub('{remediationRunId}', remediation_run_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: 'ApplicationDependencyManagementClient#cancel_remediation_run') 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::Adm::Models::RemediationRun'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#cancel_work_request(work_request_id, opts = {}) ⇒ Response

Note:

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

Cancel work request with the given ID.

Parameters:

  • work_request_id (String)

    The Oracle Cloud Identifier (OCID) of the asynchronous 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.

Returns:

  • (Response)

    A Response object with data of type nil



246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
# File 'lib/oci/adm/application_dependency_management_client.rb', line 246

def cancel_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#cancel_work_request.' if logger

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

  path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  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: 'ApplicationDependencyManagementClient#cancel_work_request') 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

#change_knowledge_base_compartment(knowledge_base_id, change_knowledge_base_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves a Knowledge Base from one compartment to another.

Parameters:

  • knowledge_base_id (String)

    The Oracle Cloud Identifier (OCID) of a Knowledge Base, as a URL path parameter.

  • change_knowledge_base_compartment_details (OCI::Adm::Models::ChangeKnowledgeBaseCompartmentDetails)

    The information to be updated.

  • 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



313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
# File 'lib/oci/adm/application_dependency_management_client.rb', line 313

def change_knowledge_base_compartment(knowledge_base_id, change_knowledge_base_compartment_details, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#change_knowledge_base_compartment.' if logger

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

  path = '/knowledgeBases/{knowledgeBaseId}/actions/changeCompartment'.sub('{knowledgeBaseId}', knowledge_base_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_knowledge_base_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ApplicationDependencyManagementClient#change_knowledge_base_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_remediation_recipe_compartment(remediation_recipe_id, change_remediation_recipe_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves a Remediation Recipe from one compartment to another.

Parameters:

  • remediation_recipe_id (String)

    The Oracle Cloud Identifier (OCID) of a Remediation Recipe, as a URL path parameter.

  • change_remediation_recipe_compartment_details (OCI::Adm::Models::ChangeRemediationRecipeCompartmentDetails)

    The information to be updated.

  • 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



383
384
385
386
387
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
# File 'lib/oci/adm/application_dependency_management_client.rb', line 383

def change_remediation_recipe_compartment(remediation_recipe_id, change_remediation_recipe_compartment_details, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#change_remediation_recipe_compartment.' if logger

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

  path = '/remediationRecipes/{remediationRecipeId}/actions/changeCompartment'.sub('{remediationRecipeId}', remediation_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_remediation_recipe_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ApplicationDependencyManagementClient#change_remediation_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_remediation_run_compartment(remediation_run_id, change_remediation_run_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves a remediation run from one 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



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
488
489
490
491
492
# File 'lib/oci/adm/application_dependency_management_client.rb', line 453

def change_remediation_run_compartment(remediation_run_id, change_remediation_run_compartment_details, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#change_remediation_run_compartment.' if logger

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

  path = '/remediationRuns/{remediationRunId}/actions/changeCompartment'.sub('{remediationRunId}', remediation_run_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_remediation_run_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ApplicationDependencyManagementClient#change_remediation_run_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_vulnerability_audit_compartment(vulnerability_audit_id, change_vulnerability_audit_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves a Vulnerability Audit from one 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



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
550
551
552
553
554
555
556
557
558
559
560
561
562
# File 'lib/oci/adm/application_dependency_management_client.rb', line 523

def change_vulnerability_audit_compartment(vulnerability_audit_id, change_vulnerability_audit_compartment_details, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#change_vulnerability_audit_compartment.' if logger

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

  path = '/vulnerabilityAudits/{vulnerabilityAuditId}/actions/changeCompartment'.sub('{vulnerabilityAuditId}', vulnerability_audit_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_vulnerability_audit_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ApplicationDependencyManagementClient#change_vulnerability_audit_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_knowledge_base(create_knowledge_base_details, opts = {}) ⇒ Response

Note:

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

Creates a new Knowledge Base.

Parameters:

Options Hash (opts):

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

    The retry configuration to apply to this operation. If no key is provided then the 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.

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



586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
# File 'lib/oci/adm/application_dependency_management_client.rb', line 586

def create_knowledge_base(create_knowledge_base_details, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#create_knowledge_base.' if logger

  raise "Missing the required parameter 'create_knowledge_base_details' when calling create_knowledge_base." if create_knowledge_base_details.nil?

  path = '/knowledgeBases'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_knowledge_base_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ApplicationDependencyManagementClient#create_knowledge_base') 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_remediation_recipe(create_remediation_recipe_details, opts = {}) ⇒ Response

Note:

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

Creates a new Remediation Recipe.

Parameters:

Options Hash (opts):

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

    The retry configuration to apply to this operation. If no key is provided then the 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.

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



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
677
678
679
680
681
682
# File 'lib/oci/adm/application_dependency_management_client.rb', line 646

def create_remediation_recipe(create_remediation_recipe_details, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#create_remediation_recipe.' if logger

  raise "Missing the required parameter 'create_remediation_recipe_details' when calling create_remediation_recipe." if create_remediation_recipe_details.nil?

  path = '/remediationRecipes'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_remediation_recipe_details)

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

#create_remediation_run(create_remediation_run_details, opts = {}) ⇒ Response

Note:

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

Creates a new remediation run.

Parameters:

Options Hash (opts):

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

    The retry configuration to apply to this operation. If no key is provided then the 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.

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



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
742
743
# File 'lib/oci/adm/application_dependency_management_client.rb', line 706

def create_remediation_run(create_remediation_run_details, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#create_remediation_run.' if logger

  raise "Missing the required parameter 'create_remediation_run_details' when calling create_remediation_run." if create_remediation_run_details.nil?

  path = '/remediationRuns'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_remediation_run_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ApplicationDependencyManagementClient#create_remediation_run') 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::Adm::Models::RemediationRun'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_vulnerability_audit(create_vulnerability_audit_details, opts = {}) ⇒ Response

Note:

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

Creates a new Vulnerability Audit by providing a tree of Application Dependencies.

Parameters:

Options Hash (opts):

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

    The retry configuration to apply to this operation. If no key is provided then the 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.

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:



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

def create_vulnerability_audit(create_vulnerability_audit_details, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#create_vulnerability_audit.' if logger

  raise "Missing the required parameter 'create_vulnerability_audit_details' when calling create_vulnerability_audit." if create_vulnerability_audit_details.nil?

  path = '/vulnerabilityAudits'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_vulnerability_audit_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ApplicationDependencyManagementClient#create_vulnerability_audit') 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::Adm::Models::VulnerabilityAudit'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#deactivate_remediation_recipe(remediation_recipe_id, opts = {}) ⇒ Response

Note:

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

Deactivates the specified Remediation Recipe.

Parameters:

  • remediation_recipe_id (String)

    The Oracle Cloud Identifier (OCID) of a Remediation Recipe, as a URL path parameter.

  • 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



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
870
871
# File 'lib/oci/adm/application_dependency_management_client.rb', line 835

def deactivate_remediation_recipe(remediation_recipe_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#deactivate_remediation_recipe.' if logger

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

  path = '/remediationRecipes/{remediationRecipeId}/actions/deactivate'.sub('{remediationRecipeId}', remediation_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: 'ApplicationDependencyManagementClient#deactivate_remediation_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
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_knowledge_base(knowledge_base_id, opts = {}) ⇒ Response

Note:

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

Deletes the specified Knowledge Base.

Parameters:

  • knowledge_base_id (String)

    The Oracle Cloud Identifier (OCID) of a Knowledge Base, as a URL path parameter.

  • 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



895
896
897
898
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
# File 'lib/oci/adm/application_dependency_management_client.rb', line 895

def delete_knowledge_base(knowledge_base_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#delete_knowledge_base.' if logger

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

  path = '/knowledgeBases/{knowledgeBaseId}'.sub('{knowledgeBaseId}', knowledge_base_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: 'ApplicationDependencyManagementClient#delete_knowledge_base') 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_remediation_recipe(remediation_recipe_id, opts = {}) ⇒ Response

Note:

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

Deletes the specified Remediation Recipe.

Parameters:

  • remediation_recipe_id (String)

    The Oracle Cloud Identifier (OCID) of a Remediation Recipe, as a URL path parameter.

  • 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



955
956
957
958
959
960
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
# File 'lib/oci/adm/application_dependency_management_client.rb', line 955

def delete_remediation_recipe(remediation_recipe_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#delete_remediation_recipe.' if logger

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

  path = '/remediationRecipes/{remediationRecipeId}'.sub('{remediationRecipeId}', remediation_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: 'ApplicationDependencyManagementClient#delete_remediation_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_remediation_run(remediation_run_id, opts = {}) ⇒ Response

Note:

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

Deletes the specified remediation run.

Parameters:

  • remediation_run_id (String)

    Unique Remediation Run identifier path parameter.

  • 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



1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
# File 'lib/oci/adm/application_dependency_management_client.rb', line 1015

def delete_remediation_run(remediation_run_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#delete_remediation_run.' if logger

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

  path = '/remediationRuns/{remediationRunId}'.sub('{remediationRunId}', remediation_run_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: 'ApplicationDependencyManagementClient#delete_remediation_run') 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_vulnerability_audit(vulnerability_audit_id, opts = {}) ⇒ Response

Note:

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

Deletes the specified Vulnerability Audit.

Parameters:

  • vulnerability_audit_id (String)

    Unique Vulnerability Audit identifier path parameter.

  • 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



1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
# File 'lib/oci/adm/application_dependency_management_client.rb', line 1075

def delete_vulnerability_audit(vulnerability_audit_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#delete_vulnerability_audit.' if logger

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

  path = '/vulnerabilityAudits/{vulnerabilityAuditId}'.sub('{vulnerabilityAuditId}', vulnerability_audit_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: 'ApplicationDependencyManagementClient#delete_vulnerability_audit') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_knowledge_base(knowledge_base_id, opts = {}) ⇒ Response

Note:

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

Returns the details of the specified Knowledge Base.

Parameters:

  • knowledge_base_id (String)

    The Oracle Cloud Identifier (OCID) of a Knowledge Base, as a URL path parameter.

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



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

def get_knowledge_base(knowledge_base_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#get_knowledge_base.' if logger

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

  path = '/knowledgeBases/{knowledgeBaseId}'.sub('{knowledgeBaseId}', knowledge_base_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: 'ApplicationDependencyManagementClient#get_knowledge_base') 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::Adm::Models::KnowledgeBase'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_remediation_recipe(remediation_recipe_id, opts = {}) ⇒ Response

Note:

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

Returns the details of the specified RemediationRecipe.

Parameters:

  • remediation_recipe_id (String)

    The Oracle Cloud Identifier (OCID) of a Remediation Recipe, as a URL path parameter.

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



1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
# File 'lib/oci/adm/application_dependency_management_client.rb', line 1183

def get_remediation_recipe(remediation_recipe_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#get_remediation_recipe.' if logger

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

  path = '/remediationRecipes/{remediationRecipeId}'.sub('{remediationRecipeId}', remediation_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: 'ApplicationDependencyManagementClient#get_remediation_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::Adm::Models::RemediationRecipe'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_remediation_run(remediation_run_id, opts = {}) ⇒ Response

Note:

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

Returns the details of the specified remediation run.

Parameters:

  • remediation_run_id (String)

    Unique Remediation Run identifier path parameter.

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



1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
# File 'lib/oci/adm/application_dependency_management_client.rb', line 1237

def get_remediation_run(remediation_run_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#get_remediation_run.' if logger

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

  path = '/remediationRuns/{remediationRunId}'.sub('{remediationRunId}', remediation_run_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: 'ApplicationDependencyManagementClient#get_remediation_run') 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::Adm::Models::RemediationRun'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_stage(remediation_run_id, stage_type, opts = {}) ⇒ Response

Note:

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

Returns the details of the specified Remediation Run Stage.

Parameters:

  • remediation_run_id (String)

    Unique Remediation Run identifier path parameter.

  • stage_type (String)

    The type of Remediation Run Stage, as a URL path parameter.

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



1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
# File 'lib/oci/adm/application_dependency_management_client.rb', line 1292

def get_stage(remediation_run_id, stage_type, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#get_stage.' if logger

  raise "Missing the required parameter 'remediation_run_id' when calling get_stage." if remediation_run_id.nil?
  raise "Missing the required parameter 'stage_type' when calling get_stage." if stage_type.nil?
  unless OCI::Adm::Models::REMEDIATION_RUN_STAGE_TYPE_ENUM.include?(stage_type)
    raise 'Invalid value for "stage_type", must be one of the values in OCI::Adm::Models::REMEDIATION_RUN_STAGE_TYPE_ENUM.'
  end

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

  path = '/remediationRuns/{remediationRunId}/stages/{stageType}'.sub('{remediationRunId}', remediation_run_id.to_s).sub('{stageType}', stage_type.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: 'ApplicationDependencyManagementClient#get_stage') 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::Adm::Models::RemediationRunStage'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_vulnerability_audit(vulnerability_audit_id, opts = {}) ⇒ Response

Note:

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

Returns the details of the specified Vulnerability Audit.

Parameters:

  • vulnerability_audit_id (String)

    Unique Vulnerability Audit identifier path parameter.

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



1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
# File 'lib/oci/adm/application_dependency_management_client.rb', line 1352

def get_vulnerability_audit(vulnerability_audit_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#get_vulnerability_audit.' if logger

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

  path = '/vulnerabilityAudits/{vulnerabilityAuditId}'.sub('{vulnerabilityAuditId}', vulnerability_audit_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: 'ApplicationDependencyManagementClient#get_vulnerability_audit') 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::Adm::Models::VulnerabilityAudit'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_work_request(work_request_id, opts = {}) ⇒ Response

Note:

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

Gets the status of the work request with the given ID.

Parameters:

  • work_request_id (String)

    The Oracle Cloud Identifier (OCID) of the asynchronous 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:



1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
# File 'lib/oci/adm/application_dependency_management_client.rb', line 1406

def get_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#get_work_request.' if logger

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

  path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  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: 'ApplicationDependencyManagementClient#get_work_request') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Adm::Models::WorkRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_application_dependency_recommendations(remediation_run_id, opts = {}) ⇒ Response

Note:

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

Returns a list of application dependency with their associated recommendations.

Parameters:

  • remediation_run_id (String)

    Unique Remediation Run identifier path parameter.

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

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

  • :gav (String)

    A filter to return only resources that match the entire GAV (Group Artifact Version) identifier given.

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. If sort order is dfs, the nodes are returned by going through the application dependency tree in a depth-first manner. Children are sorted based on their GAV property alphabetically (either ascending or descending, depending on the order parameter). Default order is ascending. If sort order is bfs, the nodes are returned by going through the application dependency tree in a breadth-first manner. Children are sorted based on their GAV property alphabetically (either ascending or descending, depending on the order parameter). Default order is ascending. Default order for gav is ascending where ascending corresponds to alphanumerical order. Default order for nodeId is ascending where ascending corresponds to alphanumerical order. Sorting by DFS or BFS cannot be used in conjunction with the following query parameters: "gav", "cvssV2GreaterThanOrEqual", "cvssV3GreaterThanOrEqual" and "vulnerabilityId". (default to gav) Allowed values are: gav, nodeId, dfs, bfs

Returns:



1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
# File 'lib/oci/adm/application_dependency_management_client.rb', line 1472

def list_application_dependency_recommendations(remediation_run_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#list_application_dependency_recommendations.' if logger

  raise "Missing the required parameter 'remediation_run_id' when calling list_application_dependency_recommendations." if remediation_run_id.nil?

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

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

  path = '/remediationRuns/{remediationRunId}/applicationDependencyRecommendations'.sub('{remediationRunId}', remediation_run_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[:gav] = opts[:gav] if opts[:gav]
  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: 'ApplicationDependencyManagementClient#list_application_dependency_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::Adm::Models::ApplicationDependencyRecommendationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_application_dependency_vulnerabilities(vulnerability_audit_id, opts = {}) ⇒ Response

Note:

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

Returns a list of Application Dependencies with their associated vulnerabilities.

Parameters:

  • vulnerability_audit_id (String)

    Unique Vulnerability Audit identifier path parameter.

  • 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

  • :vulnerability_id (String)

    A filter to return only Vulnerability Audits that match the specified id.

  • :cvss_v3_greater_than_or_equal (Float)

    A filter that returns only Vulnerability Audits that have a Common Vulnerability Scoring System Version 3 (CVSS V3) greater or equal than the specified value. (default to 0)

  • :cvss_v2_greater_than_or_equal (Float)

    A filter that returns only Vulnerability Audits that have a Common Vulnerability Scoring System Version 2 (CVSS V2) greater or equal than the specified value. (default to 0)

  • :limit (Integer)

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

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. If sort order is dfs, the nodes are returned by going through the application dependency tree in a depth-first manner. Children are sorted based on their GAV property alphabetically (either ascending or descending, depending on the order parameter). Default order is ascending. If sort order is bfs, the nodes are returned by going through the application dependency tree in a breadth-first manner. Children are sorted based on their GAV property alphabetically (either ascending or descending, depending on the order parameter). Default order is ascending. Default order for gav is ascending where ascending corresponds to alphanumerical order. Default order for nodeId is ascending where ascending corresponds to alphanumerical order. Sorting by DFS or BFS cannot be used in conjunction with the following query parameters: "gav", "cvssV2GreaterThanOrEqual", "cvssV3GreaterThanOrEqual" and "vulnerabilityId". (default to gav) Allowed values are: gav, nodeId, dfs, bfs

  • :root_node_id (String)

    A filter to override the top level root identifier with the new given value. The application dependency tree will only be traversed from the given node. Query parameters "cvssV2GreaterThanOrEqual", "cvssV3GreaterThanOrEqual", "gav" and "vulnerabilityId" cannot be used in conjunction with this parameter. (default to null)

  • :depth (Integer)

    A filter to limit depth of the application dependencies tree traversal. Additionally query parameters such as "cvssV2GreaterThanOrEqual", "cvssV3GreaterThanOrEqual", "gav" and "vulnerabilityId" can't be used in conjunction with this latter.

  • :gav (String)

    A filter to return only resources that match the entire GAV (Group Artifact Version) identifier given.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
# File 'lib/oci/adm/application_dependency_management_client.rb', line 1562

def list_application_dependency_vulnerabilities(vulnerability_audit_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#list_application_dependency_vulnerabilities.' if logger

  raise "Missing the required parameter 'vulnerability_audit_id' when calling list_application_dependency_vulnerabilities." if vulnerability_audit_id.nil?

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

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

  path = '/vulnerabilityAudits/{vulnerabilityAuditId}/applicationDependencyVulnerabilities'.sub('{vulnerabilityAuditId}', vulnerability_audit_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:vulnerabilityId] = opts[:vulnerability_id] if opts[:vulnerability_id]
  query_params[:cvssV3GreaterThanOrEqual] = opts[:cvss_v3_greater_than_or_equal] if opts[:cvss_v3_greater_than_or_equal]
  query_params[:cvssV2GreaterThanOrEqual] = opts[:cvss_v2_greater_than_or_equal] if opts[:cvss_v2_greater_than_or_equal]
  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[:rootNodeId] = opts[:root_node_id] if opts[:root_node_id]
  query_params[:depth] = opts[:depth] if opts[:depth]
  query_params[:gav] = opts[:gav] if opts[:gav]

  # 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: 'ApplicationDependencyManagementClient#list_application_dependency_vulnerabilities') 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::Adm::Models::ApplicationDependencyVulnerabilityCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_knowledge_bases(opts = {}) ⇒ Response

Note:

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

Returns a list of KnowledgeBases based on the specified query parameters. At least id or compartmentId query parameter must be provided.

Parameters:

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

    the optional parameters

Options Hash (opts):

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

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

  • :id (String)

    A filter to return only resources that match the specified identifier. Required only if the compartmentId query parameter is not specified.

  • :sort_by (String)

    The field used to sort Knowledge Bases. Only one sort order is allowed. Default order for displayName is ascending alphabetical order. Default order for lifecyleState is the following sequence: CREATING, ACTIVE, UPDATING, FAILED, DELETING, and DELETED.Default order for timeCreated is descending. Default order for timeUpdated is descending. (default to timeCreated) Allowed values are: DISPLAY_NAME, LIFECYCLE_STATE, TIME_CREATED, TIME_UPDATED

  • :lifecycle_state (String)

    A filter to return only Knowledge Bases that match the specified lifecycleState.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

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

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :compartment_id (String)

    A filter to return only resources that belong to the specified compartment identifier. Required only if the id query param is not specified.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
# File 'lib/oci/adm/application_dependency_management_client.rb', line 1652

def list_knowledge_bases(opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#list_knowledge_bases.' if logger


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

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

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

  path = '/knowledgeBases'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:compartmentId] = opts[:compartment_id] if opts[: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: 'ApplicationDependencyManagementClient#list_knowledge_bases') 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::Adm::Models::KnowledgeBaseCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_remediation_recipes(opts = {}) ⇒ Response

Note:

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

Returns a list of Remediation Recipes based on the specified query parameters. The query parameters compartmentId or id must be provided.

Parameters:

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

    the optional parameters

Options Hash (opts):

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

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

  • :id (String)

    A filter to return only resources that match the specified identifier. Required only if the compartmentId query parameter is not specified.

  • :sort_by (String)

    The field used to sort Remediation Recipes. Only one sort order is allowed. Default order for displayName is ascending alphabetical order. Default order for lifecyleState is the following sequence: CREATING, ACTIVE, UPDATING, INACTIVE, FAILED, DELETING, and DELETED. Default order for timeCreated is descending. Default order for timeUpdated is descending. Default order for type is the following sequence: ADM. (default to timeCreated) Allowed values are: DISPLAY_NAME, LIFECYCLE_STATE, TIME_CREATED, TIME_UPDATED, TYPE

  • :lifecycle_state (String)

    A filter to return only Remediation Recipes that match the specified lifecycleState.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

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

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :compartment_id (String)

    A filter to return only resources that belong to the specified compartment identifier. Required only if the id query param is not specified.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
# File 'lib/oci/adm/application_dependency_management_client.rb', line 1744

def list_remediation_recipes(opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#list_remediation_recipes.' if logger


  if opts[:sort_by] && !%w[DISPLAY_NAME LIFECYCLE_STATE TIME_CREATED TIME_UPDATED TYPE].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of DISPLAY_NAME, LIFECYCLE_STATE, TIME_CREATED, TIME_UPDATED, TYPE.'
  end

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

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

  path = '/remediationRecipes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:compartmentId] = opts[:compartment_id] if opts[: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: 'ApplicationDependencyManagementClient#list_remediation_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::Adm::Models::RemediationRecipeCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_remediation_runs(opts = {}) ⇒ Response

Note:

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

Returns a list of remediation runs contained by a compartment. The query parameter compartmentId is required unless the query parameter id is specified.

Parameters:

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

    the optional parameters

Options Hash (opts):

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

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

  • :id (String)

    A filter to return only resources that match the specified identifier. Required only if the compartmentId query parameter is not specified.

  • :remediation_recipe_id (String)

    A filter to return only resources that match the specified Remediation Recipe identifier.

  • :lifecycle_state (String)

    A filter to return only Remediation Runs that match the specified lifecycleState.

  • :display_name (String)

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

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

  • :sort_by (String)

    The field used to sort Remediation Runs. Only one sort order is allowed. Default order for timeCreated is descending. Default order for timeFinished is descending. Default order for timeStarted is descending. Default order for displayName is ascending alphabetical order. Default order for lifecycleState is the following sequence: CREATING, ACTIVE, UPDATING, DELETING, DELETED, and FAILED. Default order for currentStageType is the following sequence: DETECT, RECOMMEND, VERIFY, and APPLY. (default to timeCreated) Allowed values are: timeCreated, timeFinished, timeStarted, displayName, lifecycleState, currentStageType

  • :compartment_id (String)

    A filter to return only resources that belong to the specified compartment identifier. Required only if the id query param is not specified.

  • :limit (Integer)

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

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
# File 'lib/oci/adm/application_dependency_management_client.rb', line 1838

def list_remediation_runs(opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#list_remediation_runs.' if logger


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

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

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

  path = '/remediationRuns'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:remediationRecipeId] = opts[:remediation_recipe_id] if opts[:remediation_recipe_id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  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: 'ApplicationDependencyManagementClient#list_remediation_runs') 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::Adm::Models::RemediationRunCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_stages(remediation_run_id, opts = {}) ⇒ Response

Note:

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

Returns a list of Remediation Run Stages based on the specified query parameters and Remediation Run identifier.

Parameters:

  • remediation_run_id (String)

    Unique Remediation Run identifier path parameter.

  • 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

  • :type (String)

    A filter to return only Stages that match the specified type.

  • :status (String)

    A filter to return only Stages that match the specified status.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

  • :limit (Integer)

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

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :sort_by (String)

    The field used to sort Stages. Only one sort order is allowed. Default order for status is the following sequence: CREATED, IN_PROGRESS, SUCCEEDED, FAILED, CANCELING, and CANCELED. Default order for timeCreated is descending. Default order for timeFinished is descending. Default order for timeStarted is descending. Default order for type is the following sequence: DETECT, RECOMMEND, VERIFY, and APPLY. (default to timeCreated) Allowed values are: status, timeCreated, timeFinished, timeStarted, type

Returns:



1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
# File 'lib/oci/adm/application_dependency_management_client.rb', line 1924

def list_stages(remediation_run_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#list_stages.' if logger

  raise "Missing the required parameter 'remediation_run_id' when calling list_stages." if remediation_run_id.nil?

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

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

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

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

  path = '/remediationRuns/{remediationRunId}/stages'.sub('{remediationRunId}', remediation_run_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:type] = opts[:type] if opts[:type]
  query_params[:status] = opts[:status] if opts[:status]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  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: 'ApplicationDependencyManagementClient#list_stages') 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::Adm::Models::RemediationRunStageCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_vulnerability_audits(opts = {}) ⇒ Response

Note:

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

Returns a list of Vulnerability Audits based on the specified query parameters. At least one of id, compartmentId query parameter must be provided.

Parameters:

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

    the optional parameters

Options Hash (opts):

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

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

  • :id (String)

    A filter to return only resources that match the specified identifier. Required only if the compartmentId query parameter is not specified.

  • :compartment_id (String)

    A filter to return only resources that belong to the specified compartment identifier. Required only if the id query param is not specified.

  • :knowledge_base_id (String)

    A filter to return only Vulnerability Audits that were created against the specified knowledge base.

  • :is_success (BOOLEAN)

    A filter to return only successful or failed Vulnerability Audits.

  • :lifecycle_state (String)

    A filter to return only Vulnerability Audits that match the specified lifecycleState.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

  • :limit (Integer)

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

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :sort_by (String)

    The field used to sort Vulnerability Audits. Only one sort order is allowed. Default order for maxObservedCvssV2Score is ascending. Default order for maxObservedCvssV3Score is ascending. Default order for maxObservedCvssV2ScoreWithIgnored is ascending. Default order for maxObservedCvssV3ScoreWithIgnored is ascending. Default order for timeCreated is descending. Default order for vulnerableArtifactsCount is ascending. Default order for vulnerableArtifactsCountWithIgnored is ascending. (default to timeCreated) Allowed values are: maxObservedCvssV2Score, maxObservedCvssV3Score, timeCreated, vulnerableArtifactsCount, maxObservedCvssV2ScoreWithIgnored, maxObservedCvssV3ScoreWithIgnored, vulnerableArtifactsCountWithIgnored

  • :display_name (String)

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

Returns:



2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
# File 'lib/oci/adm/application_dependency_management_client.rb', line 2024

def list_vulnerability_audits(opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#list_vulnerability_audits.' if logger


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

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

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

  path = '/vulnerabilityAudits'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:knowledgeBaseId] = opts[:knowledge_base_id] if opts[:knowledge_base_id]
  query_params[:isSuccess] = opts[:is_success] if !opts[:is_success].nil?
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ApplicationDependencyManagementClient#list_vulnerability_audits') 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::Adm::Models::VulnerabilityAuditCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_request_errors(work_request_id, opts = {}) ⇒ Response

Note:

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

Return a (paginated) list of errors for a given work request.

Allowed values are: timeAccepted

Parameters:

  • work_request_id (String)

    The Oracle Cloud Identifier (OCID) of the asynchronous 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.

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :limit (Integer)

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

  • :sort_by (String)

    The field used to sort WorkRequests. Only one sort order is allowed. Default order for timeAccepted is descending. (default to timeAccepted)

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

Returns:



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

def list_work_request_errors(work_request_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#list_work_request_errors.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil?

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

  if opts[:sort_order] && !OCI::Adm::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Adm::Models::SORT_ORDER_ENUM.'
  end
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  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: 'ApplicationDependencyManagementClient#list_work_request_errors') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Adm::Models::WorkRequestErrorCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_request_logs(work_request_id, opts = {}) ⇒ Response

Note:

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

Return a (paginated) list of logs for a given work request.

Allowed values are: timeAccepted

Parameters:

  • work_request_id (String)

    The Oracle Cloud Identifier (OCID) of the asynchronous 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.

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :limit (Integer)

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

  • :sort_by (String)

    The field used to sort WorkRequests. Only one sort order is allowed. Default order for timeAccepted is descending. (default to timeAccepted)

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

Returns:



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
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
# File 'lib/oci/adm/application_dependency_management_client.rb', line 2178

def list_work_request_logs(work_request_id, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#list_work_request_logs.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil?

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

  if opts[:sort_order] && !OCI::Adm::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Adm::Models::SORT_ORDER_ENUM.'
  end
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  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: 'ApplicationDependencyManagementClient#list_work_request_logs') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Adm::Models::WorkRequestLogEntryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_requests(opts = {}) ⇒ Response

Note:

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

Lists the work requests in a compartment.

Allowed values are: timeAccepted

Parameters:

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

    the optional parameters

Options Hash (opts):

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

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

  • :compartment_id (String)

    A filter to return only resources that belong to the specified compartment identifier. Required only if the id query param is not specified.

  • :work_request_id (String)

    The identifier of the asynchronous work request.

  • :status (String)

    A filter to return only resources that match the specified OperationStatus.

  • :resource_id (String)

    The Oracle Cloud Identifier (OCID) of the resource affected by the work request.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :limit (Integer)

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

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

  • :sort_by (String)

    The field used to sort WorkRequests. Only one sort order is allowed. Default order for timeAccepted is descending. (default to timeAccepted)

Returns:



2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
# File 'lib/oci/adm/application_dependency_management_client.rb', line 2256

def list_work_requests(opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#list_work_requests.' if logger


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

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

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

  path = '/workRequests'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:workRequestId] = opts[:work_request_id] if opts[:work_request_id]
  query_params[:status] = opts[:status] if opts[:status]
  query_params[:resourceId] = opts[:resource_id] if opts[:resource_id]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  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: 'ApplicationDependencyManagementClient#list_work_requests') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Adm::Models::WorkRequestSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



94
95
96
# File 'lib/oci/adm/application_dependency_management_client.rb', line 94

def logger
  @api_client.config.logger
end

#update_knowledge_base(knowledge_base_id, update_knowledge_base_details, opts = {}) ⇒ Response

Note:

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

Updates one or more attributes of the specified Knowledge Base.

Parameters:

  • knowledge_base_id (String)

    The Oracle Cloud Identifier (OCID) of a Knowledge Base, as a URL path parameter.

  • update_knowledge_base_details (OCI::Adm::Models::UpdateKnowledgeBaseDetails)

    The details to update a Knowledge Base.

  • 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



2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
# File 'lib/oci/adm/application_dependency_management_client.rb', line 2335

def update_knowledge_base(knowledge_base_id, update_knowledge_base_details, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#update_knowledge_base.' if logger

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

  path = '/knowledgeBases/{knowledgeBaseId}'.sub('{knowledgeBaseId}', knowledge_base_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_knowledge_base_details)

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

#update_remediation_recipe(remediation_recipe_id, update_remediation_recipe_details, opts = {}) ⇒ Response

Note:

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

Updates one or more attributes of the specified Remediation Recipe.

Parameters:

  • remediation_recipe_id (String)

    The Oracle Cloud Identifier (OCID) of a Remediation Recipe, as a URL path parameter.

  • update_remediation_recipe_details (OCI::Adm::Models::UpdateRemediationRecipeDetails)

    The details to update a Remediation Recipe.

  • 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



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
# File 'lib/oci/adm/application_dependency_management_client.rb', line 2397

def update_remediation_recipe(remediation_recipe_id, update_remediation_recipe_details, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#update_remediation_recipe.' if logger

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

  path = '/remediationRecipes/{remediationRecipeId}'.sub('{remediationRecipeId}', remediation_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 = @api_client.object_to_http_body(update_remediation_recipe_details)

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

#update_remediation_run(remediation_run_id, update_remediation_run_details, opts = {}) ⇒ Response

Note:

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

Updates by identifier one or more attributes of the specified remediation run.

Parameters:

  • remediation_run_id (String)

    Unique Remediation Run identifier path parameter.

  • update_remediation_run_details (OCI::Adm::Models::UpdateRemediationRunDetails)

    The details used to update a remediation run.

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



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

def update_remediation_run(remediation_run_id, update_remediation_run_details, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#update_remediation_run.' if logger

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

  path = '/remediationRuns/{remediationRunId}'.sub('{remediationRunId}', remediation_run_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_remediation_run_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ApplicationDependencyManagementClient#update_remediation_run') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Adm::Models::RemediationRun'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_vulnerability_audit(vulnerability_audit_id, update_vulnerability_audit_details, opts = {}) ⇒ Response

Note:

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

Updates one or more attributes of the specified Vulnerability Audit.

Parameters:

  • vulnerability_audit_id (String)

    Unique Vulnerability Audit identifier path parameter.

  • update_vulnerability_audit_details (OCI::Adm::Models::UpdateVulnerabilityAuditDetails)

    The details to update a Vulnerability Audit.

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



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

def update_vulnerability_audit(vulnerability_audit_id, update_vulnerability_audit_details, opts = {})
  logger.debug 'Calling operation ApplicationDependencyManagementClient#update_vulnerability_audit.' if logger

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

  path = '/vulnerabilityAudits/{vulnerabilityAuditId}'.sub('{vulnerabilityAuditId}', vulnerability_audit_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_vulnerability_audit_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ApplicationDependencyManagementClient#update_vulnerability_audit') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Adm::Models::VulnerabilityAudit'
    )
  end
  # rubocop:enable Metrics/BlockLength
end