aws-sdk-marketplacemetering 1.28.0 → 1.33.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d52015b8728981ef704b5627db3393096831e2d54162d2c0cd1d956d77c00a7d
4
- data.tar.gz: 494c507ea5e582678ea238b5504130aa1e456b31dbad47cb289bff5e242b6fe8
3
+ metadata.gz: 169aa18f1dd827d292ffe19ee6eb24df459f0c2359a97c8c9f47e8c609f5258e
4
+ data.tar.gz: 05e12875264c83b24becac9afde1316e2fbe61113fa01baf211aa62f811b183c
5
5
  SHA512:
6
- metadata.gz: f5eddb401e67f32f410d887f55b681b4a8f8dc699ff0e169024ff67c5fe7ab9c56d4d8cb699439e7d7d4e9ecb5343291d496688847ac87a11ca0f592bb4b53c4
7
- data.tar.gz: cfcbf771418206c1c70f2e4597ba59bdab50e30991017891978121121e297c9f4a333b009bb55ba999e0b5dccd19472ba1b6db973ce1b7419f012ceedaaf8f52
6
+ metadata.gz: b5397cf9032e619ae759042f3a7fe10842d7fb740467e49e255b2ff72a7797573e06fabedb6af3042606cc8299eb693c5068f366f4f5df2ea85eba70b71a0a82
7
+ data.tar.gz: 05c71493dc52d6c203cb63f8c3981ce4e6ae9b571ad623152062ae5f5586eb6b89dcc293eb6c729f0f3891fd0ae6c7b185b89ea4a67cc3101e739dfc4141d3ff
@@ -7,6 +7,7 @@
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
10
+
10
11
  require 'aws-sdk-core'
11
12
  require 'aws-sigv4'
12
13
 
@@ -44,9 +45,9 @@ require_relative 'aws-sdk-marketplacemetering/customizations'
44
45
  #
45
46
  # See {Errors} for more information.
46
47
  #
47
- # @service
48
+ # @!group service
48
49
  module Aws::MarketplaceMetering
49
50
 
50
- GEM_VERSION = '1.28.0'
51
+ GEM_VERSION = '1.33.0'
51
52
 
52
53
  end
@@ -85,13 +85,28 @@ module Aws::MarketplaceMetering
85
85
  # * `Aws::Credentials` - Used for configuring static, non-refreshing
86
86
  # credentials.
87
87
  #
88
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
89
+ # shared file, such as `~/.aws/config`.
90
+ #
91
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
92
+ #
93
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
94
+ # assume a role after providing credentials via the web.
95
+ #
96
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
97
+ # access token generated from `aws login`.
98
+ #
99
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
100
+ # process that outputs to stdout.
101
+ #
88
102
  # * `Aws::InstanceProfileCredentials` - Used for loading credentials
89
103
  # from an EC2 IMDS on an EC2 instance.
90
104
  #
91
- # * `Aws::SharedCredentials` - Used for loading credentials from a
92
- # shared file, such as `~/.aws/config`.
105
+ # * `Aws::ECSCredentials` - Used for loading credentials from
106
+ # instances running in ECS.
93
107
  #
94
- # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
108
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
109
+ # from the Cognito Identity service.
95
110
  #
96
111
  # When `:credentials` are not configured directly, the following
97
112
  # locations will be searched for credentials:
@@ -101,10 +116,10 @@ module Aws::MarketplaceMetering
101
116
  # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
102
117
  # * `~/.aws/credentials`
103
118
  # * `~/.aws/config`
104
- # * EC2 IMDS instance profile - When used by default, the timeouts are
105
- # very aggressive. Construct and pass an instance of
106
- # `Aws::InstanceProfileCredentails` to enable retries and extended
107
- # timeouts.
119
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
120
+ # are very aggressive. Construct and pass an instance of
121
+ # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
122
+ # enable retries and extended timeouts.
108
123
  #
109
124
  # @option options [required, String] :region
110
125
  # The AWS region to connect to. The configured `:region` is
@@ -334,6 +349,12 @@ module Aws::MarketplaceMetering
334
349
  #
335
350
  # BatchMeterUsage can process up to 25 UsageRecords at a time.
336
351
  #
