libZSservicesZSamazonka-savingsplansZSamazonka-savingsplans
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.SavingsPlans.CreateSavingsPlan

Description

Creates a Savings Plan.

Synopsis

Creating a Request

data CreateSavingsPlan Source #

See: newCreateSavingsPlan smart constructor.

Constructors

CreateSavingsPlan' 

Fields

  • clientToken :: Maybe Text

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

  • purchaseTime :: Maybe POSIX

    The time at which to purchase the Savings Plan, in UTC format (YYYY-MM-DDTHH:MM:SSZ).

  • upfrontPaymentAmount :: Maybe Text

    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 supported only if the payment option is Partial Upfront.

  • tags :: Maybe (HashMap Text Text)

    One or more tags.

  • savingsPlanOfferingId :: Text

    The ID of the offering.

  • commitment :: Text

    The hourly commitment, in USD. This is a value between 0.001 and 1 million. You cannot specify more than three digits after the decimal point.

Instances

Instances details
Eq CreateSavingsPlan Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

Read CreateSavingsPlan Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

Show CreateSavingsPlan Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

Generic CreateSavingsPlan Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

Associated Types

type Rep CreateSavingsPlan :: Type -> Type #

NFData CreateSavingsPlan Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

Methods

rnf :: CreateSavingsPlan -> () #

Hashable CreateSavingsPlan Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

ToJSON CreateSavingsPlan Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

AWSRequest CreateSavingsPlan Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

Associated Types

type AWSResponse CreateSavingsPlan #

ToHeaders CreateSavingsPlan Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

ToPath CreateSavingsPlan Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

ToQuery CreateSavingsPlan Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

type Rep CreateSavingsPlan Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

type Rep CreateSavingsPlan = D1 ('MetaData "CreateSavingsPlan" "Amazonka.SavingsPlans.CreateSavingsPlan" "libZSservicesZSamazonka-savingsplansZSamazonka-savingsplans" 'False) (C1 ('MetaCons "CreateSavingsPlan'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "purchaseTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: S1 ('MetaSel ('Just "upfrontPaymentAmount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))) :*: (S1 ('MetaSel ('Just "savingsPlanOfferingId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "commitment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse CreateSavingsPlan Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

newCreateSavingsPlan Source #

Create a value of CreateSavingsPlan with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:clientToken:CreateSavingsPlan', createSavingsPlan_clientToken - Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

$sel:purchaseTime:CreateSavingsPlan', createSavingsPlan_purchaseTime - The time at which to purchase the Savings Plan, in UTC format (YYYY-MM-DDTHH:MM:SSZ).

$sel:upfrontPaymentAmount:CreateSavingsPlan', createSavingsPlan_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 supported only if the payment option is Partial Upfront.

$sel:tags:CreateSavingsPlan', createSavingsPlan_tags - One or more tags.

$sel:savingsPlanOfferingId:CreateSavingsPlan', createSavingsPlan_savingsPlanOfferingId - The ID of the offering.

$sel:commitment:CreateSavingsPlan', createSavingsPlan_commitment - The hourly commitment, in USD. This is a value between 0.001 and 1 million. You cannot specify more than three digits after the decimal point.

Request Lenses

createSavingsPlan_clientToken :: Lens' CreateSavingsPlan (Maybe Text) Source #

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

createSavingsPlan_purchaseTime :: Lens' CreateSavingsPlan (Maybe UTCTime) Source #

The time at which to purchase the Savings Plan, in UTC format (YYYY-MM-DDTHH:MM:SSZ).

createSavingsPlan_upfrontPaymentAmount :: Lens' CreateSavingsPlan (Maybe Text) Source #

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 supported only if the payment option is Partial Upfront.

createSavingsPlan_commitment :: Lens' CreateSavingsPlan Text Source #

The hourly commitment, in USD. This is a value between 0.001 and 1 million. You cannot specify more than three digits after the decimal point.

Destructuring the Response

data CreateSavingsPlanResponse Source #

See: newCreateSavingsPlanResponse smart constructor.

Constructors

CreateSavingsPlanResponse' 

Fields

Instances

Instances details
Eq CreateSavingsPlanResponse Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

Read CreateSavingsPlanResponse Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

Show CreateSavingsPlanResponse Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

Generic CreateSavingsPlanResponse Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

Associated Types

type Rep CreateSavingsPlanResponse :: Type -> Type #

NFData CreateSavingsPlanResponse Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

type Rep CreateSavingsPlanResponse Source # 
Instance details

Defined in Amazonka.SavingsPlans.CreateSavingsPlan

type Rep CreateSavingsPlanResponse = D1 ('MetaData "CreateSavingsPlanResponse" "Amazonka.SavingsPlans.CreateSavingsPlan" "libZSservicesZSamazonka-savingsplansZSamazonka-savingsplans" 'False) (C1 ('MetaCons "CreateSavingsPlanResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "savingsPlanId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreateSavingsPlanResponse Source #

Create a value of CreateSavingsPlanResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:savingsPlanId:CreateSavingsPlanResponse', createSavingsPlanResponse_savingsPlanId - The ID of the Savings Plan.

$sel:httpStatus:CreateSavingsPlanResponse', createSavingsPlanResponse_httpStatus - The response's http status code.

Response Lenses