2024/03/20 - AWS Savings Plans - 1 new1 updated api methods
Changes Introducing the Savings Plans Return feature enabling customers to return their Savings Plans within 7 days of purchase.
Returns the specified Savings Plan.
See also: AWS API Documentation
Request Syntax
client.return_savings_plan( savingsPlanId='string', clientToken='string' )
string
[REQUIRED]
The ID of the Savings Plan.
string
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
This field is autopopulated if not provided.
dict
Response Syntax
{ 'savingsPlanId': 'string' }
Response Structure
(dict) --
savingsPlanId (string) --
The ID of the Savings Plan.
{'states': {'returned', 'pending-return'}}Response
{'savingsPlans': {'returnableUntil': 'string', 'state': {'returned', 'pending-return'}}}
Describes the specified Savings Plans.
See also: AWS API Documentation
Request Syntax
client.describe_savings_plans( savingsPlanArns=[ 'string', ], savingsPlanIds=[ 'string', ], nextToken='string', maxResults=123, states=[ 'payment-pending'|'payment-failed'|'active'|'retired'|'queued'|'queued-deleted'|'pending-return'|'returned', ], filters=[ { 'name': 'region'|'ec2-instance-family'|'commitment'|'upfront'|'term'|'savings-plan-type'|'payment-option'|'start'|'end', 'values': [ 'string', ] }, ] )
list
The Amazon Resource Names (ARN) of the Savings Plans.
(string) --
list
The IDs of the Savings Plans.
(string) --
string
The token for the next page of results.
integer
The maximum number of results to return with a single call. To retrieve additional results, make another call with the returned token value.
list
The current states of the Savings Plans.
(string) --
list
The filters.
(dict) --
Information about a Savings Plan filter.
name (string) --
The filter name.
values (list) --
The filter value.
(string) --
dict
Response Syntax
{ 'savingsPlans': [ { 'offeringId': 'string', 'savingsPlanId': 'string', 'savingsPlanArn': 'string', 'description': 'string', 'start': 'string', 'end': 'string', 'state': 'payment-pending'|'payment-failed'|'active'|'retired'|'queued'|'queued-deleted'|'pending-return'|'returned', 'region': 'string', 'ec2InstanceFamily': 'string', 'savingsPlanType': 'Compute'|'EC2Instance'|'SageMaker', 'paymentOption': 'All Upfront'|'Partial Upfront'|'No Upfront', 'productTypes': [ 'EC2'|'Fargate'|'Lambda'|'SageMaker', ], 'currency': 'CNY'|'USD', 'commitment': 'string', 'upfrontPaymentAmount': 'string', 'recurringPaymentAmount': 'string', 'termDurationInSeconds': 123, 'tags': { 'string': 'string' }, 'returnableUntil': 'string' }, ], 'nextToken': 'string' }
Response Structure
(dict) --
savingsPlans (list) --
Information about the Savings Plans.
(dict) --
Information about a Savings Plan.
offeringId (string) --
The ID of the offering.
savingsPlanId (string) --
The ID of the Savings Plan.
savingsPlanArn (string) --
The Amazon Resource Name (ARN) of the Savings Plan.
description (string) --
The description.
start (string) --
The start time.
end (string) --
The end time.
state (string) --
The current state.
region (string) --
The Amazon Web Services Region.
ec2InstanceFamily (string) --
The EC2 instance family.
savingsPlanType (string) --
The plan type.
paymentOption (string) --
The payment option.
productTypes (list) --
The product types.
(string) --
currency (string) --
The currency.
commitment (string) --
The hourly commitment amount in the specified currency.
upfrontPaymentAmount (string) --
The up-front payment amount.
recurringPaymentAmount (string) --
The recurring payment amount.
termDurationInSeconds (integer) --
The duration of the term, in seconds.
tags (dict) --
One or more tags.
(string) --
(string) --
returnableUntil (string) --
The time until when a return for the Savings Plan can be requested. If the Savings Plan is not returnable, the field reflects the Savings Plan start time.
nextToken (string) --
The token to use to retrieve the next page of results. This value is null when there are no more results to return.