Skip to main content

savings_plans

Creates, updates, deletes, gets or lists a savings_plans resource.

Overview

Namesavings_plans
TypeResource
Idaws.savingsplans.savings_plans

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
next_tokenstringThe token to use to retrieve the next page of results. This value is null when there are no more results to return. (pattern: <code>^[A-Za-z0-9/=+]+$</code>)
savings_plansarrayInformation about the Savings Plans.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_savings_plansselectregionDescribes the specified Savings Plans.
create_savings_planinsertregion, savingsPlanOfferingId, commitmentCreates a Savings Plan.
delete_queued_savings_plandeleteregionDeletes the queued purchase for the specified Savings Plan.
return_savings_planexecregion, savingsPlanIdReturns the specified Savings Plan.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Describes the specified Savings Plans.

SELECT
next_token,
savings_plans
FROM aws.savingsplans.savings_plans
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a Savings Plan.

INSERT INTO aws.savingsplans.savings_plans (
savingsPlanOfferingId,
commitment,
upfrontPaymentAmount,
purchaseTime,
clientToken,
tags,
region
)
SELECT
'{{ savingsPlanOfferingId }}' /* required */,
'{{ commitment }}' /* required */,
'{{ upfrontPaymentAmount }}',
'{{ purchaseTime }}',
'{{ clientToken }}',
'{{ tags }}',
'{{ region }}'
RETURNING
savings_plan_id
;

DELETE examples

Deletes the queued purchase for the specified Savings Plan.

DELETE FROM aws.savingsplans.savings_plans
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Returns the specified Savings Plan.

EXEC aws.savingsplans.savings_plans.return_savings_plan
@region='{{ region }}' --required
@@json=
'{
"savingsPlanId": "{{ savingsPlanId }}",
"clientToken": "{{ clientToken }}"
}'
;