Class: OCI::OsManagement::OsManagementClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/os_management/os_management_client.rb

Overview

API for the OS Management service. Use these API operations for working with Managed instances and Managed instance groups.

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

Creates a new OsManagementClient. 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/os_management_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 + '/20190801'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "OsManagementClient 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/os_management_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/os_management_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/os_management_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/os_management_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 a given list of Software Packages to a specific 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)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



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

def add_packages_to_software_source(software_source_id, add_packages_to_software_source_details, opts = {})
  logger.debug 'Calling operation OsManagementClient#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]
  # rubocop:enable Style/NegatedIf

  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: 'OsManagementClient#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

#attach_child_software_source_to_managed_instance(managed_instance_id, attach_child_software_source_to_managed_instance_details, opts = {}) ⇒ Response

Note:

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

Adds a child software source to a managed instance. After the software source has been added, then packages from that software source can be installed on the managed instance.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# File 'lib/oci/os_management/os_management_client.rb', line 178

def attach_child_software_source_to_managed_instance(managed_instance_id, attach_child_software_source_to_managed_instance_details, opts = {})
  logger.debug 'Calling operation OsManagementClient#attach_child_software_source_to_managed_instance.' if logger

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

  path = '/managedInstances/{managedInstanceId}/actions/attachChildSoftwareSource'.sub('{managedInstanceId}', managed_instance_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[:'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(attach_child_software_source_to_managed_instance_details)

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

#attach_managed_instance_to_managed_instance_group(managed_instance_group_id, managed_instance_id, opts = {}) ⇒ Response

Note:

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

Adds a Managed Instance to a Managed Instance Group. After the Managed Instance has been added, then operations can be performed on the Managed Instance Group which will then apply to all Managed Instances in the group.

Parameters:

  • managed_instance_group_id (String)

    OCID for the managed instance group

  • managed_instance_id (String)

    OCID for the managed instance

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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



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

def attach_managed_instance_to_managed_instance_group(managed_instance_group_id, managed_instance_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#attach_managed_instance_to_managed_instance_group.' if logger

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

  path = '/managedInstanceGroups/{managedInstanceGroupId}/actions/attachManagedInstance'.sub('{managedInstanceGroupId}', managed_instance_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:managedInstanceId] = managed_instance_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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#attach_parent_software_source_to_managed_instance(managed_instance_id, attach_parent_software_source_to_managed_instance_details, opts = {}) ⇒ Response

Note:

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

Adds a parent software source to a managed instance. After the software source has been added, then packages from that software source can be installed on the managed instance. Software sources that have this software source as a parent will be able to be added to this managed instance.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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

def attach_parent_software_source_to_managed_instance(managed_instance_id, attach_parent_software_source_to_managed_instance_details, opts = {})
  logger.debug 'Calling operation OsManagementClient#attach_parent_software_source_to_managed_instance.' if logger

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

  path = '/managedInstances/{managedInstanceId}/actions/attachParentSoftwareSource'.sub('{managedInstanceId}', managed_instance_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[:'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(attach_parent_software_source_to_managed_instance_details)

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

#change_managed_instance_group_compartment(managed_instance_group_id, change_managed_instance_group_compartment_details, opts = {}) ⇒ Response

Note:

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

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

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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



384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
# File 'lib/oci/os_management/os_management_client.rb', line 384

def change_managed_instance_group_compartment(managed_instance_group_id, change_managed_instance_group_compartment_details, opts = {})
  logger.debug 'Calling operation OsManagementClient#change_managed_instance_group_compartment.' if logger

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

  path = '/managedInstanceGroups/{managedInstanceGroupId}/actions/changeCompartment'.sub('{managedInstanceGroupId}', managed_instance_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]
  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_managed_instance_group_compartment_details)

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

#change_scheduled_job_compartment(scheduled_job_id, change_scheduled_job_compartment_details, opts = {}) ⇒ Response

Note:

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

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

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
# File 'lib/oci/os_management/os_management_client.rb', line 456

def change_scheduled_job_compartment(scheduled_job_id, change_scheduled_job_compartment_details, opts = {})
  logger.debug 'Calling operation OsManagementClient#change_scheduled_job_compartment.' if logger

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

  path = '/scheduledJobs/{scheduledJobId}/actions/changeCompartment'.sub('{scheduledJobId}', scheduled_job_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_scheduled_job_compartment_details)

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

#change_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 a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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



528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
# File 'lib/oci/os_management/os_management_client.rb', line 528

def change_software_source_compartment(software_source_id, change_software_source_compartment_details, opts = {})
  logger.debug 'Calling operation OsManagementClient#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: 'OsManagementClient#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_managed_instance_group(create_managed_instance_group_details, opts = {}) ⇒ Response

Note:

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

Creates a new Managed Instance Group on the management system. This will not contain any managed instances after it is first created, and they must be added later.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

Returns:



594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
# File 'lib/oci/os_management/os_management_client.rb', line 594

def create_managed_instance_group(create_managed_instance_group_details, opts = {})
  logger.debug 'Calling operation OsManagementClient#create_managed_instance_group.' if logger

  raise "Missing the required parameter 'create_managed_instance_group_details' when calling create_managed_instance_group." if create_managed_instance_group_details.nil?

  path = '/managedInstanceGroups'
  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_managed_instance_group_details)

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

#create_scheduled_job(create_scheduled_job_details, opts = {}) ⇒ Response

Note:

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

Creates a new Scheduled Job to perform a specific package operation on a set of managed instances or managed instance groups. Can be created as a one-time execution in the future, or as a recurring execution that repeats on a defined interval.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

Returns:



659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
# File 'lib/oci/os_management/os_management_client.rb', line 659

def create_scheduled_job(create_scheduled_job_details, opts = {})
  logger.debug 'Calling operation OsManagementClient#create_scheduled_job.' if logger

  raise "Missing the required parameter 'create_scheduled_job_details' when calling create_scheduled_job." if create_scheduled_job_details.nil?

  path = '/scheduledJobs'
  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_scheduled_job_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OsManagementClient#create_scheduled_job') 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::OsManagement::Models::ScheduledJob'
    )
  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 custom Software Source on the management system. This will not contain any packages after it is first created, and they must be added later.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

Returns:



723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
# File 'lib/oci/os_management/os_management_client.rb', line 723

def create_software_source(create_software_source_details, opts = {})
  logger.debug 'Calling operation OsManagementClient#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: 'OsManagementClient#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::OsManagement::Models::SoftwareSource'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_managed_instance_group(managed_instance_group_id, opts = {}) ⇒ Response

Note:

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

Deletes a Managed Instance Group from the management system

Parameters:

  • managed_instance_group_id (String)

    OCID for the managed instance group

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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



785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
# File 'lib/oci/os_management/os_management_client.rb', line 785

def delete_managed_instance_group(managed_instance_group_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#delete_managed_instance_group.' if logger

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

  path = '/managedInstanceGroups/{managedInstanceGroupId}'.sub('{managedInstanceGroupId}', managed_instance_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]
  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: 'OsManagementClient#delete_managed_instance_group') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_scheduled_job(scheduled_job_id, opts = {}) ⇒ Response

Note:

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

Cancels an existing Scheduled Job on the management system

Parameters:

  • scheduled_job_id (String)

    The ID of the scheduled job.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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



846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
# File 'lib/oci/os_management/os_management_client.rb', line 846

def delete_scheduled_job(scheduled_job_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#delete_scheduled_job.' if logger

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

  path = '/scheduledJobs/{scheduledJobId}'.sub('{scheduledJobId}', scheduled_job_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: 'OsManagementClient#delete_scheduled_job') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Deletes a custom Software Source on the management system

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)

    The client request ID for tracing.

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



907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
# File 'lib/oci/os_management/os_management_client.rb', line 907

def delete_software_source(software_source_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#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: 'OsManagementClient#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

#detach_child_software_source_from_managed_instance(managed_instance_id, detach_child_software_source_from_managed_instance_details, opts = {}) ⇒ Response

Note:

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

Removes a child software source from a managed instance. Packages will no longer be able to be installed from these 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)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
# File 'lib/oci/os_management/os_management_client.rb', line 970

def detach_child_software_source_from_managed_instance(managed_instance_id, detach_child_software_source_from_managed_instance_details, opts = {})
  logger.debug 'Calling operation OsManagementClient#detach_child_software_source_from_managed_instance.' if logger

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

  path = '/managedInstances/{managedInstanceId}/actions/detachChildSoftwareSource'.sub('{managedInstanceId}', managed_instance_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[:'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(detach_child_software_source_from_managed_instance_details)

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

#detach_managed_instance_from_managed_instance_group(managed_instance_group_id, managed_instance_id, opts = {}) ⇒ Response

Note:

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

Removes a Managed Instance from a Managed Instance Group.

Parameters:

  • managed_instance_group_id (String)

    OCID for the managed instance group

  • managed_instance_id (String)

    OCID for the managed instance

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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



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
# File 'lib/oci/os_management/os_management_client.rb', line 1034

def detach_managed_instance_from_managed_instance_group(managed_instance_group_id, managed_instance_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#detach_managed_instance_from_managed_instance_group.' if logger

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

  path = '/managedInstanceGroups/{managedInstanceGroupId}/actions/detachManagedInstance'.sub('{managedInstanceGroupId}', managed_instance_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:managedInstanceId] = managed_instance_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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#detach_parent_software_source_from_managed_instance(managed_instance_id, detach_parent_software_source_from_managed_instance_details, opts = {}) ⇒ Response

Note:

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

Removes a software source from a managed instance. All child software sources will also be removed from the managed instance. Packages will no longer be able to be installed from these 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)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
# File 'lib/oci/os_management/os_management_client.rb', line 1100

def detach_parent_software_source_from_managed_instance(managed_instance_id, detach_parent_software_source_from_managed_instance_details, opts = {})
  logger.debug 'Calling operation OsManagementClient#detach_parent_software_source_from_managed_instance.' if logger

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

  path = '/managedInstances/{managedInstanceId}/actions/detachParentSoftwareSource'.sub('{managedInstanceId}', managed_instance_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[:'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(detach_parent_software_source_from_managed_instance_details)

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

#disable_module_stream_on_managed_instance(managed_instance_id, module_name, opts = {}) ⇒ Response

Note:

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

Disables a module stream on a managed instance. After the stream is disabled, it is no longer possible to install the profiles that are contained by the stream. All installed profiles must be removed prior to disabling a module stream.

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • module_name (String)

    The name of a 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)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

  • :if_match (String)

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

  • :stream_name (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/os_management/os_management_client.rb', line 1176

def disable_module_stream_on_managed_instance(managed_instance_id, module_name, opts = {})
  logger.debug 'Calling operation OsManagementClient#disable_module_stream_on_managed_instance.' if logger

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

  path = '/managedInstances/{managedInstanceId}/actions/moduleStreams/disable'.sub('{managedInstanceId}', managed_instance_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:moduleName] = module_name
  query_params[:streamName] = opts[:stream_name] if opts[: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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#enable_module_stream_on_managed_instance(managed_instance_id, module_name, opts = {}) ⇒ Response

Note:

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

Enables a module stream on a managed instance. After the stream is enabled, it is possible to install the profiles that are contained by the stream. Enabling a stream that is already enabled will succeed. Attempting to enable a different stream for a module that already has a stream enabled results in an error.

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • module_name (String)

    The name of a 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)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

  • :if_match (String)

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

  • :stream_name (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
# File 'lib/oci/os_management/os_management_client.rb', line 1256

def enable_module_stream_on_managed_instance(managed_instance_id, module_name, opts = {})
  logger.debug 'Calling operation OsManagementClient#enable_module_stream_on_managed_instance.' if logger

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

  path = '/managedInstances/{managedInstanceId}/actions/moduleStreams/enable'.sub('{managedInstanceId}', managed_instance_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:moduleName] = module_name
  query_params[:streamName] = opts[:stream_name] if opts[: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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#get_erratum(erratum_id, opts = {}) ⇒ Response

Note:

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

Returns a specific erratum.

Parameters:

  • erratum_id (String)

    The OCID of the erratum.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
# File 'lib/oci/os_management/os_management_client.rb', line 1316

def get_erratum(erratum_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#get_erratum.' if logger

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

  path = '/errata/{erratumId}'.sub('{erratumId}', erratum_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: 'OsManagementClient#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::OsManagement::Models::Erratum'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_managed_instance(managed_instance_id, opts = {}) ⇒ Response

Note:

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

Returns a specific Managed Instance.

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
# File 'lib/oci/os_management/os_management_client.rb', line 1371

def get_managed_instance(managed_instance_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#get_managed_instance.' if logger

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

  path = '/managedInstances/{managedInstanceId}'.sub('{managedInstanceId}', managed_instance_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: 'OsManagementClient#get_managed_instance') 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::OsManagement::Models::ManagedInstance'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_managed_instance_group(managed_instance_group_id, opts = {}) ⇒ Response

Note:

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

Returns a specific Managed Instance Group.

Parameters:

  • managed_instance_group_id (String)

    OCID for the managed instance group

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
# File 'lib/oci/os_management/os_management_client.rb', line 1426

def get_managed_instance_group(managed_instance_group_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#get_managed_instance_group.' if logger

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

  path = '/managedInstanceGroups/{managedInstanceGroupId}'.sub('{managedInstanceGroupId}', managed_instance_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: 'OsManagementClient#get_managed_instance_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::OsManagement::Models::ManagedInstanceGroup'
    )
  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.

Retrieve a detailed description of a module stream from 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)

    The client request ID for tracing.

Returns:



1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
# File 'lib/oci/os_management/os_management_client.rb', line 1483

def get_module_stream(software_source_id, module_name, stream_name, opts = {})
  logger.debug 'Calling operation OsManagementClient#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)
  raise "Parameter value for 'stream_name' must not be blank" if OCI::Internal::Util.blank_string?(stream_name)

  path = '/softwareSources/{softwareSourceId}/modules/{moduleName}/streams/{streamName}'.sub('{softwareSourceId}', software_source_id.to_s).sub('{moduleName}', module_name.to_s).sub('{streamName}', stream_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: 'OsManagementClient#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::OsManagement::Models::ModuleStream'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Retrieve a detailed description of a module stream profile from 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

  • profile_name (String)

    The name of the profile of the containing module stream

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1545
1546
1547
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
# File 'lib/oci/os_management/os_management_client.rb', line 1545

def get_module_stream_profile(software_source_id, module_name, stream_name, profile_name, opts = {})
  logger.debug 'Calling operation OsManagementClient#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 '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 "Missing the required parameter 'profile_name' when calling get_module_stream_profile." if profile_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)
  raise "Parameter value for 'stream_name' must not be blank" if OCI::Internal::Util.blank_string?(stream_name)
  raise "Parameter value for 'profile_name' must not be blank" if OCI::Internal::Util.blank_string?(profile_name)

  path = '/softwareSources/{softwareSourceId}/modules/{moduleName}/streams/{streamName}/profiles/{profileName}'.sub('{softwareSourceId}', software_source_id.to_s).sub('{moduleName}', module_name.to_s).sub('{streamName}', stream_name.to_s).sub('{profileName}', profile_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: 'OsManagementClient#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::OsManagement::Models::ModuleStreamProfile'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_scheduled_job(scheduled_job_id, opts = {}) ⇒ Response

Note:

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

Gets the detailed information for the Scheduled Job with the given ID.

Parameters:

  • scheduled_job_id (String)

    The ID of the scheduled job.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
# File 'lib/oci/os_management/os_management_client.rb', line 1606

def get_scheduled_job(scheduled_job_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#get_scheduled_job.' if logger

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

  path = '/scheduledJobs/{scheduledJobId}'.sub('{scheduledJobId}', scheduled_job_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: 'OsManagementClient#get_scheduled_job') 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::OsManagement::Models::ScheduledJob'
    )
  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 a specific Software Package.

Parameters:

  • software_source_id (String)

    The OCID of the software source.

  • software_package_name (String)

    The id 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)

    The client request ID for tracing.

Returns:



1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
# File 'lib/oci/os_management/os_management_client.rb', line 1662

def get_software_package(software_source_id, software_package_name, opts = {})
  logger.debug 'Calling operation OsManagementClient#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: 'OsManagementClient#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::OsManagement::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 a specific 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)

    The client request ID for tracing.

Returns:



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/os_management_client.rb', line 1719

def get_software_source(software_source_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#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: 'OsManagementClient#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::OsManagement::Models::SoftwareSource'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_windows_update(windows_update, opts = {}) ⇒ Response

Note:

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

Returns a Windows Update object.

Parameters:

  • windows_update (String)

    The Windows Update

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
# File 'lib/oci/os_management/os_management_client.rb', line 1774

def get_windows_update(windows_update, opts = {})
  logger.debug 'Calling operation OsManagementClient#get_windows_update.' if logger

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

  path = '/updates/{windowsUpdate}'.sub('{windowsUpdate}', windows_update.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: 'OsManagementClient#get_windows_update') 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::OsManagement::Models::WindowsUpdate'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Gets the detailed information for the work request with the given ID.

Parameters:

  • work_request_id (String)

    The ID of the asynchronous request.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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

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

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

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

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

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

  post_body = nil

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

#install_all_package_updates_on_managed_instance(managed_instance_id, opts = {}) ⇒ Response

Note:

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

Install all of the available package updates for the managed instance.

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • 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

  • :update_type (String)

    The type of updates to be applied

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/os_management/os_management_client.rb', line 1890

def install_all_package_updates_on_managed_instance(managed_instance_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#install_all_package_updates_on_managed_instance.' if logger

  raise "Missing the required parameter 'managed_instance_id' when calling install_all_package_updates_on_managed_instance." if managed_instance_id.nil?

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

  path = '/managedInstances/{managedInstanceId}/actions/packages/updateAll'.sub('{managedInstanceId}', managed_instance_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#install_all_updates_on_managed_instance_group(managed_instance_group_id, opts = {}) ⇒ Response

Note:

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

Install all of the available updates for the Managed Instance Group.

Parameters:

  • managed_instance_group_id (String)

    OCID for the managed instance group

  • 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

  • :update_type (String)

    The type of updates to be applied

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/os_management/os_management_client.rb', line 1958

def install_all_updates_on_managed_instance_group(managed_instance_group_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#install_all_updates_on_managed_instance_group.' if logger

  raise "Missing the required parameter 'managed_instance_group_id' when calling install_all_updates_on_managed_instance_group." if managed_instance_group_id.nil?

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

  path = '/managedInstanceGroups/{managedInstanceGroupId}/actions/updates/installAll'.sub('{managedInstanceGroupId}', managed_instance_group_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#install_all_windows_updates_on_managed_instance(managed_instance_id, opts = {}) ⇒ Response

Note:

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

Install all of the available Windows updates for the managed instance.

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • 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

  • :update_type (String)

    The type of updates to be applied

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
# File 'lib/oci/os_management/os_management_client.rb', line 2026

def install_all_windows_updates_on_managed_instance(managed_instance_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#install_all_windows_updates_on_managed_instance.' if logger

  raise "Missing the required parameter 'managed_instance_id' when calling install_all_windows_updates_on_managed_instance." if managed_instance_id.nil?

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

  path = '/managedInstances/{managedInstanceId}/actions/updates/installAll'.sub('{managedInstanceId}', managed_instance_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#install_module_stream_profile_on_managed_instance(managed_instance_id, module_name, opts = {}) ⇒ Response

Note:

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

Installs a profile for an module stream. The stream must be enabled before a profile can be installed. If a module stream defines multiple profiles, each one can be installed independently.

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • module_name (String)

    The name of a 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)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

  • :if_match (String)

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

  • :stream_name (String)

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

  • :profile_name (String)

    The name of the profile of the containing module stream

Returns:

  • (Response)

    A Response object with data of type nil



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

def install_module_stream_profile_on_managed_instance(managed_instance_id, module_name, opts = {})
  logger.debug 'Calling operation OsManagementClient#install_module_stream_profile_on_managed_instance.' if logger

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

  path = '/managedInstances/{managedInstanceId}/actions/streamProfiles/install'.sub('{managedInstanceId}', managed_instance_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:moduleName] = module_name
  query_params[:streamName] = opts[:stream_name] if opts[:stream_name]
  query_params[:profileName] = opts[:profile_name] if opts[:profile_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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#install_package_on_managed_instance(managed_instance_id, software_package_name, opts = {}) ⇒ Response

Note:

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

Installs a package on a managed instance.

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • software_package_name (String)

    Package name

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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



2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
# File 'lib/oci/os_management/os_management_client.rb', line 2174

def install_package_on_managed_instance(managed_instance_id, software_package_name, opts = {})
  logger.debug 'Calling operation OsManagementClient#install_package_on_managed_instance.' if logger

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

  path = '/managedInstances/{managedInstanceId}/actions/packages/install'.sub('{managedInstanceId}', managed_instance_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:softwarePackageName] = software_package_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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#install_package_update_on_managed_instance(managed_instance_id, software_package_name, opts = {}) ⇒ Response

Note:

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

Updates a package on a managed instance.

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • software_package_name (String)

    Package name

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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



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
2270
2271
2272
2273
2274
2275
2276
2277
2278
# File 'lib/oci/os_management/os_management_client.rb', line 2239

def install_package_update_on_managed_instance(managed_instance_id, software_package_name, opts = {})
  logger.debug 'Calling operation OsManagementClient#install_package_update_on_managed_instance.' if logger

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

  path = '/managedInstances/{managedInstanceId}/actions/packages/update'.sub('{managedInstanceId}', managed_instance_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:softwarePackageName] = software_package_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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#install_windows_update_on_managed_instance(managed_instance_id, windows_update_name, opts = {}) ⇒ Response

Note:

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

Installs a Windows update on a managed instance.

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • windows_update_name (String)

    Unique identifier for the Windows update. NOTE - This is not an OCID, but is a unique identifier assigned by Microsoft. Example: 6981d463-cd91-4a26-b7c4-ea4ded9183ed

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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



2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
# File 'lib/oci/os_management/os_management_client.rb', line 2307

def install_windows_update_on_managed_instance(managed_instance_id, windows_update_name, opts = {})
  logger.debug 'Calling operation OsManagementClient#install_windows_update_on_managed_instance.' if logger

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

  path = '/managedInstances/{managedInstanceId}/actions/updates/install'.sub('{managedInstanceId}', managed_instance_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:windowsUpdateName] = windows_update_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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#list_available_packages_for_managed_instance(managed_instance_id, opts = {}) ⇒ Response

Note:

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

Returns a list of packages available for install on the Managed Instance.

Allowed values are: TIMECREATED, DISPLAYNAME

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • 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 user-friendly name. Does not have to be unique, and it's changeable.

    Example: My new resource

  • :compartment_id (String)

    The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect.

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
# File 'lib/oci/os_management/os_management_client.rb', line 2377

def list_available_packages_for_managed_instance(managed_instance_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#list_available_packages_for_managed_instance.' if logger

  raise "Missing the required parameter 'managed_instance_id' when calling list_available_packages_for_managed_instance." if managed_instance_id.nil?

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  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 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id)

  path = '/managedInstances/{managedInstanceId}/packages/available'.sub('{managedInstanceId}', managed_instance_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[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OsManagementClient#list_available_packages_for_managed_instance') 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: 'Array<OCI::OsManagement::Models::InstallablePackageSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_available_software_sources_for_managed_instance(managed_instance_id, opts = {}) ⇒ Response

Note:

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

Returns a list of available software sources for a Managed Instance.

Allowed values are: TIMECREATED, DISPLAYNAME

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • 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 user-friendly name. Does not have to be unique, and it's changeable.

    Example: My new resource

  • :compartment_id (String)

    The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect.

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
# File 'lib/oci/os_management/os_management_client.rb', line 2458

def list_available_software_sources_for_managed_instance(managed_instance_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#list_available_software_sources_for_managed_instance.' if logger

  raise "Missing the required parameter 'managed_instance_id' when calling list_available_software_sources_for_managed_instance." if managed_instance_id.nil?

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  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 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id)

  path = '/managedInstances/{managedInstanceId}/availableSoftwareSources'.sub('{managedInstanceId}', managed_instance_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[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OsManagementClient#list_available_software_sources_for_managed_instance') 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: 'Array<OCI::OsManagement::Models::AvailableSoftwareSourceSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_available_updates_for_managed_instance(managed_instance_id, opts = {}) ⇒ Response

Note:

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

Returns a list of available updates for a Managed Instance.

Allowed values are: TIMECREATED, DISPLAYNAME

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • 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 user-friendly name. Does not have to be unique, and it's changeable.

    Example: My new resource

  • :compartment_id (String)

    The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect.

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
# File 'lib/oci/os_management/os_management_client.rb', line 2539

def list_available_updates_for_managed_instance(managed_instance_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#list_available_updates_for_managed_instance.' if logger

  raise "Missing the required parameter 'managed_instance_id' when calling list_available_updates_for_managed_instance." if managed_instance_id.nil?

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  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 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id)

  path = '/managedInstances/{managedInstanceId}/packages/updates'.sub('{managedInstanceId}', managed_instance_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[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OsManagementClient#list_available_updates_for_managed_instance') 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: 'Array<OCI::OsManagement::Models::AvailableUpdateSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_available_windows_updates_for_managed_instance(managed_instance_id, opts = {}) ⇒ Response

Note:

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

Returns a list of available Windows updates for a Managed Instance. This is only applicable to Windows instances.

Allowed values are: TIMECREATED, DISPLAYNAME

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • 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 user-friendly name. Does not have to be unique, and it's changeable.

    Example: My new resource

  • :compartment_id (String)

    The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect.

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :is_eligible_for_installation (String)

    Indicator of whether the update can be installed using OSMS.

Returns:



2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
# File 'lib/oci/os_management/os_management_client.rb', line 2621

def list_available_windows_updates_for_managed_instance(managed_instance_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#list_available_windows_updates_for_managed_instance.' if logger

  raise "Missing the required parameter 'managed_instance_id' when calling list_available_windows_updates_for_managed_instance." if managed_instance_id.nil?

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

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

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

  path = '/managedInstances/{managedInstanceId}/updates/available'.sub('{managedInstanceId}', managed_instance_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[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:isEligibleForInstallation] = opts[:is_eligible_for_installation] if opts[:is_eligible_for_installation]

  # 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: 'OsManagementClient#list_available_windows_updates_for_managed_instance') 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: 'Array<OCI::OsManagement::Models::AvailableWindowsUpdateSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_errata(opts = {}) ⇒ Response

Note:

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

Returns a list of all of the currently available Errata in the system

Allowed values are: ISSUEDATE, ADVISORYNAME

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 ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect.

  • :erratum_id (String)

    The OCID of the erratum.

  • :advisory_name (String)

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

    Example: ELSA-2020-5804

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

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
# File 'lib/oci/os_management/os_management_client.rb', line 2715

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


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

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

  path = '/errata'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:erratumId] = opts[:erratum_id] if opts[:erratum_id]
  query_params[:advisoryName] = opts[:advisory_name] if opts[:advisory_name]
  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: 'OsManagementClient#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: 'Array<OCI::OsManagement::Models::ErratumSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_managed_instance_errata(managed_instance_id, opts = {}) ⇒ Response

Note:

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

Returns a list of errata relevant to the Managed Instance.

Allowed values are: TIMECREATED, DISPLAYNAME

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • 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 user-friendly name. Does not have to be unique, and it's changeable.

    Example: My new resource

  • :compartment_id (String)

    The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect.

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
# File 'lib/oci/os_management/os_management_client.rb', line 2797

def list_managed_instance_errata(managed_instance_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#list_managed_instance_errata.' if logger

  raise "Missing the required parameter 'managed_instance_id' when calling list_managed_instance_errata." if managed_instance_id.nil?

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  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 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id)

  path = '/managedInstances/{managedInstanceId}/errata'.sub('{managedInstanceId}', managed_instance_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[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OsManagementClient#list_managed_instance_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: 'Array<OCI::OsManagement::Models::ErratumSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a list of all Managed Instance Groups.

Allowed values are: TIMECREATED, DISPLAYNAME

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

    A user-friendly name. Does not have to be unique, and it's changeable.

    Example: My new resource

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :lifecycle_state (String)

    The current lifecycle state for the object.

  • :os_family (String)

    The OS family for which to list resources.

Returns:



2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
# File 'lib/oci/os_management/os_management_client.rb', line 2879

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

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

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

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

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

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

  path = '/managedInstanceGroups'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[: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] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:osFamily] = opts[:os_family] if opts[:os_family]

  # 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: 'OsManagementClient#list_managed_instance_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: 'Array<OCI::OsManagement::Models::ManagedInstanceGroupSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a list of all Managed Instances.

Allowed values are: TIMECREATED, DISPLAYNAME

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

    A user-friendly name. Does not have to be unique, and it's changeable.

    Example: My new resource

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :os_family (String)

    The OS family for which to list resources.

Returns:



2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
# File 'lib/oci/os_management/os_management_client.rb', line 2969

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

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

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

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

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

  path = '/managedInstances'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[: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[:osFamily] = opts[:os_family] if opts[:os_family]

  # 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: 'OsManagementClient#list_managed_instances') 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: 'Array<OCI::OsManagement::Models::ManagedInstanceSummary>'
    )
  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.

Retrieve a list of module stream profiles from a software source. Filters may be applied to select a subset of module stream profiles based on the filter criteria.

The "moduleName", "streamName", and "profileName" attributes combine to form a set of filters on the list of module stream profiles. If a "moduleName" is provided, only profiles that belong to that module are returned. If both a "moduleName" and "streamName" are given, only profiles belonging to that module stream are returned. Finally, if all three are given then only the particular profile indicated by the triple is returned. It is not valid to supply a "streamName" without a "moduleName". It is also not valid to supply a "profileName" without a "streamName".

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 ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect.

  • :module_name (String)

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

  • :stream_name (String)

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

  • :profile_name (String)

    The name of the profile of the containing module stream

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
# File 'lib/oci/os_management/os_management_client.rb', line 3069

def list_module_stream_profiles(software_source_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#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] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  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}/streamProfiles'.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[:moduleName] = opts[:module_name] if opts[:module_name]
  query_params[:streamName] = opts[:stream_name] if opts[:stream_name]
  query_params[:profileName] = opts[:profile_name] if opts[:profile_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: 'OsManagementClient#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: 'Array<OCI::OsManagement::Models::ModuleStreamProfileSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_module_stream_profiles_on_managed_instance(managed_instance_id, opts = {}) ⇒ Response

Note:

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

Retrieve a list of module stream profiles, along with a summary of their of their status, from a managed instance. Filters may be applied to select a subset of profiles based on the filter criteria.

The "moduleName", "streamName", and "profileName" attributes combine to form a set of filters on the list of module stream profiles. If a "modulName" is provided, only profiles that belong to that module are returned. If both a "moduleName" and "streamName" are given, only profiles belonging to that module stream are returned. Finally, if all three are given then only the particular profile indicated by the triple is returned. It is not valid to supply a "streamName" without a "moduleName". It is also not valid to supply a "profileName" without a "streamName".

The "status" attribute filters against the state of a module stream profile. Valid values are "INSTALLED" and "AVAILABLE". If the attribute is set to "INSTALLED", only module stream profiles that are installed are included in the result set. If the attribute is set to "AVAILABLE", only module stream profiles that are not installed are included in the result set. If the attribute is not defined, the request is not subject to this filter.

When sorting by display name, the result set is sorted first by module name, then by stream name, and finally by profile name.

Allowed values are: TIMECREATED, DISPLAYNAME

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • 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 ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect.

  • :module_name (String)

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

  • :stream_name (String)

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

  • :profile_name (String)

    The name of the profile of the containing module stream

  • :profile_status (String)

    The status of the profile.

    A profile with the "INSTALLED" status indicates that the profile has been installed.

    A profile with the "AVAILABLE" status indicates that the profile is not installed, but can be.

    Allowed values are: INSTALLED, AVAILABLE

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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

def list_module_stream_profiles_on_managed_instance(managed_instance_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#list_module_stream_profiles_on_managed_instance.' if logger

  raise "Missing the required parameter 'managed_instance_id' when calling list_module_stream_profiles_on_managed_instance." if managed_instance_id.nil?

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

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  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 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id)

  path = '/managedInstances/{managedInstanceId}/streamProfiles'.sub('{managedInstanceId}', managed_instance_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[:moduleName] = opts[:module_name] if opts[:module_name]
  query_params[:streamName] = opts[:stream_name] if opts[:stream_name]
  query_params[:profileName] = opts[:profile_name] if opts[:profile_name]
  query_params[:profileStatus] = opts[:profile_status] if opts[:profile_status]
  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: 'OsManagementClient#list_module_stream_profiles_on_managed_instance') 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: 'Array<OCI::OsManagement::Models::ModuleStreamProfileOnManagedInstanceSummary>'
    )
  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.

Retrieve a list of module streams from a software source. Filters may be applied to select a subset of module streams based on the filter criteria.

The 'moduleName' attribute filters against the name of a module. It accepts strings of the format "<module>". If this attribute is defined, only streams that belong to the specified module are included in the result set. If it is not defined, the request is not subject to this filter. The 'streamName' attribute filters against the name of a stream of a module. If this attribute is defined, only the particular module stream that matches both the module and stream names is included in the result set. It is not valid to supply 'streamName' without also supplying a 'moduleName'.

When sorting by display name, the result set is sorted first by module name, then by stream 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

  • :compartment_id (String)

    The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect.

  • :module_name (String)

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

  • :stream_name (String)

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

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
# File 'lib/oci/os_management/os_management_client.rb', line 3293

def list_module_streams(software_source_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#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] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  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}/moduleStreams'.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[:moduleName] = opts[:module_name] if opts[:module_name]
  query_params[:streamName] = opts[:stream_name] if opts[:stream_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: 'OsManagementClient#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: 'Array<OCI::OsManagement::Models::ModuleStreamSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_module_streams_on_managed_instance(managed_instance_id, opts = {}) ⇒ Response

Note:

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

Retrieve a list of module streams, along with a summary of their status, from a managed instance. Filters may be applied to select a subset of module streams based on the filter criteria.

The 'moduleName' attribute filters against the name of a module. It accepts strings of the format "<module>". If this attribute is defined, only streams that belong to the specified module are included in the result set. If it is not defined, the request is not subject to this filter.

The "status" attribute filters against the state of a module stream. Valid values are "ENABLED", "DISABLED", and "ACTIVE". If the attribute is set to "ENABLED", only module streams that are enabled are included in the result set. If the attribute is set to "DISABLED", only module streams that are not enabled are included in the result set. If the attribute is set to "ACTIVE", only module streams that are active are included in the result set. If the attribute is not defined, the request is not subject to this filter.

When sorting by the display name, the result set is sorted first by the module name and then by the stream name.

Allowed values are: TIMECREATED, DISPLAYNAME

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • 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 ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect.

  • :module_name (String)

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

  • :stream_name (String)

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

  • :stream_status (String)

    The status of the stream

    A stream with the "ENABLED" status can be used as a source for installing profiles. Streams with this status are also "ACTIVE".

    A stream with the "DISABLED" status cannot be the source for installing profiles. To install profiles and packages from this stream, it must be enabled.

    A stream with the "ACTIVE" status can be used as a source for installing profiles. The packages that comprise the stream are also used when a matching package is installed directly. In general, a stream can have this status if it is the default stream for the module and no stream has been explicitly enabled.

    Allowed values are: ENABLED, DISABLED, ACTIVE

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
# File 'lib/oci/os_management/os_management_client.rb', line 3413

def list_module_streams_on_managed_instance(managed_instance_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#list_module_streams_on_managed_instance.' if logger

  raise "Missing the required parameter 'managed_instance_id' when calling list_module_streams_on_managed_instance." if managed_instance_id.nil?

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

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  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 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id)

  path = '/managedInstances/{managedInstanceId}/moduleStreams'.sub('{managedInstanceId}', managed_instance_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[:moduleName] = opts[:module_name] if opts[:module_name]
  query_params[:streamName] = opts[:stream_name] if opts[:stream_name]
  query_params[:streamStatus] = opts[:stream_status] if opts[:stream_status]
  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: 'OsManagementClient#list_module_streams_on_managed_instance') 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: 'Array<OCI::OsManagement::Models::ModuleStreamOnManagedInstanceSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_packages_installed_on_managed_instance(managed_instance_id, opts = {}) ⇒ Response

Note:

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

Returns a list of installed packages on the Managed Instance.

Allowed values are: TIMECREATED, DISPLAYNAME

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • 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 user-friendly name. Does not have to be unique, and it's changeable.

    Example: My new resource

  • :compartment_id (String)

    The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect.

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
# File 'lib/oci/os_management/os_management_client.rb', line 3500

def list_packages_installed_on_managed_instance(managed_instance_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#list_packages_installed_on_managed_instance.' if logger

  raise "Missing the required parameter 'managed_instance_id' when calling list_packages_installed_on_managed_instance." if managed_instance_id.nil?

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  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 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id)

  path = '/managedInstances/{managedInstanceId}/packages'.sub('{managedInstanceId}', managed_instance_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[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OsManagementClient#list_packages_installed_on_managed_instance') 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: 'Array<OCI::OsManagement::Models::InstalledPackageSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a list of all of the currently active Scheduled Jobs in the system

Allowed values are: TIMECREATED, DISPLAYNAME

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

    A user-friendly name. Does not have to be unique, and it's changeable.

    Example: My new resource

  • :managed_instance_id (String)

    The ID of the managed instance for which to list resources.

  • :managed_instance_group_id (String)

    The ID of the managed instace group for which to list resources.

  • :operation_type (String)

    The operation type for which to list resources

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :lifecycle_state (String)

    The current lifecycle state for the object.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :os_family (String)

    The OS family for which to list resources.

  • :is_restricted (BOOLEAN)

    If true, will only filter out restricted Autonomous Linux Scheduled Job

Returns:



3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
# File 'lib/oci/os_management/os_management_client.rb', line 3586

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

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

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

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

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

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

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

  path = '/scheduledJobs'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:managedInstanceId] = opts[:managed_instance_id] if opts[:managed_instance_id]
  query_params[:managedInstanceGroupId] = opts[:managed_instance_group_id] if opts[:managed_instance_group_id]
  query_params[:operationType] = opts[:operation_type] if opts[:operation_type]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:osFamily] = opts[:os_family] if opts[:os_family]
  query_params[:isRestricted] = opts[:is_restricted] if !opts[:is_restricted].nil?

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OsManagementClient#list_scheduled_jobs') 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: 'Array<OCI::OsManagement::Models::ScheduledJobSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Lists Software Packages in a Software Source

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 ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect.

  • :display_name (String)

    A user-friendly name. Does not have to be unique, and it's changeable.

    Example: My new resource

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
# File 'lib/oci/os_management/os_management_client.rb', line 3684

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

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

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  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[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OsManagementClient#list_software_source_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: 'Array<OCI::OsManagement::Models::SoftwarePackageSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a list of all Software Sources.

Allowed values are: TIMECREATED, DISPLAYNAME

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

    A user-friendly name. Does not have to be unique, and it's changeable.

    Example: My new resource

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :lifecycle_state (String)

    The current lifecycle state for the object.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
# File 'lib/oci/os_management/os_management_client.rb', line 3765

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

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

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

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

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

  path = '/softwareSources'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[: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] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # 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: 'OsManagementClient#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: 'Array<OCI::OsManagement::Models::SoftwareSourceSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_upcoming_scheduled_jobs(compartment_id, time_end, opts = {}) ⇒ Response

Note:

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

Returns a list of all of the Scheduled Jobs whose next execution time is at or before the specified time.

Allowed values are: TIMECREATED, DISPLAYNAME

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • time_end (DateTime)

    The cut-off time before which to list all upcoming schedules, in ISO 8601 format

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

  • 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 user-friendly name. Does not have to be unique, and it's changeable.

    Example: My new resource

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :tag_name (String)

    The name of the tag.

  • :tag_value (String)

    The value for the tag.

  • :lifecycle_state (String)

    The current lifecycle state for the object.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :os_family (String)

    The OS family for which to list resources.

Returns:



3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
# File 'lib/oci/os_management/os_management_client.rb', line 3857

def list_upcoming_scheduled_jobs(compartment_id, time_end, opts = {})
  logger.debug 'Calling operation OsManagementClient#list_upcoming_scheduled_jobs.' if logger

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

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

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

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

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

  path = '/scheduledJobs/upcomingSchedules'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:timeEnd] = time_end
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:tagName] = opts[:tag_name] if opts[:tag_name]
  query_params[:tagValue] = opts[:tag_value] if opts[:tag_value]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:osFamily] = opts[:os_family] if opts[:os_family]

  # 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: 'OsManagementClient#list_upcoming_scheduled_jobs') 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: 'Array<OCI::OsManagement::Models::ScheduledJobSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_windows_updates(opts = {}) ⇒ Response

Note:

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

Returns a list of Windows Updates.

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 ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect.

  • :display_name (String)

    A user-friendly name. Does not have to be unique, and it's changeable.

    Example: My new resource

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
# File 'lib/oci/os_management/os_management_client.rb', line 3950

def list_windows_updates(opts = {})
  logger.debug 'Calling operation OsManagementClient#list_windows_updates.' if logger


  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  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 = '/updates'
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OsManagementClient#list_windows_updates') 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: 'Array<OCI::OsManagement::Models::WindowsUpdateSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_windows_updates_installed_on_managed_instance(managed_instance_id, opts = {}) ⇒ Response

Note:

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

Returns a list of installed Windows updates for a Managed Instance. This is only applicable to Windows instances.

Allowed values are: TIMECREATED, DISPLAYNAME

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • 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 user-friendly name. Does not have to be unique, and it's changeable.

    Example: My new resource

  • :compartment_id (String)

    The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect.

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
# File 'lib/oci/os_management/os_management_client.rb', line 4029

def list_windows_updates_installed_on_managed_instance(managed_instance_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#list_windows_updates_installed_on_managed_instance.' if logger

  raise "Missing the required parameter 'managed_instance_id' when calling list_windows_updates_installed_on_managed_instance." if managed_instance_id.nil?

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  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 'managed_instance_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_instance_id)

  path = '/managedInstances/{managedInstanceId}/updates/installed'.sub('{managedInstanceId}', managed_instance_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[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OsManagementClient#list_windows_updates_installed_on_managed_instance') 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: 'Array<OCI::OsManagement::Models::InstalledWindowsUpdateSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Gets the errors for the work request with the given ID. Allowed values are: TIMECREATED, DISPLAYNAME

Parameters:

  • work_request_id (String)

    The ID of the asynchronous request.

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

    the optional parameters

Options Hash (opts):

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

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

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
# File 'lib/oci/os_management/os_management_client.rb', line 4104

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

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

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  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 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

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

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[: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: 'OsManagementClient#list_work_request_errors') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::OsManagement::Models::WorkRequestError>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Lists the log entries for the work request with the given ID. Allowed values are: TIMECREATED, DISPLAYNAME

Parameters:

  • work_request_id (String)

    The ID of the asynchronous request.

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

    the optional parameters

Options Hash (opts):

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

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

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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

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

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

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  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 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

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

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[: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: 'OsManagementClient#list_work_request_logs') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::OsManagement::Models::WorkRequestLogEntry>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Lists the work requests in a compartment.

Allowed values are: TIMECREATED, DISPLAYNAME

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :display_name (String)

    A user-friendly name. Does not have to be unique, and it's changeable.

    Example: My new resource

  • :managed_instance_id (String)

    The ID of the managed instance for which to list resources.

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :os_family (String)

    The OS family for which to list resources.

Returns:



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

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

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

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

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

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

  path = '/workRequests'
  operation_signing_strategy = :standard

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

  # 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: 'OsManagementClient#list_work_requests') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::OsManagement::Models::WorkRequestSummary>'
    )
  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/os_management_client.rb', line 95

def logger
  @api_client.config.logger
end

#manage_module_streams_on_managed_instance(managed_instance_id, manage_module_streams_on_managed_instance_details, opts = {}) ⇒ Response

Note:

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

Perform an operation involving modules, streams, and profiles on a managed instance. Each operation may enable or disable an arbitrary amount of module streams, and install or remove an arbitrary number of module stream profiles. When the operation is complete, the state of the modules, streams, and profiles on the managed instance will match the state indicated in the operation.

Each module stream specified in the list of module streams to enable will be in the "ENABLED" state upon completion of the operation. If there was already a stream of that module enabled, any work required to switch from the current stream to the new stream is performed implicitly.

Each module stream specified in the list of module streams to disable will be in the "DISABLED" state upon completion of the operation. Any profiles that are installed for the module stream will be removed as part of the operation.

Each module stream profile specified in the list of profiles to install will be in the "INSTALLED" state upon completion of the operation, indicating that any packages that are part of the profile are installed on the managed instance. If the module stream containing the profile is not enabled, it will be enabled as part of the operation. There is an exception when attempting to install a stream of a profile when another stream of the same module is enabled. It is an error to attempt to install a profile of another module stream, unless enabling the new module stream is explicitly included in this operation.

Each module stream profile specified in the list of profiles to remove will be in the "AVAILABLE" state upon completion of the operation. The status of packages within the profile after the operation is complete is defined by the package manager on the managed instance.

Operations that contain one or more elements that are not allowed are rejected.

The result of this request is a WorkRequest object. The returned WorkRequest is the parent of a structure of other WorkRequests. Taken as a whole, this structure indicates the entire set of work to be performed to complete the operation.

This interface can also be used to perform a dry run of the operation rather than committing it to a managed instance. If a dry run is requested, the OS Management Service will evaluate the operation against the current module, stream, and profile state on the managed instance. It will calculate the impact of the operation on all modules, streams, and profiles on the managed instance, including those that are implicitly impacted by the operation.

The WorkRequest resulting from a dry run behaves differently than a WorkRequest resulting from a committable operation. Dry run WorkRequests are always singletons and never have children. The impact of the operation is returned using the log and error facilities of WorkRequests. The impact of operations that are allowed by the OS Management Service are communicated as one or more work request log entries. Operations that are not allowed by the OS Management Service are communicated as one or more work requst error entries. Each entry, for either logs or errors, contains a structured message containing the results of one or more operations.

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • manage_module_streams_on_managed_instance_details (OCI::OsManagement::Models::ManageModuleStreamsOnManagedInstanceDetails)

    A description of an operation to perform against the modules, streams, and profiles of a managed instance

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
# File 'lib/oci/os_management/os_management_client.rb', line 4403

def manage_module_streams_on_managed_instance(managed_instance_id, manage_module_streams_on_managed_instance_details, opts = {})
  logger.debug 'Calling operation OsManagementClient#manage_module_streams_on_managed_instance.' if logger

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

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

  post_body = @api_client.object_to_http_body(manage_module_streams_on_managed_instance_details)

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

#remove_module_stream_profile_from_managed_instance(managed_instance_id, module_name, opts = {}) ⇒ Response

Note:

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

Removes a profile for a module stream that is installed on a managed instance. If a module stream is provided, rather than a fully qualified profile, all profiles that have been installed for the module stream will be removed.

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • module_name (String)

    The name of a 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)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

  • :if_match (String)

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

  • :stream_name (String)

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

  • :profile_name (String)

    The name of the profile of the containing module stream

Returns:

  • (Response)

    A Response object with data of type nil



4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
# File 'lib/oci/os_management/os_management_client.rb', line 4480

def remove_module_stream_profile_from_managed_instance(managed_instance_id, module_name, opts = {})
  logger.debug 'Calling operation OsManagementClient#remove_module_stream_profile_from_managed_instance.' if logger

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

  path = '/managedInstances/{managedInstanceId}/actions/streamProfiles/remove'.sub('{managedInstanceId}', managed_instance_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:moduleName] = module_name
  query_params[:streamName] = opts[:stream_name] if opts[:stream_name]
  query_params[:profileName] = opts[:profile_name] if opts[:profile_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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#remove_package_from_managed_instance(managed_instance_id, software_package_name, opts = {}) ⇒ Response

Note:

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

Removes an installed package from a managed instance.

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • software_package_name (String)

    Package name

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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



4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
# File 'lib/oci/os_management/os_management_client.rb', line 4548

def remove_package_from_managed_instance(managed_instance_id, software_package_name, opts = {})
  logger.debug 'Calling operation OsManagementClient#remove_package_from_managed_instance.' if logger

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

  path = '/managedInstances/{managedInstanceId}/actions/packages/remove'.sub('{managedInstanceId}', managed_instance_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:softwarePackageName] = software_package_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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#remove_packages_from_software_source(software_source_id, remove_packages_from_software_source_details, opts = {}) ⇒ Response

Note:

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

Removes a given list of Software Packages from a specific 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)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
# File 'lib/oci/os_management/os_management_client.rb', line 4607

def remove_packages_from_software_source(software_source_id, remove_packages_from_software_source_details, opts = {})
  logger.debug 'Calling operation OsManagementClient#remove_packages_from_software_source.' if logger

  raise "Missing the required parameter 'software_source_id' when calling remove_packages_from_software_source." if software_source_id.nil?
  raise "Missing the required parameter 'remove_packages_from_software_source_details' when calling remove_packages_from_software_source." if remove_packages_from_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/removePackages'.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 = @api_client.object_to_http_body(remove_packages_from_software_source_details)

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

#run_scheduled_job_now(scheduled_job_id, opts = {}) ⇒ Response

Note:

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

This will trigger an already created Scheduled Job to being executing immediately instead of waiting for its next regularly scheduled time.

Parameters:

  • scheduled_job_id (String)

    The ID of the scheduled job.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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



4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
# File 'lib/oci/os_management/os_management_client.rb', line 4675

def run_scheduled_job_now(scheduled_job_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#run_scheduled_job_now.' if logger

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

  path = '/scheduledJobs/{scheduledJobId}/actions/runNow'.sub('{scheduledJobId}', scheduled_job_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 = nil

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

#search_software_packages(opts = {}) ⇒ Response

Note:

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

Searches all of the available Software Sources and returns any/all Software Packages matching the search criteria.

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

  • :software_package_name (String)

    the identifier for the software package (not an OCID)

  • :display_name (String)

    A user-friendly name. Does not have to be unique, and it's changeable.

    Example: My new resource

  • :cve_name (String)

    The name of the CVE as published. Example: CVE-2006-4535

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to DESC) Allowed values are: ASC, DESC

  • :sort_by (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
# File 'lib/oci/os_management/os_management_client.rb', line 4747

def search_software_packages(opts = {})
  logger.debug 'Calling operation OsManagementClient#search_software_packages.' if logger


  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  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/softwarePackages'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:softwarePackageName] = opts[:software_package_name] if opts[:software_package_name]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:cveName] = opts[:cve_name] if opts[:cve_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: 'OsManagementClient#search_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: 'Array<OCI::OsManagement::Models::SoftwarePackageSearchSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#skip_next_scheduled_job_execution(scheduled_job_id, opts = {}) ⇒ Response

Note:

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

This will force an already created Scheduled Job to skip its next regularly scheduled execution

Parameters:

  • scheduled_job_id (String)

    The ID of the scheduled job.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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



4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
# File 'lib/oci/os_management/os_management_client.rb', line 4828

def skip_next_scheduled_job_execution(scheduled_job_id, opts = {})
  logger.debug 'Calling operation OsManagementClient#skip_next_scheduled_job_execution.' if logger

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

  path = '/scheduledJobs/{scheduledJobId}/actions/skipNextExecution'.sub('{scheduledJobId}', scheduled_job_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 = nil

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

#switch_module_stream_on_managed_instance(managed_instance_id, module_name, opts = {}) ⇒ Response

Note:

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

Enables a new stream for a module that already has a stream enabled. If any profiles or packages from the original module are installed, switching to a new stream will remove the existing packages and install their counterparts in the new stream.

Parameters:

  • managed_instance_id (String)

    OCID for the managed instance

  • module_name (String)

    The name of a 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)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

  • :if_match (String)

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

  • :stream_name (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
# File 'lib/oci/os_management/os_management_client.rb', line 4904

def switch_module_stream_on_managed_instance(managed_instance_id, module_name, opts = {})
  logger.debug 'Calling operation OsManagementClient#switch_module_stream_on_managed_instance.' if logger

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

  path = '/managedInstances/{managedInstanceId}/actions/moduleStreams/switch'.sub('{managedInstanceId}', managed_instance_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:moduleName] = module_name
  query_params[:streamName] = opts[:stream_name] if opts[: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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#update_managed_instance(managed_instance_id, update_managed_instance_details, opts = {}) ⇒ Response

Note:

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

Updates a specific Managed Instance.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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



4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
# File 'lib/oci/os_management/os_management_client.rb', line 4971

def update_managed_instance(managed_instance_id, update_managed_instance_details, opts = {})
  logger.debug 'Calling operation OsManagementClient#update_managed_instance.' if logger

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

  path = '/managedInstances/{managedInstanceId}'.sub('{managedInstanceId}', managed_instance_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_managed_instance_details)

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

#update_managed_instance_group(managed_instance_group_id, update_managed_instance_group_details, opts = {}) ⇒ Response

Note:

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

Updates a specific Managed Instance Group.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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



5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
# File 'lib/oci/os_management/os_management_client.rb', line 5035

def update_managed_instance_group(managed_instance_group_id, update_managed_instance_group_details, opts = {})
  logger.debug 'Calling operation OsManagementClient#update_managed_instance_group.' if logger

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

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

  post_body = @api_client.object_to_http_body(update_managed_instance_group_details)

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

#update_scheduled_job(scheduled_job_id, update_scheduled_job_details, opts = {}) ⇒ Response

Note:

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

Updates an existing Scheduled Job on the management system.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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



5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
# File 'lib/oci/os_management/os_management_client.rb', line 5099

def update_scheduled_job(scheduled_job_id, update_scheduled_job_details, opts = {})
  logger.debug 'Calling operation OsManagementClient#update_scheduled_job.' if logger

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

  path = '/scheduledJobs/{scheduledJobId}'.sub('{scheduledJobId}', scheduled_job_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_scheduled_job_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OsManagementClient#update_scheduled_job') 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::OsManagement::Models::ScheduledJob'
    )
  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 an existing custom Software Source on the management system.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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



5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
# File 'lib/oci/os_management/os_management_client.rb', line 5163

def update_software_source(software_source_id, update_software_source_details, opts = {})
  logger.debug 'Calling operation OsManagementClient#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: 'OsManagementClient#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::OsManagement::Models::SoftwareSource'
    )
  end
  # rubocop:enable Metrics/BlockLength
end