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](/Content/application-dependency-management/home.htm).

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



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

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

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

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

  if endpoint
    @endpoint = endpoint + '/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:



13
14
15
# File 'lib/oci/adm/application_dependency_management_client.rb', line 13

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


17
18
19
# File 'lib/oci/adm/application_dependency_management_client.rb', line 17

def endpoint
  @endpoint
end

#regionString

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

Returns:

  • (String)


27
28
29
# File 'lib/oci/adm/application_dependency_management_client.rb', line 27

def region
  @region
end

#retry_configOCI::Retry::RetryConfig (readonly)

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



23
24
25
# File 'lib/oci/adm/application_dependency_management_client.rb', line 23

def retry_config
  @retry_config
end

Instance Method Details

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/cancel_work_request.rb.html) to see an example of how to use cancel_work_request API.

Cancel work request with the given ID.

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



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

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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/change_knowledge_base_compartment.rb.html) to see an example of how to use change_knowledge_base_compartment API.

Moves a Knowledge Base 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



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

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_vulnerability_audit_compartment(vulnerability_audit_id, change_vulnerability_audit_compartment_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/change_vulnerability_audit_compartment.rb.html) 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



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
283
284
285
286
287
288
289
290
291
# File 'lib/oci/adm/application_dependency_management_client.rb', line 252

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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/create_knowledge_base.rb.html) 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



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

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/create_vulnerability_audit.rb.html) 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:



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

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

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/delete_knowledge_base.rb.html) to see an example of how to use delete_knowledge_base API.

Deletes the specified 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

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



443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# File 'lib/oci/adm/application_dependency_management_client.rb', line 443

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/delete_vulnerability_audit.rb.html) 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



503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
# File 'lib/oci/adm/application_dependency_management_client.rb', line 503

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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/get_knowledge_base.rb.html) to see an example of how to use get_knowledge_base API.

Returns the details of the specified 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.

Returns:



557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
# File 'lib/oci/adm/application_dependency_management_client.rb', line 557

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/get_vulnerability_audit.rb.html) 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:



611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
# File 'lib/oci/adm/application_dependency_management_client.rb', line 611

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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/get_work_request.rb.html) to see an example of how to use get_work_request API.

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

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
# File 'lib/oci/adm/application_dependency_management_client.rb', line 665

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/list_application_dependency_vulnerabilities.rb.html) 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. Default order for gav is ascending where ascending corresponds to alphanumerical order. Default order for nodeId is ascending where ascending corresponds to alphanumerical order.

    (default to gav)
    

    Allowed values are: gav, nodeId

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



733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
# File 'lib/oci/adm/application_dependency_management_client.rb', line 733

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].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of gav, nodeId.'
  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[: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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/list_knowledge_bases.rb.html) 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.

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
# File 'lib/oci/adm/application_dependency_management_client.rb', line 817

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/list_vulnerability_audits.rb.html) 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 or knowledgeBaseId 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.

  • :compartment_id (String)

    A filter to return only resources that belong to the specified compartment identifier.

  • :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 timeCreated is *descending*. Default order for vulnerableArtifactsCount is *ascending*.

    (default to timeCreated)
    

    Allowed values are: maxObservedCvssV2Score, maxObservedCvssV3Score, timeCreated, vulnerableArtifactsCount

  • :display_name (String)

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

Returns:



906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
# File 'lib/oci/adm/application_dependency_management_client.rb', line 906

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].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of maxObservedCvssV2Score, maxObservedCvssV3Score, timeCreated, vulnerableArtifactsCount.'
  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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/list_work_request_errors.rb.html) 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:

Options Hash (opts):

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

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



987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
# File 'lib/oci/adm/application_dependency_management_client.rb', line 987

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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/list_work_request_logs.rb.html) 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:

Options Hash (opts):

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

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



1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
# File 'lib/oci/adm/application_dependency_management_client.rb', line 1060

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](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/list_work_requests.rb.html) 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.

  • :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](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)) 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:



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
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
# File 'lib/oci/adm/application_dependency_management_client.rb', line 1136

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.



92
93
94
# File 'lib/oci/adm/application_dependency_management_client.rb', line 92

def logger
  @api_client.config.logger
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/update_knowledge_base.rb.html) to see an example of how to use update_knowledge_base API.

Updates one or more attributes of the specified 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

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



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

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_vulnerability_audit(vulnerability_audit_id, update_vulnerability_audit_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/adm/update_vulnerability_audit.rb.html) 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:



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

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