352
+ # A UsageRecord can optionally include multiple usage allocations, to
353
+ # provide customers with usagedata split into buckets by tags that you
354
+ # define (or allow the customer to define).
355
+ #
356
+ # BatchMeterUsage requests must be less than 1MB in size.
357
+ #
337
358
  # @option params [required, Array<Types::UsageRecord>] :usage_records
338
359
  # The set of UsageRecords to submit. BatchMeterUsage accepts up to 25
339
360
  # UsageRecords at a time.
@@ -357,6 +378,17 @@ module Aws::MarketplaceMetering
357
378
  # customer_identifier: "CustomerIdentifier", # required
358
379
  # dimension: "UsageDimension", # required
359
380
  # quantity: 1,
381
+ # usage_allocations: [
382
+ # {
383
+ # allocated_usage_quantity: 1, # required
384
+ # tags: [
385
+ # {
386
+ # key: "TagKey", # required
387
+ # value: "TagValue", # required
388
+ # },
389
+ # ],
390
+ # },
391
+ # ],
360
392
  # },
361
393
  # ],
362
394
  # product_code: "ProductCode", # required
@@ -369,6 +401,11 @@ module Aws::MarketplaceMetering
369
401
  # resp.results[0].usage_record.customer_identifier #=> String
370
402
  # resp.results[0].usage_record.dimension #=> String
371
403
  # resp.results[0].usage_record.quantity #=> Integer
404
+ # resp.results[0].usage_record.usage_allocations #=> Array
405
+ # resp.results[0].usage_record.usage_allocations[0].allocated_usage_quantity #=> Integer
406
+ # resp.results[0].usage_record.usage_allocations[0].tags #=> Array
407
+ # resp.results[0].usage_record.usage_allocations[0].tags[0].key #=> String
408
+ # resp.results[0].usage_record.usage_allocations[0].tags[0].value #=> String
372
409
  # resp.results[0].metering_record_id #=> String
373
410
  # resp.results[0].status #=> String, one of "Success", "CustomerNotSubscribed", "DuplicateRecord"
374
411
  # resp.unprocessed_records #=> Array
@@ -376,6 +413,11 @@ module Aws::MarketplaceMetering
376
413
  # resp.unprocessed_records[0].customer_identifier #=> String
377
414
  # resp.unprocessed_records[0].dimension #=> String
378
415
  # resp.unprocessed_records[0].quantity #=> Integer
416
+ # resp.unprocessed_records[0].usage_allocations #=> Array
417
+ # resp.unprocessed_records[0].usage_allocations[0].allocated_usage_quantity #=> Integer
418
+ # resp.unprocessed_records[0].usage_allocations[0].tags #=> Array
419
+ # resp.unprocessed_records[0].usage_allocations[0].tags[0].key #=> String
420
+ # resp.unprocessed_records[0].usage_allocations[0].tags[0].value #=> String
379
421
  #
380
422
  # @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/BatchMeterUsage AWS API Documentation
381
423
  #
@@ -392,6 +434,10 @@ module Aws::MarketplaceMetering
392
434
  # MeterUsage is authenticated on the buyer's AWS account using
393
435
  # credentials from the EC2 instance, ECS task, or EKS pod.
394
436
  #
437
+ # MeterUsage can optionally include multiple usage allocations, to
438
+ # provide customers with usage data split into buckets by tags that you
439
+ # define (or allow the customer to define).
440
+ #
395
441
  # @option params [required, String] :product_code
396
442
  # Product code is used to uniquely identify a product in AWS
397
443
  # Marketplace. The product code should be the same as the one used
@@ -415,6 +461,13 @@ module Aws::MarketplaceMetering
415
461
  # returns DryRunOperation; otherwise, it returns UnauthorizedException.
416
462
  # Defaults to `false` if not specified.
417
463
  #
464
+ # @option params [Array<Types::UsageAllocation>] :usage_allocations
465
+ # The set of UsageAllocations to submit.
466
+ #
467
+ # The sum of all UsageAllocation quantities must equal the UsageQuantity
468
+ # of the MeterUsage request, and each UsageAllocation must have a unique
469
+ # set of tags (include no tags).
470
+ #
418
471
  # @return [Types::MeterUsageResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
419
472
  #
