aws-sdk-savingsplans 1.38.0 → 1.40.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-savingsplans/client.rb +127 -64
- data/lib/aws-sdk-savingsplans/client_api.rb +22 -0
- data/lib/aws-sdk-savingsplans/endpoint_provider.rb +1 -1
- data/lib/aws-sdk-savingsplans/endpoints.rb +14 -0
- data/lib/aws-sdk-savingsplans/plugins/endpoints.rb +2 -0
- data/lib/aws-sdk-savingsplans/types.rb +71 -25
- data/lib/aws-sdk-savingsplans.rb +1 -1
- data/sig/client.rbs +12 -1
- data/sig/types.rbs +14 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad8bdf4f784723663b13ceabf9b97d114431690841f011c5c183ea56667857a5
|
4
|
+
data.tar.gz: 705fec4f3a3d58787f05f77be399f89deb0fab291745ac949e2336e55de60dc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8343c66fc2f452690a120587c2de431d27c2f587dc1375410acd56f2405c9b1f0bee0012e903eb1dad9fdb8bfdae5964cd90215ebc9fc3a2cac0ee4bf40e31df
|
7
|
+
data.tar.gz: 31926d4f284d1f47ff84ec41e2d2cd97a267b9ff97fb78770a5c58fe8768add36fdfa5da26c21396fe93cde5817008b5bf9f4923ef8754e94553d6d6d836d5ed
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.40.0 (2024-04-25)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
8
|
+
|
9
|
+
1.39.0 (2024-03-20)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Feature - Introducing the Savings Plans Return feature enabling customers to return their Savings Plans within 7 days of purchase.
|
13
|
+
|
4
14
|
1.38.0 (2024-01-26)
|
5
15
|
------------------
|
6
16
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.40.0
|
@@ -22,6 +22,7 @@ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
|
|
22
22
|
require 'aws-sdk-core/plugins/response_paging.rb'
|
23
23
|
require 'aws-sdk-core/plugins/stub_responses.rb'
|
24
24
|
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
25
|
+
require 'aws-sdk-core/plugins/invocation_id.rb'
|
25
26
|
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
26
27
|
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
27
28
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
@@ -72,6 +73,7 @@ module Aws::SavingsPlans
|
|
72
73
|
add_plugin(Aws::Plugins::ResponsePaging)
|
73
74
|
add_plugin(Aws::Plugins::StubResponses)
|
74
75
|
add_plugin(Aws::Plugins::IdempotencyToken)
|
76
|
+
add_plugin(Aws::Plugins::InvocationId)
|
75
77
|
add_plugin(Aws::Plugins::JsonvalueConverter)
|
76
78
|
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
77
79
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
@@ -196,10 +198,17 @@ module Aws::SavingsPlans
|
|
196
198
|
# When set to 'true' the request body will not be compressed
|
197
199
|
# for supported operations.
|
198
200
|
#
|
199
|
-
# @option options [String] :endpoint
|
200
|
-
#
|
201
|
-
#
|
202
|
-
#
|
201
|
+
# @option options [String, URI::HTTPS, URI::HTTP] :endpoint
|
202
|
+
# Normally you should not configure the `:endpoint` option
|
203
|
+
# directly. This is normally constructed from the `:region`
|
204
|
+
# option. Configuring `:endpoint` is normally reserved for
|
205
|
+
# connecting to test or custom endpoints. The endpoint should
|
206
|
+
# be a URI formatted like:
|
207
|
+
#
|
208
|
+
# 'http://example.com'
|
209
|
+
# 'https://example.com'
|
210
|
+
# 'http://example.com:123'
|
211
|
+
#
|
203
212
|
#
|
204
213
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
205
214
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
@@ -337,50 +346,65 @@ module Aws::SavingsPlans
|
|
337
346
|
# @option options [Aws::SavingsPlans::EndpointProvider] :endpoint_provider
|
338
347
|
# The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::SavingsPlans::EndpointParameters`
|
339
348
|
#
|
340
|
-
# @option options [
|
341
|
-
#
|
342
|
-
#
|
343
|
-
#
|
344
|
-
#
|
345
|
-
#
|
346
|
-
#
|
347
|
-
#
|
348
|
-
#
|
349
|
-
#
|
350
|
-
#
|
351
|
-
# @option options [Float] :
|
352
|
-
#
|
353
|
-
#
|
354
|
-
#
|
355
|
-
#
|
356
|
-
#
|
357
|
-
#
|
358
|
-
#
|
359
|
-
#
|
360
|
-
#
|
361
|
-
#
|
362
|
-
#
|
363
|
-
#
|
364
|
-
#
|
365
|
-
#
|
366
|
-
#
|
367
|
-
#
|
349
|
+
# @option options [Float] :http_continue_timeout (1)
|
350
|
+
# The number of seconds to wait for a 100-continue response before sending the
|
351
|
+
# request body. This option has no effect unless the request has "Expect"
|
352
|
+
# header set to "100-continue". Defaults to `nil` which disables this
|
353
|
+
# behaviour. This value can safely be set per request on the session.
|
354
|
+
#
|
355
|
+
# @option options [Float] :http_idle_timeout (5)
|
356
|
+
# The number of seconds a connection is allowed to sit idle before it
|
357
|
+
# is considered stale. Stale connections are closed and removed from the
|
358
|
+
# pool before making a request.
|
359
|
+
#
|
360
|
+
# @option options [Float] :http_open_timeout (15)
|
361
|
+
# The default number of seconds to wait for response data.
|
362
|
+
# This value can safely be set per-request on the session.
|
363
|
+
#
|
364
|
+
# @option options [URI::HTTP,String] :http_proxy
|
365
|
+
# A proxy to send requests through. Formatted like 'http://proxy.com:123'.
|
366
|
+
#
|
367
|
+
# @option options [Float] :http_read_timeout (60)
|
368
|
+
# The default number of seconds to wait for response data.
|
369
|
+
# This value can safely be set per-request on the session.
|
370
|
+
#
|
371
|
+
# @option options [Boolean] :http_wire_trace (false)
|
372
|
+
# When `true`, HTTP debug output will be sent to the `:logger`.
|
373
|
+
#
|
374
|
+
# @option options [Proc] :on_chunk_received
|
375
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
376
|
+
# of the response body is received. It provides three arguments: the chunk,
|
377
|
+
# the number of bytes received, and the total number of
|
378
|
+
# bytes in the response (or nil if the server did not send a `content-length`).
|
379
|
+
#
|
380
|
+
# @option options [Proc] :on_chunk_sent
|
381
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
382
|
+
# of the request body is sent. It provides three arguments: the chunk,
|
383
|
+
# the number of bytes read from the body, and the total number of
|
384
|
+
# bytes in the body.
|
385
|
+
#
|
386
|
+
# @option options [Boolean] :raise_response_errors (true)
|
387
|
+
# When `true`, response errors are raised.
|
388
|
+
#
|
389
|
+
# @option options [String] :ssl_ca_bundle
|
390
|
+
# Full path to the SSL certificate authority bundle file that should be used when
|
391
|
+
# verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
|
392
|
+
# `:ssl_ca_directory` the the system default will be used if available.
|
393
|
+
#
|
394
|
+
# @option options [String] :ssl_ca_directory
|
395
|
+
# Full path of the directory that contains the unbundled SSL certificate
|
396
|
+
# authority files for verifying peer certificates. If you do
|
397
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
|
398
|
+
# default will be used if available.
|
368
399
|
#
|
369
|
-
# @option options [
|
370
|
-
#
|
371
|
-
# connection.
|
400
|
+
# @option options [String] :ssl_ca_store
|
401
|
+
# Sets the X509::Store to verify peer certificate.
|
372
402
|
#
|
373
|
-
# @option options [
|
374
|
-
#
|
375
|
-
# verifying peer certificates. If you do not pass
|
376
|
-
# `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
|
377
|
-
# will be used if available.
|
403
|
+
# @option options [Float] :ssl_timeout
|
404
|
+
# Sets the SSL timeout in seconds
|
378
405
|
#
|
379
|
-
# @option options [
|
380
|
-
#
|
381
|
-
# authority files for verifying peer certificates. If you do
|
382
|
-
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
|
383
|
-
# system default will be used if available.
|
406
|
+
# @option options [Boolean] :ssl_verify_peer (true)
|
407
|
+
# When `true`, SSL peer certificates are verified when establishing a connection.
|
384
408
|
#
|
385
409
|
def initialize(*args)
|
386
410
|
super
|
@@ -394,21 +418,21 @@ module Aws::SavingsPlans
|
|
394
418
|
# The ID of the offering.
|
395
419
|
#
|
396
420
|
# @option params [required, String] :commitment
|
397
|
-
# The hourly commitment, in
|
398
|
-
#
|
399
|
-
# point.
|
421
|
+
# The hourly commitment, in the same currency of the
|
422
|
+
# `savingsPlanOfferingId`. This is a value between 0.001 and 1 million.
|
423
|
+
# You cannot specify more than five digits after the decimal point.
|
400
424
|
#
|
401
425
|
# @option params [String] :upfront_payment_amount
|
402
426
|
# The up-front payment amount. This is a whole number between 50 and 99
|
403
|
-
# percent of the total value of the Savings Plan. This parameter is
|
404
|
-
# supported
|
427
|
+
# percent of the total value of the Savings Plan. This parameter is only
|
428
|
+
# supported if the payment option is `Partial Upfront`.
|
405
429
|
#
|
406
430
|
# @option params [Time,DateTime,Date,Integer,String] :purchase_time
|
407
|
-
# The time
|
431
|
+
# The purchase time of the Savings Plan in UTC format
|
408
432
|
# (YYYY-MM-DDTHH:MM:SSZ).
|
409
433
|
#
|
410
434
|
# @option params [String] :client_token
|
411
|
-
#
|
435
|
+
# A unique, case-sensitive identifier that you provide to ensure the
|
412
436
|
# idempotency of the request.
|
413
437
|
#
|
414
438
|
# **A suitable default value is auto-generated.** You should normally
|
@@ -469,7 +493,7 @@ module Aws::SavingsPlans
|
|
469
493
|
req.send_request(options)
|
470
494
|
end
|
471
495
|
|
472
|
-
# Describes the specified Savings
|
496
|
+
# Describes the rates for the specified Savings Plan.
|
473
497
|
#
|
474
498
|
# @option params [required, String] :savings_plan_id
|
475
499
|
# The ID of the Savings Plan.
|
@@ -547,7 +571,7 @@ module Aws::SavingsPlans
|
|
547
571
|
# value.
|
548
572
|
#
|
549
573
|
# @option params [Array<String>] :states
|
550
|
-
# The states.
|
574
|
+
# The current states of the Savings Plans.
|
551
575
|
#
|
552
576
|
# @option params [Array<Types::SavingsPlanFilter>] :filters
|
553
577
|
# The filters.
|
@@ -564,7 +588,7 @@ module Aws::SavingsPlans
|
|
564
588
|
# savings_plan_ids: ["SavingsPlanId"],
|
565
589
|
# next_token: "PaginationToken",
|
566
590
|
# max_results: 1,
|
567
|
-
# states: ["payment-pending"], # accepts payment-pending, payment-failed, active, retired, queued, queued-deleted
|
591
|
+
# states: ["payment-pending"], # accepts payment-pending, payment-failed, active, retired, queued, queued-deleted, pending-return, returned
|
568
592
|
# filters: [
|
569
593
|
# {
|
570
594
|
# name: "region", # accepts region, ec2-instance-family, commitment, upfront, term, savings-plan-type, payment-option, start, end
|
@@ -582,7 +606,7 @@ module Aws::SavingsPlans
|
|
582
606
|
# resp.savings_plans[0].description #=> String
|
583
607
|
# resp.savings_plans[0].start #=> String
|
584
608
|
# resp.savings_plans[0].end #=> String
|
585
|
-
# resp.savings_plans[0].state #=> String, one of "payment-pending", "payment-failed", "active", "retired", "queued", "queued-deleted"
|
609
|
+
# resp.savings_plans[0].state #=> String, one of "payment-pending", "payment-failed", "active", "retired", "queued", "queued-deleted", "pending-return", "returned"
|
586
610
|
# resp.savings_plans[0].region #=> String
|
587
611
|
# resp.savings_plans[0].ec2_instance_family #=> String
|
588
612
|
# resp.savings_plans[0].savings_plan_type #=> String, one of "Compute", "EC2Instance", "SageMaker"
|
@@ -596,6 +620,7 @@ module Aws::SavingsPlans
|
|
596
620
|
# resp.savings_plans[0].term_duration_in_seconds #=> Integer
|
597
621
|
# resp.savings_plans[0].tags #=> Hash
|
598
622
|
# resp.savings_plans[0].tags["TagKey"] #=> String
|
623
|
+
# resp.savings_plans[0].returnable_until #=> String
|
599
624
|
# resp.next_token #=> String
|
600
625
|
#
|
601
626
|
# @see http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/DescribeSavingsPlans AWS API Documentation
|
@@ -607,7 +632,7 @@ module Aws::SavingsPlans
|
|
607
632
|
req.send_request(options)
|
608
633
|
end
|
609
634
|
|
610
|
-
# Describes the specified Savings Plans
|
635
|
+
# Describes the offering rates for the specified Savings Plans.
|
611
636
|
#
|
612
637
|
# @option params [Array<String>] :savings_plan_offering_ids
|
613
638
|
# The IDs of the offerings.
|
@@ -619,7 +644,7 @@ module Aws::SavingsPlans
|
|
619
644
|
# The plan types.
|
620
645
|
#
|
621
646
|
# @option params [Array<String>] :products
|
622
|
-
# The
|
647
|
+
# The Amazon Web Services products.
|
623
648
|
#
|
624
649
|
# @option params [Array<String>] :service_codes
|
625
650
|
# The services.
|
@@ -628,7 +653,8 @@ module Aws::SavingsPlans
|
|
628
653
|
# The usage details of the line item in the billing report.
|
629
654
|
#
|
630
655
|
# @option params [Array<String>] :operations
|
631
|
-
# The specific
|
656
|
+
# The specific Amazon Web Services operation for the line item in the
|
657
|
+
# billing report.
|
632
658
|
#
|
633
659
|
# @option params [Array<Types::SavingsPlanOfferingRateFilterElement>] :filters
|
634
660
|
# The filters.
|
@@ -695,7 +721,7 @@ module Aws::SavingsPlans
|
|
695
721
|
req.send_request(options)
|
696
722
|
end
|
697
723
|
|
698
|
-
# Describes the specified Savings Plans
|
724
|
+
# Describes the offerings for the specified Savings Plans.
|
699
725
|
#
|
700
726
|
# @option params [Array<String>] :offering_ids
|
701
727
|
# The IDs of the offerings.
|
@@ -707,10 +733,10 @@ module Aws::SavingsPlans
|
|
707
733
|
# The product type.
|
708
734
|
#
|
709
735
|
# @option params [Array<String>] :plan_types
|
710
|
-
# The plan
|
736
|
+
# The plan types.
|
711
737
|
#
|
712
738
|
# @option params [Array<Integer>] :durations
|
713
|
-
# The
|
739
|
+
# The duration, in seconds.
|
714
740
|
#
|
715
741
|
# @option params [Array<String>] :currencies
|
716
742
|
# The currencies.
|
@@ -725,7 +751,8 @@ module Aws::SavingsPlans
|
|
725
751
|
# The usage details of the line item in the billing report.
|
726
752
|
#
|
727
753
|
# @option params [Array<String>] :operations
|
728
|
-
# The specific
|
754
|
+
# The specific Amazon Web Services operation for the line item in the
|
755
|
+
# billing report.
|
729
756
|
#
|
730
757
|
# @option params [Array<Types::SavingsPlanOfferingFilterElement>] :filters
|
731
758
|
# The filters.
|
@@ -823,6 +850,42 @@ module Aws::SavingsPlans
|
|
823
850
|
req.send_request(options)
|
824
851
|
end
|
825
852
|
|
853
|
+
# Returns the specified Savings Plan.
|
854
|
+
#
|
855
|
+
# @option params [required, String] :savings_plan_id
|
856
|
+
# The ID of the Savings Plan.
|
857
|
+
#
|
858
|
+
# @option params [String] :client_token
|
859
|
+
# A unique, case-sensitive identifier that you provide to ensure the
|
860
|
+
# idempotency of the request.
|
861
|
+
#
|
862
|
+
# **A suitable default value is auto-generated.** You should normally
|
863
|
+
# not need to pass this option.**
|
864
|
+
#
|
865
|
+
# @return [Types::ReturnSavingsPlanResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
866
|
+
#
|
867
|
+
# * {Types::ReturnSavingsPlanResponse#savings_plan_id #savings_plan_id} => String
|
868
|
+
#
|
869
|
+
# @example Request syntax with placeholder values
|
870
|
+
#
|
871
|
+
# resp = client.return_savings_plan({
|
872
|
+
# savings_plan_id: "SavingsPlanId", # required
|
873
|
+
# client_token: "ClientToken",
|
874
|
+
# })
|
875
|
+
#
|
876
|
+
# @example Response structure
|
877
|
+
#
|
878
|
+
# resp.savings_plan_id #=> String
|
879
|
+
#
|
880
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/ReturnSavingsPlan AWS API Documentation
|
881
|
+
#
|
882
|
+
# @overload return_savings_plan(params = {})
|
883
|
+
# @param [Hash] params ({})
|
884
|
+
def return_savings_plan(params = {}, options = {})
|
885
|
+
req = build_request(:return_savings_plan, params)
|
886
|
+
req.send_request(options)
|
887
|
+
end
|
888
|
+
|
826
889
|
# Adds the specified tags to the specified resource.
|
827
890
|
#
|
828
891
|
# @option params [required, String] :resource_arn
|
@@ -891,7 +954,7 @@ module Aws::SavingsPlans
|
|
891
954
|
params: params,
|
892
955
|
config: config)
|
893
956
|
context[:gem_name] = 'aws-sdk-savingsplans'
|
894
|
-
context[:gem_version] = '1.
|
957
|
+
context[:gem_version] = '1.40.0'
|
895
958
|
Seahorse::Client::Request.new(handlers, context)
|
896
959
|
end
|
897
960
|
|
@@ -44,6 +44,8 @@ module Aws::SavingsPlans
|
|
44
44
|
ParentSavingsPlanOffering = Shapes::StructureShape.new(name: 'ParentSavingsPlanOffering')
|
45
45
|
Region = Shapes::StringShape.new(name: 'Region')
|
46
46
|
ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
|
47
|
+
ReturnSavingsPlanRequest = Shapes::StructureShape.new(name: 'ReturnSavingsPlanRequest')
|
48
|
+
ReturnSavingsPlanResponse = Shapes::StructureShape.new(name: 'ReturnSavingsPlanResponse')
|
47
49
|
SavingsPlan = Shapes::StructureShape.new(name: 'SavingsPlan')
|
48
50
|
SavingsPlanArn = Shapes::StringShape.new(name: 'SavingsPlanArn')
|
49
51
|
SavingsPlanArnList = Shapes::ListShape.new(name: 'SavingsPlanArnList')
|
@@ -219,6 +221,13 @@ module Aws::SavingsPlans
|
|
219
221
|
ResourceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
|
220
222
|
ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
|
221
223
|
|
224
|
+
ReturnSavingsPlanRequest.add_member(:savings_plan_id, Shapes::ShapeRef.new(shape: SavingsPlanId, required: true, location_name: "savingsPlanId"))
|
225
|
+
ReturnSavingsPlanRequest.add_member(:client_token, Shapes::ShapeRef.new(shape: ClientToken, location_name: "clientToken", metadata: {"idempotencyToken"=>true}))
|
226
|
+
ReturnSavingsPlanRequest.struct_class = Types::ReturnSavingsPlanRequest
|
227
|
+
|
228
|
+
ReturnSavingsPlanResponse.add_member(:savings_plan_id, Shapes::ShapeRef.new(shape: SavingsPlanId, location_name: "savingsPlanId"))
|
229
|
+
ReturnSavingsPlanResponse.struct_class = Types::ReturnSavingsPlanResponse
|
230
|
+
|
222
231
|
SavingsPlan.add_member(:offering_id, Shapes::ShapeRef.new(shape: SavingsPlanOfferingId, location_name: "offeringId"))
|
223
232
|
SavingsPlan.add_member(:savings_plan_id, Shapes::ShapeRef.new(shape: SavingsPlanId, location_name: "savingsPlanId"))
|
224
233
|
SavingsPlan.add_member(:savings_plan_arn, Shapes::ShapeRef.new(shape: SavingsPlanArn, location_name: "savingsPlanArn"))
|
@@ -237,6 +246,7 @@ module Aws::SavingsPlans
|
|
237
246
|
SavingsPlan.add_member(:recurring_payment_amount, Shapes::ShapeRef.new(shape: Amount, location_name: "recurringPaymentAmount"))
|
238
247
|
SavingsPlan.add_member(:term_duration_in_seconds, Shapes::ShapeRef.new(shape: TermDurationInSeconds, location_name: "termDurationInSeconds"))
|
239
248
|
SavingsPlan.add_member(:tags, Shapes::ShapeRef.new(shape: TagMap, location_name: "tags"))
|
249
|
+
SavingsPlan.add_member(:returnable_until, Shapes::ShapeRef.new(shape: String, location_name: "returnableUntil"))
|
240
250
|
SavingsPlan.struct_class = Types::SavingsPlan
|
241
251
|
|
242
252
|
SavingsPlanArnList.member = Shapes::ShapeRef.new(shape: SavingsPlanArn)
|
@@ -467,6 +477,18 @@ module Aws::SavingsPlans
|
|
467
477
|
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
468
478
|
end)
|
469
479
|
|
480
|
+
api.add_operation(:return_savings_plan, Seahorse::Model::Operation.new.tap do |o|
|
481
|
+
o.name = "ReturnSavingsPlan"
|
482
|
+
o.http_method = "POST"
|
483
|
+
o.http_request_uri = "/ReturnSavingsPlan"
|
484
|
+
o.input = Shapes::ShapeRef.new(shape: ReturnSavingsPlanRequest)
|
485
|
+
o.output = Shapes::ShapeRef.new(shape: ReturnSavingsPlanResponse)
|
486
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
487
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
488
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
489
|
+
o.errors << Shapes::ShapeRef.new(shape: ServiceQuotaExceededException)
|
490
|
+
end)
|
491
|
+
|
470
492
|
api.add_operation(:tag_resource, Seahorse::Model::Operation.new.tap do |o|
|
471
493
|
o.name = "TagResource"
|
472
494
|
o.http_method = "POST"
|
@@ -35,7 +35,7 @@ module Aws::SavingsPlans
|
|
35
35
|
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
36
36
|
end
|
37
37
|
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
38
|
-
if Aws::Endpoints::Matchers.boolean_equals?(
|
38
|
+
if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
|
39
39
|
return Aws::Endpoints::Endpoint.new(url: "https://savingsplans-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
40
40
|
end
|
41
41
|
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
@@ -110,6 +110,20 @@ module Aws::SavingsPlans
|
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
113
|
+
class ReturnSavingsPlan
|
114
|
+
def self.build(context)
|
115
|
+
unless context.config.regional_endpoint
|
116
|
+
endpoint = context.config.endpoint.to_s
|
117
|
+
end
|
118
|
+
Aws::SavingsPlans::EndpointParameters.new(
|
119
|
+
region: context.config.region,
|
120
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
121
|
+
use_fips: context.config.use_fips_endpoint,
|
122
|
+
endpoint: endpoint,
|
123
|
+
)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
113
127
|
class TagResource
|
114
128
|
def self.build(context)
|
115
129
|
unless context.config.regional_endpoint
|
@@ -72,6 +72,8 @@ module Aws::SavingsPlans
|
|
72
72
|
Aws::SavingsPlans::Endpoints::DescribeSavingsPlansOfferings.build(context)
|
73
73
|
when :list_tags_for_resource
|
74
74
|
Aws::SavingsPlans::Endpoints::ListTagsForResource.build(context)
|
75
|
+
when :return_savings_plan
|
76
|
+
Aws::SavingsPlans::Endpoints::ReturnSavingsPlan.build(context)
|
75
77
|
when :tag_resource
|
76
78
|
Aws::SavingsPlans::Endpoints::TagResource.build(context)
|
77
79
|
when :untag_resource
|
@@ -15,7 +15,8 @@ module Aws::SavingsPlans
|
|
15
15
|
# @return [String]
|
16
16
|
#
|
17
17
|
# @!attribute [rw] commitment
|
18
|
-
# The hourly commitment, in
|
18
|
+
# The hourly commitment, in the same currency of the
|
19
|
+
# `savingsPlanOfferingId`. This is a value between 0.001 and 1
|
19
20
|
# million. You cannot specify more than five digits after the decimal
|
20
21
|
# point.
|
21
22
|
# @return [String]
|
@@ -23,16 +24,16 @@ module Aws::SavingsPlans
|
|
23
24
|
# @!attribute [rw] upfront_payment_amount
|
24
25
|
# The up-front payment amount. This is a whole number between 50 and
|
25
26
|
# 99 percent of the total value of the Savings Plan. This parameter is
|
26
|
-
# supported
|
27
|
+
# only supported if the payment option is `Partial Upfront`.
|
27
28
|
# @return [String]
|
28
29
|
#
|
29
30
|
# @!attribute [rw] purchase_time
|
30
|
-
# The time
|
31
|
+
# The purchase time of the Savings Plan in UTC format
|
31
32
|
# (YYYY-MM-DDTHH:MM:SSZ).
|
32
33
|
# @return [Time]
|
33
34
|
#
|
34
35
|
# @!attribute [rw] client_token
|
35
|
-
#
|
36
|
+
# A unique, case-sensitive identifier that you provide to ensure the
|
36
37
|
# idempotency of the request.
|
37
38
|
#
|
38
39
|
# **A suitable default value is auto-generated.** You should normally
|
@@ -118,7 +119,7 @@ module Aws::SavingsPlans
|
|
118
119
|
# @return [String]
|
119
120
|
#
|
120
121
|
# @!attribute [rw] search_results
|
121
|
-
# Information about the Savings
|
122
|
+
# Information about the Savings Plan rates.
|
122
123
|
# @return [Array<Types::SavingsPlanRate>]
|
123
124
|
#
|
124
125
|
# @!attribute [rw] next_token
|
@@ -149,7 +150,7 @@ module Aws::SavingsPlans
|
|
149
150
|
# @return [Array<String>]
|
150
151
|
#
|
151
152
|
# @!attribute [rw] products
|
152
|
-
# The
|
153
|
+
# The Amazon Web Services products.
|
153
154
|
# @return [Array<String>]
|
154
155
|
#
|
155
156
|
# @!attribute [rw] service_codes
|
@@ -161,7 +162,8 @@ module Aws::SavingsPlans
|
|
161
162
|
# @return [Array<String>]
|
162
163
|
#
|
163
164
|
# @!attribute [rw] operations
|
164
|
-
# The specific
|
165
|
+
# The specific Amazon Web Services operation for the line item in the
|
166
|
+
# billing report.
|
165
167
|
# @return [Array<String>]
|
166
168
|
#
|
167
169
|
# @!attribute [rw] filters
|
@@ -226,11 +228,11 @@ module Aws::SavingsPlans
|
|
226
228
|
# @return [String]
|
227
229
|
#
|
228
230
|
# @!attribute [rw] plan_types
|
229
|
-
# The plan
|
231
|
+
# The plan types.
|
230
232
|
# @return [Array<String>]
|
231
233
|
#
|
232
234
|
# @!attribute [rw] durations
|
233
|
-
# The
|
235
|
+
# The duration, in seconds.
|
234
236
|
# @return [Array<Integer>]
|
235
237
|
#
|
236
238
|
# @!attribute [rw] currencies
|
@@ -250,7 +252,8 @@ module Aws::SavingsPlans
|
|
250
252
|
# @return [Array<String>]
|
251
253
|
#
|
252
254
|
# @!attribute [rw] operations
|
253
|
-
# The specific
|
255
|
+
# The specific Amazon Web Services operation for the line item in the
|
256
|
+
# billing report.
|
254
257
|
# @return [Array<String>]
|
255
258
|
#
|
256
259
|
# @!attribute [rw] filters
|
@@ -324,7 +327,7 @@ module Aws::SavingsPlans
|
|
324
327
|
# @return [Integer]
|
325
328
|
#
|
326
329
|
# @!attribute [rw] states
|
327
|
-
# The states.
|
330
|
+
# The current states of the Savings Plans.
|
328
331
|
# @return [Array<String>]
|
329
332
|
#
|
330
333
|
# @!attribute [rw] filters
|
@@ -451,6 +454,39 @@ module Aws::SavingsPlans
|
|
451
454
|
include Aws::Structure
|
452
455
|
end
|
453
456
|
|
457
|
+
# @!attribute [rw] savings_plan_id
|
458
|
+
# The ID of the Savings Plan.
|
459
|
+
# @return [String]
|
460
|
+
#
|
461
|
+
# @!attribute [rw] client_token
|
462
|
+
# A unique, case-sensitive identifier that you provide to ensure the
|
463
|
+
# idempotency of the request.
|
464
|
+
#
|
465
|
+
# **A suitable default value is auto-generated.** You should normally
|
466
|
+
# not need to pass this option.
|
467
|
+
# @return [String]
|
468
|
+
#
|
469
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/ReturnSavingsPlanRequest AWS API Documentation
|
470
|
+
#
|
471
|
+
class ReturnSavingsPlanRequest < Struct.new(
|
472
|
+
:savings_plan_id,
|
473
|
+
:client_token)
|
474
|
+
SENSITIVE = []
|
475
|
+
include Aws::Structure
|
476
|
+
end
|
477
|
+
|
478
|
+
# @!attribute [rw] savings_plan_id
|
479
|
+
# The ID of the Savings Plan.
|
480
|
+
# @return [String]
|
481
|
+
#
|
482
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/ReturnSavingsPlanResponse AWS API Documentation
|
483
|
+
#
|
484
|
+
class ReturnSavingsPlanResponse < Struct.new(
|
485
|
+
:savings_plan_id)
|
486
|
+
SENSITIVE = []
|
487
|
+
include Aws::Structure
|
488
|
+
end
|
489
|
+
|
454
490
|
# Information about a Savings Plan.
|
455
491
|
#
|
456
492
|
# @!attribute [rw] offering_id
|
@@ -478,11 +514,11 @@ module Aws::SavingsPlans
|
|
478
514
|
# @return [String]
|
479
515
|
#
|
480
516
|
# @!attribute [rw] state
|
481
|
-
# The state.
|
517
|
+
# The current state.
|
482
518
|
# @return [String]
|
483
519
|
#
|
484
520
|
# @!attribute [rw] region
|
485
|
-
# The
|
521
|
+
# The Amazon Web Services Region.
|
486
522
|
# @return [String]
|
487
523
|
#
|
488
524
|
# @!attribute [rw] ec2_instance_family
|
@@ -506,7 +542,7 @@ module Aws::SavingsPlans
|
|
506
542
|
# @return [String]
|
507
543
|
#
|
508
544
|
# @!attribute [rw] commitment
|
509
|
-
# The hourly commitment
|
545
|
+
# The hourly commitment amount in the specified currency.
|
510
546
|
# @return [String]
|
511
547
|
#
|
512
548
|
# @!attribute [rw] upfront_payment_amount
|
@@ -525,6 +561,12 @@ module Aws::SavingsPlans
|
|
525
561
|
# One or more tags.
|
526
562
|
# @return [Hash<String,String>]
|
527
563
|
#
|
564
|
+
# @!attribute [rw] returnable_until
|
565
|
+
# The time until when a return for the Savings Plan can be requested.
|
566
|
+
# If the Savings Plan is not returnable, the field reflects the
|
567
|
+
# Savings Plan start time.
|
568
|
+
# @return [String]
|
569
|
+
#
|
528
570
|
# @see http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/SavingsPlan AWS API Documentation
|
529
571
|
#
|
530
572
|
class SavingsPlan < Struct.new(
|
@@ -545,12 +587,13 @@ module Aws::SavingsPlans
|
|
545
587
|
:upfront_payment_amount,
|
546
588
|
:recurring_payment_amount,
|
547
589
|
:term_duration_in_seconds,
|
548
|
-
:tags
|
590
|
+
:tags,
|
591
|
+
:returnable_until)
|
549
592
|
SENSITIVE = []
|
550
593
|
include Aws::Structure
|
551
594
|
end
|
552
595
|
|
553
|
-
# Information about a filter.
|
596
|
+
# Information about a Savings Plan filter.
|
554
597
|
#
|
555
598
|
# @!attribute [rw] name
|
556
599
|
# The filter name.
|
@@ -608,7 +651,8 @@ module Aws::SavingsPlans
|
|
608
651
|
# @return [String]
|
609
652
|
#
|
610
653
|
# @!attribute [rw] operation
|
611
|
-
# The specific
|
654
|
+
# The specific Amazon Web Services operation for the line item in the
|
655
|
+
# billing report.
|
612
656
|
# @return [String]
|
613
657
|
#
|
614
658
|
# @!attribute [rw] properties
|
@@ -633,7 +677,7 @@ module Aws::SavingsPlans
|
|
633
677
|
include Aws::Structure
|
634
678
|
end
|
635
679
|
|
636
|
-
# Information about a filter.
|
680
|
+
# Information about a Savings Plan offering filter.
|
637
681
|
#
|
638
682
|
# @!attribute [rw] name
|
639
683
|
# The filter name.
|
@@ -652,7 +696,7 @@ module Aws::SavingsPlans
|
|
652
696
|
include Aws::Structure
|
653
697
|
end
|
654
698
|
|
655
|
-
# Information about a property.
|
699
|
+
# Information about a Savings Plan offering property.
|
656
700
|
#
|
657
701
|
# @!attribute [rw] name
|
658
702
|
# The property name.
|
@@ -698,7 +742,8 @@ module Aws::SavingsPlans
|
|
698
742
|
# @return [String]
|
699
743
|
#
|
700
744
|
# @!attribute [rw] operation
|
701
|
-
# The specific
|
745
|
+
# The specific Amazon Web Services operation for the line item in the
|
746
|
+
# billing report.
|
702
747
|
# @return [String]
|
703
748
|
#
|
704
749
|
# @!attribute [rw] properties
|
@@ -720,7 +765,7 @@ module Aws::SavingsPlans
|
|
720
765
|
include Aws::Structure
|
721
766
|
end
|
722
767
|
|
723
|
-
# Information about a filter.
|
768
|
+
# Information about a Savings Plan offering rate filter.
|
724
769
|
#
|
725
770
|
# @!attribute [rw] name
|
726
771
|
# The filter name.
|
@@ -739,7 +784,7 @@ module Aws::SavingsPlans
|
|
739
784
|
include Aws::Structure
|
740
785
|
end
|
741
786
|
|
742
|
-
# Information about a property.
|
787
|
+
# Information about a Savings Plan offering rate property.
|
743
788
|
#
|
744
789
|
# @!attribute [rw] name
|
745
790
|
# The property name.
|
@@ -785,7 +830,8 @@ module Aws::SavingsPlans
|
|
785
830
|
# @return [String]
|
786
831
|
#
|
787
832
|
# @!attribute [rw] operation
|
788
|
-
# The specific
|
833
|
+
# The specific Amazon Web Services operation for the line item in the
|
834
|
+
# billing report.
|
789
835
|
# @return [String]
|
790
836
|
#
|
791
837
|
# @!attribute [rw] properties
|
@@ -807,7 +853,7 @@ module Aws::SavingsPlans
|
|
807
853
|
include Aws::Structure
|
808
854
|
end
|
809
855
|
|
810
|
-
# Information about a filter.
|
856
|
+
# Information about a Savings Plan rate filter.
|
811
857
|
#
|
812
858
|
# @!attribute [rw] name
|
813
859
|
# The filter name.
|
@@ -826,7 +872,7 @@ module Aws::SavingsPlans
|
|
826
872
|
include Aws::Structure
|
827
873
|
end
|
828
874
|
|
829
|
-
# Information about a property.
|
875
|
+
# Information about a Savings Plan rate property.
|
830
876
|
#
|
831
877
|
# @!attribute [rw] name
|
832
878
|
# The property name.
|
data/lib/aws-sdk-savingsplans.rb
CHANGED
data/sig/client.rbs
CHANGED
@@ -127,7 +127,7 @@ module Aws
|
|
127
127
|
?savings_plan_ids: Array[::String],
|
128
128
|
?next_token: ::String,
|
129
129
|
?max_results: ::Integer,
|
130
|
-
?states: Array[("payment-pending" | "payment-failed" | "active" | "retired" | "queued" | "queued-deleted")],
|
130
|
+
?states: Array[("payment-pending" | "payment-failed" | "active" | "retired" | "queued" | "queued-deleted" | "pending-return" | "returned")],
|
131
131
|
?filters: Array[
|
132
132
|
{
|
133
133
|
name: ("region" | "ec2-instance-family" | "commitment" | "upfront" | "term" | "savings-plan-type" | "payment-option" | "start" | "end")?,
|
@@ -200,6 +200,17 @@ module Aws
|
|
200
200
|
) -> _ListTagsForResourceResponseSuccess
|
201
201
|
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _ListTagsForResourceResponseSuccess
|
202
202
|
|
203
|
+
interface _ReturnSavingsPlanResponseSuccess
|
204
|
+
include ::Seahorse::Client::_ResponseSuccess[Types::ReturnSavingsPlanResponse]
|
205
|
+
def savings_plan_id: () -> ::String
|
206
|
+
end
|
207
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SavingsPlans/Client.html#return_savings_plan-instance_method
|
208
|
+
def return_savings_plan: (
|
209
|
+
savings_plan_id: ::String,
|
210
|
+
?client_token: ::String
|
211
|
+
) -> _ReturnSavingsPlanResponseSuccess
|
212
|
+
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _ReturnSavingsPlanResponseSuccess
|
213
|
+
|
203
214
|
interface _TagResourceResponseSuccess
|
204
215
|
include ::Seahorse::Client::_ResponseSuccess[Types::TagResourceResponse]
|
205
216
|
end
|
data/sig/types.rbs
CHANGED
@@ -94,7 +94,7 @@ module Aws::SavingsPlans
|
|
94
94
|
attr_accessor savings_plan_ids: ::Array[::String]
|
95
95
|
attr_accessor next_token: ::String
|
96
96
|
attr_accessor max_results: ::Integer
|
97
|
-
attr_accessor states: ::Array[("payment-pending" | "payment-failed" | "active" | "retired" | "queued" | "queued-deleted")]
|
97
|
+
attr_accessor states: ::Array[("payment-pending" | "payment-failed" | "active" | "retired" | "queued" | "queued-deleted" | "pending-return" | "returned")]
|
98
98
|
attr_accessor filters: ::Array[Types::SavingsPlanFilter]
|
99
99
|
SENSITIVE: []
|
100
100
|
end
|
@@ -135,6 +135,17 @@ module Aws::SavingsPlans
|
|
135
135
|
SENSITIVE: []
|
136
136
|
end
|
137
137
|
|
138
|
+
class ReturnSavingsPlanRequest
|
139
|
+
attr_accessor savings_plan_id: ::String
|
140
|
+
attr_accessor client_token: ::String
|
141
|
+
SENSITIVE: []
|
142
|
+
end
|
143
|
+
|
144
|
+
class ReturnSavingsPlanResponse
|
145
|
+
attr_accessor savings_plan_id: ::String
|
146
|
+
SENSITIVE: []
|
147
|
+
end
|
148
|
+
|
138
149
|
class SavingsPlan
|
139
150
|
attr_accessor offering_id: ::String
|
140
151
|
attr_accessor savings_plan_id: ::String
|
@@ -142,7 +153,7 @@ module Aws::SavingsPlans
|
|
142
153
|
attr_accessor description: ::String
|
143
154
|
attr_accessor start: ::String
|
144
155
|
attr_accessor end: ::String
|
145
|
-
attr_accessor state: ("payment-pending" | "payment-failed" | "active" | "retired" | "queued" | "queued-deleted")
|
156
|
+
attr_accessor state: ("payment-pending" | "payment-failed" | "active" | "retired" | "queued" | "queued-deleted" | "pending-return" | "returned")
|
146
157
|
attr_accessor region: ::String
|
147
158
|
attr_accessor ec2_instance_family: ::String
|
148
159
|
attr_accessor savings_plan_type: ("Compute" | "EC2Instance" | "SageMaker")
|
@@ -154,6 +165,7 @@ module Aws::SavingsPlans
|
|
154
165
|
attr_accessor recurring_payment_amount: ::String
|
155
166
|
attr_accessor term_duration_in_seconds: ::Integer
|
156
167
|
attr_accessor tags: ::Hash[::String, ::String]
|
168
|
+
attr_accessor returnable_until: ::String
|
157
169
|
SENSITIVE: []
|
158
170
|
end
|
159
171
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-savingsplans
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.40.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: 2024-
|
11
|
+
date: 2024-04-25 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.
|
22
|
+
version: 3.193.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.
|
32
|
+
version: 3.193.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: aws-sigv4
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|