Class: OCI::OsManagementHub::SoftwareSourceClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/os_management_hub/software_source_client.rb

Overview

Use the OS Management Hub API to manage and monitor updates and patches for instances in OCI, your private data center, or 3rd-party clouds. For more information, see Overview of OS Management Hub.

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

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



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

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

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



16
17
18
# File 'lib/oci/os_management_hub/software_source_client.rb', line 16

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


20
21
22
# File 'lib/oci/os_management_hub/software_source_client.rb', line 20

def endpoint
  @endpoint
end

#regionString

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

Returns:

  • (String)


30
31
32
# File 'lib/oci/os_management_hub/software_source_client.rb', line 30

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



26
27
28
# File 'lib/oci/os_management_hub/software_source_client.rb', line 26

def retry_config
  @retry_config
end

Instance Method Details

#add_packages_to_software_source(software_source_id, add_packages_to_software_source_details, opts = {}) ⇒ Response

Note:

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

Adds packages to a software source. This operation can only be done for custom and versioned custom software sources that are not created using filters. For a versioned custom software source, you can only add packages when the source is created. Once content is added to a versioned custom software source, it is immutable.

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)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

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



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/oci/os_management_hub/software_source_client.rb', line 127

def add_packages_to_software_source(software_source_id, add_packages_to_software_source_details, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#add_packages_to_software_source.' if logger

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

  path = '/softwareSources/{softwareSourceId}/actions/addPackages'.sub('{softwareSourceId}', software_source_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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(add_packages_to_software_source_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#add_packages_to_software_source') 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_availability_of_software_sources(change_availability_of_software_sources_details, opts = {}) ⇒ Response

Note:

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

Updates the availability for a list of specified software sources.

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)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

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



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

def change_availability_of_software_sources(change_availability_of_software_sources_details, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#change_availability_of_software_sources.' if logger

  raise "Missing the required parameter 'change_availability_of_software_sources_details' when calling change_availability_of_software_sources." if change_availability_of_software_sources_details.nil?

  path = '/softwareSources/actions/changeAvailability'
  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(change_availability_of_software_sources_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#change_availability_of_software_sources') 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_software_source_compartment(software_source_id, change_software_source_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves the specified software sources to a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

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)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

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



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
292
293
294
295
296
297
298
299
# File 'lib/oci/os_management_hub/software_source_client.rb', line 260

def change_software_source_compartment(software_source_id, change_software_source_compartment_details, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#change_software_source_compartment.' if logger

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

  path = '/softwareSources/{softwareSourceId}/actions/changeCompartment'.sub('{softwareSourceId}', software_source_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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  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_software_source_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#change_software_source_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_entitlement(create_entitlement_details, opts = {}) ⇒ Response

Note:

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

Registers the necessary entitlement credentials for OS vendor software sources.

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)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

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



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
353
354
355
356
357
358
359
360
# File 'lib/oci/os_management_hub/software_source_client.rb', line 324

def create_entitlement(create_entitlement_details, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#create_entitlement.' if logger

  raise "Missing the required parameter 'create_entitlement_details' when calling create_entitlement." if create_entitlement_details.nil?

  path = '/entitlements'
  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_entitlement_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#create_entitlement') 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_software_source(create_software_source_details, opts = {}) ⇒ Response

Note:

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

Creates a new versioned or custom software source.

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)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

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



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/os_management_hub/software_source_client.rb', line 385

def create_software_source(create_software_source_details, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#create_software_source.' if logger

  raise "Missing the required parameter 'create_software_source_details' when calling create_software_source." if create_software_source_details.nil?

  path = '/softwareSources'
  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_software_source_details)

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

#delete_software_source(software_source_id, opts = {}) ⇒ Response

Note:

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

Deletes the specified software source.

Parameters:

  • software_source_id (String)

    The OCID of the software source.

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

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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
480
481
482
# File 'lib/oci/os_management_hub/software_source_client.rb', line 446

def delete_software_source(software_source_id, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#delete_software_source.' if logger

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

  path = '/softwareSources/{softwareSourceId}'.sub('{softwareSourceId}', software_source_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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#delete_software_source') 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_erratum(compartment_id, name, opts = {}) ⇒ Response

Note:

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

Returns information about the specified erratum based on its advisory name.

Parameters:

  • compartment_id (String)

    The OCID of the compartment. This parameter is required and returns only resources contained within the specified compartment.

  • name (String)

    The erratum name (such as ELSA-2023-34678).

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

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



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

def get_erratum(compartment_id, name, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#get_erratum.' if logger

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

  path = '/errata/{name}'.sub('{name}', name.to_s)
  operation_signing_strategy = :standard

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

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

#get_module_stream(software_source_id, module_name, stream_name, opts = {}) ⇒ Response

Note:

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

Returns information about the specified module stream in a software source.

Parameters:

  • software_source_id (String)

    The OCID of the software source.

  • module_name (String)

    The name of the module.

  • stream_name (String)

    The name of the stream of the containing module.

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

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



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
594
595
596
597
598
599
600
601
602
# File 'lib/oci/os_management_hub/software_source_client.rb', line 562

def get_module_stream(software_source_id, module_name, stream_name, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#get_module_stream.' if logger

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

  path = '/softwareSources/{softwareSourceId}/moduleStreams/{moduleName}'.sub('{softwareSourceId}', software_source_id.to_s).sub('{moduleName}', module_name.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:streamName] = stream_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: 'SoftwareSourceClient#get_module_stream') 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::OsManagementHub::Models::ModuleStream'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_module_stream_profile(software_source_id, profile_name, module_name, stream_name, opts = {}) ⇒ Response

Note:

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

Returns information about the specified module stream profile in a software source.

Parameters:

  • software_source_id (String)

    The OCID of the software source.

  • profile_name (String)

    The name of the module stream profile.

  • module_name (String)

    The name of a module.

  • stream_name (String)

    The name of the stream of the containing module.

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

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
# File 'lib/oci/os_management_hub/software_source_client.rb', line 626

def get_module_stream_profile(software_source_id, profile_name, module_name, stream_name, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#get_module_stream_profile.' if logger

  raise "Missing the required parameter 'software_source_id' when calling get_module_stream_profile." if software_source_id.nil?
  raise "Missing the required parameter 'profile_name' when calling get_module_stream_profile." if profile_name.nil?
  raise "Missing the required parameter 'module_name' when calling get_module_stream_profile." if module_name.nil?
  raise "Missing the required parameter 'stream_name' when calling get_module_stream_profile." if stream_name.nil?
  raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id)
  raise "Parameter value for 'profile_name' must not be blank" if OCI::Internal::Util.blank_string?(profile_name)

  path = '/softwareSources/{softwareSourceId}/moduleStreamProfiles/{profileName}'.sub('{softwareSourceId}', software_source_id.to_s).sub('{profileName}', profile_name.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:moduleName] = module_name
  query_params[:streamName] = stream_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: 'SoftwareSourceClient#get_module_stream_profile') 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::OsManagementHub::Models::ModuleStreamProfile'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_package_group(software_source_id, package_group_id, opts = {}) ⇒ Response

Note:

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

Returns information about the specified package group from a software source.

Parameters:

  • software_source_id (String)

    The OCID of the software source.

  • package_group_id (String)

    The unique package group identifier.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
# File 'lib/oci/os_management_hub/software_source_client.rb', line 688

def get_package_group(software_source_id, package_group_id, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#get_package_group.' if logger

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

  path = '/softwareSources/{softwareSourceId}/packageGroups/{packageGroupId}'.sub('{softwareSourceId}', software_source_id.to_s).sub('{packageGroupId}', package_group_id.to_s)
  operation_signing_strategy = :standard

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

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

#get_software_package(software_source_id, software_package_name, opts = {}) ⇒ Response

Note:

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

Returns information about the specified software package.

Parameters:

  • software_source_id (String)

    The OCID of the software source.

  • software_package_name (String)

    The name of the software package.

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

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



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
# File 'lib/oci/os_management_hub/software_source_client.rb', line 746

def get_software_package(software_source_id, software_package_name, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#get_software_package.' if logger

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

  path = '/softwareSources/{softwareSourceId}/softwarePackages/{softwarePackageName}'.sub('{softwareSourceId}', software_source_id.to_s).sub('{softwarePackageName}', software_package_name.to_s)
  operation_signing_strategy = :standard

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

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

#get_software_package_by_name(software_package_name, opts = {}) ⇒ Response

Note:

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

Returns information about the specified software package based on its fully qualified name.

Parameters:

  • software_package_name (String)

    The name of the software package.

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

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
# File 'lib/oci/os_management_hub/software_source_client.rb', line 802

def get_software_package_by_name(software_package_name, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#get_software_package_by_name.' if logger

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

  path = '/softwarePackages/{softwarePackageName}'.sub('{softwarePackageName}', software_package_name.to_s)
  operation_signing_strategy = :standard

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

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

#get_software_source(software_source_id, opts = {}) ⇒ Response

Note:

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

Returns information about the specified software source.

Parameters:

  • software_source_id (String)

    The OCID of the software source.

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

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
# File 'lib/oci/os_management_hub/software_source_client.rb', line 856

def get_software_source(software_source_id, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#get_software_source.' if logger

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

  path = '/softwareSources/{softwareSourceId}'.sub('{softwareSourceId}', software_source_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: 'SoftwareSourceClient#get_software_source') 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::OsManagementHub::Models::SoftwareSource'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_all_software_packages(opts = {}) ⇒ Response

Note:

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

Lists software packages available through the OS Management Hub service. Filter the list against a variety of criteria including but not limited to its name.

Allowed values are: displayName

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

  • :display_name (String)

    A filter to return resources that match the given user-friendly name.

  • :display_name_contains (String)

    A filter to return resources that may partially match the given display name.

  • :version (String)

    A filter to return software packages that match the given version.

  • :architecture (String)

    A filter to return software packages that match the given architecture.

  • :is_latest (BOOLEAN)

    Indicates whether to list only the latest versions of packages, module streams, and stream profiles.

  • :os_family (String)

    A filter to return only resources that match the given operating system family.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

  • :sort_order (String)

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

  • :sort_by (String)

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

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



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
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/os_management_hub/software_source_client.rb', line 931

def list_all_software_packages(opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#list_all_software_packages.' if logger


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

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

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

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

  path = '/softwarePackages'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains]
  query_params[:version] = opts[:version] if opts[:version]
  query_params[:architecture] = opts[:architecture] if opts[:architecture]
  query_params[:isLatest] = opts[:is_latest] if !opts[:is_latest].nil?
  query_params[:osFamily] = opts[:os_family] if opts[:os_family]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

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

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

Note:

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

Lists entitlements in the specified tenancy OCID. Filter the list against a variety of criteria including but not limited to its Customer Support Identifier (CSI), and vendor name.

Allowed values are: csi, vendorName

Parameters:

  • compartment_id (String)

    The OCID of the compartment. This parameter is required and returns only resources contained within the specified compartment.

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

    the optional parameters

Options Hash (opts):

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

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

  • :csi (String)

    A filter to return entitlements that match the given CSI.

  • :vendor_name (String)

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

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

  • :sort_order (String)

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

  • :sort_by (String)

    The field to sort entitlements by. Only one sort order may be provided. (default to vendorName)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1027

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

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

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

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

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

  path = '/entitlements'
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

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

Note:

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

Lists all of the currently available errata. Filter the list against a variety of criteria including but not limited to its name, classification type, advisory severity, and OS family.

Allowed values are: timeIssued, name

Parameters:

  • compartment_id (String)

    The OCID of the compartment. This parameter is required and returns only resources contained within the specified compartment.

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

    the optional parameters

Options Hash (opts):

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

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

  • :name (Array<String>)

    The assigned erratum name. It's unique and not changeable.

    Example: ELSA-2020-5804

  • :name_contains (String)

    A filter to return resources that may partially match the erratum name given.

  • :classification_type (Array<String>)

    A filter to return only packages that match the given update classification type. Allowed values are: SECURITY, BUGFIX, ENHANCEMENT, OTHER

  • :advisory_type (Array<String>)

    A filter to return only errata that match the given advisory types. Allowed values are: SECURITY, BUGFIX, ENHANCEMENT

  • :os_family (String)

    A filter to return only resources that match the given operating system family.

  • :advisory_severity (Array<String>)

    The advisory severity.

    Allowed values are: LOW, MODERATE, IMPORTANT, CRITICAL

  • :time_issue_date_start (DateTime)

    The issue date after which to list all errata, in ISO 8601 format

    Example: 2017-07-14T02:40:00.000Z

  • :time_issue_date_end (DateTime)

    The issue date before which to list all errata, in ISO 8601 format

    Example: 2017-07-14T02:40:00.000Z

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

  • :sort_order (String)

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

  • :sort_by (String)

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

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

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
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
1220
1221
1222
1223
1224
1225
1226
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1136

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

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


  classification_type_allowable_values = %w[SECURITY BUGFIX ENHANCEMENT OTHER]
  if opts[:classification_type] && !opts[:classification_type].empty?
    opts[:classification_type].each do |val_to_check|
      unless classification_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "classification_type", must be one of SECURITY, BUGFIX, ENHANCEMENT, OTHER.'
      end
    end
  end


  advisory_type_allowable_values = %w[SECURITY BUGFIX ENHANCEMENT]
  if opts[:advisory_type] && !opts[:advisory_type].empty?
    opts[:advisory_type].each do |val_to_check|
      unless advisory_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "advisory_type", must be one of SECURITY, BUGFIX, ENHANCEMENT.'
      end
    end
  end

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


  advisory_severity_allowable_values = %w[LOW MODERATE IMPORTANT CRITICAL]
  if opts[:advisory_severity] && !opts[:advisory_severity].empty?
    opts[:advisory_severity].each do |val_to_check|
      unless advisory_severity_allowable_values.include?(val_to_check)
        raise 'Invalid value for "advisory_severity", must be one of LOW, MODERATE, IMPORTANT, CRITICAL.'
      end
    end
  end

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

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

  path = '/errata'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:name] = OCI::ApiClient.build_collection_params(opts[:name], :multi) if opts[:name] && !opts[:name].empty?
  query_params[:nameContains] = opts[:name_contains] if opts[:name_contains]
  query_params[:classificationType] = OCI::ApiClient.build_collection_params(opts[:classification_type], :multi) if opts[:classification_type] && !opts[:classification_type].empty?
  query_params[:advisoryType] = OCI::ApiClient.build_collection_params(opts[:advisory_type], :multi) if opts[:advisory_type] && !opts[:advisory_type].empty?
  query_params[:osFamily] = opts[:os_family] if opts[:os_family]
  query_params[:advisorySeverity] = OCI::ApiClient.build_collection_params(opts[:advisory_severity], :multi) if opts[:advisory_severity] && !opts[:advisory_severity].empty?
  query_params[:timeIssueDateStart] = opts[:time_issue_date_start] if opts[:time_issue_date_start]
  query_params[:timeIssueDateEnd] = opts[:time_issue_date_end] if opts[:time_issue_date_end]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

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

#list_module_stream_profiles(software_source_id, opts = {}) ⇒ Response

Note:

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

Lists module stream profiles from the specified software source OCID. Filter the list against a variety of criteria including but not limited to its module name, stream name, and profile name.

Allowed values are: moduleName

Parameters:

  • software_source_id (String)

    The OCID of the software source.

  • 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

  • :module_name (String)

    The name of a module. This parameter is required if a streamName is specified.

  • :stream_name (String)

    The name of the module stream. This parameter is required if a profile name is specified.

  • :name (String)

    The name of the entity to be queried.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

  • :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 moduleName is ascending. (default to moduleName)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1265

def list_module_stream_profiles(software_source_id, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#list_module_stream_profiles.' if logger

  raise "Missing the required parameter 'software_source_id' when calling list_module_stream_profiles." if software_source_id.nil?

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

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

  path = '/softwareSources/{softwareSourceId}/moduleStreamProfiles'.sub('{softwareSourceId}', software_source_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#list_module_streams(software_source_id, opts = {}) ⇒ Response

Note:

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

Lists module streams from the specified software source OCID. Filter the list against a variety of criteria including but not limited to its module name and (stream) name.

Allowed values are: moduleName

Parameters:

  • software_source_id (String)

    The OCID of the software source.

  • 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

  • :module_name (String)

    The name of a module. This parameter is required if a streamName is specified.

  • :name (String)

    The name of the entity to be queried.

  • :is_latest (BOOLEAN)

    Indicates whether to list only the latest versions of packages, module streams, and stream profiles.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

  • :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 moduleName is ascending. (default to moduleName)

  • :module_name_contains (String)

    A filter to return resources that may partially match the module name given.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



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
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1356

def list_module_streams(software_source_id, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#list_module_streams.' if logger

  raise "Missing the required parameter 'software_source_id' when calling list_module_streams." if software_source_id.nil?

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

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

  path = '/softwareSources/{softwareSourceId}/moduleStreams'.sub('{softwareSourceId}', software_source_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:moduleName] = opts[:module_name] if opts[:module_name]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:isLatest] = opts[:is_latest] if !opts[:is_latest].nil?
  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[:moduleNameContains] = opts[:module_name_contains] if opts[:module_name_contains]

  # 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: 'SoftwareSourceClient#list_module_streams') 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::OsManagementHub::Models::ModuleStreamCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_package_groups(software_source_id, opts = {}) ⇒ Response

Note:

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

Lists package groups that are associated with the specified software source OCID. Filter the list against a variety of criteria including but not limited to its name, and package group type.

Allowed values are: timeCreated, displayName

Parameters:

  • software_source_id (String)

    The OCID of the software source.

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

    The OCID of the compartment that contains the resources to list. This filter returns only resources contained within the specified compartment.

  • :name (String)

    The name of the entity to be queried.

  • :name_contains (String)

    A filter to return resources that may partially match the name given.

  • :group_type (Array<OCI::OsManagementHub::Models::OCI::OsManagementHub::Models::PackageGroupGroupType>)

    A filter to return only package groups of the specified type.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

  • :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 timeCreated is descending. Default order for displayName is ascending. (default to timeCreated)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1446

def list_package_groups(software_source_id, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#list_package_groups.' if logger

  raise "Missing the required parameter 'software_source_id' when calling list_package_groups." if software_source_id.nil?

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

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

  path = '/softwareSources/{softwareSourceId}/packageGroups'.sub('{softwareSourceId}', software_source_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:nameContains] = opts[:name_contains] if opts[:name_contains]
  query_params[:groupType] = OCI::ApiClient.build_collection_params(opts[:group_type], :multi) if opts[:group_type] && !opts[:group_type].empty?
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

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

#list_software_package_software_sources(software_package_name, compartment_id, opts = {}) ⇒ Response

Note:

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

Lists the software sources in the tenancy that contain the software package. Filter the list against a variety of criteria including but not limited to its name, type, architecture, and OS family.

Allowed values are: timeCreated, displayName

Parameters:

  • software_package_name (String)

    The name of the software package.

  • compartment_id (String)

    The OCID of the compartment. This parameter is required and returns only resources contained within the specified compartment.

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

    the optional parameters

Options Hash (opts):

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

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

  • :software_source_type (Array<String>)

    The type of the software source. Allowed values are: VENDOR, CUSTOM, VERSIONED

  • :os_family (Array<String>)

    A filter to return only resources that match the given operating system family. Allowed values are: ORACLE_LINUX_9, ORACLE_LINUX_8, ORACLE_LINUX_7, ORACLE_LINUX_6, WINDOWS_SERVER_2016, WINDOWS_SERVER_2019, WINDOWS_SERVER_2022, ALL

  • :arch_type (Array<String>)

    A filter to return only instances whose architecture type matches the given architecture. Allowed values are: X86_64, AARCH64, I686, NOARCH, SRC

  • :availability (Array<String>)

    The availabilities of the software source in a non-OCI environment for a tenancy. Allowed values are: AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE

  • :availability_at_oci (Array<String>)

    The availabilities of the software source in an OCI environment for a tenancy. Allowed values are: AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE

  • :availability_anywhere (Array<String>)

    The availabilities of the software source. Use this query parameter to filter across availabilities in different environments. Allowed values are: AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE

  • :display_name (String)

    A filter to return resources that match the given user-friendly name.

  • :display_name_contains (String)

    A filter to return resources that may partially match the given display name.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

  • :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 timeCreated is descending. Default order for displayName is ascending. (default to timeCreated)

  • :lifecycle_state (Array<OCI::OsManagementHub::Models::OCI::OsManagementHub::Models::SoftwareSourceLifecycleState>)

    A filter to return only software sources whose state matches the given state.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1548

def list_software_package_software_sources(software_package_name, compartment_id, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#list_software_package_software_sources.' if logger

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


  software_source_type_allowable_values = %w[VENDOR CUSTOM VERSIONED]
  if opts[:software_source_type] && !opts[:software_source_type].empty?
    opts[:software_source_type].each do |val_to_check|
      unless software_source_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "software_source_type", must be one of VENDOR, CUSTOM, VERSIONED.'
      end
    end
  end


  os_family_allowable_values = %w[ORACLE_LINUX_9 ORACLE_LINUX_8 ORACLE_LINUX_7 ORACLE_LINUX_6 WINDOWS_SERVER_2016 WINDOWS_SERVER_2019 WINDOWS_SERVER_2022 ALL]
  if opts[:os_family] && !opts[:os_family].empty?
    opts[:os_family].each do |val_to_check|
      unless os_family_allowable_values.include?(val_to_check)
        raise 'Invalid value for "os_family", must be one of ORACLE_LINUX_9, ORACLE_LINUX_8, ORACLE_LINUX_7, ORACLE_LINUX_6, WINDOWS_SERVER_2016, WINDOWS_SERVER_2019, WINDOWS_SERVER_2022, ALL.'
      end
    end
  end


  arch_type_allowable_values = %w[X86_64 AARCH64 I686 NOARCH SRC]
  if opts[:arch_type] && !opts[:arch_type].empty?
    opts[:arch_type].each do |val_to_check|
      unless arch_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "arch_type", must be one of X86_64, AARCH64, I686, NOARCH, SRC.'
      end
    end
  end


  availability_allowable_values = %w[AVAILABLE SELECTED RESTRICTED UNAVAILABLE]
  if opts[:availability] && !opts[:availability].empty?
    opts[:availability].each do |val_to_check|
      unless availability_allowable_values.include?(val_to_check)
        raise 'Invalid value for "availability", must be one of AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE.'
      end
    end
  end


  availability_at_oci_allowable_values = %w[AVAILABLE SELECTED RESTRICTED UNAVAILABLE]
  if opts[:availability_at_oci] && !opts[:availability_at_oci].empty?
    opts[:availability_at_oci].each do |val_to_check|
      unless availability_at_oci_allowable_values.include?(val_to_check)
        raise 'Invalid value for "availability_at_oci", must be one of AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE.'
      end
    end
  end


  availability_anywhere_allowable_values = %w[AVAILABLE SELECTED RESTRICTED UNAVAILABLE]
  if opts[:availability_anywhere] && !opts[:availability_anywhere].empty?
    opts[:availability_anywhere].each do |val_to_check|
      unless availability_anywhere_allowable_values.include?(val_to_check)
        raise 'Invalid value for "availability_anywhere", must be one of AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE.'
      end
    end
  end

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

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

  path = '/softwarePackages/{softwarePackageName}/softwareSources'.sub('{softwarePackageName}', software_package_name.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:softwareSourceType] = OCI::ApiClient.build_collection_params(opts[:software_source_type], :multi) if opts[:software_source_type] && !opts[:software_source_type].empty?
  query_params[:osFamily] = OCI::ApiClient.build_collection_params(opts[:os_family], :multi) if opts[:os_family] && !opts[:os_family].empty?
  query_params[:archType] = OCI::ApiClient.build_collection_params(opts[:arch_type], :multi) if opts[:arch_type] && !opts[:arch_type].empty?
  query_params[:availability] = OCI::ApiClient.build_collection_params(opts[:availability], :multi) if opts[:availability] && !opts[:availability].empty?
  query_params[:availabilityAtOci] = OCI::ApiClient.build_collection_params(opts[:availability_at_oci], :multi) if opts[:availability_at_oci] && !opts[:availability_at_oci].empty?
  query_params[:availabilityAnywhere] = OCI::ApiClient.build_collection_params(opts[:availability_anywhere], :multi) if opts[:availability_anywhere] && !opts[:availability_anywhere].empty?
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains]
  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[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?

  # 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: 'SoftwareSourceClient#list_software_package_software_sources') 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::OsManagementHub::Models::SoftwareSourceCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_software_packages(software_source_id, opts = {}) ⇒ Response

Note:

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

Lists software packages in the specified software source. Filter the list against a variety of criteria including but not limited to its name.

Allowed values are: timeCreated, displayName

Parameters:

  • software_source_id (String)

    The OCID of the software source.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

    A filter to return resources that match the given user-friendly name.

  • :display_name_contains (String)

    A filter to return resources that may partially match the given display name.

  • :is_latest (BOOLEAN)

    Indicates whether to list only the latest versions of packages, module streams, and stream profiles.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

  • :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 timeCreated is descending. Default order for displayName is ascending. (default to timeCreated)

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1704

def list_software_packages(software_source_id, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#list_software_packages.' if logger

  raise "Missing the required parameter 'software_source_id' when calling list_software_packages." if software_source_id.nil?

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

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

  path = '/softwareSources/{softwareSourceId}/softwarePackages'.sub('{softwareSourceId}', software_source_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains]
  query_params[:isLatest] = opts[:is_latest] if !opts[:is_latest].nil?
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

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

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

Note:

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

Lists available software source vendors. Filter the list against a variety of criteria including but not limited to its name.

Allowed values are: name

Parameters:

  • compartment_id (String)

    The OCID of the compartment. This parameter is required and returns only resources contained within the specified compartment.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :sort_order (String)

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

  • :sort_by (String)

    The field to sort software source vendors by. Only one sort order may be provided. Default order for name is ascending. (default to name)

  • :name (String)

    The name of the entity to be queried.

Returns:



1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1780

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

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

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

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

  path = '/softwareSourceVendors'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:name] = opts[:name] if opts[: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: 'SoftwareSourceClient#list_software_source_vendors') 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::OsManagementHub::Models::SoftwareSourceVendorCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_software_sources(opts = {}) ⇒ Response

Note:

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

Lists software sources that match the specified tenancy or software source OCID. Filter the list against a variety of criteria including but not limited to its name, status, architecture, and OS family.

Allowed values are: timeCreated, displayName

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)

    The OCID of the compartment that contains the resources to list. This filter returns only resources contained within the specified compartment.

  • :software_source_id (String)

    The OCID for the software source.

  • :software_source_type (Array<String>)

    The type of the software source. Allowed values are: VENDOR, CUSTOM, VERSIONED

  • :vendor_name (String)

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

  • :os_family (Array<String>)

    A filter to return only resources that match the given operating system family. Allowed values are: ORACLE_LINUX_9, ORACLE_LINUX_8, ORACLE_LINUX_7, ORACLE_LINUX_6, WINDOWS_SERVER_2016, WINDOWS_SERVER_2019, WINDOWS_SERVER_2022, ALL

  • :arch_type (Array<String>)

    A filter to return only instances whose architecture type matches the given architecture. Allowed values are: X86_64, AARCH64, I686, NOARCH, SRC

  • :availability (Array<String>)

    The availabilities of the software source in a non-OCI environment for a tenancy. Allowed values are: AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE

  • :availability_at_oci (Array<String>)

    The availabilities of the software source in an OCI environment for a tenancy. Allowed values are: AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE

  • :availability_anywhere (Array<String>)

    The availabilities of the software source. Use this query parameter to filter across availabilities in different environments. Allowed values are: AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE

  • :is_mandatory_for_autonomous_linux (BOOLEAN)

    Indicates whether the software source is mandatory for the Autonomous Linux service.

  • :display_name (String)

    A filter to return resources that match the given user-friendly name.

  • :display_name_contains (String)

    A filter to return resources that may partially match the given display name.

  • :display_name_not_equal_to (Array<String>)

    A multi filter to return resources that do not contains the given display names.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

  • :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 timeCreated is descending. Default order for displayName is ascending. (default to timeCreated)

  • :lifecycle_state (Array<OCI::OsManagementHub::Models::OCI::OsManagementHub::Models::SoftwareSourceLifecycleState>)

    A filter to return only software sources whose state matches the given state.

  • :opc_request_id (String)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
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
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1880

def list_software_sources(opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#list_software_sources.' if logger



  software_source_type_allowable_values = %w[VENDOR CUSTOM VERSIONED]
  if opts[:software_source_type] && !opts[:software_source_type].empty?
    opts[:software_source_type].each do |val_to_check|
      unless software_source_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "software_source_type", must be one of VENDOR, CUSTOM, VERSIONED.'
      end
    end
  end

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


  os_family_allowable_values = %w[ORACLE_LINUX_9 ORACLE_LINUX_8 ORACLE_LINUX_7 ORACLE_LINUX_6 WINDOWS_SERVER_2016 WINDOWS_SERVER_2019 WINDOWS_SERVER_2022 ALL]
  if opts[:os_family] && !opts[:os_family].empty?
    opts[:os_family].each do |val_to_check|
      unless os_family_allowable_values.include?(val_to_check)
        raise 'Invalid value for "os_family", must be one of ORACLE_LINUX_9, ORACLE_LINUX_8, ORACLE_LINUX_7, ORACLE_LINUX_6, WINDOWS_SERVER_2016, WINDOWS_SERVER_2019, WINDOWS_SERVER_2022, ALL.'
      end
    end
  end


  arch_type_allowable_values = %w[X86_64 AARCH64 I686 NOARCH SRC]
  if opts[:arch_type] && !opts[:arch_type].empty?
    opts[:arch_type].each do |val_to_check|
      unless arch_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "arch_type", must be one of X86_64, AARCH64, I686, NOARCH, SRC.'
      end
    end
  end


  availability_allowable_values = %w[AVAILABLE SELECTED RESTRICTED UNAVAILABLE]
  if opts[:availability] && !opts[:availability].empty?
    opts[:availability].each do |val_to_check|
      unless availability_allowable_values.include?(val_to_check)
        raise 'Invalid value for "availability", must be one of AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE.'
      end
    end
  end


  availability_at_oci_allowable_values = %w[AVAILABLE SELECTED RESTRICTED UNAVAILABLE]
  if opts[:availability_at_oci] && !opts[:availability_at_oci].empty?
    opts[:availability_at_oci].each do |val_to_check|
      unless availability_at_oci_allowable_values.include?(val_to_check)
        raise 'Invalid value for "availability_at_oci", must be one of AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE.'
      end
    end
  end


  availability_anywhere_allowable_values = %w[AVAILABLE SELECTED RESTRICTED UNAVAILABLE]
  if opts[:availability_anywhere] && !opts[:availability_anywhere].empty?
    opts[:availability_anywhere].each do |val_to_check|
      unless availability_anywhere_allowable_values.include?(val_to_check)
        raise 'Invalid value for "availability_anywhere", must be one of AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE.'
      end
    end
  end

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

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

  path = '/softwareSources'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:softwareSourceId] = opts[:software_source_id] if opts[:software_source_id]
  query_params[:softwareSourceType] = OCI::ApiClient.build_collection_params(opts[:software_source_type], :multi) if opts[:software_source_type] && !opts[:software_source_type].empty?
  query_params[:vendorName] = opts[:vendor_name] if opts[:vendor_name]
  query_params[:osFamily] = OCI::ApiClient.build_collection_params(opts[:os_family], :multi) if opts[:os_family] && !opts[:os_family].empty?
  query_params[:archType] = OCI::ApiClient.build_collection_params(opts[:arch_type], :multi) if opts[:arch_type] && !opts[:arch_type].empty?
  query_params[:availability] = OCI::ApiClient.build_collection_params(opts[:availability], :multi) if opts[:availability] && !opts[:availability].empty?
  query_params[:availabilityAtOci] = OCI::ApiClient.build_collection_params(opts[:availability_at_oci], :multi) if opts[:availability_at_oci] && !opts[:availability_at_oci].empty?
  query_params[:availabilityAnywhere] = OCI::ApiClient.build_collection_params(opts[:availability_anywhere], :multi) if opts[:availability_anywhere] && !opts[:availability_anywhere].empty?
  query_params[:isMandatoryForAutonomousLinux] = opts[:is_mandatory_for_autonomous_linux] if !opts[:is_mandatory_for_autonomous_linux].nil?
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains]
  query_params[:displayNameNotEqualTo] = OCI::ApiClient.build_collection_params(opts[:display_name_not_equal_to], :multi) if opts[:display_name_not_equal_to] && !opts[:display_name_not_equal_to].empty?
  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[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?

  # 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: 'SoftwareSourceClient#list_software_sources') 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::OsManagementHub::Models::SoftwareSourceCollection'
    )
  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.



95
96
97
# File 'lib/oci/os_management_hub/software_source_client.rb', line 95

def logger
  @api_client.config.logger
end

#search_software_source_module_streams(search_software_source_module_streams_details, opts = {}) ⇒ Response

Note:

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

Returns a list of module streams from the specified software sources. Filter the list against a variety of criteria including the module name.

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)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

Returns:



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
# File 'lib/oci/os_management_hub/software_source_client.rb', line 2034

def search_software_source_module_streams(search_software_source_module_streams_details, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#search_software_source_module_streams.' if logger

  raise "Missing the required parameter 'search_software_source_module_streams_details' when calling search_software_source_module_streams." if search_software_source_module_streams_details.nil?

  path = '/softwareSourceModuleStreams/actions/search'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(search_software_source_module_streams_details)

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

#search_software_source_modules(search_software_source_modules_details, opts = {}) ⇒ Response

Note:

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

Lists modules from a list of software sources. Filter the list against a variety of criteria including the module name.

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)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

Returns:



2101
2102
2103
2104
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
# File 'lib/oci/os_management_hub/software_source_client.rb', line 2101

def search_software_source_modules(search_software_source_modules_details, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#search_software_source_modules.' if logger

  raise "Missing the required parameter 'search_software_source_modules_details' when calling search_software_source_modules." if search_software_source_modules_details.nil?

  path = '/softwareSourceModules/actions/search'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(search_software_source_modules_details)

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

#search_software_source_package_groups(search_software_source_package_groups_details, opts = {}) ⇒ Response

Note:

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

Searches the package groups from the specified list of software sources. Filter the list against a variety of criteria including but not limited to its name, and group type.

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)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see List Pagination.

    Example: 50 (default to 10)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

    Example: 3

Returns:



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

def search_software_source_package_groups(search_software_source_package_groups_details, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#search_software_source_package_groups.' if logger

  raise "Missing the required parameter 'search_software_source_package_groups_details' when calling search_software_source_package_groups." if search_software_source_package_groups_details.nil?

  path = '/softwareSourcePackageGroups/actions/search'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(search_software_source_package_groups_details)

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

#update_software_source(software_source_id, update_software_source_details, opts = {}) ⇒ Response

Note:

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

Updates the specified software source's details, including but not limited to name, description, and tags.

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)

    Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

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



2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
# File 'lib/oci/os_management_hub/software_source_client.rb', line 2231

def update_software_source(software_source_id, update_software_source_details, opts = {})
  logger.debug 'Calling operation SoftwareSourceClient#update_software_source.' if logger

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

  path = '/softwareSources/{softwareSourceId}'.sub('{softwareSourceId}', software_source_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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_software_source_details)

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