class DatadogAPIClient::V1::AWSIntegrationAPI

Attributes

api_client[RW]

Public Class Methods

new(api_client = APIClient.default) click to toggle source
# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 22
def initialize(api_client = APIClient.default)
  @api_client = api_client
end

Public Instance Methods

create_aws_account(body, opts = {}) click to toggle source

Create an AWS integration Create a Datadog-Amazon Web Services integration. Using the `POST` method updates your integration configuration by adding your new configuration to the existing one in your Datadog organization. A unique AWS Account ID for role based authentication. @param body [AWSAccount] AWS Request Object @param [Hash] opts the optional parameters @return [AWSAccountCreateResponse]

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 30
def create_aws_account(body, opts = {})
  data, _status_code, _headers = create_aws_account_with_http_info(body, opts)
  data
end
create_aws_account_with_http_info(body, opts = {}) click to toggle source

Create an AWS integration Create a Datadog-Amazon Web Services integration. Using the &#x60;POST&#x60; method updates your integration configuration by adding your new configuration to the existing one in your Datadog organization. A unique AWS Account ID for role based authentication. @param body [AWSAccount] AWS Request Object @param [Hash] opts the optional parameters @return [Array<(AWSAccountCreateResponse, Integer, Hash)>] AWSAccountCreateResponse data, response status code and response headers

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 40
def create_aws_account_with_http_info(body, opts = {})

  if @api_client.config.unstable_operations.has_key?(:create_aws_account)
    unstable_enabled = @api_client.config.unstable_operations[:create_aws_account]
    if unstable_enabled
      @api_client.config.logger.warn format("Using unstable operation '%s'", "create_aws_account")
    else
      raise APIError.new(message: format("Unstable operation '%s' is disabled", "create_aws_account"))
    end
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.create_aws_account ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling AWSIntegrationAPI.create_aws_account"
  end
  # resource path
  local_var_path = '/api/v1/integration/aws'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'AWSAccountCreateResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :create_aws_account,
    :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: AWSIntegrationAPI#create_aws_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_aws_tag_filter(body, opts = {}) click to toggle source

Set an AWS tag filter Set an AWS tag filter. @param body [AWSTagFilterCreateRequest] Set an AWS tag filter using an &#x60;aws_account_identifier&#x60;, &#x60;namespace&#x60;, and filtering string. Namespace options are &#x60;application_elb&#x60;, &#x60;elb&#x60;, &#x60;lambda&#x60;, &#x60;network_elb&#x60;, &#x60;rds&#x60;, &#x60;sqs&#x60;, and &#x60;custom&#x60;. @param [Hash] opts the optional parameters @return [Object]

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 105
def create_aws_tag_filter(body, opts = {})
  data, _status_code, _headers = create_aws_tag_filter_with_http_info(body, opts)
  data
end
create_aws_tag_filter_with_http_info(body, opts = {}) click to toggle source

Set an AWS tag filter Set an AWS tag filter. @param body [AWSTagFilterCreateRequest] Set an AWS tag filter using an &#x60;aws_account_identifier&#x60;, &#x60;namespace&#x60;, and filtering string. Namespace options are &#x60;application_elb&#x60;, &#x60;elb&#x60;, &#x60;lambda&#x60;, &#x60;network_elb&#x60;, &#x60;rds&#x60;, &#x60;sqs&#x60;, and &#x60;custom&#x60;. @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 115
def create_aws_tag_filter_with_http_info(body, opts = {})

  if @api_client.config.unstable_operations.has_key?(:create_aws_tag_filter)
    unstable_enabled = @api_client.config.unstable_operations[:create_aws_tag_filter]
    if unstable_enabled
      @api_client.config.logger.warn format("Using unstable operation '%s'", "create_aws_tag_filter")
    else
      raise APIError.new(message: format("Unstable operation '%s' is disabled", "create_aws_tag_filter"))
    end
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.create_aws_tag_filter ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling AWSIntegrationAPI.create_aws_tag_filter"
  end
  # resource path
  local_var_path = '/api/v1/integration/aws/filtering'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :create_aws_tag_filter,
    :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: AWSIntegrationAPI#create_aws_tag_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_new_aws_external_id(body, opts = {}) click to toggle source

