lib/datadog_api_client/v2/api/auth_n_mappings_api.rb
# Create an AuthN Mapping
# Create an AuthN Mapping.
# @param body [AuthNMappingCreateRequest] 
# @param opts [Hash] the optional parameters
# @return [Array<(AuthNMappingResponse, Integer, Hash)>] AuthNMappingResponse data, response status code and response headers
Create an AuthN Mapping
Create an AuthN Mapping.
Create an AuthN Mapping Create an AuthN Mapping .
def create_auth_n_mapping_with_http_info(body, opts = {})
      if @api_client.config.unstable_operations.has_key?(:create_auth_n_mapping)
        unstable_enabled = @api_client.config.unstable_operations[:create_auth_n_mapping]
        if unstable_enabled
          @api_client.config.logger.warn format("Using unstable operation '%s'", "create_auth_n_mapping")
        else
          raise APIError.new(message: format("Unstable operation '%s' is disabled", "create_auth_n_mapping"))
        end
      end
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: AuthNMappingsAPI.create_auth_n_mapping ...'
      end
      if @api_client.config.client_side_validation && body.nil?
        fail ArgumentError, "Missing the required parameter 'body' when calling AuthNMappingsAPI.create_auth_n_mapping"
      end
      local_var_path = '/api/v2/authn_mappings'
      query_params = opts[:query_params] || {}
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
      return_type = opts[:debug_return_type] || 'AuthNMappingResponse'
      auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
      new_options = opts.merge(
        :operation => :create_auth_n_mapping,
        :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(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: AuthNMappingsAPI#create_auth_n_mapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def create_auth_n_mapping_with_http_info ( body , opts = { } ) if @api_client . config . unstable_operations . has_key? ( :create_auth_n_mapping ) unstable_enabled = @api_client . config . unstable_operations [ :create_auth_n_mapping ] if unstable_enabled @api_client . config . logger . warn format ( "Using unstable operation '%s'" , "create_auth_n_mapping" ) else raise APIError . new ( message : format ( "Unstable operation '%s' is disabled" , "create_auth_n_mapping" ) ) end end if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: AuthNMappingsAPI.create_auth_n_mapping ...' end if @api_client . config . client_side_validation && body . nil? fail ArgumentError , "Missing the required parameter 'body' when calling AuthNMappingsAPI.create_auth_n_mapping" end local_var_path = '/api/v2/authn_mappings' query_params = opts [ :query_params ] || { } header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) header_params [ 'Content-Type' ] = @api_client . select_header_content_type ( [ 'application/json' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( body ) return_type = opts [ :debug_return_type ] || 'AuthNMappingResponse' auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth , :AuthZ ] new_options = opts . merge ( :operation => :create_auth_n_mapping , :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 ( :POST , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: AuthNMappingsAPI#create_auth_n_mapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Create an AuthN Mapping
Create an AuthN Mapping.
Create an AuthN Mapping Create an AuthN Mapping .
# verify the required parameter 'body' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # HTTP header 'Content-Type' # form parameters # http body (model) # return_type # auth_names
AuthNMappingResponse data, response status code and response headers
AuthNMappingResponse data response status code and response headers
Array<(AuthNMappingResponse, Integer, Hash)>
body
<not_specific>
opts
the optional parameters
the optional parameters
<not_specific>
None