class OCI::OsManagement::OsManagementClient

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

Attributes

api_client[R]

Client used to make HTTP requests. @return [OCI::ApiClient]

endpoint[R]

Fully qualified endpoint URL @return [String]

region[R]

The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}. @return [String]

retry_config[R]

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 @return [OCI::Retry::RetryConfig]

Public Class Methods

new(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) click to toggle source

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.

@param [Config] config A Config object. @param [String] region A region used to determine the service endpoint. This will usually

correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.

@param [String] endpoint The fully qualified endpoint URL @param [OCI::BaseSigner] signer 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

@param [OCI::ApiClientProxySettings] proxy_settings 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

@param [OCI::Retry::RetryConfig] retry_config 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
# File lib/oci/os_management/os_management_client.rb, line 54
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

Public Instance Methods

add_packages_to_software_source(software_source_id, add_packages_to_software_source_details, opts = {}) click to toggle source

Adds a given list of Software Packages to a specific Software Source.

@param [String] software_source_id The OCID of the software source. @param [OCI::OsManagement::Models::AddPackagesToSoftwareSourceDetails] add_packages_to_software_source_details A list of package identifiers @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/add_packages_to_software_source.rb.html) to see an example of how to use add_packages_to_software_source API.

# File lib/oci/os_management/os_management_client.rb, line 112
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 = {}) click to toggle source

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.

@param [String] managed_instance_id OCID for the managed instance @param [OCI::OsManagement::Models::AttachChildSoftwareSourceToManagedInstanceDetails] attach_child_software_source_to_managed_instance_details Details for attaching a Software Source to a Managed Instance @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/attach_child_software_source_to_managed_instance.rb.html) to see an example of how to use attach_child_software_source_to_managed_instance API.

# File lib/oci/os_management/os_management_client.rb, line 176
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 = {}) click to toggle source

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.

@param [String] managed_instance_group_id OCID for the managed instance group @param [String] managed_instance_id OCID for the managed instance @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/attach_managed_instance_to_managed_instance_group.rb.html) to see an example of how to use attach_managed_instance_to_managed_instance_group API.

# File lib/oci/os_management/os_management_client.rb, line 243
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 = {}) click to toggle source

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.

@param [String] managed_instance_id OCID for the managed instance @param [OCI::OsManagement::Models::AttachParentSoftwareSourceToManagedInstanceDetails] attach_parent_software_source_to_managed_instance_details Details for attaching a Software Source to a Managed Instance @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/attach_parent_software_source_to_managed_instance.rb.html) to see an example of how to use attach_parent_software_source_to_managed_instance API.

# File lib/oci/os_management/os_management_client.rb, line 311
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 = {}) click to toggle source

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

@param [String] managed_instance_group_id OCID for the managed instance group @param [OCI::OsManagement::Models::ChangeManagedInstanceGroupCompartmentDetails] change_managed_instance_group_compartment_details OCID for the compartment to which the resource will be moved. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :if_match 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.

@option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/change_managed_instance_group_compartment.rb.html) to see an example of how to use change_managed_instance_group_compartment API.

# File lib/oci/os_management/os_management_client.rb, line 382
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 = {}) click to toggle source

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

@param [String] scheduled_job_id The ID of the scheduled job. @param [OCI::OsManagement::Models::ChangeScheduledJobCompartmentDetails] change_scheduled_job_compartment_details OCID for the compartment to which the resource will be moved. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :if_match 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.

@option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/change_scheduled_job_compartment.rb.html) to see an example of how to use change_scheduled_job_compartment API.

# File lib/oci/os_management/os_management_client.rb, line 454
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 = {}) click to toggle source

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

@param [String] software_source_id The OCID of the software source. @param [OCI::OsManagement::Models::ChangeSoftwareSourceCompartmentDetails] change_software_source_compartment_details OCID for the compartment to which the resource will be moved. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :if_match 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.

@option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/change_software_source_compartment.rb.html) to see an example of how to use change_software_source_compartment API.

# File lib/oci/os_management/os_management_client.rb, line 526
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 = {}) click to toggle source

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.

