CreateSavingsPlan - Savings Plans

CreateSavingsPlan

Creates a Savings Plan.

Request Syntax

POST /CreateSavingsPlan HTTP/1.1 Content-type: application/json { "clientToken": "string", "commitment": "string", "purchaseTime": number, "savingsPlanOfferingId": "string", "tags": { "string" : "string" }, "upfrontPaymentAmount": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

clientToken

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Required: No

commitment

The hourly commitment, in the same currency of the savingsPlanOfferingId. This is a value between 0.001 and 1 million. You cannot specify more than five digits after the decimal point.

Type: String

Required: Yes

purchaseTime

The purchase time of the Savings Plan in UTC format (YYYY-MM-DDTHH:MM:SSZ).

Type: Timestamp

Required: No

savingsPlanOfferingId

The ID of the offering.

Type: String

Required: Yes

tags

One or more tags.

Type: String to string map

Required: No

upfrontPaymentAmount

The up-front payment amount. This is a whole number between 50 and 99 percent of the total value of the Savings Plan. This parameter is only supported if the payment option is Partial Upfront.

Type: String

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "savingsPlanId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

savingsPlanId

The ID of the Savings Plan.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerException

An unexpected error occurred.

HTTP Status Code: 500

ResourceNotFoundException

The specified resource was not found.

HTTP Status Code: 404

ServiceQuotaExceededException

A service quota has been exceeded.

HTTP Status Code: 402

ValidationException

One of the input parameters is not valid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: