aws-sdk-marketplacemetering 1.0.0.rc1 → 1.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-marketplacemetering.rb +2 -2
- data/lib/aws-sdk-marketplacemetering/client.rb +305 -264
- data/lib/aws-sdk-marketplacemetering/client_api.rb +134 -136
- data/lib/aws-sdk-marketplacemetering/errors.rb +4 -13
- data/lib/aws-sdk-marketplacemetering/resource.rb +12 -14
- data/lib/aws-sdk-marketplacemetering/types.rb +247 -215
- metadata +2 -2
@@ -1,146 +1,144 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
# @api private
|
88
|
-
API = Seahorse::Model::Api.new.tap do |api|
|
89
|
-
|
90
|
-
api.version = "2016-01-14"
|
91
|
-
|
92
|
-
api.metadata = {
|
93
|
-
"endpointPrefix" => "metering.marketplace",
|
94
|
-
"jsonVersion" => "1.1",
|
95
|
-
"protocol" => "json",
|
96
|
-
"serviceFullName" => "AWSMarketplace Metering",
|
97
|
-
"signatureVersion" => "v4",
|
98
|
-
"signingName" => "aws-marketplace",
|
99
|
-
"targetPrefix" => "AWSMPMeteringService",
|
100
|
-
}
|
101
|
-
|
102
|
-
api.add_operation(:batch_meter_usage, Seahorse::Model::Operation.new.tap do |o|
|
103
|
-
o.name = "BatchMeterUsage"
|
104
|
-
o.http_method = "POST"
|
105
|
-
o.http_request_uri = "/"
|
106
|
-
o.input = Shapes::ShapeRef.new(shape: BatchMeterUsageRequest)
|
107
|
-
o.output = Shapes::ShapeRef.new(shape: BatchMeterUsageResult)
|
108
|
-
o.errors << Shapes::ShapeRef.new(shape: InternalServiceErrorException)
|
109
|
-
o.errors << Shapes::ShapeRef.new(shape: InvalidProductCodeException)
|
110
|
-
o.errors << Shapes::ShapeRef.new(shape: InvalidUsageDimensionException)
|
111
|
-
o.errors << Shapes::ShapeRef.new(shape: InvalidCustomerIdentifierException)
|
112
|
-
o.errors << Shapes::ShapeRef.new(shape: TimestampOutOfBoundsException)
|
113
|
-
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
114
|
-
end)
|
115
|
-
|
116
|
-
api.add_operation(:meter_usage, Seahorse::Model::Operation.new.tap do |o|
|
117
|
-
o.name = "MeterUsage"
|
118
|
-
o.http_method = "POST"
|
119
|
-
o.http_request_uri = "/"
|
120
|
-
o.input = Shapes::ShapeRef.new(shape: MeterUsageRequest)
|
121
|
-
o.output = Shapes::ShapeRef.new(shape: MeterUsageResult)
|
122
|
-
o.errors << Shapes::ShapeRef.new(shape: InternalServiceErrorException)
|
123
|
-
o.errors << Shapes::ShapeRef.new(shape: InvalidProductCodeException)
|
124
|
-
o.errors << Shapes::ShapeRef.new(shape: InvalidUsageDimensionException)
|
125
|
-
o.errors << Shapes::ShapeRef.new(shape: InvalidEndpointRegionException)
|
126
|
-
o.errors << Shapes::ShapeRef.new(shape: TimestampOutOfBoundsException)
|
127
|
-
o.errors << Shapes::ShapeRef.new(shape: DuplicateRequestException)
|
128
|
-
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
129
|
-
end)
|
130
|
-
|
131
|
-
api.add_operation(:resolve_customer, Seahorse::Model::Operation.new.tap do |o|
|
132
|
-
o.name = "ResolveCustomer"
|
133
|
-
o.http_method = "POST"
|
134
|
-
o.http_request_uri = "/"
|
135
|
-
o.input = Shapes::ShapeRef.new(shape: ResolveCustomerRequest)
|
136
|
-
o.output = Shapes::ShapeRef.new(shape: ResolveCustomerResult)
|
137
|
-
o.errors << Shapes::ShapeRef.new(shape: InvalidTokenException)
|
138
|
-
o.errors << Shapes::ShapeRef.new(shape: ExpiredTokenException)
|
139
|
-
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
140
|
-
o.errors << Shapes::ShapeRef.new(shape: InternalServiceErrorException)
|
141
|
-
end)
|
142
|
-
end
|
8
|
+
module Aws::MarketplaceMetering
|
9
|
+
# @api private
|
10
|
+
module ClientApi
|
11
|
+
|
12
|
+
include Seahorse::Model
|
13
|
+
|
14
|
+
BatchMeterUsageRequest = Shapes::StructureShape.new(name: 'BatchMeterUsageRequest')
|
15
|
+
BatchMeterUsageResult = Shapes::StructureShape.new(name: 'BatchMeterUsageResult')
|
16
|
+
Boolean = Shapes::BooleanShape.new(name: 'Boolean')
|
17
|
+
CustomerIdentifier = Shapes::StringShape.new(name: 'CustomerIdentifier')
|
18
|
+
DuplicateRequestException = Shapes::StructureShape.new(name: 'DuplicateRequestException')
|
19
|
+
ExpiredTokenException = Shapes::StructureShape.new(name: 'ExpiredTokenException')
|
20
|
+
InternalServiceErrorException = Shapes::StructureShape.new(name: 'InternalServiceErrorException')
|
21
|
+
InvalidCustomerIdentifierException = Shapes::StructureShape.new(name: 'InvalidCustomerIdentifierException')
|
22
|
+
InvalidEndpointRegionException = Shapes::StructureShape.new(name: 'InvalidEndpointRegionException')
|
23
|
+
InvalidProductCodeException = Shapes::StructureShape.new(name: 'InvalidProductCodeException')
|
24
|
+
InvalidTokenException = Shapes::StructureShape.new(name: 'InvalidTokenException')
|
25
|
+
InvalidUsageDimensionException = Shapes::StructureShape.new(name: 'InvalidUsageDimensionException')
|
26
|
+
MeterUsageRequest = Shapes::StructureShape.new(name: 'MeterUsageRequest')
|
27
|
+
MeterUsageResult = Shapes::StructureShape.new(name: 'MeterUsageResult')
|
28
|
+
NonEmptyString = Shapes::StringShape.new(name: 'NonEmptyString')
|
29
|
+
ProductCode = Shapes::StringShape.new(name: 'ProductCode')
|
30
|
+
ResolveCustomerRequest = Shapes::StructureShape.new(name: 'ResolveCustomerRequest')
|
31
|
+
ResolveCustomerResult = Shapes::StructureShape.new(name: 'ResolveCustomerResult')
|
32
|
+
String = Shapes::StringShape.new(name: 'String')
|
33
|
+
ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
|
34
|
+
Timestamp = Shapes::TimestampShape.new(name: 'Timestamp')
|
35
|
+
TimestampOutOfBoundsException = Shapes::StructureShape.new(name: 'TimestampOutOfBoundsException')
|
36
|
+
UsageDimension = Shapes::StringShape.new(name: 'UsageDimension')
|
37
|
+
UsageQuantity = Shapes::IntegerShape.new(name: 'UsageQuantity')
|
38
|
+
UsageRecord = Shapes::StructureShape.new(name: 'UsageRecord')
|
39
|
+
UsageRecordList = Shapes::ListShape.new(name: 'UsageRecordList')
|
40
|
+
UsageRecordResult = Shapes::StructureShape.new(name: 'UsageRecordResult')
|
41
|
+
UsageRecordResultList = Shapes::ListShape.new(name: 'UsageRecordResultList')
|
42
|
+
UsageRecordResultStatus = Shapes::StringShape.new(name: 'UsageRecordResultStatus')
|
43
|
+
errorMessage = Shapes::StringShape.new(name: 'errorMessage')
|
44
|
+
|
45
|
+
BatchMeterUsageRequest.add_member(:usage_records, Shapes::ShapeRef.new(shape: UsageRecordList, required: true, location_name: "UsageRecords"))
|
46
|
+
BatchMeterUsageRequest.add_member(:product_code, Shapes::ShapeRef.new(shape: ProductCode, required: true, location_name: "ProductCode"))
|
47
|
+
BatchMeterUsageRequest.struct_class = Types::BatchMeterUsageRequest
|
48
|
+
|
49
|
+
BatchMeterUsageResult.add_member(:results, Shapes::ShapeRef.new(shape: UsageRecordResultList, location_name: "Results"))
|
50
|
+
BatchMeterUsageResult.add_member(:unprocessed_records, Shapes::ShapeRef.new(shape: UsageRecordList, location_name: "UnprocessedRecords"))
|
51
|
+
BatchMeterUsageResult.struct_class = Types::BatchMeterUsageResult
|
52
|
+
|
53
|
+
MeterUsageRequest.add_member(:product_code, Shapes::ShapeRef.new(shape: ProductCode, required: true, location_name: "ProductCode"))
|
54
|
+
MeterUsageRequest.add_member(:timestamp, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "Timestamp"))
|
55
|
+
MeterUsageRequest.add_member(:usage_dimension, Shapes::ShapeRef.new(shape: UsageDimension, required: true, location_name: "UsageDimension"))
|
56
|
+
MeterUsageRequest.add_member(:usage_quantity, Shapes::ShapeRef.new(shape: UsageQuantity, required: true, location_name: "UsageQuantity"))
|
57
|
+
MeterUsageRequest.add_member(:dry_run, Shapes::ShapeRef.new(shape: Boolean, required: true, location_name: "DryRun"))
|
58
|
+
MeterUsageRequest.struct_class = Types::MeterUsageRequest
|
59
|
+
|
60
|
+
MeterUsageResult.add_member(:metering_record_id, Shapes::ShapeRef.new(shape: String, location_name: "MeteringRecordId"))
|
61
|
+
MeterUsageResult.struct_class = Types::MeterUsageResult
|
62
|
+
|
63
|
+
ResolveCustomerRequest.add_member(:registration_token, Shapes::ShapeRef.new(shape: NonEmptyString, required: true, location_name: "RegistrationToken"))
|
64
|
+
ResolveCustomerRequest.struct_class = Types::ResolveCustomerRequest
|
65
|
+
|
66
|
+
ResolveCustomerResult.add_member(:customer_identifier, Shapes::ShapeRef.new(shape: CustomerIdentifier, location_name: "CustomerIdentifier"))
|
67
|
+
ResolveCustomerResult.add_member(:product_code, Shapes::ShapeRef.new(shape: ProductCode, location_name: "ProductCode"))
|
68
|
+
ResolveCustomerResult.struct_class = Types::ResolveCustomerResult
|
69
|
+
|
70
|
+
UsageRecord.add_member(:timestamp, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "Timestamp"))
|
71
|
+
UsageRecord.add_member(:customer_identifier, Shapes::ShapeRef.new(shape: CustomerIdentifier, required: true, location_name: "CustomerIdentifier"))
|
72
|
+
UsageRecord.add_member(:dimension, Shapes::ShapeRef.new(shape: UsageDimension, required: true, location_name: "Dimension"))
|
73
|
+
UsageRecord.add_member(:quantity, Shapes::ShapeRef.new(shape: UsageQuantity, required: true, location_name: "Quantity"))
|
74
|
+
UsageRecord.struct_class = Types::UsageRecord
|
75
|
+
|
76
|
+
UsageRecordList.member = Shapes::ShapeRef.new(shape: UsageRecord)
|
77
|
+
|
78
|
+
UsageRecordResult.add_member(:usage_record, Shapes::ShapeRef.new(shape: UsageRecord, location_name: "UsageRecord"))
|
79
|
+
UsageRecordResult.add_member(:metering_record_id, Shapes::ShapeRef.new(shape: String, location_name: "MeteringRecordId"))
|
80
|
+
UsageRecordResult.add_member(:status, Shapes::ShapeRef.new(shape: UsageRecordResultStatus, location_name: "Status"))
|
81
|
+
UsageRecordResult.struct_class = Types::UsageRecordResult
|
82
|
+
|
83
|
+
UsageRecordResultList.member = Shapes::ShapeRef.new(shape: UsageRecordResult)
|
84
|
+
|
143
85
|
|
86
|
+
# @api private
|
87
|
+
API = Seahorse::Model::Api.new.tap do |api|
|
88
|
+
|
89
|
+
api.version = "2016-01-14"
|
90
|
+
|
91
|
+
api.metadata = {
|
92
|
+
"endpointPrefix" => "metering.marketplace",
|
93
|
+
"jsonVersion" => "1.1",
|
94
|
+
"protocol" => "json",
|
95
|
+
"serviceFullName" => "AWSMarketplace Metering",
|
96
|
+
"signatureVersion" => "v4",
|
97
|
+
"signingName" => "aws-marketplace",
|
98
|
+
"targetPrefix" => "AWSMPMeteringService",
|
99
|
+
}
|
100
|
+
|
101
|
+
api.add_operation(:batch_meter_usage, Seahorse::Model::Operation.new.tap do |o|
|
102
|
+
o.name = "BatchMeterUsage"
|
103
|
+
o.http_method = "POST"
|
104
|
+
o.http_request_uri = "/"
|
105
|
+
o.input = Shapes::ShapeRef.new(shape: BatchMeterUsageRequest)
|
106
|
+
o.output = Shapes::ShapeRef.new(shape: BatchMeterUsageResult)
|
107
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServiceErrorException)
|
108
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidProductCodeException)
|
109
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidUsageDimensionException)
|
110
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidCustomerIdentifierException)
|
111
|
+
o.errors << Shapes::ShapeRef.new(shape: TimestampOutOfBoundsException)
|
112
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
113
|
+
end)
|
114
|
+
|
115
|
+
api.add_operation(:meter_usage, Seahorse::Model::Operation.new.tap do |o|
|
116
|
+
o.name = "MeterUsage"
|
117
|
+
o.http_method = "POST"
|
118
|
+
o.http_request_uri = "/"
|
119
|
+
o.input = Shapes::ShapeRef.new(shape: MeterUsageRequest)
|
120
|
+
o.output = Shapes::ShapeRef.new(shape: MeterUsageResult)
|
121
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServiceErrorException)
|
122
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidProductCodeException)
|
123
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidUsageDimensionException)
|
124
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidEndpointRegionException)
|
125
|
+
o.errors << Shapes::ShapeRef.new(shape: TimestampOutOfBoundsException)
|
126
|
+
o.errors << Shapes::ShapeRef.new(shape: DuplicateRequestException)
|
127
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
128
|
+
end)
|
129
|
+
|
130
|
+
api.add_operation(:resolve_customer, Seahorse::Model::Operation.new.tap do |o|
|
131
|
+
o.name = "ResolveCustomer"
|
132
|
+
o.http_method = "POST"
|
133
|
+
o.http_request_uri = "/"
|
134
|
+
o.input = Shapes::ShapeRef.new(shape: ResolveCustomerRequest)
|
135
|
+
o.output = Shapes::ShapeRef.new(shape: ResolveCustomerResult)
|
136
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidTokenException)
|
137
|
+
o.errors << Shapes::ShapeRef.new(shape: ExpiredTokenException)
|
138
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
139
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServiceErrorException)
|
140
|
+
end)
|
144
141
|
end
|
142
|
+
|
145
143
|
end
|
146
144
|
end
|
@@ -1,23 +1,14 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
module
|
10
|
-
module Errors
|
8
|
+
module Aws::MarketplaceMetering
|
9
|
+
module Errors
|
11
10
|
|
12
|
-
|
11
|
+
extend Aws::Errors::DynamicErrors
|
13
12
|
|
14
|
-
# Raised when calling #load or #data on a resource class that can not be
|
15
|
-
# loaded. This can happen when:
|
16
|
-
#
|
17
|
-
# * A resource class has identifiers, but no data attributes.
|
18
|
-
# * Resource data is only available when making an API call that
|
19
|
-
# enumerates all resources of that type.
|
20
|
-
class ResourceNotLoadable < RuntimeError; end
|
21
|
-
end
|
22
13
|
end
|
23
14
|
end
|
@@ -1,25 +1,23 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
class Resource
|
8
|
+
module Aws::MarketplaceMetering
|
9
|
+
class Resource
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
# @return [Client]
|
19
|
-
def client
|
20
|
-
@client
|
21
|
-
end
|
11
|
+
# @param options ({})
|
12
|
+
# @option options [Client] :client
|
13
|
+
def initialize(options = {})
|
14
|
+
@client = options[:client] || Client.new(options)
|
15
|
+
end
|
22
16
|
|
17
|
+
# @return [Client]
|
18
|
+
def client
|
19
|
+
@client
|
23
20
|
end
|
21
|
+
|
24
22
|
end
|
25
23
|
end
|
@@ -1,232 +1,264 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
module
|
10
|
-
module Types
|
8
|
+
module Aws::MarketplaceMetering
|
9
|
+
module Types
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
# records were either honored by AWS Marketplace Metering Service or
|
49
|
-
# were invalid.
|
50
|
-
# @return [Array<Types::UsageRecordResult>]
|
51
|
-
#
|
52
|
-
# @!attribute [rw] unprocessed_records
|
53
|
-
# Contains all UsageRecords that were not processed by
|
54
|
-
# BatchMeterUsage. This is a list of UsageRecords. You can retry the
|
55
|
-
# failed request by making another BatchMeterUsage call with this list
|
56
|
-
# as input in the BatchMeterUsageRequest.
|
57
|
-
# @return [Array<Types::UsageRecord>]
|
58
|
-
class BatchMeterUsageResult < Struct.new(
|
59
|
-
:results,
|
60
|
-
:unprocessed_records)
|
61
|
-
include Aws::Structure
|
62
|
-
end
|
11
|
+
# A BatchMeterUsageRequest contains UsageRecords, which indicate
|
12
|
+
# quantities of usage within your application.
|
13
|
+
#
|
14
|
+
# @note When making an API call, you may pass BatchMeterUsageRequest
|
15
|
+
# data as a hash:
|
16
|
+
#
|
17
|
+
# {
|
18
|
+
# usage_records: [ # required
|
19
|
+
# {
|
20
|
+
# timestamp: Time.now, # required
|
21
|
+
# customer_identifier: "CustomerIdentifier", # required
|
22
|
+
# dimension: "UsageDimension", # required
|
23
|
+
# quantity: 1, # required
|
24
|
+
# },
|
25
|
+
# ],
|
26
|
+
# product_code: "ProductCode", # required
|
27
|
+
# }
|
28
|
+
#
|
29
|
+
# @!attribute [rw] usage_records
|
30
|
+
# The set of UsageRecords to submit. BatchMeterUsage accepts up to 25
|
31
|
+
# UsageRecords at a time.
|
32
|
+
# @return [Array<Types::UsageRecord>]
|
33
|
+
#
|
34
|
+
# @!attribute [rw] product_code
|
35
|
+
# Product code is used to uniquely identify a product in AWS
|
36
|
+
# Marketplace. The product code should be the same as the one used
|
37
|
+
# during the publishing of a new product.
|
38
|
+
# @return [String]
|
39
|
+
#
|
40
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/BatchMeterUsageRequest AWS API Documentation
|
41
|
+
#
|
42
|
+
class BatchMeterUsageRequest < Struct.new(
|
43
|
+
:usage_records,
|
44
|
+
:product_code)
|
45
|
+
include Aws::Structure
|
46
|
+
end
|
63
47
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
# publishing of the product.
|
88
|
-
# @return [String]
|
89
|
-
#
|
90
|
-
# @!attribute [rw] usage_quantity
|
91
|
-
# Consumption value for the hour.
|
92
|
-
# @return [Integer]
|
93
|
-
#
|
94
|
-
# @!attribute [rw] dry_run
|
95
|
-
# Checks whether you have the permissions required for the action, but
|
96
|
-
# does not make the request. If you have the permissions, the request
|
97
|
-
# returns DryRunOperation; otherwise, it returns
|
98
|
-
# UnauthorizedException.
|
99
|
-
# @return [Boolean]
|
100
|
-
class MeterUsageRequest < Struct.new(
|
101
|
-
:product_code,
|
102
|
-
:timestamp,
|
103
|
-
:usage_dimension,
|
104
|
-
:usage_quantity,
|
105
|
-
:dry_run)
|
106
|
-
include Aws::Structure
|
107
|
-
end
|
48
|
+
# Contains the UsageRecords processed by BatchMeterUsage and any records
|
49
|
+
# that have failed due to transient error.
|
50
|
+
#
|
51
|
+
# @!attribute [rw] results
|
52
|
+
# Contains all UsageRecords processed by BatchMeterUsage. These
|
53
|
+
# records were either honored by AWS Marketplace Metering Service or
|
54
|
+
# were invalid.
|
55
|
+
# @return [Array<Types::UsageRecordResult>]
|
56
|
+
#
|
57
|
+
# @!attribute [rw] unprocessed_records
|
58
|
+
# Contains all UsageRecords that were not processed by
|
59
|
+
# BatchMeterUsage. This is a list of UsageRecords. You can retry the
|
60
|
+
# failed request by making another BatchMeterUsage call with this list
|
61
|
+
# as input in the BatchMeterUsageRequest.
|
62
|
+
# @return [Array<Types::UsageRecord>]
|
63
|
+
#
|
64
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/BatchMeterUsageResult AWS API Documentation
|
65
|
+
#
|
66
|
+
class BatchMeterUsageResult < Struct.new(
|
67
|
+
:results,
|
68
|
+
:unprocessed_records)
|
69
|
+
include Aws::Structure
|
70
|
+
end
|
108
71
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
72
|
+
# @note When making an API call, you may pass MeterUsageRequest
|
73
|
+
# data as a hash:
|
74
|
+
#
|
75
|
+
# {
|
76
|
+
# product_code: "ProductCode", # required
|
77
|
+
# timestamp: Time.now, # required
|
78
|
+
# usage_dimension: "UsageDimension", # required
|
79
|
+
# usage_quantity: 1, # required
|
80
|
+
# dry_run: false, # required
|
81
|
+
# }
|
82
|
+
#
|
83
|
+
# @!attribute [rw] product_code
|
84
|
+
# Product code is used to uniquely identify a product in AWS
|
85
|
+
# Marketplace. The product code should be the same as the one used
|
86
|
+
# during the publishing of a new product.
|
87
|
+
# @return [String]
|
88
|
+
#
|
89
|
+
# @!attribute [rw] timestamp
|
90
|
+
# Timestamp of the hour, recorded in UTC. The seconds and milliseconds
|
91
|
+
# portions of the timestamp will be ignored.
|
92
|
+
# @return [Time]
|
93
|
+
#
|
94
|
+
# @!attribute [rw] usage_dimension
|
95
|
+
# It will be one of the fcp dimension name provided during the
|
96
|
+
# publishing of the product.
|
97
|
+
# @return [String]
|
98
|
+
#
|
99
|
+
# @!attribute [rw] usage_quantity
|
100
|
+
# Consumption value for the hour.
|
101
|
+
# @return [Integer]
|
102
|
+
#
|
103
|
+
# @!attribute [rw] dry_run
|
104
|
+
# Checks whether you have the permissions required for the action, but
|
105
|
+
# does not make the request. If you have the permissions, the request
|
106
|
+
# returns DryRunOperation; otherwise, it returns
|
107
|
+
# UnauthorizedException.
|
108
|
+
# @return [Boolean]
|
109
|
+
#
|
110
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/MeterUsageRequest AWS API Documentation
|
111
|
+
#
|
112
|
+
class MeterUsageRequest < Struct.new(
|
113
|
+
:product_code,
|
114
|
+
:timestamp,
|
115
|
+
:usage_dimension,
|
116
|
+
:usage_quantity,
|
117
|
+
:dry_run)
|
118
|
+
include Aws::Structure
|
119
|
+
end
|
115
120
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
# the buyer submits a registration token through the browser. The
|
126
|
-
# registration token is resolved to obtain a CustomerIdentifier and
|
127
|
-
# product code.
|
128
|
-
# @return [String]
|
129
|
-
class ResolveCustomerRequest < Struct.new(
|
130
|
-
:registration_token)
|
131
|
-
include Aws::Structure
|
132
|
-
end
|
121
|
+
# @!attribute [rw] metering_record_id
|
122
|
+
# @return [String]
|
123
|
+
#
|
124
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/MeterUsageResult AWS API Documentation
|
125
|
+
#
|
126
|
+
class MeterUsageResult < Struct.new(
|
127
|
+
:metering_record_id)
|
128
|
+
include Aws::Structure
|
129
|
+
end
|
133
130
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
131
|
+
# Contains input to the ResolveCustomer operation.
|
132
|
+
#
|
133
|
+
# @note When making an API call, you may pass ResolveCustomerRequest
|
134
|
+
# data as a hash:
|
135
|
+
#
|
136
|
+
# {
|
137
|
+
# registration_token: "NonEmptyString", # required
|
138
|
+
# }
|
139
|
+
#
|
140
|
+
# @!attribute [rw] registration_token
|
141
|
+
# When a buyer visits your website during the registration process,
|
142
|
+
# the buyer submits a registration token through the browser. The
|
143
|
+
# registration token is resolved to obtain a CustomerIdentifier and
|
144
|
+
# product code.
|
145
|
+
# @return [String]
|
146
|
+
#
|
147
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/ResolveCustomerRequest AWS API Documentation
|
148
|
+
#
|
149
|
+
class ResolveCustomerRequest < Struct.new(
|
150
|
+
:registration_token)
|
151
|
+
include Aws::Structure
|
152
|
+
end
|
152
153
|
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
# The CustomerIdentifier is obtained through the ResolveCustomer
|
176
|
-
# operation and represents an individual buyer in your application.
|
177
|
-
# @return [String]
|
178
|
-
#
|
179
|
-
# @!attribute [rw] dimension
|
180
|
-
# During the process of registering a product on AWS Marketplace, up
|
181
|
-
# to eight dimensions are specified. These represent different units
|
182
|
-
# of value in your application.
|
183
|
-
# @return [String]
|
184
|
-
#
|
185
|
-
# @!attribute [rw] quantity
|
186
|
-
# The quantity of usage consumed by the customer for the given
|
187
|
-
# dimension and time.
|
188
|
-
# @return [Integer]
|
189
|
-
class UsageRecord < Struct.new(
|
190
|
-
:timestamp,
|
191
|
-
:customer_identifier,
|
192
|
-
:dimension,
|
193
|
-
:quantity)
|
194
|
-
include Aws::Structure
|
195
|
-
end
|
154
|
+
# The result of the ResolveCustomer operation. Contains the
|
155
|
+
# CustomerIdentifier and product code.
|
156
|
+
#
|
157
|
+
# @!attribute [rw] customer_identifier
|
158
|
+
# The CustomerIdentifier is used to identify an individual customer in
|
159
|
+
# your application. Calls to BatchMeterUsage require
|
160
|
+
# CustomerIdentifiers for each UsageRecord.
|
161
|
+
# @return [String]
|
162
|
+
#
|
163
|
+
# @!attribute [rw] product_code
|
164
|
+
# The product code is returned to confirm that the buyer is
|
165
|
+
# registering for your product. Subsequent BatchMeterUsage calls
|
166
|
+
# should be made using this product code.
|
167
|
+
# @return [String]
|
168
|
+
#
|
169
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/ResolveCustomerResult AWS API Documentation
|
170
|
+
#
|
171
|
+
class ResolveCustomerResult < Struct.new(
|
172
|
+
:customer_identifier,
|
173
|
+
:product_code)
|
174
|
+
include Aws::Structure
|
175
|
+
end
|
196
176
|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
177
|
+
# A UsageRecord indicates a quantity of usage for a given product,
|
178
|
+
# customer, dimension and time.
|
179
|
+
#
|
180
|
+
# Multiple requests with the same UsageRecords as input will be
|
181
|
+
# deduplicated to prevent double charges.
|
182
|
+
#
|
183
|
+
# @note When making an API call, you may pass UsageRecord
|
184
|
+
# data as a hash:
|
185
|
+
#
|
186
|
+
# {
|
187
|
+
# timestamp: Time.now, # required
|
188
|
+
# customer_identifier: "CustomerIdentifier", # required
|
189
|
+
# dimension: "UsageDimension", # required
|
190
|
+
# quantity: 1, # required
|
191
|
+
# }
|
192
|
+
#
|
193
|
+
# @!attribute [rw] timestamp
|
194
|
+
# Timestamp of the hour, recorded in UTC. The seconds and milliseconds
|
195
|
+
# portions of the timestamp will be ignored.
|
196
|
+
#
|
197
|
+
# Your application can meter usage for up to one hour in the past.
|
198
|
+
# @return [Time]
|
199
|
+
#
|
200
|
+
# @!attribute [rw] customer_identifier
|
201
|
+
# The CustomerIdentifier is obtained through the ResolveCustomer
|
202
|
+
# operation and represents an individual buyer in your application.
|
203
|
+
# @return [String]
|
204
|
+
#
|
205
|
+
# @!attribute [rw] dimension
|
206
|
+
# During the process of registering a product on AWS Marketplace, up
|
207
|
+
# to eight dimensions are specified. These represent different units
|
208
|
+
# of value in your application.
|
209
|
+
# @return [String]
|
210
|
+
#
|
211
|
+
# @!attribute [rw] quantity
|
212
|
+
# The quantity of usage consumed by the customer for the given
|
213
|
+
# dimension and time.
|
214
|
+
# @return [Integer]
|
215
|
+
#
|
216
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/UsageRecord AWS API Documentation
|
217
|
+
#
|
218
|
+
class UsageRecord < Struct.new(
|
219
|
+
:timestamp,
|
220
|
+
:customer_identifier,
|
221
|
+
:dimension,
|
222
|
+
:quantity)
|
223
|
+
include Aws::Structure
|
224
|
+
end
|
229
225
|
|
226
|
+
# A UsageRecordResult indicates the status of a given UsageRecord
|
227
|
+
# processed by BatchMeterUsage.
|
228
|
+
#
|
229
|
+
# @!attribute [rw] usage_record
|
230
|
+
# The UsageRecord that was part of the BatchMeterUsage request.
|
231
|
+
# @return [Types::UsageRecord]
|
232
|
+
#
|
233
|
+
# @!attribute [rw] metering_record_id
|
234
|
+
# The MeteringRecordId is a unique identifier for this metering event.
|
235
|
+
# @return [String]
|
236
|
+
#
|
237
|
+
# @!attribute [rw] status
|
238
|
+
# The UsageRecordResult Status indicates the status of an individual
|
239
|
+
# UsageRecord processed by BatchMeterUsage.
|
240
|
+
#
|
241
|
+
# * *Success*- The UsageRecord was accepted and honored by
|
242
|
+
# BatchMeterUsage.
|
243
|
+
#
|
244
|
+
# * *CustomerNotSubscribed*- The CustomerIdentifier specified is not
|
245
|
+
# subscribed to your product. The UsageRecord was not honored.
|
246
|
+
# Future UsageRecords for this customer will fail until the customer
|
247
|
+
# subscribes to your product.
|
248
|
+
#
|
249
|
+
# * *DuplicateRecord*- Indicates that the UsageRecord was invalid and
|
250
|
+
# not honored. A previously metered UsageRecord had the same
|
251
|
+
# customer, dimension, and time, but a different quantity.
|
252
|
+
# @return [String]
|
253
|
+
#
|
254
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/UsageRecordResult AWS API Documentation
|
255
|
+
#
|
256
|
+
class UsageRecordResult < Struct.new(
|
257
|
+
:usage_record,
|
258
|
+
:metering_record_id,
|
259
|
+
:status)
|
260
|
+
include Aws::Structure
|
230
261
|
end
|
262
|
+
|
231
263
|
end
|
232
264
|
end
|