420
473
  # * {Types::MeterUsageResult#metering_record_id #metering_record_id} => String
@@ -427,6 +480,17 @@ module Aws::MarketplaceMetering
427
480
  # usage_dimension: "UsageDimension", # required
428
481
  # usage_quantity: 1,
429
482
  # dry_run: false,
483
+ # usage_allocations: [
484
+ # {
485
+ # allocated_usage_quantity: 1, # required
486
+ # tags: [
487
+ # {
488
+ # key: "TagKey", # required
489
+ # value: "TagValue", # required
490
+ # },
491
+ # ],
492
+ # },
493
+ # ],
430
494
  # })
431
495
  #
432
496
  # @example Response structure
@@ -568,7 +632,7 @@ module Aws::MarketplaceMetering
568
632
  params: params,
569
633
  config: config)
570
634
  context[:gem_name] = 'aws-sdk-marketplacemetering'
571
- context[:gem_version] = '1.28.0'
635
+ context[:gem_version] = '1.33.0'
572
636
  Seahorse::Client::Request.new(handlers, context)
573
637
  end
574
638
 
@@ -13,6 +13,7 @@ module Aws::MarketplaceMetering
13
13
 
14
14
  include Seahorse::Model
15
15
 
16
+ AllocatedUsageQuantity = Shapes::IntegerShape.new(name: 'AllocatedUsageQuantity')
16
17
  BatchMeterUsageRequest = Shapes::StructureShape.new(name: 'BatchMeterUsageRequest')
17
18
  BatchMeterUsageResult = Shapes::StructureShape.new(name: 'BatchMeterUsageResult')
18
19
  Boolean = Shapes::BooleanShape.new(name: 'Boolean')
@@ -27,7 +28,9 @@ module Aws::MarketplaceMetering
27
28
  InvalidProductCodeException = Shapes::StructureShape.new(name: 'InvalidProductCodeException')
28
29
  InvalidPublicKeyVersionException = Shapes::StructureShape.new(name: 'InvalidPublicKeyVersionException')
29
30
  InvalidRegionException = Shapes::StructureShape.new(name: 'InvalidRegionException')
31
+ InvalidTagException = Shapes::StructureShape.new(name: 'InvalidTagException')
30
32
  InvalidTokenException = Shapes::StructureShape.new(name: 'InvalidTokenException')
33
+ InvalidUsageAllocationsException = Shapes::StructureShape.new(name: 'InvalidUsageAllocationsException')
31
34
  InvalidUsageDimensionException = Shapes::StructureShape.new(name: 'InvalidUsageDimensionException')
32
35
  MeterUsageRequest = Shapes::StructureShape.new(name: 'MeterUsageRequest')
33
36
  MeterUsageResult = Shapes::StructureShape.new(name: 'MeterUsageResult')
@@ -40,9 +43,15 @@ module Aws::MarketplaceMetering
40
43
  ResolveCustomerRequest = Shapes::StructureShape.new(name: 'ResolveCustomerRequest')
41
44
  ResolveCustomerResult = Shapes::StructureShape.new(name: 'ResolveCustomerResult')
42
45
  String = Shapes::StringShape.new(name: 'String')
46
+ Tag = Shapes::StructureShape.new(name: 'Tag')
47
+ TagKey = Shapes::StringShape.new(name: 'TagKey')
48
+ TagList = Shapes::ListShape.new(name: 'TagList')
49
+ TagValue = Shapes::StringShape.new(name: 'TagValue')
43
50
  ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
44
51
  Timestamp = Shapes::TimestampShape.new(name: 'Timestamp')
45
52
  TimestampOutOfBoundsException = Shapes::StructureShape.new(name: 'TimestampOutOfBoundsException')
53
+ UsageAllocation = Shapes::StructureShape.new(name: 'UsageAllocation')
54
+ UsageAllocations = Shapes::ListShape.new(name: 'UsageAllocations')
46
55
  UsageDimension = Shapes::StringShape.new(name: 'UsageDimension')
47
56
  UsageQuantity = Shapes::IntegerShape.new(name: 'UsageQuantity')
48
57
  UsageRecord = Shapes::StructureShape.new(name: 'UsageRecord')
