aws-sdk-costandusagereportservice 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 21f5d807cc81149a473e33b634a3a558bd7737a1
4
+ data.tar.gz: eb8b89d8331c8c370d3529e24bb81f2b400dbe68
5
+ SHA512:
6
+ metadata.gz: 1264552324b0632a9f3df7a55810a88fc548f29cd5da4edc371a4f171152cff6a6a1f6bb721ba34c009c02f7d496d0c82d11b466e3f7246e201a2ca231383a97
7
+ data.tar.gz: 17aa79f742c1af17ad6080d82c928003dbc29daeae7bf5fdb84be9c6b701cad67c7c57a57bc1f9975eecdcda1450b61a54a5c697ee2d440aa1e4d0aa10afda88
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-costandusagereportservice/types'
12
+ require_relative 'aws-sdk-costandusagereportservice/client_api'
13
+ require_relative 'aws-sdk-costandusagereportservice/client'
14
+ require_relative 'aws-sdk-costandusagereportservice/errors'
15
+ require_relative 'aws-sdk-costandusagereportservice/resource'
16
+ require_relative 'aws-sdk-costandusagereportservice/customizations'
17
+
18
+ # This module provides support for AWS Cost and Usage Report Service. This module is available in the
19
+ # `aws-sdk-costandusagereportservice` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from AWS Cost and Usage Report Service all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::CostandUsageReportService::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::CostandUsageReportService
44
+
45
+ GEM_VERSION = '1.0.0.rc1'
46
+
47
+ end
@@ -0,0 +1,299 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/response_paging.rb'
19
+ require 'aws-sdk-core/plugins/stub_responses.rb'
20
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/signature_v4.rb'
22
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
23
+
24
+ Aws::Plugins::GlobalConfiguration.add_identifier(:costandusagereportservice)
25
+
26
+ module Aws::CostandUsageReportService
27
+ class Client < Seahorse::Client::Base
28
+
29
+ include Aws::ClientStubs
30
+
31
+ @identifier = :costandusagereportservice
32
+
33
+ set_api(ClientApi::API)
34
+
35
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
36
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
37
+ add_plugin(Aws::Plugins::Logging)
38
+ add_plugin(Aws::Plugins::ParamConverter)
39
+ add_plugin(Aws::Plugins::ParamValidator)
40
+ add_plugin(Aws::Plugins::UserAgent)
41
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
42
+ add_plugin(Aws::Plugins::RetryErrors)
43
+ add_plugin(Aws::Plugins::GlobalConfiguration)
44
+ add_plugin(Aws::Plugins::RegionalEndpoint)
45
+ add_plugin(Aws::Plugins::ResponsePaging)
46
+ add_plugin(Aws::Plugins::StubResponses)
47
+ add_plugin(Aws::Plugins::IdempotencyToken)
48
+ add_plugin(Aws::Plugins::SignatureV4)
49
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
50
+
51
+ # @option options [required, Aws::CredentialProvider] :credentials
52
+ # Your AWS credentials. This can be an instance of any one of the
53
+ # following classes:
54
+ #
55
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
56
+ # credentials.
57
+ #
58
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
59
+ # from an EC2 IMDS on an EC2 instance.
60
+ #
61
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
62
+ # shared file, such as `~/.aws/config`.
63
+ #
64
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
65
+ #
66
+ # When `:credentials` are not configured directly, the following
67
+ # locations will be searched for credentials:
68
+ #
69
+ # * `Aws.config[:credentials]`
70
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
71
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
72
+ # * `~/.aws/credentials`
73
+ # * `~/.aws/config`
74
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
75
+ # very aggressive. Construct and pass an instance of
76
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
77
+ # timeouts.
78
+ #
79
+ # @option options [required, String] :region
80
+ # The AWS region to connect to. The configured `:region` is
81
+ # used to determine the service `:endpoint`. When not passed,
82
+ # a default `:region` is search for in the following locations:
83
+ #
84
+ # * `Aws.config[:region]`
85
+ # * `ENV['AWS_REGION']`
86
+ # * `ENV['AMAZON_REGION']`
87
+ # * `ENV['AWS_DEFAULT_REGION']`
88
+ # * `~/.aws/credentials`
89
+ # * `~/.aws/config`
90
+ #
91
+ # @option options [String] :access_key_id
92
+ #
93
+ # @option options [Boolean] :convert_params (true)
94
+ # When `true`, an attempt is made to coerce request parameters into
95
+ # the required types.
96
+ #
97
+ # @option options [String] :endpoint
98
+ # The client endpoint is normally constructed from the `:region`
99
+ # option. You should only configure an `:endpoint` when connecting
100
+ # to test endpoints. This should be avalid HTTP(S) URI.
101
+ #
102
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
103
+ # The log formatter.
104
+ #
105
+ # @option options [Symbol] :log_level (:info)
106
+ # The log level to send messages to the `:logger` at.
107
+ #
108
+ # @option options [Logger] :logger
109
+ # The Logger instance to send log messages to. If this option
110
+ # is not set, logging will be disabled.
111
+ #
112
+ # @option options [String] :profile ("default")
113
+ # Used when loading credentials from the shared credentials file
114
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
115
+ #
116
+ # @option options [Integer] :retry_limit (3)
117
+ # The maximum number of times to retry failed requests. Only
118
+ # ~ 500 level server errors and certain ~ 400 level client errors
119
+ # are retried. Generally, these are throttling errors, data
120
+ # checksum errors, networking errors, timeout errors and auth
121
+ # errors from expired credentials.
122
+ #
123
+ # @option options [String] :secret_access_key
124
+ #
125
+ # @option options [String] :session_token
126
+ #
127
+ # @option options [Boolean] :simple_json (false)
128
+ # Disables request parameter conversion, validation, and formatting.
129
+ # Also disable response data type conversions. This option is useful
130
+ # when you want to ensure the highest level of performance by
131
+ # avoiding overhead of walking request parameters and response data
132
+ # structures.
133
+ #
134
+ # When `:simple_json` is enabled, the request parameters hash must
135
+ # be formatted exactly as the DynamoDB API expects.
136
+ #
137
+ # @option options [Boolean] :stub_responses (false)
138
+ # Causes the client to return stubbed responses. By default
139
+ # fake responses are generated and returned. You can specify
140
+ # the response data to return or errors to raise by calling
141
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
142
+ #
143
+ # ** Please note ** When response stubbing is enabled, no HTTP
144
+ # requests are made, and retries are disabled.
145
+ #
146
+ # @option options [Boolean] :validate_params (true)
147
+ # When `true`, request parameters are validated before
148
+ # sending the request.
149
+ #
150
+ def initialize(*args)
151
+ super
152
+ end
153
+
154
+ # @!group API Operations
155
+
156
+ # Delete a specified report definition
157
+ #
158
+ # @option params [String] :report_name
159
+ # Preferred name for a report, it has to be unique. Must starts with a
160
+ # number/letter, case sensitive. Limited to 256 characters.
161
+ #
162
+ # @return [Types::DeleteReportDefinitionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
163
+ #
164
+ # * {Types::DeleteReportDefinitionResponse#response_message #response_message} => String
165
+ #
166
+ # @example Request syntax with placeholder values
167
+ #
168
+ # resp = client.delete_report_definition({
169
+ # report_name: "ReportName",
170
+ # })
171
+ #
172
+ # @example Response structure
173
+ #
174
+ # resp.response_message #=> String
175
+ #
176
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DeleteReportDefinition AWS API Documentation
177
+ #
178
+ # @overload delete_report_definition(params = {})
179
+ # @param [Hash] params ({})
180
+ def delete_report_definition(params = {}, options = {})
181
+ req = build_request(:delete_report_definition, params)
182
+ req.send_request(options)
183
+ end
184
+
185
+ # Describe a list of report definitions owned by the account
186
+ #
187
+ # @option params [Integer] :max_results
188
+ # The max number of results returned by the operation.
189
+ #
190
+ # @option params [String] :next_token
191
+ # A generic string.
192
+ #
193
+ # @return [Types::DescribeReportDefinitionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
194
+ #
195
+ # * {Types::DescribeReportDefinitionsResponse#report_definitions #report_definitions} => Array&lt;Types::ReportDefinition&gt;
196
+ # * {Types::DescribeReportDefinitionsResponse#next_token #next_token} => String
197
+ #
198
+ # @example Request syntax with placeholder values
199
+ #
200
+ # resp = client.describe_report_definitions({
201
+ # max_results: 1,
202
+ # next_token: "GenericString",
203
+ # })
204
+ #
205
+ # @example Response structure
206
+ #
207
+ # resp.report_definitions #=> Array
208
+ # resp.report_definitions[0].report_name #=> String
209
+ # resp.report_definitions[0].time_unit #=> String, one of "HOURLY", "DAILY"
210
+ # resp.report_definitions[0].format #=> String, one of "textORcsv"
211
+ # resp.report_definitions[0].compression #=> String, one of "ZIP", "GZIP"
212
+ # resp.report_definitions[0].additional_schema_elements #=> Array
213
+ # resp.report_definitions[0].additional_schema_elements[0] #=> String, one of "RESOURCES"
214
+ # resp.report_definitions[0].s3_bucket #=> String
215
+ # resp.report_definitions[0].s3_prefix #=> String
216
+ # 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"
217
+ # resp.report_definitions[0].additional_artifacts #=> Array
218
+ # resp.report_definitions[0].additional_artifacts[0] #=> String, one of "REDSHIFT", "QUICKSIGHT"
219
+ # resp.next_token #=> String
220
+ #
221
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitions AWS API Documentation
222
+ #
223
+ # @overload describe_report_definitions(params = {})
224
+ # @param [Hash] params ({})
225
+ def describe_report_definitions(params = {}, options = {})
226
+ req = build_request(:describe_report_definitions, params)
227
+ req.send_request(options)
228
+ end
229
+
230
+ # Create a new report definition
231
+ #
232
+ # @option params [required, Types::ReportDefinition] :report_definition
233
+ # The definition of AWS Cost and Usage Report. Customer can specify the
234
+ # report name, time unit, report format, compression format, S3 bucket
235
+ # and additional artifacts and schema elements in the definition.
236
+ #
237
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
238
+ #
239
+ # @example Request syntax with placeholder values
240
+ #
241
+ # resp = client.put_report_definition({
242
+ # report_definition: { # required
243
+ # report_name: "ReportName", # required
244
+ # time_unit: "HOURLY", # required, accepts HOURLY, DAILY
245
+ # format: "textORcsv", # required, accepts textORcsv
246
+ # compression: "ZIP", # required, accepts ZIP, GZIP
247
+ # additional_schema_elements: ["RESOURCES"], # required, accepts RESOURCES
248
+ # s3_bucket: "S3Bucket", # required
249
+ # s3_prefix: "S3Prefix", # required
250
+ # 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
251
+ # additional_artifacts: ["REDSHIFT"], # accepts REDSHIFT, QUICKSIGHT
252
+ # },
253
+ # })
254
+ #
255
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/PutReportDefinition AWS API Documentation
256
+ #
257
+ # @overload put_report_definition(params = {})
258
+ # @param [Hash] params ({})
259
+ def put_report_definition(params = {}, options = {})
260
+ req = build_request(:put_report_definition, params)
261
+ req.send_request(options)
262
+ end
263
+
264
+ # @!endgroup
265
+
266
+ # @param params ({})
267
+ # @api private
268
+ def build_request(operation_name, params = {})
269
+ handlers = @handlers.for(operation_name)
270
+ context = Seahorse::Client::RequestContext.new(
271
+ operation_name: operation_name,
272
+ operation: config.api.operation(operation_name),
273
+ client: self,
274
+ params: params,
275
+ config: config)
276
+ context[:gem_name] = 'aws-sdk-costandusagereportservice'
277
+ context[:gem_version] = '1.0.0.rc1'
278
+ Seahorse::Client::Request.new(handlers, context)
279
+ end
280
+
281
+ # @api private
282
+ # @deprecated
283
+ def waiter_names
284
+ []
285
+ end
286
+
287
+ class << self
288
+
289
+ # @api private
290
+ attr_reader :identifier
291
+
292
+ # @api private
293
+ def errors_module
294
+ Errors
295
+ end
296
+
297
+ end
298
+ end
299
+ end
@@ -0,0 +1,133 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::CostandUsageReportService
9
+ # @api private
10
+ module ClientApi
11
+
12
+ include Seahorse::Model
13
+
14
+ AWSRegion = Shapes::StringShape.new(name: 'AWSRegion')
15
+ AdditionalArtifact = Shapes::StringShape.new(name: 'AdditionalArtifact')
16
+ AdditionalArtifactList = Shapes::ListShape.new(name: 'AdditionalArtifactList')
17
+ CompressionFormat = Shapes::StringShape.new(name: 'CompressionFormat')
18
+ DeleteReportDefinitionRequest = Shapes::StructureShape.new(name: 'DeleteReportDefinitionRequest')
19
+ DeleteReportDefinitionResponse = Shapes::StructureShape.new(name: 'DeleteReportDefinitionResponse')
20
+ DeleteResponseMessage = Shapes::StringShape.new(name: 'DeleteResponseMessage')
21
+ DescribeReportDefinitionsRequest = Shapes::StructureShape.new(name: 'DescribeReportDefinitionsRequest')
22
+ DescribeReportDefinitionsResponse = Shapes::StructureShape.new(name: 'DescribeReportDefinitionsResponse')
23
+ DuplicateReportNameException = Shapes::StructureShape.new(name: 'DuplicateReportNameException')
24
+ ErrorMessage = Shapes::StringShape.new(name: 'ErrorMessage')
25
+ GenericString = Shapes::StringShape.new(name: 'GenericString')
26
+ InternalErrorException = Shapes::StructureShape.new(name: 'InternalErrorException')
27
+ MaxResults = Shapes::IntegerShape.new(name: 'MaxResults')
28
+ PutReportDefinitionRequest = Shapes::StructureShape.new(name: 'PutReportDefinitionRequest')
29
+ PutReportDefinitionResponse = Shapes::StructureShape.new(name: 'PutReportDefinitionResponse')
30
+ ReportDefinition = Shapes::StructureShape.new(name: 'ReportDefinition')
31
+ ReportDefinitionList = Shapes::ListShape.new(name: 'ReportDefinitionList')
32
+ ReportFormat = Shapes::StringShape.new(name: 'ReportFormat')
33
+ ReportLimitReachedException = Shapes::StructureShape.new(name: 'ReportLimitReachedException')
34
+ ReportName = Shapes::StringShape.new(name: 'ReportName')
35
+ S3Bucket = Shapes::StringShape.new(name: 'S3Bucket')
36
+ S3Prefix = Shapes::StringShape.new(name: 'S3Prefix')
37
+ SchemaElement = Shapes::StringShape.new(name: 'SchemaElement')
38
+ SchemaElementList = Shapes::ListShape.new(name: 'SchemaElementList')
39
+ TimeUnit = Shapes::StringShape.new(name: 'TimeUnit')
40
+ ValidationException = Shapes::StructureShape.new(name: 'ValidationException')
41
+
42
+ AdditionalArtifactList.member = Shapes::ShapeRef.new(shape: AdditionalArtifact)
43
+
44
+ DeleteReportDefinitionRequest.add_member(:report_name, Shapes::ShapeRef.new(shape: ReportName, location_name: "ReportName"))
45
+ DeleteReportDefinitionRequest.struct_class = Types::DeleteReportDefinitionRequest
46
+
47
+ DeleteReportDefinitionResponse.add_member(:response_message, Shapes::ShapeRef.new(shape: DeleteResponseMessage, location_name: "ResponseMessage"))
48
+ DeleteReportDefinitionResponse.struct_class = Types::DeleteReportDefinitionResponse
49
+
50
+ DescribeReportDefinitionsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResults, location_name: "MaxResults"))
51
+ DescribeReportDefinitionsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: GenericString, location_name: "NextToken"))
52
+ DescribeReportDefinitionsRequest.struct_class = Types::DescribeReportDefinitionsRequest
53
+
54
+ DescribeReportDefinitionsResponse.add_member(:report_definitions, Shapes::ShapeRef.new(shape: ReportDefinitionList, location_name: "ReportDefinitions"))
55
+ DescribeReportDefinitionsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: GenericString, location_name: "NextToken"))
56
+ DescribeReportDefinitionsResponse.struct_class = Types::DescribeReportDefinitionsResponse
57
+
58
+ PutReportDefinitionRequest.add_member(:report_definition, Shapes::ShapeRef.new(shape: ReportDefinition, required: true, location_name: "ReportDefinition"))
59
+ PutReportDefinitionRequest.struct_class = Types::PutReportDefinitionRequest
60
+
61
+ PutReportDefinitionResponse.struct_class = Types::PutReportDefinitionResponse
62
+
63
+ ReportDefinition.add_member(:report_name, Shapes::ShapeRef.new(shape: ReportName, required: true, location_name: "ReportName"))
64
+ ReportDefinition.add_member(:time_unit, Shapes::ShapeRef.new(shape: TimeUnit, required: true, location_name: "TimeUnit"))
65
+ ReportDefinition.add_member(:format, Shapes::ShapeRef.new(shape: ReportFormat, required: true, location_name: "Format"))
66
+ ReportDefinition.add_member(:compression, Shapes::ShapeRef.new(shape: CompressionFormat, required: true, location_name: "Compression"))
67
+ ReportDefinition.add_member(:additional_schema_elements, Shapes::ShapeRef.new(shape: SchemaElementList, required: true, location_name: "AdditionalSchemaElements"))
68
+ ReportDefinition.add_member(:s3_bucket, Shapes::ShapeRef.new(shape: S3Bucket, required: true, location_name: "S3Bucket"))
69
+ ReportDefinition.add_member(:s3_prefix, Shapes::ShapeRef.new(shape: S3Prefix, required: true, location_name: "S3Prefix"))
70
+ ReportDefinition.add_member(:s3_region, Shapes::ShapeRef.new(shape: AWSRegion, required: true, location_name: "S3Region"))
71
+ ReportDefinition.add_member(:additional_artifacts, Shapes::ShapeRef.new(shape: AdditionalArtifactList, location_name: "AdditionalArtifacts"))
72
+ ReportDefinition.struct_class = Types::ReportDefinition
73
+
74
+ ReportDefinitionList.member = Shapes::ShapeRef.new(shape: ReportDefinition)
75
+
76
+ SchemaElementList.member = Shapes::ShapeRef.new(shape: SchemaElement)
77
+
78
+
79
+ # @api private
80
+ API = Seahorse::Model::Api.new.tap do |api|
81
+
82
+ api.version = "2017-01-06"
83
+
84
+ api.metadata = {
85
+ "endpointPrefix" => "cur",
86
+ "jsonVersion" => "1.1",
87
+ "protocol" => "json",
88
+ "serviceFullName" => "AWS Cost and Usage Report Service",
89
+ "signatureVersion" => "v4",
90
+ "signingName" => "cur",
91
+ "targetPrefix" => "AWSOrigamiServiceGatewayService",
92
+ }
93
+
94
+ api.add_operation(:delete_report_definition, Seahorse::Model::Operation.new.tap do |o|
95
+ o.name = "DeleteReportDefinition"
96
+ o.http_method = "POST"
97
+ o.http_request_uri = "/"
98
+ o.input = Shapes::ShapeRef.new(shape: DeleteReportDefinitionRequest)
99
+ o.output = Shapes::ShapeRef.new(shape: DeleteReportDefinitionResponse)
100
+ o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
101
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
102
+ end)
103
+
104
+ api.add_operation(:describe_report_definitions, Seahorse::Model::Operation.new.tap do |o|
105
+ o.name = "DescribeReportDefinitions"
106
+ o.http_method = "POST"
107
+ o.http_request_uri = "/"
108
+ o.input = Shapes::ShapeRef.new(shape: DescribeReportDefinitionsRequest)
109
+ o.output = Shapes::ShapeRef.new(shape: DescribeReportDefinitionsResponse)
110
+ o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
111
+ o[:pager] = Aws::Pager.new(
112
+ limit_key: "max_results",
113
+ tokens: {
114
+ "next_token" => "next_token"
115
+ }
116
+ )
117
+ end)
118
+
119
+ api.add_operation(:put_report_definition, Seahorse::Model::Operation.new.tap do |o|
120
+ o.name = "PutReportDefinition"
121
+ o.http_method = "POST"
122
+ o.http_request_uri = "/"
123
+ o.input = Shapes::ShapeRef.new(shape: PutReportDefinitionRequest)
124
+ o.output = Shapes::ShapeRef.new(shape: PutReportDefinitionResponse)
125
+ o.errors << Shapes::ShapeRef.new(shape: DuplicateReportNameException)
126
+ o.errors << Shapes::ShapeRef.new(shape: ReportLimitReachedException)
127
+ o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
128
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
129
+ end)
130
+ end
131
+
132
+ end
133
+ end
@@ -0,0 +1,14 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::CostandUsageReportService
9
+ module Errors
10
+
11
+ extend Aws::Errors::DynamicErrors
12
+
13
+ end
14
+ end
@@ -0,0 +1,23 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::CostandUsageReportService
9
+ class Resource
10
+
11
+ # @param options ({})
12
+ # @option options [Client] :client
13
+ def initialize(options = {})
14
+ @client = options[:client] || Client.new(options)
15
+ end
16
+
17
+ # @return [Client]
18
+ def client
19
+ @client
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,200 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::CostandUsageReportService
9
+ module Types
10
+
11
+ # Request of DeleteReportDefinition
12
+ #
13
+ # @note When making an API call, you may pass DeleteReportDefinitionRequest
14
+ # data as a hash:
15
+ #
16
+ # {
17
+ # report_name: "ReportName",
18
+ # }
19
+ #
20
+ # @!attribute [rw] report_name
21
+ # Preferred name for a report, it has to be unique. Must starts with a
22
+ # number/letter, case sensitive. Limited to 256 characters.
23
+ # @return [String]
24
+ #
25
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DeleteReportDefinitionRequest AWS API Documentation
26
+ #
27
+ class DeleteReportDefinitionRequest < Struct.new(
28
+ :report_name)
29
+ include Aws::Structure
30
+ end
31
+
32
+ # Response of DeleteReportDefinition
33
+ #
34
+ # @!attribute [rw] response_message
35
+ # A message indicates if the deletion is successful.
36
+ # @return [String]
37
+ #
38
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DeleteReportDefinitionResponse AWS API Documentation
39
+ #
40
+ class DeleteReportDefinitionResponse < Struct.new(
41
+ :response_message)
42
+ include Aws::Structure
43
+ end
44
+
45
+ # Request of DescribeReportDefinitions
46
+ #
47
+ # @note When making an API call, you may pass DescribeReportDefinitionsRequest
48
+ # data as a hash:
49
+ #
50
+ # {
51
+ # max_results: 1,
52
+ # next_token: "GenericString",
53
+ # }
54
+ #
55
+ # @!attribute [rw] max_results
56
+ # The max number of results returned by the operation.
57
+ # @return [Integer]
58
+ #
59
+ # @!attribute [rw] next_token
60
+ # A generic string.
61
+ # @return [String]
62
+ #
63
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitionsRequest AWS API Documentation
64
+ #
65
+ class DescribeReportDefinitionsRequest < Struct.new(
66
+ :max_results,
67
+ :next_token)
68
+ include Aws::Structure
69
+ end
70
+
71
+ # Response of DescribeReportDefinitions
72
+ #
73
+ # @!attribute [rw] report_definitions
74
+ # A list of report definitions.
75
+ # @return [Array<Types::ReportDefinition>]
76
+ #
77
+ # @!attribute [rw] next_token
78
+ # A generic string.
79
+ # @return [String]
80
+ #
81
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitionsResponse AWS API Documentation
82
+ #
83
+ class DescribeReportDefinitionsResponse < Struct.new(
84
+ :report_definitions,
85
+ :next_token)
86
+ include Aws::Structure
87
+ end
88
+
89
+ # Request of PutReportDefinition
90
+ #
91
+ # @note When making an API call, you may pass PutReportDefinitionRequest
92
+ # data as a hash:
93
+ #
94
+ # {
95
+ # report_definition: { # required
96
+ # report_name: "ReportName", # required
97
+ # time_unit: "HOURLY", # required, accepts HOURLY, DAILY
98
+ # format: "textORcsv", # required, accepts textORcsv
99
+ # compression: "ZIP", # required, accepts ZIP, GZIP
100
+ # additional_schema_elements: ["RESOURCES"], # required, accepts RESOURCES
101
+ # s3_bucket: "S3Bucket", # required
102
+ # s3_prefix: "S3Prefix", # required
103
+ # 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
104
+ # additional_artifacts: ["REDSHIFT"], # accepts REDSHIFT, QUICKSIGHT
105
+ # },
106
+ # }
107
+ #
108
+ # @!attribute [rw] report_definition
109
+ # The definition of AWS Cost and Usage Report. Customer can specify
110
+ # the report name, time unit, report format, compression format, S3
111
+ # bucket and additional artifacts and schema elements in the
112
+ # definition.
113
+ # @return [Types::ReportDefinition]
114
+ #
115
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/PutReportDefinitionRequest AWS API Documentation
116
+ #
117
+ class PutReportDefinitionRequest < Struct.new(
118
+ :report_definition)
119
+ include Aws::Structure
120
+ end
121
+
122
+ # Response of PutReportDefinition
123
+ #
124
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/PutReportDefinitionResponse AWS API Documentation
125
+ #
126
+ class PutReportDefinitionResponse < Aws::EmptyStructure; end
127
+
128
+ # The definition of AWS Cost and Usage Report. Customer can specify the
129
+ # report name, time unit, report format, compression format, S3 bucket
130
+ # and additional artifacts and schema elements in the definition.
131
+ #
132
+ # @note When making an API call, you may pass ReportDefinition
133
+ # data as a hash:
134
+ #
135
+ # {
136
+ # report_name: "ReportName", # required
137
+ # time_unit: "HOURLY", # required, accepts HOURLY, DAILY
138
+ # format: "textORcsv", # required, accepts textORcsv
139
+ # compression: "ZIP", # required, accepts ZIP, GZIP
140
+ # additional_schema_elements: ["RESOURCES"], # required, accepts RESOURCES
141
+ # s3_bucket: "S3Bucket", # required
142
+ # s3_prefix: "S3Prefix", # required
143
+ # 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
144
+ # additional_artifacts: ["REDSHIFT"], # accepts REDSHIFT, QUICKSIGHT
145
+ # }
146
+ #
147
+ # @!attribute [rw] report_name
148
+ # Preferred name for a report, it has to be unique. Must starts with a
149
+ # number/letter, case sensitive. Limited to 256 characters.
150
+ # @return [String]
151
+ #
152
+ # @!attribute [rw] time_unit
153
+ # The frequency on which report data are measured and displayed.
154
+ # @return [String]
155
+ #
156
+ # @!attribute [rw] format
157
+ # Preferred format for report.
158
+ # @return [String]
159
+ #
160
+ # @!attribute [rw] compression
161
+ # Preferred compression format for report.
162
+ # @return [String]
163
+ #
164
+ # @!attribute [rw] additional_schema_elements
165
+ # A list of schema elements.
166
+ # @return [Array<String>]
167
+ #
168
+ # @!attribute [rw] s3_bucket
169
+ # Name of customer S3 bucket.
170
+ # @return [String]
171
+ #
172
+ # @!attribute [rw] s3_prefix
173
+ # Preferred report path prefix. Limited to 256 characters.
174
+ # @return [String]
175
+ #
176
+ # @!attribute [rw] s3_region
177
+ # Region of customer S3 bucket.
178
+ # @return [String]
179
+ #
180
+ # @!attribute [rw] additional_artifacts
181
+ # A list of additional artifacts.
182
+ # @return [Array<String>]
183
+ #
184
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/ReportDefinition AWS API Documentation
185
+ #
186
+ class ReportDefinition < Struct.new(
187
+ :report_name,
188
+ :time_unit,
189
+ :format,
190
+ :compression,
191
+ :additional_schema_elements,
192
+ :s3_bucket,
193
+ :s3_prefix,
194
+ :s3_region,
195
+ :additional_artifacts)
196
+ include Aws::Structure
197
+ end
198
+
199
+ end
200
+ end
metadata ADDED
@@ -0,0 +1,80 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: aws-sdk-costandusagereportservice
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.rc1
5
+ platform: ruby
6
+ authors:
7
+ - Amazon Web Services
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-03-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: aws-sdk-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 3.0.0.rc1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 3.0.0.rc1
27
+ - !ruby/object:Gem::Dependency
28
+ name: aws-sigv4
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.0'
41
+ description: Official AWS Ruby gem for AWS Cost and Usage Report Service. This gem
42
+ is part of the AWS SDK for Ruby.
43
+ email:
44
+ - trevrowe@amazon.com
45
+ executables: []
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - lib/aws-sdk-costandusagereportservice.rb
50
+ - lib/aws-sdk-costandusagereportservice/client.rb
51
+ - lib/aws-sdk-costandusagereportservice/client_api.rb
52
+ - lib/aws-sdk-costandusagereportservice/customizations.rb
53
+ - lib/aws-sdk-costandusagereportservice/errors.rb
54
+ - lib/aws-sdk-costandusagereportservice/resource.rb
55
+ - lib/aws-sdk-costandusagereportservice/types.rb
56
+ homepage: http://github.com/aws/aws-sdk-ruby
57
+ licenses:
58
+ - Apache-2.0
59
+ metadata: {}
60
+ post_install_message:
61
+ rdoc_options: []
62
+ require_paths:
63
+ - lib
64
+ required_ruby_version: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">"
72
+ - !ruby/object:Gem::Version
73
+ version: 1.3.1
74
+ requirements: []
75
+ rubyforge_project:
76
+ rubygems_version: 2.5.1
77
+ signing_key:
78
+ specification_version: 4
79
+ summary: AWS SDK for Ruby - AWS Cost and Usage Report Service
80
+ test_files: []