@param [OCI::OsManagement::Models::CreateManagedInstanceGroupDetails] create_managed_instance_group_details Details about a Managed Instance Group to create @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type {OCI::OsManagement::Models::ManagedInstanceGroup ManagedInstanceGroup} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/create_managed_instance_group.rb.html) to see an example of how to use create_managed_instance_group API.

# File lib/oci/os_management/os_management_client.rb, line 592
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 = {}) click to toggle source

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.

@param [OCI::OsManagement::Models::CreateScheduledJobDetails] create_scheduled_job_details Details about a Scheduled Job to create @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type {OCI::OsManagement::Models::ScheduledJob ScheduledJob} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/create_scheduled_job.rb.html) to see an example of how to use create_scheduled_job API.

# File lib/oci/os_management/os_management_client.rb, line 657
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 = {}) click to toggle source

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.

@param [OCI::OsManagement::Models::CreateSoftwareSourceDetails] create_software_source_details Details about a Sofware Source to create @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type {OCI::OsManagement::Models::SoftwareSource SoftwareSource} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/create_software_source.rb.html) to see an example of how to use create_software_source API.

# File lib/oci/os_management/os_management_client.rb, line 721
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 = {}) click to toggle source

Deletes a Managed Instance Group from the management system

@param [String] managed_instance_group_id OCID for the managed instance group @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :if_match 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/delete_managed_instance_group.rb.html) to see an example of how to use delete_managed_instance_group API.

# File lib/oci/os_management/os_management_client.rb, line 783
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 = {}) click to toggle source

Cancels an existing Scheduled Job on the management system

@param [String] scheduled_job_id The ID of the scheduled job. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :if_match 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/delete_scheduled_job.rb.html) to see an example of how to use delete_scheduled_job API.

# File lib/oci/os_management/os_management_client.rb, line 844
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 = {}) click to toggle source

Deletes a custom Software Source on the management system

@param [String] software_source_id The OCID of the software source. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :if_match 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/delete_software_source.rb.html) to see an example of how to use delete_software_source API.

# File lib/oci/os_management/os_management_client.rb, line 905
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 = {}) click to toggle source

Removes a child software source from a managed instance. Packages will no longer be able to be installed from these software sources.

@param [String] managed_instance_id OCID for the managed instance @param [OCI::OsManagement::Models::DetachChildSoftwareSourceFromManagedInstanceDetails] detach_child_software_source_from_managed_instance_details Details for detaching a Software Source from a Managed Instance @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/detach_child_software_source_from_managed_instance.rb.html) to see an example of how to use detach_child_software_source_from_managed_instance API.

# File lib/oci/os_management/os_management_client.rb, line 968
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 = {}) click to toggle source

Removes a Managed Instance from a Managed Instance Group.

@param [String] managed_instance_group_id OCID for the managed instance group @param [String] managed_instance_id OCID for the managed instance @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/detach_managed_instance_from_managed_instance_group.rb.html) to see an example of how to use detach_managed_instance_from_managed_instance_group API.

# File lib/oci/os_management/os_management_client.rb, line 1032
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 = {}) click to toggle source

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.

@param [String] managed_instance_id OCID for the managed instance @param [OCI::OsManagement::Models::DetachParentSoftwareSourceFromManagedInstanceDetails] detach_parent_software_source_from_managed_instance_details Details for detaching a Software Source from a Managed Instance @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/detach_parent_software_source_from_managed_instance.rb.html) to see an example of how to use detach_parent_software_source_from_managed_instance API.

# File lib/oci/os_management/os_management_client.rb, line 1098
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
get_erratum(erratum_id, opts = {}) click to toggle source

Returns a specific erratum.

@param [String] erratum_id The OCID of the erratum. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::OsManagement::Models::Erratum Erratum} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/get_erratum.rb.html) to see an example of how to use get_erratum API.

# File lib/oci/os_management/os_management_client.rb, line 1155
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 = {}) click to toggle source

Returns a specific Managed Instance.