@@ -91,9 +100,15 @@ module Aws::MarketplaceMetering
91
100
  InvalidRegionException.add_member(:message, Shapes::ShapeRef.new(shape: errorMessage, location_name: "message"))
92
101
  InvalidRegionException.struct_class = Types::InvalidRegionException
93
102
 
103
+ InvalidTagException.add_member(:message, Shapes::ShapeRef.new(shape: errorMessage, location_name: "message"))
104
+ InvalidTagException.struct_class = Types::InvalidTagException
105
+
94
106
  InvalidTokenException.add_member(:message, Shapes::ShapeRef.new(shape: errorMessage, location_name: "message"))
95
107
  InvalidTokenException.struct_class = Types::InvalidTokenException
96
108
 
109
+ InvalidUsageAllocationsException.add_member(:message, Shapes::ShapeRef.new(shape: errorMessage, location_name: "message"))
110
+ InvalidUsageAllocationsException.struct_class = Types::InvalidUsageAllocationsException
111
+
97
112
  InvalidUsageDimensionException.add_member(:message, Shapes::ShapeRef.new(shape: errorMessage, location_name: "message"))
98
113
  InvalidUsageDimensionException.struct_class = Types::InvalidUsageDimensionException
99
114
 
@@ -102,6 +117,7 @@ module Aws::MarketplaceMetering
102
117
  MeterUsageRequest.add_member(:usage_dimension, Shapes::ShapeRef.new(shape: UsageDimension, required: true, location_name: "UsageDimension"))
103
118
  MeterUsageRequest.add_member(:usage_quantity, Shapes::ShapeRef.new(shape: UsageQuantity, location_name: "UsageQuantity"))
104
119
  MeterUsageRequest.add_member(:dry_run, Shapes::ShapeRef.new(shape: Boolean, location_name: "DryRun"))
120
+ MeterUsageRequest.add_member(:usage_allocations, Shapes::ShapeRef.new(shape: UsageAllocations, location_name: "UsageAllocations"))
105
121
  MeterUsageRequest.struct_class = Types::MeterUsageRequest
106
122
 
107
123
  MeterUsageResult.add_member(:metering_record_id, Shapes::ShapeRef.new(shape: String, location_name: "MeteringRecordId"))
@@ -126,16 +142,29 @@ module Aws::MarketplaceMetering
126
142
  ResolveCustomerResult.add_member(:product_code, Shapes::ShapeRef.new(shape: ProductCode, location_name: "ProductCode"))
127
143
  ResolveCustomerResult.struct_class = Types::ResolveCustomerResult
128
144
 
145
+ Tag.add_member(:key, Shapes::ShapeRef.new(shape: TagKey, required: true, location_name: "Key"))
146
+ Tag.add_member(:value, Shapes::ShapeRef.new(shape: TagValue, required: true, location_name: "Value"))
147
+ Tag.struct_class = Types::Tag
148
+
149
+ TagList.member = Shapes::ShapeRef.new(shape: Tag)
150
+
129
151
  ThrottlingException.add_member(:message, Shapes::ShapeRef.new(shape: errorMessage, location_name: "message"))
130
152
  ThrottlingException.struct_class = Types::ThrottlingException
131
153
 
132
154
  TimestampOutOfBoundsException.add_member(:message, Shapes::ShapeRef.new(shape: errorMessage, location_name: "message"))
133
155
  TimestampOutOfBoundsException.struct_class = Types::TimestampOutOfBoundsException
134
156
 
157
+ UsageAllocation.add_member(:allocated_usage_quantity, Shapes::ShapeRef.new(shape: AllocatedUsageQuantity, required: true, location_name: "AllocatedUsageQuantity"))
158
+ UsageAllocation.add_member(:tags, Shapes::ShapeRef.new(shape: TagList, location_name: "Tags"))
159
+ UsageAllocation.struct_class = Types::UsageAllocation
160
+
161
+ UsageAllocations.member = Shapes::ShapeRef.new(shape: UsageAllocation)
162
+
135
163
  UsageRecord.add_member(:timestamp, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "Timestamp"))
136
164
  UsageRecord.add_member(:customer_identifier, Shapes::ShapeRef.new(shape: CustomerIdentifier, required: true, location_name: "CustomerIdentifier"))
