lib/oci/os_management/os_management_client.rb
# 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](https://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.
Removes a given list of Software Packages from a specific Software Source.
Removes a given list of Software Packages from a specific Software Source .
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
      query_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]
      post_body = @api_client.object_to_http_body(remove_packages_from_software_source_details)
      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
    end
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 query_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 ] post_body = @api_client . object_to_http_body ( remove_packages_from_software_source_details ) 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 end
Removes a given list of Software Packages from a specific Software Source.
Removes a given list of Software Packages from a specific Software Source .
# 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 nil
A Response object with data of type nil
Response
software_source_id
remove_packages_from_software_source_details
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 remove_packages_from_software_source API.
Click [ here ] to see an example of how to use remove_packages_from_software_source API .