lib/oci/os_management/os_management_client.rb
# 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](https://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.
Returns a list of all of the currently available Errata in the system
Returns a list of all of the currently available Errata in the system
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
      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[:accept] = 'application/json'
      header_params[:'content-type'] = 'application/json'
      header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
      post_body = nil
      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
    end
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 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 [ :accept ] = 'application/json' header_params [ :' content-type ' ] = 'application/json' header_params [ :' opc-request-id ' ] = opts [ :opc_request_id ] if opts [ :opc_request_id ] post_body = nil 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 end
Returns a list of all of the currently available Errata in the system
Returns a list of all of the currently available Errata in the system
# rubocop:disable Style/NegatedIf # Query Params # Header Params # rubocop:enable Style/NegatedIf # rubocop:disable Metrics/BlockLength # rubocop:enable Metrics/BlockLength
A Response object with data of type Array<{OCI::OsManagement::Models::ErratumSummary ErratumSummary}>
A Response object with data of type Array< { OCI :: OsManagement :: Models :: ErratumSummary ErratumSummary } >
Response
opts
:opc_request_id The client request ID for tracing.
: opc_request_id The client request ID for tracing .
opts the optional parameters
opts the optional parameters
note
Click [here] to see an example of how to use list_errata API.
Click [ here ] to see an example of how to use list_errata API .