aws-sdk-pricing 1.42.0 → 1.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-pricing/client.rb +154 -1
- data/lib/aws-sdk-pricing/client_api.rb +79 -0
- data/lib/aws-sdk-pricing/endpoint_provider.rb +29 -23
- data/lib/aws-sdk-pricing/endpoints.rb +28 -0
- data/lib/aws-sdk-pricing/errors.rb +16 -0
- data/lib/aws-sdk-pricing/plugins/endpoints.rb +4 -0
- data/lib/aws-sdk-pricing/types.rb +191 -2
- data/lib/aws-sdk-pricing.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7825c66ce3281c35e7f356be7e32c62a6c62eb6c5ef456c0d1e97e8eb90cec67
|
4
|
+
data.tar.gz: 6146568860b4c0e4d602d3d4da7af4627c3c5f965e056bd84bc78390029ab459
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 359898dbba468f1cd4196cddd34aa8f2c9740c0ff86402f898ca172bcbddfd3c9280d672918653e1ead58e566f3def18b995256b37a22bfc0ceb17cd8c73d3fb
|
7
|
+
data.tar.gz: 5e10b85d52f0f5ded108caa436fec8a4af106bfab0e71a23eb93fba107f42e305913f8e567254968091cebf8c180bbb42dac5893fec64e49fa3a58749d48a832
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.43.0 (2023-03-01)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - This release adds 2 new APIs - ListPriceLists which returns a list of applicable price lists, and GetPriceListFileUrl which outputs a URL to retrieve your price lists from the generated file from ListPriceLists
|
8
|
+
|
4
9
|
1.42.0 (2023-01-18)
|
5
10
|
------------------
|
6
11
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.43.0
|
@@ -549,6 +549,62 @@ module Aws::Pricing
|
|
549
549
|
req.send_request(options)
|
550
550
|
end
|
551
551
|
|
552
|
+
# <i> <b>This feature is in preview release and is subject to change.
|
553
|
+
# Your use of Amazon Web Services Price List API is subject to the Beta
|
554
|
+
# Service Participation terms of the <a
|
555
|
+
# href="https://aws.amazon.com/service-terms/">Amazon Web Services
|
556
|
+
# Service Terms</a> (Section 1.10).</b> </i>
|
557
|
+
#
|
558
|
+
# This returns the URL that you can retrieve your Price List file from.
|
559
|
+
# This URL is based on the `PriceListArn` and `FileFormat` that you
|
560
|
+
# retrieve from the [ `ListPriceLists` ][1] response.
|
561
|
+
#
|
562
|
+
#
|
563
|
+
#
|
564
|
+
# [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html
|
565
|
+
#
|
566
|
+
# @option params [required, String] :price_list_arn
|
567
|
+
# The unique identifier that maps to where your Price List files are
|
568
|
+
# located. `PriceListArn` can be obtained from the [ `ListPriceLists`
|
569
|
+
# ][1] response.
|
570
|
+
#
|
571
|
+
#
|
572
|
+
#
|
573
|
+
# [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html
|
574
|
+
#
|
575
|
+
# @option params [required, String] :file_format
|
576
|
+
# The format that you want to retrieve your Price List files in. The
|
577
|
+
# `FileFormat` can be obtained from the [ `ListPriceLists` ][1]
|
578
|
+
# response.
|
579
|
+
#
|
580
|
+
#
|
581
|
+
#
|
582
|
+
# [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html
|
583
|
+
#
|
584
|
+
# @return [Types::GetPriceListFileUrlResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
585
|
+
#
|
586
|
+
# * {Types::GetPriceListFileUrlResponse#url #url} => String
|
587
|
+
#
|
588
|
+
# @example Request syntax with placeholder values
|
589
|
+
#
|
590
|
+
# resp = client.get_price_list_file_url({
|
591
|
+
# price_list_arn: "PriceListArn", # required
|
592
|
+
# file_format: "FileFormat", # required
|
593
|
+
# })
|
594
|
+
#
|
595
|
+
# @example Response structure
|
596
|
+
#
|
597
|
+
# resp.url #=> String
|
598
|
+
#
|
599
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetPriceListFileUrl AWS API Documentation
|
600
|
+
#
|
601
|
+
# @overload get_price_list_file_url(params = {})
|
602
|
+
# @param [Hash] params ({})
|
603
|
+
def get_price_list_file_url(params = {}, options = {})
|
604
|
+
req = build_request(:get_price_list_file_url, params)
|
605
|
+
req.send_request(options)
|
606
|
+
end
|
607
|
+
|
552
608
|
# Returns a list of all products that match the filter criteria.
|
553
609
|
#
|
554
610
|
# @option params [required, String] :service_code
|
@@ -610,6 +666,103 @@ module Aws::Pricing
|
|
610
666
|
req.send_request(options)
|
611
667
|
end
|
612
668
|
|
669
|
+
# <i> <b>This feature is in preview release and is subject to change.
|
670
|
+
# Your use of Amazon Web Services Price List API is subject to the Beta
|
671
|
+
# Service Participation terms of the <a
|
672
|
+
# href="https://aws.amazon.com/service-terms/">Amazon Web Services
|
673
|
+
# Service Terms</a> (Section 1.10).</b> </i>
|
674
|
+
#
|
675
|
+
# This returns a list of Price List references that the requester if
|
676
|
+
# authorized to view, given a `ServiceCode`, `CurrencyCode`, and an
|
677
|
+
# `EffectiveDate`. Use without a `RegionCode` filter to list Price List
|
678
|
+
# references from all available Amazon Web Services Regions. Use with a
|
679
|
+
# `RegionCode` filter to get the Price List reference that's specific
|
680
|
+
# to a specific Amazon Web Services Region. You can use the
|
681
|
+
# `PriceListArn` from the response to get your preferred Price List
|
682
|
+
# files through the [ `GetPriceListFileUrl` ][1] API.
|
683
|
+
#
|
684
|
+
#
|
685
|
+
#
|
686
|
+
# [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_GetPriceListFileUrl.html
|
687
|
+
#
|
688
|
+
# @option params [required, String] :service_code
|
689
|
+
# The service code or the Savings Plan service code for the attributes
|
690
|
+
# that you want to retrieve. For example, to get the list of applicable
|
691
|
+
# Amazon EC2 price lists, use `AmazonEC2`. For a full list of service
|
692
|
+
# codes containing On-Demand and Reserved Instance (RI) pricing, use the
|
693
|
+
# [ `DescribeServices` ][1] API.
|
694
|
+
#
|
695
|
+
# To retrieve the Compute Savings Plan price lists, use
|
696
|
+
# `ComputeSavingsPlans`. To retrieve Machine Learning Savings Plans
|
697
|
+
# price lists, use `MachineLearningSavingsPlans`.
|
698
|
+
#
|
699
|
+
#
|
700
|
+
#
|
701
|
+
# [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_DescribeServices.html#awscostmanagement-pricing_DescribeServices-request-FormatVersion
|
702
|
+
#
|
703
|
+
# @option params [required, Time,DateTime,Date,Integer,String] :effective_date
|
704
|
+
# The date that the Price List file prices are effective from.
|
705
|
+
#
|
706
|
+
# @option params [String] :region_code
|
707
|
+
# This is used to filter the Price List by Amazon Web Services Region.
|
708
|
+
# For example, to get the price list only for the `US East (N.
|
709
|
+
# Virginia)` Region, use `us-east-1`. If nothing is specified, you
|
710
|
+
# retrieve price lists for all applicable Regions. The available
|
711
|
+
# `RegionCode` list can be retrieved from [ `GetAttributeValues` ][1]
|
712
|
+
# API.
|
713
|
+
#
|
714
|
+
#
|
715
|
+
#
|
716
|
+
# [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_GetAttributeValues.html
|
717
|
+
#
|
718
|
+
# @option params [required, String] :currency_code
|
719
|
+
# The three alphabetical character ISO-4217 currency code that the Price
|
720
|
+
# List files are denominated in.
|
721
|
+
#
|
722
|
+
# @option params [String] :next_token
|
723
|
+
# The pagination token that indicates the next set of results that you
|
724
|
+
# want to retrieve.
|
725
|
+
#
|
726
|
+
# @option params [Integer] :max_results
|
727
|
+
# The maximum number of results to return in the response.
|
728
|
+
#
|
729
|
+
# @return [Types::ListPriceListsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
730
|
+
#
|
731
|
+
# * {Types::ListPriceListsResponse#price_lists #price_lists} => Array<Types::PriceList>
|
732
|
+
# * {Types::ListPriceListsResponse#next_token #next_token} => String
|
733
|
+
#
|
734
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
735
|
+
#
|
736
|
+
# @example Request syntax with placeholder values
|
737
|
+
#
|
738
|
+
# resp = client.list_price_lists({
|
739
|
+
# service_code: "ServiceCode", # required
|
740
|
+
# effective_date: Time.now, # required
|
741
|
+
# region_code: "RegionCode",
|
742
|
+
# currency_code: "CurrencyCode", # required
|
743
|
+
# next_token: "String",
|
744
|
+
# max_results: 1,
|
745
|
+
# })
|
746
|
+
#
|
747
|
+
# @example Response structure
|
748
|
+
#
|
749
|
+
# resp.price_lists #=> Array
|
750
|
+
# resp.price_lists[0].price_list_arn #=> String
|
751
|
+
# resp.price_lists[0].region_code #=> String
|
752
|
+
# resp.price_lists[0].currency_code #=> String
|
753
|
+
# resp.price_lists[0].file_formats #=> Array
|
754
|
+
# resp.price_lists[0].file_formats[0] #=> String
|
755
|
+
# resp.next_token #=> String
|
756
|
+
#
|
757
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/ListPriceLists AWS API Documentation
|
758
|
+
#
|
759
|
+
# @overload list_price_lists(params = {})
|
760
|
+
# @param [Hash] params ({})
|
761
|
+
def list_price_lists(params = {}, options = {})
|
762
|
+
req = build_request(:list_price_lists, params)
|
763
|
+
req.send_request(options)
|
764
|
+
end
|
765
|
+
|
613
766
|
# @!endgroup
|
614
767
|
|
615
768
|
# @param params ({})
|
@@ -623,7 +776,7 @@ module Aws::Pricing
|
|
623
776
|
params: params,
|
624
777
|
config: config)
|
625
778
|
context[:gem_name] = 'aws-sdk-pricing'
|
626
|
-
context[:gem_version] = '1.
|
779
|
+
context[:gem_version] = '1.43.0'
|
627
780
|
Seahorse::Client::Request.new(handlers, context)
|
628
781
|
end
|
629
782
|
|
@@ -13,31 +13,49 @@ module Aws::Pricing
|
|
13
13
|
|
14
14
|
include Seahorse::Model
|
15
15
|
|
16
|
+
AccessDeniedException = Shapes::StructureShape.new(name: 'AccessDeniedException')
|
16
17
|
AttributeNameList = Shapes::ListShape.new(name: 'AttributeNameList')
|
17
18
|
AttributeValue = Shapes::StructureShape.new(name: 'AttributeValue')
|
18
19
|
AttributeValueList = Shapes::ListShape.new(name: 'AttributeValueList')
|
19
20
|
BoxedInteger = Shapes::IntegerShape.new(name: 'BoxedInteger')
|
21
|
+
CurrencyCode = Shapes::StringShape.new(name: 'CurrencyCode')
|
20
22
|
DescribeServicesRequest = Shapes::StructureShape.new(name: 'DescribeServicesRequest')
|
21
23
|
DescribeServicesResponse = Shapes::StructureShape.new(name: 'DescribeServicesResponse')
|
24
|
+
EffectiveDate = Shapes::TimestampShape.new(name: 'EffectiveDate')
|
22
25
|
ExpiredNextTokenException = Shapes::StructureShape.new(name: 'ExpiredNextTokenException')
|
26
|
+
FileFormat = Shapes::StringShape.new(name: 'FileFormat')
|
27
|
+
FileFormats = Shapes::ListShape.new(name: 'FileFormats')
|
23
28
|
Filter = Shapes::StructureShape.new(name: 'Filter')
|
24
29
|
FilterType = Shapes::StringShape.new(name: 'FilterType')
|
25
30
|
Filters = Shapes::ListShape.new(name: 'Filters')
|
26
31
|
GetAttributeValuesRequest = Shapes::StructureShape.new(name: 'GetAttributeValuesRequest')
|
27
32
|
GetAttributeValuesResponse = Shapes::StructureShape.new(name: 'GetAttributeValuesResponse')
|
33
|
+
GetPriceListFileUrlRequest = Shapes::StructureShape.new(name: 'GetPriceListFileUrlRequest')
|
34
|
+
GetPriceListFileUrlResponse = Shapes::StructureShape.new(name: 'GetPriceListFileUrlResponse')
|
28
35
|
GetProductsRequest = Shapes::StructureShape.new(name: 'GetProductsRequest')
|
29
36
|
GetProductsResponse = Shapes::StructureShape.new(name: 'GetProductsResponse')
|
30
37
|
InternalErrorException = Shapes::StructureShape.new(name: 'InternalErrorException')
|
31
38
|
InvalidNextTokenException = Shapes::StructureShape.new(name: 'InvalidNextTokenException')
|
32
39
|
InvalidParameterException = Shapes::StructureShape.new(name: 'InvalidParameterException')
|
40
|
+
ListPriceListsRequest = Shapes::StructureShape.new(name: 'ListPriceListsRequest')
|
41
|
+
ListPriceListsResponse = Shapes::StructureShape.new(name: 'ListPriceListsResponse')
|
42
|
+
MaxResults = Shapes::IntegerShape.new(name: 'MaxResults')
|
33
43
|
NotFoundException = Shapes::StructureShape.new(name: 'NotFoundException')
|
44
|
+
PriceList = Shapes::StructureShape.new(name: 'PriceList')
|
45
|
+
PriceListArn = Shapes::StringShape.new(name: 'PriceListArn')
|
34
46
|
PriceListJsonItem = Shapes::StringShape.new(name: 'PriceListJsonItem')
|
35
47
|
PriceListJsonItems = Shapes::ListShape.new(name: 'PriceListJsonItems')
|
48
|
+
PriceLists = Shapes::ListShape.new(name: 'PriceLists')
|
49
|
+
RegionCode = Shapes::StringShape.new(name: 'RegionCode')
|
36
50
|
Service = Shapes::StructureShape.new(name: 'Service')
|
51
|
+
ServiceCode = Shapes::StringShape.new(name: 'ServiceCode')
|
37
52
|
ServiceList = Shapes::ListShape.new(name: 'ServiceList')
|
38
53
|
String = Shapes::StringShape.new(name: 'String')
|
39
54
|
errorMessage = Shapes::StringShape.new(name: 'errorMessage')
|
40
55
|
|
56
|
+
AccessDeniedException.add_member(:message, Shapes::ShapeRef.new(shape: errorMessage, location_name: "Message"))
|
57
|
+
AccessDeniedException.struct_class = Types::AccessDeniedException
|
58
|
+
|
41
59
|
AttributeNameList.member = Shapes::ShapeRef.new(shape: String)
|
42
60
|
|
43
61
|
AttributeValue.add_member(:value, Shapes::ShapeRef.new(shape: String, location_name: "Value"))
|
@@ -59,6 +77,8 @@ module Aws::Pricing
|
|
59
77
|
ExpiredNextTokenException.add_member(:message, Shapes::ShapeRef.new(shape: errorMessage, location_name: "Message"))
|
60
78
|
ExpiredNextTokenException.struct_class = Types::ExpiredNextTokenException
|
61
79
|
|
80
|
+
FileFormats.member = Shapes::ShapeRef.new(shape: FileFormat)
|
81
|
+
|
62
82
|
Filter.add_member(:type, Shapes::ShapeRef.new(shape: FilterType, required: true, location_name: "Type"))
|
63
83
|
Filter.add_member(:field, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Field"))
|
64
84
|
Filter.add_member(:value, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Value"))
|
@@ -76,6 +96,13 @@ module Aws::Pricing
|
|
76
96
|
GetAttributeValuesResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
|
77
97
|
GetAttributeValuesResponse.struct_class = Types::GetAttributeValuesResponse
|
78
98
|
|
99
|
+
GetPriceListFileUrlRequest.add_member(:price_list_arn, Shapes::ShapeRef.new(shape: PriceListArn, required: true, location_name: "PriceListArn"))
|
100
|
+
GetPriceListFileUrlRequest.add_member(:file_format, Shapes::ShapeRef.new(shape: FileFormat, required: true, location_name: "FileFormat"))
|
101
|
+
GetPriceListFileUrlRequest.struct_class = Types::GetPriceListFileUrlRequest
|
102
|
+
|
103
|
+
GetPriceListFileUrlResponse.add_member(:url, Shapes::ShapeRef.new(shape: String, location_name: "Url"))
|
104
|
+
GetPriceListFileUrlResponse.struct_class = Types::GetPriceListFileUrlResponse
|
105
|
+
|
79
106
|
GetProductsRequest.add_member(:service_code, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ServiceCode"))
|
80
107
|
GetProductsRequest.add_member(:filters, Shapes::ShapeRef.new(shape: Filters, location_name: "Filters"))
|
81
108
|
GetProductsRequest.add_member(:format_version, Shapes::ShapeRef.new(shape: String, location_name: "FormatVersion"))
|
@@ -97,11 +124,31 @@ module Aws::Pricing
|
|
97
124
|
InvalidParameterException.add_member(:message, Shapes::ShapeRef.new(shape: errorMessage, location_name: "Message"))
|
98
125
|
InvalidParameterException.struct_class = Types::InvalidParameterException
|
99
126
|
|
127
|
+
ListPriceListsRequest.add_member(:service_code, Shapes::ShapeRef.new(shape: ServiceCode, required: true, location_name: "ServiceCode"))
|
128
|
+
ListPriceListsRequest.add_member(:effective_date, Shapes::ShapeRef.new(shape: EffectiveDate, required: true, location_name: "EffectiveDate"))
|
129
|
+
ListPriceListsRequest.add_member(:region_code, Shapes::ShapeRef.new(shape: RegionCode, location_name: "RegionCode"))
|
130
|
+
ListPriceListsRequest.add_member(:currency_code, Shapes::ShapeRef.new(shape: CurrencyCode, required: true, location_name: "CurrencyCode"))
|
131
|
+
ListPriceListsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
|
132
|
+
ListPriceListsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResults, location_name: "MaxResults"))
|
133
|
+
ListPriceListsRequest.struct_class = Types::ListPriceListsRequest
|
134
|
+
|
135
|
+
ListPriceListsResponse.add_member(:price_lists, Shapes::ShapeRef.new(shape: PriceLists, location_name: "PriceLists"))
|
136
|
+
ListPriceListsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
|
137
|
+
ListPriceListsResponse.struct_class = Types::ListPriceListsResponse
|
138
|
+
|
100
139
|
NotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: errorMessage, location_name: "Message"))
|
101
140
|
NotFoundException.struct_class = Types::NotFoundException
|
102
141
|
|
142
|
+
PriceList.add_member(:price_list_arn, Shapes::ShapeRef.new(shape: PriceListArn, location_name: "PriceListArn"))
|
143
|
+
PriceList.add_member(:region_code, Shapes::ShapeRef.new(shape: RegionCode, location_name: "RegionCode"))
|
144
|
+
PriceList.add_member(:currency_code, Shapes::ShapeRef.new(shape: CurrencyCode, location_name: "CurrencyCode"))
|
145
|
+
PriceList.add_member(:file_formats, Shapes::ShapeRef.new(shape: FileFormats, location_name: "FileFormats"))
|
146
|
+
PriceList.struct_class = Types::PriceList
|
147
|
+
|
103
148
|
PriceListJsonItems.member = Shapes::ShapeRef.new(shape: PriceListJsonItem, metadata: {"jsonvalue"=>true})
|
104
149
|
|
150
|
+
PriceLists.member = Shapes::ShapeRef.new(shape: PriceList)
|
151
|
+
|
105
152
|
Service.add_member(:service_code, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ServiceCode"))
|
106
153
|
Service.add_member(:attribute_names, Shapes::ShapeRef.new(shape: AttributeNameList, location_name: "AttributeNames"))
|
107
154
|
Service.struct_class = Types::Service
|
@@ -166,6 +213,18 @@ module Aws::Pricing
|
|
166
213
|
)
|
167
214
|
end)
|
168
215
|
|
216
|
+
api.add_operation(:get_price_list_file_url, Seahorse::Model::Operation.new.tap do |o|
|
217
|
+
o.name = "GetPriceListFileUrl"
|
218
|
+
o.http_method = "POST"
|
219
|
+
o.http_request_uri = "/"
|
220
|
+
o.input = Shapes::ShapeRef.new(shape: GetPriceListFileUrlRequest)
|
221
|
+
o.output = Shapes::ShapeRef.new(shape: GetPriceListFileUrlResponse)
|
222
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
|
223
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
|
224
|
+
o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
|
225
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
226
|
+
end)
|
227
|
+
|
169
228
|
api.add_operation(:get_products, Seahorse::Model::Operation.new.tap do |o|
|
170
229
|
o.name = "GetProducts"
|
171
230
|
o.http_method = "POST"
|
@@ -184,6 +243,26 @@ module Aws::Pricing
|
|
184
243
|
}
|
185
244
|
)
|
186
245
|
end)
|
246
|
+
|
247
|
+
api.add_operation(:list_price_lists, Seahorse::Model::Operation.new.tap do |o|
|
248
|
+
o.name = "ListPriceLists"
|
249
|
+
o.http_method = "POST"
|
250
|
+
o.http_request_uri = "/"
|
251
|
+
o.input = Shapes::ShapeRef.new(shape: ListPriceListsRequest)
|
252
|
+
o.output = Shapes::ShapeRef.new(shape: ListPriceListsResponse)
|
253
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
|
254
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
|
255
|
+
o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
|
256
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
|
257
|
+
o.errors << Shapes::ShapeRef.new(shape: ExpiredNextTokenException)
|
258
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
259
|
+
o[:pager] = Aws::Pager.new(
|
260
|
+
limit_key: "max_results",
|
261
|
+
tokens: {
|
262
|
+
"next_token" => "next_token"
|
263
|
+
}
|
264
|
+
)
|
265
|
+
end)
|
187
266
|
end
|
188
267
|
|
189
268
|
end
|
@@ -14,36 +14,42 @@ module Aws::Pricing
|
|
14
14
|
use_dual_stack = parameters.use_dual_stack
|
15
15
|
use_fips = parameters.use_fips
|
16
16
|
endpoint = parameters.endpoint
|
17
|
-
if
|
18
|
-
if Aws::Endpoints::Matchers.
|
17
|
+
if Aws::Endpoints::Matchers.set?(endpoint)
|
18
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
19
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
20
|
+
end
|
21
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
22
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
23
|
+
end
|
24
|
+
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
25
|
+
end
|
26
|
+
if Aws::Endpoints::Matchers.set?(region)
|
27
|
+
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
|
28
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
29
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
30
|
+
return Aws::Endpoints::Endpoint.new(url: "https://api.pricing-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
31
|
+
end
|
32
|
+
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
33
|
+
end
|
19
34
|
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
20
|
-
|
35
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
|
36
|
+
return Aws::Endpoints::Endpoint.new(url: "https://api.pricing-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
37
|
+
end
|
38
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
21
39
|
end
|
22
40
|
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
23
|
-
|
41
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
42
|
+
return Aws::Endpoints::Endpoint.new(url: "https://api.pricing.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
43
|
+
end
|
44
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
24
45
|
end
|
25
|
-
|
26
|
-
|
27
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
28
|
-
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
29
|
-
return Aws::Endpoints::Endpoint.new(url: "https://api.pricing-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
30
|
-
end
|
31
|
-
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
32
|
-
end
|
33
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
34
|
-
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
|
35
|
-
return Aws::Endpoints::Endpoint.new(url: "https://api.pricing-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
36
|
-
end
|
37
|
-
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
38
|
-
end
|
39
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
40
|
-
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
41
|
-
return Aws::Endpoints::Endpoint.new(url: "https://api.pricing.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
46
|
+
if Aws::Endpoints::Matchers.string_equals?("aws", Aws::Endpoints::Matchers.attr(partition_result, "name"))
|
47
|
+
return Aws::Endpoints::Endpoint.new(url: "https://api.pricing.#{region}.amazonaws.com", headers: {}, properties: {})
|
42
48
|
end
|
43
|
-
|
49
|
+
return Aws::Endpoints::Endpoint.new(url: "https://api.pricing.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
44
50
|
end
|
45
|
-
return Aws::Endpoints::Endpoint.new(url: "https://api.pricing.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
46
51
|
end
|
52
|
+
raise ArgumentError, "Invalid Configuration: Missing Region"
|
47
53
|
raise ArgumentError, 'No endpoint could be resolved'
|
48
54
|
|
49
55
|
end
|
@@ -39,6 +39,20 @@ module Aws::Pricing
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
+
class GetPriceListFileUrl
|
43
|
+
def self.build(context)
|
44
|
+
unless context.config.regional_endpoint
|
45
|
+
endpoint = context.config.endpoint.to_s
|
46
|
+
end
|
47
|
+
Aws::Pricing::EndpointParameters.new(
|
48
|
+
region: context.config.region,
|
49
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
50
|
+
use_fips: context.config.use_fips_endpoint,
|
51
|
+
endpoint: endpoint,
|
52
|
+
)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
42
56
|
class GetProducts
|
43
57
|
def self.build(context)
|
44
58
|
unless context.config.regional_endpoint
|
@@ -53,5 +67,19 @@ module Aws::Pricing
|
|
53
67
|
end
|
54
68
|
end
|
55
69
|
|
70
|
+
class ListPriceLists
|
71
|
+
def self.build(context)
|
72
|
+
unless context.config.regional_endpoint
|
73
|
+
endpoint = context.config.endpoint.to_s
|
74
|
+
end
|
75
|
+
Aws::Pricing::EndpointParameters.new(
|
76
|
+
region: context.config.region,
|
77
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
78
|
+
use_fips: context.config.use_fips_endpoint,
|
79
|
+
endpoint: endpoint,
|
80
|
+
)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
56
84
|
end
|
57
85
|
end
|
@@ -27,6 +27,7 @@ module Aws::Pricing
|
|
27
27
|
# See {Seahorse::Client::RequestContext} for more information.
|
28
28
|
#
|
29
29
|
# ## Error Classes
|
30
|
+
# * {AccessDeniedException}
|
30
31
|
# * {ExpiredNextTokenException}
|
31
32
|
# * {InternalErrorException}
|
32
33
|
# * {InvalidNextTokenException}
|
@@ -39,6 +40,21 @@ module Aws::Pricing
|
|
39
40
|
|
40
41
|
extend Aws::Errors::DynamicErrors
|
41
42
|
|
43
|
+
class AccessDeniedException < ServiceError
|
44
|
+
|
45
|
+
# @param [Seahorse::Client::RequestContext] context
|
46
|
+
# @param [String] message
|
47
|
+
# @param [Aws::Pricing::Types::AccessDeniedException] data
|
48
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
49
|
+
super(context, message, data)
|
50
|
+
end
|
51
|
+
|
52
|
+
# @return [String]
|
53
|
+
def message
|
54
|
+
@message || @data[:message]
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
42
58
|
class ExpiredNextTokenException < ServiceError
|
43
59
|
|
44
60
|
# @param [Seahorse::Client::RequestContext] context
|
@@ -60,8 +60,12 @@ module Aws::Pricing
|
|
60
60
|
Aws::Pricing::Endpoints::DescribeServices.build(context)
|
61
61
|
when :get_attribute_values
|
62
62
|
Aws::Pricing::Endpoints::GetAttributeValues.build(context)
|
63
|
+
when :get_price_list_file_url
|
64
|
+
Aws::Pricing::Endpoints::GetPriceListFileUrl.build(context)
|
63
65
|
when :get_products
|
64
66
|
Aws::Pricing::Endpoints::GetProducts.build(context)
|
67
|
+
when :list_price_lists
|
68
|
+
Aws::Pricing::Endpoints::ListPriceLists.build(context)
|
65
69
|
end
|
66
70
|
end
|
67
71
|
end
|
@@ -10,6 +10,19 @@
|
|
10
10
|
module Aws::Pricing
|
11
11
|
module Types
|
12
12
|
|
13
|
+
# General authentication failure. The request wasn't signed correctly.
|
14
|
+
#
|
15
|
+
# @!attribute [rw] message
|
16
|
+
# @return [String]
|
17
|
+
#
|
18
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/AccessDeniedException AWS API Documentation
|
19
|
+
#
|
20
|
+
class AccessDeniedException < Struct.new(
|
21
|
+
:message)
|
22
|
+
SENSITIVE = []
|
23
|
+
include Aws::Structure
|
24
|
+
end
|
25
|
+
|
13
26
|
# The values of a given attribute, such as `Throughput Optimized HDD` or
|
14
27
|
# `Provisioned IOPS` for the `Amazon EC2` `volumeType` attribute.
|
15
28
|
#
|
@@ -119,8 +132,8 @@ module Aws::Pricing
|
|
119
132
|
#
|
120
133
|
# @!attribute [rw] value
|
121
134
|
# The service code or attribute value that you want to filter by. If
|
122
|
-
# you
|
123
|
-
# such as `AmazonEC2`. If you
|
135
|
+
# you're filtering by service code this is the actual service code,
|
136
|
+
# such as `AmazonEC2`. If you're filtering by attribute name, this is
|
124
137
|
# the attribute value that you want the returned products to match,
|
125
138
|
# such as a `Provisioned IOPS` volume.
|
126
139
|
# @return [String]
|
@@ -186,6 +199,47 @@ module Aws::Pricing
|
|
186
199
|
include Aws::Structure
|
187
200
|
end
|
188
201
|
|
202
|
+
# @!attribute [rw] price_list_arn
|
203
|
+
# The unique identifier that maps to where your Price List files are
|
204
|
+
# located. `PriceListArn` can be obtained from the [ `ListPriceLists`
|
205
|
+
# ][1] response.
|
206
|
+
#
|
207
|
+
#
|
208
|
+
#
|
209
|
+
# [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html
|
210
|
+
# @return [String]
|
211
|
+
#
|
212
|
+
# @!attribute [rw] file_format
|
213
|
+
# The format that you want to retrieve your Price List files in. The
|
214
|
+
# `FileFormat` can be obtained from the [ `ListPriceLists` ][1]
|
215
|
+
# response.
|
216
|
+
#
|
217
|
+
#
|
218
|
+
#
|
219
|
+
# [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html
|
220
|
+
# @return [String]
|
221
|
+
#
|
222
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetPriceListFileUrlRequest AWS API Documentation
|
223
|
+
#
|
224
|
+
class GetPriceListFileUrlRequest < Struct.new(
|
225
|
+
:price_list_arn,
|
226
|
+
:file_format)
|
227
|
+
SENSITIVE = []
|
228
|
+
include Aws::Structure
|
229
|
+
end
|
230
|
+
|
231
|
+
# @!attribute [rw] url
|
232
|
+
# The URL to download your Price List file from.
|
233
|
+
# @return [String]
|
234
|
+
#
|
235
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetPriceListFileUrlResponse AWS API Documentation
|
236
|
+
#
|
237
|
+
class GetPriceListFileUrlResponse < Struct.new(
|
238
|
+
:url)
|
239
|
+
SENSITIVE = []
|
240
|
+
include Aws::Structure
|
241
|
+
end
|
242
|
+
|
189
243
|
# @!attribute [rw] service_code
|
190
244
|
# The code for the service whose products you want to retrieve.
|
191
245
|
# @return [String]
|
@@ -286,6 +340,84 @@ module Aws::Pricing
|
|
286
340
|
include Aws::Structure
|
287
341
|
end
|
288
342
|
|
343
|
+
# @!attribute [rw] service_code
|
344
|
+
# The service code or the Savings Plan service code for the attributes
|
345
|
+
# that you want to retrieve. For example, to get the list of
|
346
|
+
# applicable Amazon EC2 price lists, use `AmazonEC2`. For a full list
|
347
|
+
# of service codes containing On-Demand and Reserved Instance (RI)
|
348
|
+
# pricing, use the [ `DescribeServices` ][1] API.
|
349
|
+
#
|
350
|
+
# To retrieve the Compute Savings Plan price lists, use
|
351
|
+
# `ComputeSavingsPlans`. To retrieve Machine Learning Savings Plans
|
352
|
+
# price lists, use `MachineLearningSavingsPlans`.
|
353
|
+
#
|
354
|
+
#
|
355
|
+
#
|
356
|
+
# [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_DescribeServices.html#awscostmanagement-pricing_DescribeServices-request-FormatVersion
|
357
|
+
# @return [String]
|
358
|
+
#
|
359
|
+
# @!attribute [rw] effective_date
|
360
|
+
# The date that the Price List file prices are effective from.
|
361
|
+
# @return [Time]
|
362
|
+
#
|
363
|
+
# @!attribute [rw] region_code
|
364
|
+
# This is used to filter the Price List by Amazon Web Services Region.
|
365
|
+
# For example, to get the price list only for the `US East (N.
|
366
|
+
# Virginia)` Region, use `us-east-1`. If nothing is specified, you
|
367
|
+
# retrieve price lists for all applicable Regions. The available
|
368
|
+
# `RegionCode` list can be retrieved from [ `GetAttributeValues` ][1]
|
369
|
+
# API.
|
370
|
+
#
|
371
|
+
#
|
372
|
+
#
|
373
|
+
# [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_GetAttributeValues.html
|
374
|
+
# @return [String]
|
375
|
+
#
|
376
|
+
# @!attribute [rw] currency_code
|
377
|
+
# The three alphabetical character ISO-4217 currency code that the
|
378
|
+
# Price List files are denominated in.
|
379
|
+
# @return [String]
|
380
|
+
#
|
381
|
+
# @!attribute [rw] next_token
|
382
|
+
# The pagination token that indicates the next set of results that you
|
383
|
+
# want to retrieve.
|
384
|
+
# @return [String]
|
385
|
+
#
|
386
|
+
# @!attribute [rw] max_results
|
387
|
+
# The maximum number of results to return in the response.
|
388
|
+
# @return [Integer]
|
389
|
+
#
|
390
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/ListPriceListsRequest AWS API Documentation
|
391
|
+
#
|
392
|
+
class ListPriceListsRequest < Struct.new(
|
393
|
+
:service_code,
|
394
|
+
:effective_date,
|
395
|
+
:region_code,
|
396
|
+
:currency_code,
|
397
|
+
:next_token,
|
398
|
+
:max_results)
|
399
|
+
SENSITIVE = []
|
400
|
+
include Aws::Structure
|
401
|
+
end
|
402
|
+
|
403
|
+
# @!attribute [rw] price_lists
|
404
|
+
# The type of price list references that match your request.
|
405
|
+
# @return [Array<Types::PriceList>]
|
406
|
+
#
|
407
|
+
# @!attribute [rw] next_token
|
408
|
+
# The pagination token that indicates the next set of results to
|
409
|
+
# retrieve.
|
410
|
+
# @return [String]
|
411
|
+
#
|
412
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/ListPriceListsResponse AWS API Documentation
|
413
|
+
#
|
414
|
+
class ListPriceListsResponse < Struct.new(
|
415
|
+
:price_lists,
|
416
|
+
:next_token)
|
417
|
+
SENSITIVE = []
|
418
|
+
include Aws::Structure
|
419
|
+
end
|
420
|
+
|
289
421
|
# The requested resource can't be found.
|
290
422
|
#
|
291
423
|
# @!attribute [rw] message
|
@@ -299,6 +431,63 @@ module Aws::Pricing
|
|
299
431
|
include Aws::Structure
|
300
432
|
end
|
301
433
|
|
434
|
+
# <i> <b>This feature is in preview release and is subject to change.
|
435
|
+
# Your use of Amazon Web Services Price List API is subject to the Beta
|
436
|
+
# Service Participation terms of the <a
|
437
|
+
# href="https://aws.amazon.com/service-terms/">Amazon Web Services
|
438
|
+
# Service Terms</a> (Section 1.10).</b> </i>
|
439
|
+
#
|
440
|
+
# This is the type of price list references that match your request.
|
441
|
+
#
|
442
|
+
# @!attribute [rw] price_list_arn
|
443
|
+
# The unique identifier that maps to where your Price List files are
|
444
|
+
# located. `PriceListArn` can be obtained from the [ `ListPriceList`
|
445
|
+
# ][1] response.
|
446
|
+
#
|
447
|
+
#
|
448
|
+
#
|
449
|
+
# [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html
|
450
|
+
# @return [String]
|
451
|
+
#
|
452
|
+
# @!attribute [rw] region_code
|
453
|
+
# This is used to filter the Price List by Amazon Web Services Region.
|
454
|
+
# For example, to get the price list only for the `US East (N.
|
455
|
+
# Virginia)` Region, use `us-east-1`. If nothing is specified, you
|
456
|
+
# retrieve price lists for all applicable Regions. The available
|
457
|
+
# `RegionCode` list can be retrieved from [ `GetAttributeValues` ][1]
|
458
|
+
# API.
|
459
|
+
#
|
460
|
+
#
|
461
|
+
#
|
462
|
+
# [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_GetAttributeValues.html
|
463
|
+
# @return [String]
|
464
|
+
#
|
465
|
+
# @!attribute [rw] currency_code
|
466
|
+
# The three alphabetical character ISO-4217 currency code the Price
|
467
|
+
# List files are denominated in.
|
468
|
+
# @return [String]
|
469
|
+
#
|
470
|
+
# @!attribute [rw] file_formats
|
471
|
+
# The format you want to retrieve your Price List files. The
|
472
|
+
# `FileFormat` can be obtained from the [ `ListPriceList` ][1]
|
473
|
+
# response.
|
474
|
+
#
|
475
|
+
#
|
476
|
+
#
|
477
|
+
# [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html
|
478
|
+
# @return [Array<String>]
|
479
|
+
#
|
480
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/PriceList AWS API Documentation
|
481
|
+
#
|
482
|
+
class PriceList < Struct.new(
|
483
|
+
:price_list_arn,
|
484
|
+
:region_code,
|
485
|
+
:currency_code,
|
486
|
+
:file_formats)
|
487
|
+
SENSITIVE = []
|
488
|
+
include Aws::Structure
|
489
|
+
end
|
490
|
+
|
302
491
|
# The metadata for a service, such as the service code and available
|
303
492
|
# attribute names.
|
304
493
|
#
|
data/lib/aws-sdk-pricing.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-pricing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.43.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: 2023-01
|
11
|
+
date: 2023-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|