You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::CostandUsageReportService::Client

Inherits:
Seahorse::Client::Base show all
Includes:
Aws::ClientStubs
Defined in:
gems/aws-sdk-costandusagereportservice/lib/aws-sdk-costandusagereportservice/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from Aws::ClientStubs

#stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



152
153
154
# File 'gems/aws-sdk-costandusagereportservice/lib/aws-sdk-costandusagereportservice/client.rb', line 152

def initialize(*args)
  super
end

Instance Method Details

#delete_report_definition(params = {}) ⇒ Types::DeleteReportDefinitionResponse

Delete a specified report definition

Examples:

Request syntax with placeholder values


resp = client.delete_report_definition({
  report_name: "ReportName",
})

Response structure


resp.response_message #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :report_name (String)

    Preferred name for a report, it has to be unique. Must starts with a number/letter, case sensitive. Limited to 256 characters.

Returns:

See Also:



182
183
184
185
# File 'gems/aws-sdk-costandusagereportservice/lib/aws-sdk-costandusagereportservice/client.rb', line 182

def delete_report_definition(params = {}, options = {})
  req = build_request(:delete_report_definition, params)
  req.send_request(options)
end

#describe_report_definitions(params = {}) ⇒ Types::DescribeReportDefinitionsResponse

Describe a list of report definitions owned by the account

Examples:

Request syntax with placeholder values


resp = client.describe_report_definitions({
  max_results: 1,
  next_token: "GenericString",
})

Response structure


resp.report_definitions #=> Array
resp.report_definitions[0].report_name #=> String
resp.report_definitions[0].time_unit #=> String, one of "HOURLY", "DAILY"
resp.report_definitions[0].format #=> String, one of "textORcsv"
resp.report_definitions[0].compression #=> String, one of "ZIP", "GZIP"
resp.report_definitions[0].additional_schema_elements #=> Array
resp.report_definitions[0].additional_schema_elements[0] #=> String, one of "RESOURCES"
resp.report_definitions[0].s3_bucket #=> String
resp.report_definitions[0].s3_prefix #=> String
resp.report_definitions[0].s3_region #=> String, one of "us-east-1", "us-west-1", "us-west-2", "eu-central-1", "eu-west-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1"
resp.report_definitions[0].additional_artifacts #=> Array
resp.report_definitions[0].additional_artifacts[0] #=> String, one of "REDSHIFT", "QUICKSIGHT"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :max_results (Integer)

    The max number of results returned by the operation.

  • :next_token (String)

    A generic string.

Returns:

See Also:



227
228
229
230
# File 'gems/aws-sdk-costandusagereportservice/lib/aws-sdk-costandusagereportservice/client.rb', line 227

def describe_report_definitions(params = {}, options = {})
  req = build_request(:describe_report_definitions, params)
  req.send_request(options)
end

#put_report_definition(params = {}) ⇒ Struct

Create a new report definition

Examples:

Request syntax with placeholder values


resp = client.put_report_definition({
  report_definition: { # required
    report_name: "ReportName", # required
    time_unit: "HOURLY", # required, accepts HOURLY, DAILY
    format: "textORcsv", # required, accepts textORcsv
    compression: "ZIP", # required, accepts ZIP, GZIP
    additional_schema_elements: ["RESOURCES"], # required, accepts RESOURCES
    s3_bucket: "S3Bucket", # required
    s3_prefix: "S3Prefix", # required
    s3_region: "us-east-1", # required, accepts us-east-1, us-west-1, us-west-2, eu-central-1, eu-west-1, ap-southeast-1, ap-southeast-2, ap-northeast-1
    additional_artifacts: ["REDSHIFT"], # accepts REDSHIFT, QUICKSIGHT
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :report_definition (required, Types::ReportDefinition)

    The definition of AWS Cost and Usage Report. Customer can specify the report name, time unit, report format, compression format, S3 bucket and additional artifacts and schema elements in the definition.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



261
262
263
264
# File 'gems/aws-sdk-costandusagereportservice/lib/aws-sdk-costandusagereportservice/client.rb', line 261

def put_report_definition(params = {}, options = {})
  req = build_request(:put_report_definition, params)
  req.send_request(options)
end