137
165
  UsageRecord.add_member(:dimension, Shapes::ShapeRef.new(shape: UsageDimension, required: true, location_name: "Dimension"))
138
166
  UsageRecord.add_member(:quantity, Shapes::ShapeRef.new(shape: UsageQuantity, location_name: "Quantity"))
167
+ UsageRecord.add_member(:usage_allocations, Shapes::ShapeRef.new(shape: UsageAllocations, location_name: "UsageAllocations"))
139
168
  UsageRecord.struct_class = Types::UsageRecord
140
169
 
141
170
  UsageRecordList.member = Shapes::ShapeRef.new(shape: UsageRecord)
@@ -175,6 +204,8 @@ module Aws::MarketplaceMetering
175
204
  o.errors << Shapes::ShapeRef.new(shape: InternalServiceErrorException)
176
205
  o.errors << Shapes::ShapeRef.new(shape: InvalidProductCodeException)
177
206
  o.errors << Shapes::ShapeRef.new(shape: InvalidUsageDimensionException)
207
+ o.errors << Shapes::ShapeRef.new(shape: InvalidTagException)
208
+ o.errors << Shapes::ShapeRef.new(shape: InvalidUsageAllocationsException)
178
209
  o.errors << Shapes::ShapeRef.new(shape: InvalidCustomerIdentifierException)
179
210
  o.errors << Shapes::ShapeRef.new(shape: TimestampOutOfBoundsException)
180
211
  o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
@@ -190,6 +221,8 @@ module Aws::MarketplaceMetering
190
221
  o.errors << Shapes::ShapeRef.new(shape: InternalServiceErrorException)
191
222
  o.errors << Shapes::ShapeRef.new(shape: InvalidProductCodeException)
192
223
  o.errors << Shapes::ShapeRef.new(shape: InvalidUsageDimensionException)
224
+ o.errors << Shapes::ShapeRef.new(shape: InvalidTagException)
225
+ o.errors << Shapes::ShapeRef.new(shape: InvalidUsageAllocationsException)
193
226
  o.errors << Shapes::ShapeRef.new(shape: InvalidEndpointRegionException)
194
227
  o.errors << Shapes::ShapeRef.new(shape: TimestampOutOfBoundsException)
195
228
  o.errors << Shapes::ShapeRef.new(shape: DuplicateRequestException)
@@ -37,7 +37,9 @@ module Aws::MarketplaceMetering
37
37
  # * {InvalidProductCodeException}
38
38
  # * {InvalidPublicKeyVersionException}
39
39
  # * {InvalidRegionException}
40
+ # * {InvalidTagException}
40
41
  # * {InvalidTokenException}
42
+ # * {InvalidUsageAllocationsException}
41
43
  # * {InvalidUsageDimensionException}
42
44
  # * {PlatformNotSupportedException}
43
45
  # * {ThrottlingException}
@@ -199,6 +201,21 @@ module Aws::MarketplaceMetering
199
201
  end
200
202
  end
201
203
 
204
+ class InvalidTagException < ServiceError
205
+
206
+ # @param [Seahorse::Client::RequestContext] context
207
+ # @param [String] message
208
+ # @param [Aws::MarketplaceMetering::Types::InvalidTagException] data
209
+ def initialize(context, message, data = Aws::EmptyStructure.new)
210
+ super(context, message, data)
211
+ end
212
+
213
+ # @return [String]
214
+ def message
215
+ @message || @data[:message]
216
+ end
217
+ end
218
+
202
219
  class InvalidTokenException < ServiceError
203
220
 
204
221
  # @param [Seahorse::Client::RequestContext] context
@@ -214,6 +231,21 @@ module Aws::MarketplaceMetering
214
231
  end
215
232
  end
216
233
 
234
+ class InvalidUsageAllocationsException < ServiceError
235
+
236
+ # @param [Seahorse::Client::RequestContext] context
237
+ # @param [String] message
238
+ # @param [Aws::MarketplaceMetering::Types::InvalidUsageAllocationsException] data
239
+ def initialize(context, message, data = Aws::EmptyStructure.new)
240
+ super(context, message, data)
241
+ end
242
+
243
+ # @return [String]
244
+ def message
245
+ @message || @data[:message]
246
+ end
247
+ end
248
+
217
249
  class InvalidUsageDimensionException < ServiceError