@param [String] managed_instance_id OCID for the managed instance @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::OsManagement::Models::ManagedInstance ManagedInstance} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/get_managed_instance.rb.html) to see an example of how to use get_managed_instance API.

# File lib/oci/os_management/os_management_client.rb, line 1210
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 = {}) click to toggle source

Returns a specific Managed Instance Group.

@param [String] managed_instance_group_id OCID for the managed instance group @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::OsManagement::Models::ManagedInstanceGroup ManagedInstanceGroup} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/get_managed_instance_group.rb.html) to see an example of how to use get_managed_instance_group API.

# File lib/oci/os_management/os_management_client.rb, line 1265
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_scheduled_job(scheduled_job_id, opts = {}) click to toggle source

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

@param [String] scheduled_job_id The ID of the scheduled job. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::OsManagement::Models::ScheduledJob ScheduledJob} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/get_scheduled_job.rb.html) to see an example of how to use get_scheduled_job API.

# File lib/oci/os_management/os_management_client.rb, line 1320
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 = {}) click to toggle source

Returns a specific Software Package.

@param [String] software_source_id The OCID of the software source. @param [String] software_package_name The id of the software package. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::OsManagement::Models::SoftwarePackage SoftwarePackage} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/get_software_package.rb.html) to see an example of how to use get_software_package API.

# File lib/oci/os_management/os_management_client.rb, line 1376
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 = {}) click to toggle source

Returns a specific Software Source.

@param [String] software_source_id The OCID of the software source. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::OsManagement::Models::SoftwareSource SoftwareSource} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/get_software_source.rb.html) to see an example of how to use get_software_source API.

# File lib/oci/os_management/os_management_client.rb, line 1433
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 = {}) click to toggle source

Returns a Windows Update object.

@param [String] windows_update The Windows Update @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::OsManagement::Models::WindowsUpdate WindowsUpdate} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/get_windows_update.rb.html) to see an example of how to use get_windows_update API.

# File lib/oci/os_management/os_management_client.rb, line 1488
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 = {}) click to toggle source

Gets the detailed information for the work request with the given ID. @param [String] work_request_id The ID of the asynchronous request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::OsManagement::Models::WorkRequest WorkRequest} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/get_work_request.rb.html) to see an example of how to use get_work_request API.

# File lib/oci/os_management/os_management_client.rb, line 1542
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 = {}) click to toggle source

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

@param [String] managed_instance_id OCID for the managed instance @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/install_all_package_updates_on_managed_instance.rb.html) to see an example of how to use install_all_package_updates_on_managed_instance API.

# File lib/oci/os_management/os_management_client.rb, line 1603
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?
  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 = {}

  # 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_windows_updates_on_managed_instance(managed_instance_id, opts = {}) click to toggle source

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

@param [String] managed_instance_id OCID for the managed instance @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/install_all_windows_updates_on_managed_instance.rb.html) to see an example of how to use install_all_windows_updates_on_managed_instance API.

# File lib/oci/os_management/os_management_client.rb, line 1665
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?
  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 = {}

  # 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_package_on_managed_instance(managed_instance_id, software_package_name, opts = {}) click to toggle source

Installs a package on a managed instance.

@param [String] managed_instance_id OCID for the managed instance @param [String] software_package_name Package name @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/install_package_on_managed_instance.rb.html) to see an example of how to use install_package_on_managed_instance API.

# File lib/oci/os_management/os_management_client.rb, line 1728
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 = {}) click to toggle source

Updates a package on a managed instance.

@param [String] managed_instance_id OCID for the managed instance @param [String] software_package_name Package name @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/install_package_update_on_managed_instance.rb.html) to see an example of how to use install_package_update_on_managed_instance API.

# File lib/oci/os_management/os_management_client.rb, line 1793
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 = {}) click to toggle source

Installs a Windows update on a managed instance.