Generate a new external ID Generate a new AWS external ID for a given AWS account ID and role name pair. @param body [AWSAccount] Your Datadog role delegation name. For more information about your AWS account Role name, see the [Datadog AWS integration configuration info](docs.datadoghq.com/integrations/amazon_web_services/#setup). @param [Hash] opts the optional parameters @return [AWSAccountCreateResponse]

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 180
def create_new_aws_external_id(body, opts = {})
  data, _status_code, _headers = create_new_aws_external_id_with_http_info(body, opts)
  data
end
create_new_aws_external_id_with_http_info(body, opts = {}) click to toggle source

Generate a new external ID Generate a new AWS external ID for a given AWS account ID and role name pair. @param body [AWSAccount] Your Datadog role delegation name. For more information about your AWS account Role name, see the [Datadog AWS integration configuration info](docs.datadoghq.com/integrations/amazon_web_services/#setup). @param [Hash] opts the optional parameters @return [Array<(AWSAccountCreateResponse, Integer, Hash)>] AWSAccountCreateResponse data, response status code and response headers

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 190
def create_new_aws_external_id_with_http_info(body, opts = {})

  if @api_client.config.unstable_operations.has_key?(:create_new_aws_external_id)
    unstable_enabled = @api_client.config.unstable_operations[:create_new_aws_external_id]
    if unstable_enabled
      @api_client.config.logger.warn format("Using unstable operation '%s'", "create_new_aws_external_id")
    else
      raise APIError.new(message: format("Unstable operation '%s' is disabled", "create_new_aws_external_id"))
    end
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.create_new_aws_external_id ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling AWSIntegrationAPI.create_new_aws_external_id"
  end
  # resource path
  local_var_path = '/api/v1/integration/aws/generate_new_external_id'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'AWSAccountCreateResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :create_new_aws_external_id,
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AWSIntegrationAPI#create_new_aws_external_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_aws_account(body, opts = {}) click to toggle source

Delete an AWS integration Delete a Datadog-AWS integration matching the specified `account_id` and `role_name parameters`. @param body [AWSAccountDeleteRequest] AWS request object @param [Hash] opts the optional parameters @return [Object]

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 255
def delete_aws_account(body, opts = {})
  data, _status_code, _headers = delete_aws_account_with_http_info(body, opts)
  data
end
delete_aws_account_with_http_info(body, opts = {}) click to toggle source

Delete an AWS integration Delete a Datadog-AWS integration matching the specified &#x60;account_id&#x60; and &#x60;role_name parameters&#x60;. @param body [AWSAccountDeleteRequest] AWS request object @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 265
def delete_aws_account_with_http_info(body, opts = {})

  if @api_client.config.unstable_operations.has_key?(:delete_aws_account)
    unstable_enabled = @api_client.config.unstable_operations[:delete_aws_account]
    if unstable_enabled
      @api_client.config.logger.warn format("Using unstable operation '%s'", "delete_aws_account")
    else
      raise APIError.new(message: format("Unstable operation '%s' is disabled", "delete_aws_account"))
    end
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.delete_aws_account ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling AWSIntegrationAPI.delete_aws_account"
  end
  # resource path
  local_var_path = '/api/v1/integration/aws'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :delete_aws_account,
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AWSIntegrationAPI#delete_aws_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_aws_tag_filter(body, opts = {}) click to toggle source

Delete a tag filtering entry Delete a tag filtering entry. @param body [AWSTagFilterDeleteRequest] Delete a tag filtering entry for a given AWS account and &#x60;dd-aws&#x60; namespace. @param [Hash] opts the optional parameters @return [Object]

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 330
def delete_aws_tag_filter(body, opts = {})
  data, _status_code, _headers = delete_aws_tag_filter_with_http_info(body, opts)
  data
end
delete_aws_tag_filter_with_http_info(body, opts = {}) click to toggle source

Delete a tag filtering entry Delete a tag filtering entry. @param body [AWSTagFilterDeleteRequest] Delete a tag filtering entry for a given AWS account and &#x60;dd-aws&#x60; namespace. @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 340
def delete_aws_tag_filter_with_http_info(body, opts = {})

  if @api_client.config.unstable_operations.has_key?(:delete_aws_tag_filter)
    unstable_enabled = @api_client.config.unstable_operations[:delete_aws_tag_filter]
    if unstable_enabled
      @api_client.config.logger.warn format("Using unstable operation '%s'", "delete_aws_tag_filter")
    else
      raise APIError.new(message: format("Unstable operation '%s' is disabled", "delete_aws_tag_filter"))
    end
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.delete_aws_tag_filter ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling AWSIntegrationAPI.delete_aws_tag_filter"
  end
  # resource path
  local_var_path = '/api/v1/integration/aws/filtering'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :delete_aws_tag_filter,
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AWSIntegrationAPI#delete_aws_tag_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_available_aws_namespaces(opts = {}) click to toggle source

List namespace rules List all namespace rules for a given Datadog-AWS integration. This endpoint takes no arguments. @param [Hash] opts the optional parameters @return [Array<String>]

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 404
def list_available_aws_namespaces(opts = {})
  data, _status_code, _headers = list_available_aws_namespaces_with_http_info(opts)
  data
end
list_available_aws_namespaces_with_http_info(opts = {}) click to toggle source

List namespace rules List all namespace rules for a given Datadog-AWS integration. This endpoint takes no arguments. @param [Hash] opts the optional parameters @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 413
def list_available_aws_namespaces_with_http_info(opts = {})

  if @api_client.config.unstable_operations.has_key?(:list_available_aws_namespaces)
    unstable_enabled = @api_client.config.unstable_operations[:list_available_aws_namespaces]
    if unstable_enabled
      @api_client.config.logger.warn format("Using unstable operation '%s'", "list_available_aws_namespaces")
    else
      raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_available_aws_namespaces"))
    end
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.list_available_aws_namespaces ...'
  end
  # resource path
  local_var_path = '/api/v1/integration/aws/available_namespace_rules'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<String>'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :list_available_aws_namespaces,
    :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: AWSIntegrationAPI#list_available_aws_namespaces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_aws_accounts(opts = {}) click to toggle source

List all AWS integrations List all Datadog-AWS integrations available in your Datadog organization. @param [Hash] opts the optional parameters @option opts [String] :account_id Only return AWS accounts that matches this &#x60;account_id&#x60;. @option opts [String] :role_name Only return AWS accounts that matches this role_name. @option opts [String] :access_key_id Only return AWS accounts that matches this &#x60;access_key_id&#x60;. @return [AWSAccountListResponse]

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 474
def list_aws_accounts(opts = {})
  data, _status_code, _headers = list_aws_accounts_with_http_info(opts)
  data
end
list_aws_accounts_with_http_info(opts = {}) click to toggle source

List all AWS integrations List all Datadog-AWS integrations available in your Datadog organization. @param [Hash] opts the optional parameters @option opts [String] :account_id Only return AWS accounts that matches this &#x60;account_id&#x60;. @option opts [String] :role_name Only return AWS accounts that matches this role_name. @option opts [String] :access_key_id Only return AWS accounts that matches this &#x60;access_key_id&#x60;. @return [Array<(AWSAccountListResponse, Integer, Hash)>] AWSAccountListResponse data, response status code and response headers

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 486
def list_aws_accounts_with_http_info(opts = {})

  if @api_client.config.unstable_operations.has_key?(:list_aws_accounts)
    unstable_enabled = @api_client.config.unstable_operations[:list_aws_accounts]
    if unstable_enabled
      @api_client.config.logger.warn format("Using unstable operation '%s'", "list_aws_accounts")
    else
      raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_aws_accounts"))
    end
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.list_aws_accounts ...'
  end
  # resource path
  local_var_path = '/api/v1/integration/aws'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
  query_params[:'role_name'] = opts[:'role_name'] if !opts[:'role_name'].nil?
  query_params[:'access_key_id'] = opts[:'access_key_id'] if !opts[:'access_key_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AWSAccountListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :list_aws_accounts,
    :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: AWSIntegrationAPI#list_aws_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_aws_tag_filters(account_id, opts = {}) click to toggle source

Get all AWS tag filters Get all AWS tag filters. @param account_id [String] Only return AWS filters that matches this &#x60;account_id&#x60;. @param [Hash] opts the optional parameters @return [AWSTagFilterListResponse]

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 548
def list_aws_tag_filters(account_id, opts = {})
  data, _status_code, _headers = list_aws_tag_filters_with_http_info(account_id, opts)
  data
end
list_aws_tag_filters_with_http_info(account_id, opts = {}) click to toggle source

Get all AWS tag filters Get all AWS tag filters. @param account_id [String] Only return AWS filters that matches this &#x60;account_id&#x60;. @param [Hash] opts the optional parameters @return [Array<(AWSTagFilterListResponse, Integer, Hash)>] AWSTagFilterListResponse data, response status code and response headers

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 558
def list_aws_tag_filters_with_http_info(account_id, opts = {})

  if @api_client.config.unstable_operations.has_key?(:list_aws_tag_filters)
    unstable_enabled = @api_client.config.unstable_operations[:list_aws_tag_filters]
    if unstable_enabled
      @api_client.config.logger.warn format("Using unstable operation '%s'", "list_aws_tag_filters")
    else
      raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_aws_tag_filters"))
    end
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.list_aws_tag_filters ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && account_id.nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling AWSIntegrationAPI.list_aws_tag_filters"
  end
  # resource path
  local_var_path = '/api/v1/integration/aws/filtering'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'account_id'] = account_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AWSTagFilterListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :list_aws_tag_filters,
    :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: AWSIntegrationAPI#list_aws_tag_filters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_aws_account(body, opts = {}) click to toggle source

Update an AWS integration Update a Datadog-Amazon Web Services integration. @param body [AWSAccount] AWS request object @param [Hash] opts the optional parameters @option opts [String] :account_id Only return AWS accounts that matches this &#x60;account_id&#x60;. @option opts [String] :role_name Only return AWS accounts that match this &#x60;role_name&#x60;. Required if &#x60;account_id&#x60; is specified. @option opts [String] :access_key_id Only return AWS accounts that matches this &#x60;access_key_id&#x60;. Required if none of the other two options are specified. @return [Object]

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 625
def update_aws_account(body, opts = {})
  data, _status_code, _headers = update_aws_account_with_http_info(body, opts)
  data
end
update_aws_account_with_http_info(body, opts = {}) click to toggle source

Update an AWS integration Update a Datadog-Amazon Web Services integration. @param body [AWSAccount] AWS request object @param [Hash] opts the optional parameters @option opts [String] :account_id Only return AWS accounts that matches this &#x60;account_id&#x60;. @option opts [String] :role_name Only return AWS accounts that match this &#x60;role_name&#x60;. Required if &#x60;account_id&#x60; is specified. @option opts [String] :access_key_id Only return AWS accounts that matches this &#x60;access_key_id&#x60;. Required if none of the other two options are specified. @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers

# File lib/datadog_api_client/v1/api/aws_integration_api.rb, line 638
def update_aws_account_with_http_info(body, opts = {})

  if @api_client.config.unstable_operations.has_key?(:update_aws_account)
    unstable_enabled = @api_client.config.unstable_operations[:update_aws_account]
    if unstable_enabled
      @api_client.config.logger.warn format("Using unstable operation '%s'", "update_aws_account")
    else
      raise APIError.new(message: format("Unstable operation '%s' is disabled", "update_aws_account"))
    end
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.update_aws_account ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling AWSIntegrationAPI.update_aws_account"
  end
  # resource path
  local_var_path = '/api/v1/integration/aws'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
  query_params[:'role_name'] = opts[:'role_name'] if !opts[:'role_name'].nil?
  query_params[:'access_key_id'] = opts[:'access_key_id'] if !opts[:'access_key_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :update_aws_account,
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AWSIntegrationAPI#update_aws_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end