aws-sdk-marketplacemetering 1.6.0 → 1.7.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b3a0492ba176ab7f68947ff8ca764d37ae6d645
|
4
|
+
data.tar.gz: ecc3783ee5d5ee7b3591d386ac2ef2c562bf02e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fac547094b0fd42d37c13ad2c0030d3f388142ca96c3b461589f6c511b1aedd9cc7f196c3491ba113fbcc28dde5a788f9f49ccbef94345337b0b4a1dd3ab35b
|
7
|
+
data.tar.gz: dedab45d824cb5fe4a4f0fe129060bf546cae5e23588f3728e79d67418779af5cba3e7bd3057cc2abc634fc77457a8802734670a0f2f1022ef5991043399f670
|
@@ -333,6 +333,81 @@ module Aws::MarketplaceMetering
|
|
333
333
|
req.send_request(options)
|
334
334
|
end
|
335
335
|
|
336
|
+
# Paid container software products sold through AWS Marketplace must
|
337
|
+
# integrate with the AWS Marketplace Metering Service and call the
|
338
|
+
# RegisterUsage operation for software entitlement and metering. Calling
|
339
|
+
# RegisterUsage from containers running outside of ECS is not currently
|
340
|
+
# supported. Free and BYOL products for ECS aren't required to call
|
341
|
+
# RegisterUsage, but you may choose to do so if you would like to
|
342
|
+
# receive usage data in your seller reports. The sections below explain
|
343
|
+
# the behavior of RegisterUsage. RegisterUsage performs two primary
|
344
|
+
# functions: metering and entitlement.
|
345
|
+
#
|
346
|
+
# * *Entitlement*\: RegisterUsage allows you to verify that the customer
|
347
|
+
# running your paid software is subscribed to your product on AWS
|
348
|
+
# Marketplace, enabling you to guard against unauthorized use. Your
|
349
|
+
# container image that integrates with RegisterUsage is only required
|
350
|
+
# to guard against unauthorized use at container startup, as such a
|
351
|
+
# CustomerNotSubscribedException/PlatformNotSupportedException will
|
352
|
+
# only be thrown on the initial call to RegisterUsage. Subsequent
|
353
|
+
# calls from the same Amazon ECS task instance (e.g. task-id) will not
|
354
|
+
# throw a CustomerNotSubscribedException, even if the customer
|
355
|
+
# unsubscribes while the Amazon ECS task is still running.
|
356
|
+
#
|
357
|
+
# * *Metering*\: RegisterUsage meters software use per ECS task, per
|
358
|
+
# hour, with usage prorated to the second. A minimum of 1 minute of
|
359
|
+
# usage applies to tasks that are short lived. For example, if a
|
360
|
+
# customer has a 10 node ECS cluster and creates an ECS service
|
361
|
+
# configured as a Daemon Set, then ECS will launch a task on all 10
|
362
|
+
# cluster nodes and the customer will be charged: (10 *
|
363
|
+
# hourly\_rate). Metering for software use is automatically handled by
|
364
|
+
# the AWS Marketplace Metering Control Plane -- your software is not
|
365
|
+
# required to perform any metering specific actions, other than call
|
366
|
+
# RegisterUsage once for metering of software use to commence. The AWS
|
367
|
+
# Marketplace Metering Control Plane will also continue to bill
|
368
|
+
# customers for running ECS tasks, regardless of the customers
|
369
|
+
# subscription state, removing the need for your software to perform
|
370
|
+
# entitlement checks at runtime.
|
371
|
+
#
|
372
|
+
# @option params [required, String] :product_code
|
373
|
+
# Product code is used to uniquely identify a product in AWS
|
374
|
+
# Marketplace. The product code should be the same as the one used
|
375
|
+
# during the publishing of a new product.
|
376
|
+
#
|
377
|
+
# @option params [required, Integer] :public_key_version
|
378
|
+
# Public Key Version provided by AWS Marketplace
|
379
|
+
#
|
380
|
+
# @option params [String] :nonce
|
381
|
+
# (Optional) To scope down the registration to a specific running
|
382
|
+
# software instance and guard against replay attacks.
|
383
|
+
#
|
384
|
+
# @return [Types::RegisterUsageResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
385
|
+
#
|
386
|
+
# * {Types::RegisterUsageResult#public_key_rotation_timestamp #public_key_rotation_timestamp} => Time
|
387
|
+
# * {Types::RegisterUsageResult#signature #signature} => String
|
388
|
+
#
|
389
|
+
# @example Request syntax with placeholder values
|
390
|
+
#
|
391
|
+
# resp = client.register_usage({
|
392
|
+
# product_code: "ProductCode", # required
|
393
|
+
# public_key_version: 1, # required
|
394
|
+
# nonce: "Nonce",
|
395
|
+
# })
|
396
|
+
#
|
397
|
+
# @example Response structure
|
398
|
+
#
|
399
|
+
# resp.public_key_rotation_timestamp #=> Time
|
400
|
+
# resp.signature #=> String
|
401
|
+
#
|
402
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/RegisterUsage AWS API Documentation
|
403
|
+
#
|
404
|
+
# @overload register_usage(params = {})
|
405
|
+
# @param [Hash] params ({})
|
406
|
+
def register_usage(params = {}, options = {})
|
407
|
+
req = build_request(:register_usage, params)
|
408
|
+
req.send_request(options)
|
409
|
+
end
|
410
|
+
|
336
411
|
# ResolveCustomer is called by a SaaS application during the
|
337
412
|
# registration process. When a buyer visits your website during the
|
338
413
|
# registration process, the buyer submits a registration token through
|
@@ -383,7 +458,7 @@ module Aws::MarketplaceMetering
|
|
383
458
|
params: params,
|
384
459
|
config: config)
|
385
460
|
context[:gem_name] = 'aws-sdk-marketplacemetering'
|
386
|
-
context[:gem_version] = '1.
|
461
|
+
context[:gem_version] = '1.7.0'
|
387
462
|
Seahorse::Client::Request.new(handlers, context)
|
388
463
|
end
|
389
464
|
|
@@ -15,18 +15,26 @@ module Aws::MarketplaceMetering
|
|
15
15
|
BatchMeterUsageResult = Shapes::StructureShape.new(name: 'BatchMeterUsageResult')
|
16
16
|
Boolean = Shapes::BooleanShape.new(name: 'Boolean')
|
17
17
|
CustomerIdentifier = Shapes::StringShape.new(name: 'CustomerIdentifier')
|
18
|
+
CustomerNotEntitledException = Shapes::StructureShape.new(name: 'CustomerNotEntitledException')
|
19
|
+
DisabledApiException = Shapes::StructureShape.new(name: 'DisabledApiException')
|
18
20
|
DuplicateRequestException = Shapes::StructureShape.new(name: 'DuplicateRequestException')
|
19
21
|
ExpiredTokenException = Shapes::StructureShape.new(name: 'ExpiredTokenException')
|
20
22
|
InternalServiceErrorException = Shapes::StructureShape.new(name: 'InternalServiceErrorException')
|
21
23
|
InvalidCustomerIdentifierException = Shapes::StructureShape.new(name: 'InvalidCustomerIdentifierException')
|
22
24
|
InvalidEndpointRegionException = Shapes::StructureShape.new(name: 'InvalidEndpointRegionException')
|
23
25
|
InvalidProductCodeException = Shapes::StructureShape.new(name: 'InvalidProductCodeException')
|
26
|
+
InvalidPublicKeyVersionException = Shapes::StructureShape.new(name: 'InvalidPublicKeyVersionException')
|
27
|
+
InvalidRegionException = Shapes::StructureShape.new(name: 'InvalidRegionException')
|
24
28
|
InvalidTokenException = Shapes::StructureShape.new(name: 'InvalidTokenException')
|
25
29
|
InvalidUsageDimensionException = Shapes::StructureShape.new(name: 'InvalidUsageDimensionException')
|
26
30
|
MeterUsageRequest = Shapes::StructureShape.new(name: 'MeterUsageRequest')
|
27
31
|
MeterUsageResult = Shapes::StructureShape.new(name: 'MeterUsageResult')
|
28
32
|
NonEmptyString = Shapes::StringShape.new(name: 'NonEmptyString')
|
33
|
+
Nonce = Shapes::StringShape.new(name: 'Nonce')
|
34
|
+
PlatformNotSupportedException = Shapes::StructureShape.new(name: 'PlatformNotSupportedException')
|
29
35
|
ProductCode = Shapes::StringShape.new(name: 'ProductCode')
|
36
|
+
RegisterUsageRequest = Shapes::StructureShape.new(name: 'RegisterUsageRequest')
|
37
|
+
RegisterUsageResult = Shapes::StructureShape.new(name: 'RegisterUsageResult')
|
30
38
|
ResolveCustomerRequest = Shapes::StructureShape.new(name: 'ResolveCustomerRequest')
|
31
39
|
ResolveCustomerResult = Shapes::StructureShape.new(name: 'ResolveCustomerResult')
|
32
40
|
String = Shapes::StringShape.new(name: 'String')
|
@@ -40,6 +48,7 @@ module Aws::MarketplaceMetering
|
|
40
48
|
UsageRecordResult = Shapes::StructureShape.new(name: 'UsageRecordResult')
|
41
49
|
UsageRecordResultList = Shapes::ListShape.new(name: 'UsageRecordResultList')
|
42
50
|
UsageRecordResultStatus = Shapes::StringShape.new(name: 'UsageRecordResultStatus')
|
51
|
+
VersionInteger = Shapes::IntegerShape.new(name: 'VersionInteger')
|
43
52
|
errorMessage = Shapes::StringShape.new(name: 'errorMessage')
|
44
53
|
|
45
54
|
BatchMeterUsageRequest.add_member(:usage_records, Shapes::ShapeRef.new(shape: UsageRecordList, required: true, location_name: "UsageRecords"))
|
@@ -60,6 +69,15 @@ module Aws::MarketplaceMetering
|
|
60
69
|
MeterUsageResult.add_member(:metering_record_id, Shapes::ShapeRef.new(shape: String, location_name: "MeteringRecordId"))
|
61
70
|
MeterUsageResult.struct_class = Types::MeterUsageResult
|
62
71
|
|
72
|
+
RegisterUsageRequest.add_member(:product_code, Shapes::ShapeRef.new(shape: ProductCode, required: true, location_name: "ProductCode"))
|
73
|
+
RegisterUsageRequest.add_member(:public_key_version, Shapes::ShapeRef.new(shape: VersionInteger, required: true, location_name: "PublicKeyVersion"))
|
74
|
+
RegisterUsageRequest.add_member(:nonce, Shapes::ShapeRef.new(shape: Nonce, location_name: "Nonce"))
|
75
|
+
RegisterUsageRequest.struct_class = Types::RegisterUsageRequest
|
76
|
+
|
77
|
+
RegisterUsageResult.add_member(:public_key_rotation_timestamp, Shapes::ShapeRef.new(shape: Timestamp, location_name: "PublicKeyRotationTimestamp"))
|
78
|
+
RegisterUsageResult.add_member(:signature, Shapes::ShapeRef.new(shape: NonEmptyString, location_name: "Signature"))
|
79
|
+
RegisterUsageResult.struct_class = Types::RegisterUsageResult
|
80
|
+
|
63
81
|
ResolveCustomerRequest.add_member(:registration_token, Shapes::ShapeRef.new(shape: NonEmptyString, required: true, location_name: "RegistrationToken"))
|
64
82
|
ResolveCustomerRequest.struct_class = Types::ResolveCustomerRequest
|
65
83
|
|
@@ -94,6 +112,7 @@ module Aws::MarketplaceMetering
|
|
94
112
|
"jsonVersion" => "1.1",
|
95
113
|
"protocol" => "json",
|
96
114
|
"serviceFullName" => "AWSMarketplace Metering",
|
115
|
+
"serviceId" => "Marketplace Metering",
|
97
116
|
"signatureVersion" => "v4",
|
98
117
|
"signingName" => "aws-marketplace",
|
99
118
|
"targetPrefix" => "AWSMPMeteringService",
|
@@ -112,6 +131,7 @@ module Aws::MarketplaceMetering
|
|
112
131
|
o.errors << Shapes::ShapeRef.new(shape: InvalidCustomerIdentifierException)
|
113
132
|
o.errors << Shapes::ShapeRef.new(shape: TimestampOutOfBoundsException)
|
114
133
|
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
134
|
+
o.errors << Shapes::ShapeRef.new(shape: DisabledApiException)
|
115
135
|
end)
|
116
136
|
|
117
137
|
api.add_operation(:meter_usage, Seahorse::Model::Operation.new.tap do |o|
|
@@ -129,6 +149,22 @@ module Aws::MarketplaceMetering
|
|
129
149
|
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
130
150
|
end)
|
131
151
|
|
152
|
+
api.add_operation(:register_usage, Seahorse::Model::Operation.new.tap do |o|
|
153
|
+
o.name = "RegisterUsage"
|
154
|
+
o.http_method = "POST"
|
155
|
+
o.http_request_uri = "/"
|
156
|
+
o.input = Shapes::ShapeRef.new(shape: RegisterUsageRequest)
|
157
|
+
o.output = Shapes::ShapeRef.new(shape: RegisterUsageResult)
|
158
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidProductCodeException)
|
159
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRegionException)
|
160
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidPublicKeyVersionException)
|
161
|
+
o.errors << Shapes::ShapeRef.new(shape: PlatformNotSupportedException)
|
162
|
+
o.errors << Shapes::ShapeRef.new(shape: CustomerNotEntitledException)
|
163
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
164
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServiceErrorException)
|
165
|
+
o.errors << Shapes::ShapeRef.new(shape: DisabledApiException)
|
166
|
+
end)
|
167
|
+
|
132
168
|
api.add_operation(:resolve_customer, Seahorse::Model::Operation.new.tap do |o|
|
133
169
|
o.name = "ResolveCustomer"
|
134
170
|
o.http_method = "POST"
|
@@ -139,6 +175,7 @@ module Aws::MarketplaceMetering
|
|
139
175
|
o.errors << Shapes::ShapeRef.new(shape: ExpiredTokenException)
|
140
176
|
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
141
177
|
o.errors << Shapes::ShapeRef.new(shape: InternalServiceErrorException)
|
178
|
+
o.errors << Shapes::ShapeRef.new(shape: DisabledApiException)
|
142
179
|
end)
|
143
180
|
end
|
144
181
|
|
@@ -119,6 +119,7 @@ module Aws::MarketplaceMetering
|
|
119
119
|
end
|
120
120
|
|
121
121
|
# @!attribute [rw] metering_record_id
|
122
|
+
# Metering record id.
|
122
123
|
# @return [String]
|
123
124
|
#
|
124
125
|
# @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/MeterUsageResult AWS API Documentation
|
@@ -128,6 +129,55 @@ module Aws::MarketplaceMetering
|
|
128
129
|
include Aws::Structure
|
129
130
|
end
|
130
131
|
|
132
|
+
# @note When making an API call, you may pass RegisterUsageRequest
|
133
|
+
# data as a hash:
|
134
|
+
#
|
135
|
+
# {
|
136
|
+
# product_code: "ProductCode", # required
|
137
|
+
# public_key_version: 1, # required
|
138
|
+
# nonce: "Nonce",
|
139
|
+
# }
|
140
|
+
#
|
141
|
+
# @!attribute [rw] product_code
|
142
|
+
# Product code is used to uniquely identify a product in AWS
|
143
|
+
# Marketplace. The product code should be the same as the one used
|
144
|
+
# during the publishing of a new product.
|
145
|
+
# @return [String]
|
146
|
+
#
|
147
|
+
# @!attribute [rw] public_key_version
|
148
|
+
# Public Key Version provided by AWS Marketplace
|
149
|
+
# @return [Integer]
|
150
|
+
#
|
151
|
+
# @!attribute [rw] nonce
|
152
|
+
# (Optional) To scope down the registration to a specific running
|
153
|
+
# software instance and guard against replay attacks.
|
154
|
+
# @return [String]
|
155
|
+
#
|
156
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/RegisterUsageRequest AWS API Documentation
|
157
|
+
#
|
158
|
+
class RegisterUsageRequest < Struct.new(
|
159
|
+
:product_code,
|
160
|
+
:public_key_version,
|
161
|
+
:nonce)
|
162
|
+
include Aws::Structure
|
163
|
+
end
|
164
|
+
|
165
|
+
# @!attribute [rw] public_key_rotation_timestamp
|
166
|
+
# (Optional) Only included when public key version has expired
|
167
|
+
# @return [Time]
|
168
|
+
#
|
169
|
+
# @!attribute [rw] signature
|
170
|
+
# JWT Token
|
171
|
+
# @return [String]
|
172
|
+
#
|
173
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/RegisterUsageResult AWS API Documentation
|
174
|
+
#
|
175
|
+
class RegisterUsageResult < Struct.new(
|
176
|
+
:public_key_rotation_timestamp,
|
177
|
+
:signature)
|
178
|
+
include Aws::Structure
|
179
|
+
end
|
180
|
+
|
131
181
|
# Contains input to the ResolveCustomer operation.
|
132
182
|
#
|
133
183
|
# @note When making an API call, you may pass ResolveCustomerRequest
|
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.
|
4
|
+
version: 1.7.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: 2018-11-
|
11
|
+
date: 2018-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|