aws-sdk-pricing 1.42.0 → 1.44.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: 6417c454cc32c106948ba165d0426ddcf5272c365da6310691d6073678145b7b
4
- data.tar.gz: cfce9da89edae3c6eaed9424715f06826b37e46514ee023cee4c7658be2e4707
3
+ metadata.gz: baf7ab4d4d1fbe792a602c1599f22dfddc2be6e607108f964125f11f3d2e2b6e
4
+ data.tar.gz: 3ac092ba352321bcd402aa79f091037693aecfbadff0470aa1f61df2fb05074d
5
5
  SHA512:
6
- metadata.gz: 21431e28e9ce274f0c506b3da9d1b61f8e2cd6eb660f9a6fca1d97b0df8811a205f70335163fe34dde74a43c89f0d297ef8edb8987e0ba74871483558266b517
7
- data.tar.gz: 302cf29267ab4a45e0ef515a435903997cf347a5aba7913f825dd431521b12f4d6660c24ace656f81b481d97c9d3c4ab646fef8e43547ed0cadf1aa5b078b16f
6
+ metadata.gz: 805fd0ab3a6475d6e5707627693100e521fbe95387da08639192a032029cab530276185d1741b07c98811c73dd88c898a6a3f1312037e50724ef410bceab632b
7
+ data.tar.gz: 1cfe15fe873e1a97617acc98f7e89f600aaefa94f970d47665b845aaefb6c23c66e1d3c565e6f9bd8c35501ba6319baf24aaf45080508ed8bf4c8b81f5e83a12
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.44.0 (2023-05-31)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.43.0 (2023-03-01)
10
+ ------------------
11
+
12
+ * 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
13
+
4
14
  1.42.0 (2023-01-18)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.42.0
1
+ 1.44.0
@@ -275,6 +275,11 @@ module Aws::Pricing
275
275
  # in the future.
276
276
  #
277
277
  #
278
+ # @option options [String] :sdk_ua_app_id
279
+ # A unique and opaque application ID that is appended to the
280
+ # User-Agent header as app/<sdk_ua_app_id>. It should have a
281
+ # maximum length of 50.
282
+ #
278
283
  # @option options [String] :secret_access_key
279
284
  #
280
285
  # @option options [String] :session_token
@@ -549,6 +554,62 @@ module Aws::Pricing
549
554
  req.send_request(options)
550
555
  end
551
556
 
557
+ # <i> <b>This feature is in preview release and is subject to change.
558
+ # Your use of Amazon Web Services Price List API is subject to the Beta
559
+ # Service Participation terms of the <a
560
+ # href="https://aws.amazon.com/service-terms/">Amazon Web Services
561
+ # Service Terms</a> (Section 1.10).</b> </i>
562
+ #
563
+ # This returns the URL that you can retrieve your Price List file from.
564
+ # This URL is based on the `PriceListArn` and `FileFormat` that you
565
+ # retrieve from the [ `ListPriceLists` ][1] response.
566
+ #
567
+ #
568
+ #
569
+ # [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html
570
+ #
571
+ # @option params [required, String] :price_list_arn
572
+ # The unique identifier that maps to where your Price List files are
573
+ # located. `PriceListArn` can be obtained from the [ `ListPriceLists`
574
+ # ][1] response.
575
+ #
576
+ #
577
+ #
578
+ # [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html
579
+ #
580
+ # @option params [required, String] :file_format
581
+ # The format that you want to retrieve your Price List files in. The
582
+ # `FileFormat` can be obtained from the [ `ListPriceLists` ][1]
583
+ # response.
584
+ #
585
+ #
586
+ #
587
+ # [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html
588
+ #
589
+ # @return [Types::GetPriceListFileUrlResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
590
+ #
591
+ # * {Types::GetPriceListFileUrlResponse#url #url} => String
592
+ #
593
+ # @example Request syntax with placeholder values
594
+ #
595
+ # resp = client.get_price_list_file_url({
596
+ # price_list_arn: "PriceListArn", # required
597
+ # file_format: "FileFormat", # required
598
+ # })
599
+ #
600
+ # @example Response structure
601
+ #
602
+ # resp.url #=> String
603
+ #
604
+ # @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetPriceListFileUrl AWS API Documentation
605
+ #
606
+ # @overload get_price_list_file_url(params = {})
607
+ # @param [Hash] params ({})
608
+ def get_price_list_file_url(params = {}, options = {})
609
+ req = build_request(:get_price_list_file_url, params)
610
+ req.send_request(options)
611
+ end
612
+
552
613
  # Returns a list of all products that match the filter criteria.
553
614
  #
554
615
  # @option params [required, String] :service_code
@@ -610,6 +671,103 @@ module Aws::Pricing
610
671
  req.send_request(options)
611
672
  end
612
673
 