@param [String] managed_instance_id OCID for the managed instance @param [String] windows_update_name 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`

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/install_windows_update_on_managed_instance.rb.html) to see an example of how to use install_windows_update_on_managed_instance API.

# File lib/oci/os_management/os_management_client.rb, line 1861
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 = {}) click to toggle source

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

@param [String] managed_instance_id OCID for the managed instance @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [String] :compartment_id The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::InstallablePackageSummary InstallablePackageSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_available_packages_for_managed_instance.rb.html) to see an example of how to use list_available_packages_for_managed_instance API.

# File lib/oci/os_management/os_management_client.rb, line 1931
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 = {}) click to toggle source

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

@param [String] managed_instance_id OCID for the managed instance @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [String] :compartment_id The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::AvailableSoftwareSourceSummary AvailableSoftwareSourceSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_available_software_sources_for_managed_instance.rb.html) to see an example of how to use list_available_software_sources_for_managed_instance API.

# File lib/oci/os_management/os_management_client.rb, line 2012
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 = {}) click to toggle source

Returns a list of available updates for a Managed Instance.

@param [String] managed_instance_id OCID for the managed instance @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [String] :compartment_id The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::AvailableUpdateSummary AvailableUpdateSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_available_updates_for_managed_instance.rb.html) to see an example of how to use list_available_updates_for_managed_instance API.

# File lib/oci/os_management/os_management_client.rb, line 2093
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 = {}) click to toggle source

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

@param [String] managed_instance_id OCID for the managed instance @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [String] :compartment_id The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :is_eligible_for_installation Indicator of whether the update can be installed using OSMS. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::AvailableWindowsUpdateSummary AvailableWindowsUpdateSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_available_windows_updates_for_managed_instance.rb.html) to see an example of how to use list_available_windows_updates_for_managed_instance API.

# File lib/oci/os_management/os_management_client.rb, line 2175
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 = {}) click to toggle source

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

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :compartment_id The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect. @option opts [String] :erratum_id The OCID of the erratum. @option opts [String] :advisory_name The assigned erratum name. It's unique and not changeable.

Example: `ELSA-2020-5804`

@option opts [DateTime] :time_issue_date_start The issue date after which to list all errata, in ISO 8601 format

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

@option opts [DateTime] :time_issue_date_end The issue date before which to list all errata, in ISO 8601 format

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

@option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: ISSUEDATE, ADVISORYNAME

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::ErratumSummary ErratumSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_errata.rb.html) to see an example of how to use list_errata API.

# File lib/oci/os_management/os_management_client.rb, line 2269
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 = {}) click to toggle source

Returns a list of errata relevant to the Managed Instance.

@param [String] managed_instance_id OCID for the managed instance @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [String] :compartment_id The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::ErratumSummary ErratumSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_managed_instance_errata.rb.html) to see an example of how to use list_managed_instance_errata API.

# File lib/oci/os_management/os_management_client.rb, line 2351
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 = {}) click to toggle source

Returns a list of all Managed Instance Groups.

@param [String] compartment_id The ID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :lifecycle_state The current lifecycle state for the object. @option opts [String] :os_family The OS family for which to list resources. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::ManagedInstanceGroupSummary ManagedInstanceGroupSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_managed_instance_groups.rb.html) to see an example of how to use list_managed_instance_groups API.

# File lib/oci/os_management/os_management_client.rb, line 2433
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 = {}) click to toggle source

Returns a list of all Managed Instances.

@param [String] compartment_id The ID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :os_family The OS family for which to list resources. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::ManagedInstanceSummary ManagedInstanceSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_managed_instances.rb.html) to see an example of how to use list_managed_instances API.

# File lib/oci/os_management/os_management_client.rb, line 2523
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_packages_installed_on_managed_instance(managed_instance_id, opts = {}) click to toggle source

Returns a list of installed packages on the Managed Instance.

@param [String] managed_instance_id OCID for the managed instance @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [String] :compartment_id The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::InstalledPackageSummary InstalledPackageSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_packages_installed_on_managed_instance.rb.html) to see an example of how to use list_packages_installed_on_managed_instance API.

# File lib/oci/os_management/os_management_client.rb, line 2608
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 = {}) click to toggle source

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

@param [String] compartment_id The ID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [String] :managed_instance_id The ID of the managed instance for which to list resources. @option opts [String] :managed_instance_group_id The ID of the managed instace group for which to list resources. @option opts [String] :operation_type The operation type for which to list resources @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :lifecycle_state The current lifecycle state for the object. @option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :os_family The OS family for which to list resources. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::ScheduledJobSummary ScheduledJobSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_scheduled_jobs.rb.html) to see an example of how to use list_scheduled_jobs API.

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

  # 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 = {}) click to toggle source

Lists Software Packages in a Software Source

@param [String] software_source_id The OCID of the software source. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :compartment_id The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect. @option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::SoftwarePackageSummary SoftwarePackageSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_software_source_packages.rb.html) to see an example of how to use list_software_source_packages API.

# File lib/oci/os_management/os_management_client.rb, line 2790
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 = {}) click to toggle source

Returns a list of all Software Sources.

@param [String] compartment_id The ID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :lifecycle_state The current lifecycle state for the object. @option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::SoftwareSourceSummary SoftwareSourceSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_software_sources.rb.html) to see an example of how to use list_software_sources API.

# File lib/oci/os_management/os_management_client.rb, line 2871
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 = {}) click to toggle source

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

@param [String] compartment_id The ID of the compartment in which to list resources. @param [DateTime] time_end The cut-off time before which to list all upcoming schedules, in ISO 8601 format

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

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :tag_name The name of the tag. @option opts [String] :tag_value The value for the tag. @option opts [String] :lifecycle_state The current lifecycle state for the object. @option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :os_family The OS family for which to list resources. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::ScheduledJobSummary ScheduledJobSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_upcoming_scheduled_jobs.rb.html) to see an example of how to use list_upcoming_scheduled_jobs API.

# File lib/oci/os_management/os_management_client.rb, line 2963
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 = {}) click to toggle source

Returns a list of Windows Updates.

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :compartment_id The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect. @option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::WindowsUpdateSummary WindowsUpdateSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_windows_updates.rb.html) to see an example of how to use list_windows_updates API.

# File lib/oci/os_management/os_management_client.rb, line 3056
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 = {}) click to toggle source

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

@param [String] managed_instance_id OCID for the managed instance @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [String] :compartment_id The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::InstalledWindowsUpdateSummary InstalledWindowsUpdateSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_windows_updates_installed_on_managed_instance.rb.html) to see an example of how to use list_windows_updates_installed_on_managed_instance API.

# File lib/oci/os_management/os_management_client.rb, line 3135
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 = {}) click to toggle source

Gets the errors for the work request with the given ID. @param [String] work_request_id The ID of the asynchronous request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::WorkRequestError WorkRequestError}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_work_request_errors.rb.html) to see an example of how to use list_work_request_errors API.

# File lib/oci/os_management/os_management_client.rb, line 3210
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 = {}) click to toggle source

Lists the log entries for the work request with the given ID. @param [String] work_request_id The ID of the asynchronous request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::WorkRequestLogEntry WorkRequestLogEntry}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_work_request_logs.rb.html) to see an example of how to use list_work_request_logs API.

# File lib/oci/os_management/os_management_client.rb, line 3283
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 = {}) click to toggle source

Lists the work requests in a compartment.

@param [String] compartment_id The ID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [String] :managed_instance_id The ID of the managed instance for which to list resources. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :os_family The OS family for which to list resources. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::WorkRequestSummary WorkRequestSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/list_work_requests.rb.html) to see an example of how to use list_work_requests API.

# File lib/oci/os_management/os_management_client.rb, line 3363
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
logger() click to toggle source

@return [Logger] The logger for this client. May be nil.

# File lib/oci/os_management/os_management_client.rb, line 93
def logger
  @api_client.config.logger
end
region=(new_region) click to toggle source

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

# File lib/oci/os_management/os_management_client.rb, line 83
def region=(new_region)
  @region = new_region

  raise 'A region must be specified.' unless @region

  @endpoint = OCI::Regions.get_service_endpoint_for_template(@region, 'https://osms.{region}.oci.{secondLevelDomain}') + '/20190801'
  logger.info "OsManagementClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
end
remove_package_from_managed_instance(managed_instance_id, software_package_name, opts = {}) click to toggle source

Removes an installed package from a managed instance.

@param [String] managed_instance_id OCID for the managed instance @param [String] software_package_name Package name @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/remove_package_from_managed_instance.rb.html) to see an example of how to use remove_package_from_managed_instance API.

# File lib/oci/os_management/os_management_client.rb, line 3444
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 = {}) click to toggle source

Removes a given list of Software Packages from a specific Software Source.

@param [String] software_source_id The OCID of the software source. @param [OCI::OsManagement::Models::RemovePackagesFromSoftwareSourceDetails] remove_packages_from_software_source_details A list of package identifiers @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/remove_packages_from_software_source.rb.html) to see an example of how to use remove_packages_from_software_source API.

# File lib/oci/os_management/os_management_client.rb, line 3503
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 = {}) click to toggle source

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

@param [String] scheduled_job_id The ID of the scheduled job. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :if_match 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.

@option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/run_scheduled_job_now.rb.html) to see an example of how to use run_scheduled_job_now API.

# File lib/oci/os_management/os_management_client.rb, line 3571
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 = {}) click to toggle source

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

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :software_package_name the identifier for the software package (not an OCID) @option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [String] :cve_name The name of the CVE as published.

Example: `CVE-2006-4535`

@option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to DESC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: TIMECREATED, DISPLAYNAME

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type Array<{OCI::OsManagement::Models::SoftwarePackageSearchSummary SoftwarePackageSearchSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/search_software_packages.rb.html) to see an example of how to use search_software_packages API.

# File lib/oci/os_management/os_management_client.rb, line 3643
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 = {}) click to toggle source

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

@param [String] scheduled_job_id The ID of the scheduled job. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :if_match 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.

@option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/skip_next_scheduled_job_execution.rb.html) to see an example of how to use skip_next_scheduled_job_execution API.

# File lib/oci/os_management/os_management_client.rb, line 3724
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
update_managed_instance_group(managed_instance_group_id, update_managed_instance_group_details, opts = {}) click to toggle source

Updates a specific Managed Instance Group.

@param [String] managed_instance_group_id OCID for the managed instance group @param [OCI::OsManagement::Models::UpdateManagedInstanceGroupDetails] update_managed_instance_group_details Details about a Managed Instance Group to update @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :if_match 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.

@return [Response] A Response object with data of type {OCI::OsManagement::Models::ManagedInstanceGroup ManagedInstanceGroup} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/update_managed_instance_group.rb.html) to see an example of how to use update_managed_instance_group API.

# File lib/oci/os_management/os_management_client.rb, line 3788
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 = {}) click to toggle source

Updates an existing Scheduled Job on the management system.

@param [String] scheduled_job_id The ID of the scheduled job. @param [OCI::OsManagement::Models::UpdateScheduledJobDetails] update_scheduled_job_details Details about a Scheduled Job to update @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :if_match 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.

@return [Response] A Response object with data of type {OCI::OsManagement::Models::ScheduledJob ScheduledJob} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/update_scheduled_job.rb.html) to see an example of how to use update_scheduled_job API.

# File lib/oci/os_management/os_management_client.rb, line 3852
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 = {}) click to toggle source

Updates an existing custom Software Source on the management system.

@param [String] software_source_id The OCID of the software source. @param [OCI::OsManagement::Models::UpdateSoftwareSourceDetails] update_software_source_details Details about a Sofware Source to update @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :if_match 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.

@return [Response] A Response object with data of type {OCI::OsManagement::Models::SoftwareSource SoftwareSource} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/osmanagement/update_software_source.rb.html) to see an example of how to use update_software_source API.

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

Private Instance Methods

applicable_retry_config(opts = {}) click to toggle source

rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists rubocop:enable Metrics/MethodLength, Layout/EmptyLines

# File lib/oci/os_management/os_management_client.rb, line 3961
def applicable_retry_config(opts = {})
  return @retry_config unless opts.key?(:retry_config)

  opts[:retry_config]
end