218
250
 
219
251
  # @param [Seahorse::Client::RequestContext] context
@@ -23,6 +23,17 @@ module Aws::MarketplaceMetering
23
23
  # customer_identifier: "CustomerIdentifier", # required
24
24
  # dimension: "UsageDimension", # required
25
25
  # quantity: 1,
26
+ # usage_allocations: [
27
+ # {
28
+ # allocated_usage_quantity: 1, # required
29
+ # tags: [
30
+ # {
31
+ # key: "TagKey", # required
32
+ # value: "TagValue", # required
33
+ # },
34
+ # ],
35
+ # },
36
+ # ],
26
37
  # },
27
38
  # ],
28
39
  # product_code: "ProductCode", # required
@@ -217,6 +228,19 @@ module Aws::MarketplaceMetering
217
228
  include Aws::Structure
218
229
  end
219
230
 
231
+ # The tag is invalid, or the number of tags is greater than 5.
232
+ #
233
+ # @!attribute [rw] message
234
+ # @return [String]
235
+ #
236
+ # @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/InvalidTagException AWS API Documentation
237
+ #
238
+ class InvalidTagException < Struct.new(
239
+ :message)
240
+ SENSITIVE = []
241
+ include Aws::Structure
242
+ end
243
+
220
244
  # Registration token is invalid.
221
245
  #
222
246
  # @!attribute [rw] message
@@ -230,6 +254,20 @@ module Aws::MarketplaceMetering
230
254
  include Aws::Structure
231
255
  end
232
256
 
257
+ # The usage allocation objects are invalid, or the number of allocations
258
+ # is greater than 500 for a single usage record.
259
+ #
260
+ # @!attribute [rw] message
261
+ # @return [String]
262
+ #
263
+ # @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/InvalidUsageAllocationsException AWS API Documentation
264
+ #
265
+ class InvalidUsageAllocationsException < Struct.new(
266
+ :message)
267
+ SENSITIVE = []
268
+ include Aws::Structure
269
+ end
270
+
233
271
  # The usage dimension does not match one of the UsageDimensions
234
272
  # associated with products.
235
273
  #
@@ -253,6 +291,17 @@ module Aws::MarketplaceMetering
253
291
  # usage_dimension: "UsageDimension", # required
254
292
  # usage_quantity: 1,
255
293
  # dry_run: false,
294
+ # usage_allocations: [
295
+ # {
296
+ # allocated_usage_quantity: 1, # required
297
+ # tags: [
298
+ # {
299
+ # key: "TagKey", # required
300
+ # value: "TagValue", # required
301
+ # },
302
+ # ],
303
+ # },
304
+ # ],
256
305
  # }
257
306
  #
258
307
  # @!attribute [rw] product_code
@@ -284,6 +333,14 @@ module Aws::MarketplaceMetering
284
333
  # UnauthorizedException. Defaults to `false` if not specified.
285
334
  # @return [Boolean]
286
335
  #
336
+ # @!attribute [rw] usage_allocations
337
+ # The set of UsageAllocations to submit.
338
+ #
339
+ # The sum of all UsageAllocation quantities must equal the
340
+ # UsageQuantity of the MeterUsage request, and each UsageAllocation
341
+ # must have a unique set of tags (include no tags).
342
+ # @return [Array<Types::UsageAllocation>]
343
+ #
287
344
  # @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/MeterUsageRequest AWS API Documentation
288
345
  #
289
346
  class MeterUsageRequest < Struct.new(
@@ -291,7 +348,8 @@ module Aws::MarketplaceMetering
291
348
  :timestamp,
292
349
  :usage_dimension,
293
350
  :usage_quantity,
294
- :dry_run)
351
+ :dry_run,
352
+ :usage_allocations)
295
353
  SENSITIVE = []
296
354
  include Aws::Structure
297
355
  end
@@ -422,6 +480,37 @@ module Aws::MarketplaceMetering
422
480
  include Aws::Structure
423
481
  end
424
482
 
