lib/datadog_api_client/v2/api/auth_n_mappings_api.rb
# List all AuthN Mappings
# List all AuthN Mappings in the org.
# @param opts [Hash] the optional parameters
# @option opts [Integer] :page_size Size for a given page.
# @option opts [Integer] :page_number Specific page number to return.
# @option opts [AuthNMappingsSort] :sort Sort AuthN Mappings depending on the given field.
# @option opts [Array<String>] :include Include additional information in the response.
# @option opts [String] :filter Filter all mappings by the given string.
# @return [Array<(AuthNMappingsResponse, Integer, Hash)>] AuthNMappingsResponse data, response status code and response headers
List all AuthN Mappings
List all AuthN Mappings in the org.
List all AuthN Mappings List all AuthN Mappings in the org .
def list_auth_n_mappings_with_http_info(opts = {})
      if @api_client.config.unstable_operations.has_key?(:list_auth_n_mappings)
        unstable_enabled = @api_client.config.unstable_operations[:list_auth_n_mappings]
        if unstable_enabled
          @api_client.config.logger.warn format("Using unstable operation '%s'", "list_auth_n_mappings")
        else
          raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_auth_n_mappings"))
        end
      end
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: AuthNMappingsAPI.list_auth_n_mappings ...'
      end
      allowable_values = ['created_at', '-created_at', 'role_id', '-role_id', 'saml_assertion_attribute_id', '-saml_assertion_attribute_id', 'role.name', '-role.name', 'saml_assertion_attribute.attribute_key', '-saml_assertion_attribute.attribute_key', 'saml_assertion_attribute.attribute_value', '-saml_assertion_attribute.attribute_value']
      if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
        fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
      end
      local_var_path = '/api/v2/authn_mappings'
      query_params = opts[:query_params] || {}
      query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
      query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
      query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
      query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if !opts[:'include'].nil?
      query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body]
      return_type = opts[:debug_return_type] || 'AuthNMappingsResponse'
      auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
      new_options = opts.merge(
        :operation => :list_auth_n_mappings,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )
      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: AuthNMappingsAPI#list_auth_n_mappings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def list_auth_n_mappings_with_http_info ( opts = { } ) if @api_client . config . unstable_operations . has_key? ( :list_auth_n_mappings ) unstable_enabled = @api_client . config . unstable_operations [ :list_auth_n_mappings ] if unstable_enabled @api_client . config . logger . warn format ( "Using unstable operation '%s'" , "list_auth_n_mappings" ) else raise APIError . new ( message : format ( "Unstable operation '%s' is disabled" , "list_auth_n_mappings" ) ) end end if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: AuthNMappingsAPI.list_auth_n_mappings ...' end allowable_values = [ 'created_at' , '-created_at' , 'role_id' , '-role_id' , 'saml_assertion_attribute_id' , '-saml_assertion_attribute_id' , 'role.name' , '-role.name' , 'saml_assertion_attribute.attribute_key' , '-saml_assertion_attribute.attribute_key' , 'saml_assertion_attribute.attribute_value' , '-saml_assertion_attribute.attribute_value' ] if @api_client . config . client_side_validation && opts [ :' sort ' ] && ! allowable_values . include? ( opts [ :' sort ' ] ) fail ArgumentError , "invalid value for \"sort\", must be one of #{allowable_values}" end local_var_path = '/api/v2/authn_mappings' query_params = opts [ :query_params ] || { } query_params [ :' page[size] ' ] = opts [ :' page_size ' ] if ! opts [ :' page_size ' ] . nil? query_params [ :' page[number] ' ] = opts [ :' page_number ' ] if ! opts [ :' page_number ' ] . nil? query_params [ :' sort ' ] = opts [ :' sort ' ] if ! opts [ :' sort ' ] . nil? query_params [ :' include ' ] = @api_client . build_collection_param ( opts [ :' include ' ] , :multi ) if ! opts [ :' include ' ] . nil? query_params [ :' filter ' ] = opts [ :' filter ' ] if ! opts [ :' filter ' ] . nil? header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] return_type = opts [ :debug_return_type ] || 'AuthNMappingsResponse' auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth , :AuthZ ] new_options = opts . merge ( :operation => :list_auth_n_mappings , :header_params => header_params , :query_params => query_params , :form_params => form_params , :body => post_body , :auth_names => auth_names , :return_type => return_type ) data , status_code , headers = @api_client . call_api ( :GET , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: AuthNMappingsAPI#list_auth_n_mappings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
List all AuthN Mappings
List all AuthN Mappings in the org.
List all AuthN Mappings List all AuthN Mappings in the org .
# resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # form parameters # http body (model) # return_type # auth_names
AuthNMappingsResponse data, response status code and response headers
AuthNMappingsResponse data response status code and response headers
Array<(AuthNMappingsResponse, Integer, Hash)>
opts
:filter Filter all mappings by the given string.
: filter Filter all mappings by the given string .