lib/oci/management_agent/management_agent_client.rb
def list_management_agent_install_keys(compartment_id, opts = {})
      logger.debug 'Calling operation ManagementAgentClient#list_management_agent_install_keys.' if logger

      raise "Missing the required parameter 'compartment_id' when calling list_management_agent_install_keys." if compartment_id.nil?

      if opts[:lifecycle_state] && !OCI::ManagementAgent::Models::LIFECYCLE_STATES_ENUM.include?(opts[:lifecycle_state])
        raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::ManagementAgent::Models::LIFECYCLE_STATES_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

      path = '/managementAgentInstallKeys'
      operation_signing_strategy = :standard

      # rubocop:disable Style/NegatedIf
      # Query Params
      query_params = {}
      query_params[:compartmentId] = compartment_id
      query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?
      query_params[:accessLevel] = opts[:access_level] if opts[:access_level]
      query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
      query_params[:displayName] = opts[:display_name] if opts[:display_name]
      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: 'ManagementAgentClient#list_management_agent_install_keys') 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::ManagementAgent::Models::ManagementAgentInstallKeySummary>'
        )
      end
      # rubocop:enable Metrics/BlockLength
    end
# Returns a list of Management Agent installed Keys.
#
# @param [String] compartment_id The ID of the compartment from which the Management Agents to be listed.
# @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 [BOOLEAN] :compartment_id_in_subtree if set to true then it fetches install key for all compartments where user has access to else only on the compartment specified. (default to false)
# @option opts [String] :access_level Value of this is always \"ACCESSIBLE\" and any other value is not supported. (default to ACCESSIBLE)
# @option opts [String] :lifecycle_state Filter to return only Management Agents in the particular lifecycle state.
# @option opts [String] :display_name The display name for which the Key needs to be listed.
# @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'.
#   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::ManagementAgent::Models::ManagementAgentInstallKeySummary ManagementAgentInstallKeySummary}>
# @note Click [here](https://docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/managementagent/list_management_agent_install_keys.rb.html) to see an example of how to use list_management_agent_install_keys API.
Returns a list of Management Agent installed Keys.
Returns a list of Management Agent installed Keys .
def list_management_agent_install_keys(compartment_id, opts = {})
      logger.debug 'Calling operation ManagementAgentClient#list_management_agent_install_keys.' if logger
      raise "Missing the required parameter 'compartment_id' when calling list_management_agent_install_keys." if compartment_id.nil?
      if opts[:lifecycle_state] && !OCI::ManagementAgent::Models::LIFECYCLE_STATES_ENUM.include?(opts[:lifecycle_state])
        raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::ManagementAgent::Models::LIFECYCLE_STATES_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
      path = '/managementAgentInstallKeys'
      operation_signing_strategy = :standard
      query_params = {}
      query_params[:compartmentId] = compartment_id
      query_params[:compartmentIdInSubtree] = opts[:compartment_id_in_subtree] if !opts[:compartment_id_in_subtree].nil?
      query_params[:accessLevel] = opts[:access_level] if opts[:access_level]
      query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
      query_params[:displayName] = opts[:display_name] if opts[:display_name]
      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: 'ManagementAgentClient#list_management_agent_install_keys') 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::ManagementAgent::Models::ManagementAgentInstallKeySummary>'
        )
      end
    end
def list_management_agent_install_keys ( compartment_id , opts = { } ) logger . debug 'Calling operation ManagementAgentClient#list_management_agent_install_keys.' if logger raise "Missing the required parameter 'compartment_id' when calling list_management_agent_install_keys." if compartment_id . nil? if opts [ :lifecycle_state ] && ! OCI :: ManagementAgent :: Models :: LIFECYCLE_STATES_ENUM . include? ( opts [ :lifecycle_state ] ) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::ManagementAgent::Models::LIFECYCLE_STATES_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 path = '/managementAgentInstallKeys' operation_signing_strategy = :standard query_params = { } query_params [ :compartmentId ] = compartment_id query_params [ :compartmentIdInSubtree ] = opts [ :compartment_id_in_subtree ] if ! opts [ :compartment_id_in_subtree ] . nil? query_params [ :accessLevel ] = opts [ :access_level ] if opts [ :access_level ] query_params [ :lifecycleState ] = opts [ :lifecycle_state ] if opts [ :lifecycle_state ] query_params [ :displayName ] = opts [ :display_name ] if opts [ :display_name ] 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 : 'ManagementAgentClient#list_management_agent_install_keys' ) 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::ManagementAgent::Models::ManagementAgentInstallKeySummary>' ) end end
Returns a list of Management Agent installed Keys.
Returns a list of Management Agent installed Keys .
# 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::ManagementAgent::Models::ManagementAgentInstallKeySummary ManagementAgentInstallKeySummary}>
A Response object with data of type Array< { OCI :: ManagementAgent :: Models :: ManagementAgentInstallKeySummary ManagementAgentInstallKeySummary } >
Response
compartment_id
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_management_agent_install_keys API.
Click [ here ] to see an example of how to use list_management_agent_install_keys API .