674
+ # <i> <b>This feature is in preview release and is subject to change.
675
+ # Your use of Amazon Web Services Price List API is subject to the Beta
676
+ # Service Participation terms of the <a
677
+ # href="https://aws.amazon.com/service-terms/">Amazon Web Services
678
+ # Service Terms</a> (Section 1.10).</b> </i>
679
+ #
680
+ # This returns a list of Price List references that the requester if
681
+ # authorized to view, given a `ServiceCode`, `CurrencyCode`, and an
682
+ # `EffectiveDate`. Use without a `RegionCode` filter to list Price List
683
+ # references from all available Amazon Web Services Regions. Use with a
684
+ # `RegionCode` filter to get the Price List reference that's specific
685
+ # to a specific Amazon Web Services Region. You can use the
686
+ # `PriceListArn` from the response to get your preferred Price List
687
+ # files through the [ `GetPriceListFileUrl` ][1] API.
688
+ #
689
+ #
690
+ #
691
+ # [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_GetPriceListFileUrl.html
692
+ #
693
+ # @option params [required, String] :service_code
694
+ # The service code or the Savings Plan service code for the attributes
695
+ # that you want to retrieve. For example, to get the list of applicable
696
+ # Amazon EC2 price lists, use `AmazonEC2`. For a full list of service
697
+ # codes containing On-Demand and Reserved Instance (RI) pricing, use the
698
+ # [ `DescribeServices` ][1] API.
699
+ #
700
+ # To retrieve the Compute Savings Plan price lists, use
701
+ # `ComputeSavingsPlans`. To retrieve Machine Learning Savings Plans
702
+ # price lists, use `MachineLearningSavingsPlans`.
703
+ #
704
+ #
705
+ #
706
+ # [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_DescribeServices.html#awscostmanagement-pricing_DescribeServices-request-FormatVersion
707
+ #
708
+ # @option params [required, Time,DateTime,Date,Integer,String] :effective_date
709
+ # The date that the Price List file prices are effective from.
710
+ #
711
+ # @option params [String] :region_code
712
+ # This is used to filter the Price List by Amazon Web Services Region.
713
+ # For example, to get the price list only for the `US East (N.
714
+ # Virginia)` Region, use `us-east-1`. If nothing is specified, you
715
+ # retrieve price lists for all applicable Regions. The available
716
+ # `RegionCode` list can be retrieved from [ `GetAttributeValues` ][1]
717
+ # API.
718
+ #
719
+ #
720
+ #
721
+ # [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_GetAttributeValues.html
722
+ #
723
+ # @option params [required, String] :currency_code
724
+ # The three alphabetical character ISO-4217 currency code that the Price
725
+ # List files are denominated in.
726
+ #
727
+ # @option params [String] :next_token
728
+ # The pagination token that indicates the next set of results that you
729
+ # want to retrieve.
730
+ #
731
+ # @option params [Integer] :max_results
732
+ # The maximum number of results to return in the response.
733
+ #
734
+ # @return [Types::ListPriceListsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
735
+ #
736
+ # * {Types::ListPriceListsResponse#price_lists #price_lists} => Array&lt;Types::PriceList&gt;
737
+ # * {Types::ListPriceListsResponse#next_token #next_token} => String
738
+ #
739
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
740
+ #
741
+ # @example Request syntax with placeholder values
742
+ #
743
+ # resp = client.list_price_lists({
744
+ # service_code: "ServiceCode", # required
745
+ # effective_date: Time.now, # required
746
+ # region_code: "RegionCode",
747
+ # currency_code: "CurrencyCode", # required
748
+ # next_token: "String",
749
+ # max_results: 1,
750
+ # })
751
+ #
752
+ # @example Response structure
753
+ #
754
+ # resp.price_lists #=> Array
755
+ # resp.price_lists[0].price_list_arn #=> String
756
+ # resp.price_lists[0].region_code #=> String
757
+ # resp.price_lists[0].currency_code #=> String
758
+ # resp.price_lists[0].file_formats #=> Array
759
+ # resp.price_lists[0].file_formats[0] #=> String
760
+ # resp.next_token #=> String
761
+ #
762
+ # @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/ListPriceLists AWS API Documentation
763
+ #
764
+ # @overload list_price_lists(params = {})
765
+ # @param [Hash] params ({})
766
+ def list_price_lists(params = {}, options = {})
767
+ req = build_request(:list_price_lists, params)
768
+ req.send_request(options)
769
+ end
770
+
613
771
  # @!endgroup
614
772
 
615
773
  # @param params ({})
@@ -623,7 +781,7 @@ module Aws::Pricing
623
781
  params: params,
624
782
  config: config)
625
783
  context[:gem_name] = 'aws-sdk-pricing'
626
- context[:gem_version] = '1.42.0'
784
+ context[:gem_version] = '1.44.0'
627
785
  Seahorse::Client::Request.new(handlers, context)
628
786
  end
629
787
 
@@ -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 (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
18
- if Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint))
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
- raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
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
- raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
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
- return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
26
- end
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
- raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
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 are filtering by service code this is the actual service code,
123
- # such as `AmazonEC2`. If you are filtering by attribute name, this is
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
  #
@@ -52,6 +52,6 @@ require_relative 'aws-sdk-pricing/customizations'
52
52
  # @!group service
53
53
  module Aws::Pricing
54
54
 
55
- GEM_VERSION = '1.42.0'
55
+ GEM_VERSION = '1.44.0'
56
56
 
57
57
  end
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.42.0
4
+ version: 1.44.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-18 00:00:00.000000000 Z
11
+ date: 2023-05-31 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.165.0
22
+ version: 3.174.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.165.0
32
+ version: 3.174.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement