lib/oci/apm_synthetics/apm_synthetic_client.rb
# Returns a list of scripts.
#
# @param [String] apm_domain_id The APM domain ID the request is intended for.
#
# @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 Unique identifier for the request.
#   If you need to contact Oracle about a particular request, please provide the request ID.
#
# @option opts [String] :display_name A filter to return only resources that match the entire display name given.
# @option opts [String] :content_type A filter to return only resources that match the content type given.
# @option opts [Integer] :limit The maximum number of items to return. (default to 100)
# @option opts [String] :page For list pagination. The maximum number of results per page, or items to return in a paginated
#   \"List\" call. For important details about how pagination works, see
#   [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
#
#   Example: `50`
#
# @option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). Default sort order is ascending.
#    (default to ASC)
# @option opts [String] :sort_by The field to sort by. Only one sort order may be provided.
#   Default order of displayName and contentType is ascending.
#   Default order of timeCreated and timeUpdated is descending.
#   The displayName sort by is case insensitive.
#    (default to displayName)
#   Allowed values are: displayName, timeCreated, timeUpdated, contentType
# @return [Response] A Response object with data of type {OCI::ApmSynthetics::Models::ScriptCollection ScriptCollection}
# @note Click [here](https://docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/apmsynthetics/list_scripts.rb.html) to see an example of how to use list_scripts API.
Returns a list of scripts.
Returns a list of scripts .
def list_scripts(apm_domain_id, opts = {})
      logger.debug 'Calling operation ApmSyntheticClient#list_scripts.' if logger
      raise "Missing the required parameter 'apm_domain_id' when calling list_scripts." if apm_domain_id.nil?
      if opts[:sort_order] && !OCI::ApmSynthetics::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
        raise 'Invalid value for "sort_order", must be one of the values in OCI::ApmSynthetics::Models::SORT_ORDERS_ENUM.'
      end
      if opts[:sort_by] && !%w[displayName timeCreated timeUpdated contentType].include?(opts[:sort_by])
        raise 'Invalid value for "sort_by", must be one of displayName, timeCreated, timeUpdated, contentType.'
      end
      path = '/scripts'
      operation_signing_strategy = :standard
      query_params = {}
      query_params[:apmDomainId] = apm_domain_id
      query_params[:displayName] = opts[:display_name] if opts[:display_name]
      query_params[:contentType] = opts[:content_type] if opts[:content_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]
      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: 'ApmSyntheticClient#list_scripts') 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::ApmSynthetics::Models::ScriptCollection'
        )
      end
    end
def list_scripts ( apm_domain_id , opts = { } ) logger . debug 'Calling operation ApmSyntheticClient#list_scripts.' if logger raise "Missing the required parameter 'apm_domain_id' when calling list_scripts." if apm_domain_id . nil? if opts [ :sort_order ] && ! OCI :: ApmSynthetics :: Models :: SORT_ORDERS_ENUM . include? ( opts [ :sort_order ] ) raise 'Invalid value for "sort_order", must be one of the values in OCI::ApmSynthetics::Models::SORT_ORDERS_ENUM.' end if opts [ :sort_by ] && ! %w[ displayName timeCreated timeUpdated contentType ] . include? ( opts [ :sort_by ] ) raise 'Invalid value for "sort_by", must be one of displayName, timeCreated, timeUpdated, contentType.' end path = '/scripts' operation_signing_strategy = :standard query_params = { } query_params [ :apmDomainId ] = apm_domain_id query_params [ :displayName ] = opts [ :display_name ] if opts [ :display_name ] query_params [ :contentType ] = opts [ :content_type ] if opts [ :content_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 ] 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 : 'ApmSyntheticClient#list_scripts' ) 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::ApmSynthetics::Models::ScriptCollection' ) end end
Returns a list of scripts.
Returns a list of scripts .
# 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::ApmSynthetics::Models::ScriptCollection ScriptCollection}
A Response object with data of type { OCI :: ApmSynthetics :: Models :: ScriptCollection ScriptCollection }
Response
apm_domain_id
opts
:sort_by The field to sort by. Only one sort order may be provided. Default order of displayName and contentType is ascending. Default order of timeCreated and timeUpdated is descending. The displayName sort by is case insensitive. (default to displayName) Allowed values are: displayName, timeCreated, timeUpdated, contentType
: sort_by The field to sort by . Only one sort order may be provided . Default order of displayName and contentType is ascending . Default order of timeCreated and timeUpdated is descending . The displayName sort by is case insensitive . ( default to displayName ) Allowed values are : displayName timeCreated timeUpdated contentType
opts the optional parameters
opts the optional parameters
note
Click [here] to see an example of how to use list_scripts API.
Click [ here ] to see an example of how to use list_scripts API .