lib/oci/database_management/db_management_client.rb
# Gets the job execution for a specific ID or the list of job executions for a job, Managed Database or Managed Database Group
# in a specific compartment. Only one of the parameters, ID, jobId, managedDatabaseId or managedDatabaseGroupId should be provided.
# If none of these parameters is provided, all the job executions in the compartment are listed. Job executions can also be filtered
# based on the name and status parameters.
#
# @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment.
# @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] :id The identifier of the resource.
# @option opts [String] :job_id The identifier of the job.
# @option opts [String] :managed_database_id The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Managed Database.
# @option opts [String] :managed_database_group_id The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Managed Database Group.
# @option opts [String] :status The status of the job execution.
# @option opts [String] :name A filter to return only resources that match the entire name.
# @option opts [Integer] :limit The maximum number of records returned in paginated response. (default to 10)
# @option opts [String] :page The page token representing the page, from where the next set of paginated results
#   are retrieved. This is usually retrieved from a previous list call.
#
# @option opts [String] :sort_by The field to sort information by. Only one sortOrder can be used. The default sort order
#   for \u2018TIMECREATED\u2019 is descending and the default sort order for \u2018NAME\u2019 is ascending.
#   The \u2018NAME\u2019 sort order is case-sensitive.
#    (default to TIMECREATED)
#   Allowed values are: TIMECREATED, NAME
# @option opts [String] :sort_order The option to sort information in ascending (\u2018ASC\u2019) or descending (\u2018DESC\u2019) order. Ascending order is the the default order. (default to ASC)
# @return [Response] A Response object with data of type {OCI::DatabaseManagement::Models::JobExecutionCollection JobExecutionCollection}
# @note Click [here](https://docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/list_job_executions.rb.html) to see an example of how to use list_job_executions API.
Gets the job execution for a specific ID or the list of job executions for a job, Managed Database or Managed Database Group
in a specific compartment. Only one of the parameters, ID, jobId, managedDatabaseId or managedDatabaseGroupId should be provided.
If none of these parameters is provided, all the job executions in the compartment are listed. Job executions can also be filtered
based on the name and status parameters.
Gets the job execution for a specific ID or the list of job executions for a job Managed Database or Managed Database Group in a specific compartment . Only one of the parameters ID jobId managedDatabaseId or managedDatabaseGroupId should be provided . If none of these parameters is provided all the job executions in the compartment are listed . Job executions can also be filtered based on the name and status parameters .
def list_job_executions(compartment_id, opts = {})
      logger.debug 'Calling operation DbManagementClient#list_job_executions.' if logger
      raise "Missing the required parameter 'compartment_id' when calling list_job_executions." if compartment_id.nil?
      if opts[:sort_by] && !%w[TIMECREATED NAME].include?(opts[:sort_by])
        raise 'Invalid value for "sort_by", must be one of TIMECREATED, NAME.'
      end
      if opts[:sort_order] && !OCI::DatabaseManagement::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
        raise 'Invalid value for "sort_order", must be one of the values in OCI::DatabaseManagement::Models::SORT_ORDERS_ENUM.'
      end
      path = '/jobExecutions'
      operation_signing_strategy = :standard
      query_params = {}
      query_params[:compartmentId] = compartment_id
      query_params[:id] = opts[:id] if opts[:id]
      query_params[:jobId] = opts[:job_id] if opts[:job_id]
      query_params[:managedDatabaseId] = opts[:managed_database_id] if opts[:managed_database_id]
      query_params[:managedDatabaseGroupId] = opts[:managed_database_group_id] if opts[:managed_database_group_id]
      query_params[:status] = opts[:status] if opts[:status]
      query_params[:name] = opts[:name] if opts[:name]
      query_params[:limit] = opts[:limit] if opts[:limit]
      query_params[:page] = opts[:page] if opts[:page]
      query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
      query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
      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: 'DbManagementClient#list_job_executions') 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::DatabaseManagement::Models::JobExecutionCollection'
        )
      end
    end
def list_job_executions ( compartment_id , opts = { } ) logger . debug 'Calling operation DbManagementClient#list_job_executions.' if logger raise "Missing the required parameter 'compartment_id' when calling list_job_executions." if compartment_id . nil? if opts [ :sort_by ] && ! %w[ TIMECREATED NAME ] . include? ( opts [ :sort_by ] ) raise 'Invalid value for "sort_by", must be one of TIMECREATED, NAME.' end if opts [ :sort_order ] && ! OCI :: DatabaseManagement :: Models :: SORT_ORDERS_ENUM . include? ( opts [ :sort_order ] ) raise 'Invalid value for "sort_order", must be one of the values in OCI::DatabaseManagement::Models::SORT_ORDERS_ENUM.' end path = '/jobExecutions' operation_signing_strategy = :standard query_params = { } query_params [ :compartmentId ] = compartment_id query_params [ :id ] = opts [ :id ] if opts [ :id ] query_params [ :jobId ] = opts [ :job_id ] if opts [ :job_id ] query_params [ :managedDatabaseId ] = opts [ :managed_database_id ] if opts [ :managed_database_id ] query_params [ :managedDatabaseGroupId ] = opts [ :managed_database_group_id ] if opts [ :managed_database_group_id ] query_params [ :status ] = opts [ :status ] if opts [ :status ] query_params [ :name ] = opts [ :name ] if opts [ :name ] query_params [ :limit ] = opts [ :limit ] if opts [ :limit ] query_params [ :page ] = opts [ :page ] if opts [ :page ] query_params [ :sortBy ] = opts [ :sort_by ] if opts [ :sort_by ] query_params [ :sortOrder ] = opts [ :sort_order ] if opts [ :sort_order ] 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 : 'DbManagementClient#list_job_executions' ) 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::DatabaseManagement::Models::JobExecutionCollection' ) end end
Gets the job execution for a specific ID or the list of job executions for a job, Managed Database or Managed Database Group
in a specific compartment.
Gets the job execution for a specific ID or the list of job executions for a job Managed Database or Managed Database Group in a specific compartment .
# 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 {OCI::DatabaseManagement::Models::JobExecutionCollection JobExecutionCollection}
A Response object with data of type { OCI :: DatabaseManagement :: Models :: JobExecutionCollection JobExecutionCollection }
Response
compartment_id
opts
:sort_order The option to sort information in ascending (\u2018ASC\u2019) or descending (\u2018DESC\u2019) order. Ascending order is the the default order. (default to ASC)
: sort_order The option to sort information in ascending ( \ u2018ASC \ u2019 ) or descending ( \ u2018DESC \ u2019 ) order . Ascending order is the the default order . ( default to ASC )
opts the optional parameters
opts the optional parameters
note
Click [here] to see an example of how to use list_job_executions API.
Click [ here ] to see an example of how to use list_job_executions API .