483
+ # Metadata assigned to an allocation. Each tag is made up of a key and a
484
+ # value.
485
+ #
486
+ # @note When making an API call, you may pass Tag
487
+ # data as a hash:
488
+ #
489
+ # {
490
+ # key: "TagKey", # required
491
+ # value: "TagValue", # required
492
+ # }
493
+ #
494
+ # @!attribute [rw] key
495
+ # One part of a key-value pair that makes up a tag. A key is a label
496
+ # that acts like a category for the specific tag values.
497
+ # @return [String]
498
+ #
499
+ # @!attribute [rw] value
500
+ # One part of a key-value pair that makes up a tag. A value acts as a
501
+ # descriptor within a tag category (key). The value can be empty or
502
+ # null.
503
+ # @return [String]
504
+ #
505
+ # @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/Tag AWS API Documentation
506
+ #
507
+ class Tag < Struct.new(
508
+ :key,
509
+ :value)
510
+ SENSITIVE = []
511
+ include Aws::Structure
512
+ end
513
+
425
514
  # The calls to the API are throttled.
426
515
  #
427
516
  # @!attribute [rw] message
@@ -449,6 +538,42 @@ module Aws::MarketplaceMetering
449
538
  include Aws::Structure
450
539
  end
451
540
 
541
+ # Usage allocations allow you to split usage into buckets by tags.
542
+ #
543
+ # Each UsageAllocation indicates the usage quantity for a specific set
544
+ # of tags.
545
+ #
546
+ # @note When making an API call, you may pass UsageAllocation
547
+ # data as a hash:
548
+ #
549
+ # {
550
+ # allocated_usage_quantity: 1, # required
551
+ # tags: [
552
+ # {
553
+ # key: "TagKey", # required
554
+ # value: "TagValue", # required
555
+ # },
556
+ # ],
557
+ # }
558
+ #
559
+ # @!attribute [rw] allocated_usage_quantity
560
+ # The total quantity allocated to this bucket of usage.
561
+ # @return [Integer]
562
+ #
563
+ # @!attribute [rw] tags
564
+ # The set of tags that define the bucket of usage. For the bucket of
565
+ # items with no tags, this parameter can be left out.
566
+ # @return [Array<Types::Tag>]
567
+ #
568
+ # @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/UsageAllocation AWS API Documentation
569
+ #
570
+ class UsageAllocation < Struct.new(
571
+ :allocated_usage_quantity,
572
+ :tags)
573
+ SENSITIVE = []
574
+ include Aws::Structure
575
+ end
576
+
452
577
  # A UsageRecord indicates a quantity of usage for a given product,
453
578
  # customer, dimension and time.
454
579
  #
@@ -463,6 +588,17 @@ module Aws::MarketplaceMetering
463
588
  # customer_identifier: "CustomerIdentifier", # required
464
589
  # dimension: "UsageDimension", # required
465
590
  # quantity: 1,
591
+ # usage_allocations: [
592
+ # {
593
+ # allocated_usage_quantity: 1, # required
594
+ # tags: [
595
+ # {
596
+ # key: "TagKey", # required
597
+ # value: "TagValue", # required
598
+ # },
599
+ # ],
600
+ # },
601
+ # ],
466
602
  # }
467
603
  #
468
604
  # @!attribute [rw] timestamp
@@ -489,13 +625,20 @@ module Aws::MarketplaceMetering
489
625
  # dimension and time. Defaults to `0` if not specified.
490
626
  # @return [Integer]
491
627
  #
628
+ # @!attribute [rw] usage_allocations
629
+ # The set of UsageAllocations to submit. The sum of all
630
+ # UsageAllocation quantities must equal the Quantity of the
631
+ # UsageRecord.
632
+ # @return [Array<Types::UsageAllocation>]
633
+ #
492
634
  # @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/UsageRecord AWS API Documentation
493
635
  #
494
636
  class UsageRecord < Struct.new(
495
637
  :timestamp,
496
638
  :customer_identifier,
497
639
  :dimension,
498
- :quantity)
640
+ :quantity,
641
+ :usage_allocations)
499
642
  SENSITIVE = []
500
643
  include Aws::Structure
501
644
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-marketplacemetering
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.28.0
4
+ version: 1.33.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-23 00:00:00.000000000 Z
11
+ date: 2021-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.99.0
22
+ version: 3.112.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.99.0
32
+ version: 3.112.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement