import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides an AWS Savings Plan resource. * * > Savings Plans represent a financial commitment. Once a Savings Plan becomes active, it **cannot be cancelled or deleted**. Only Savings Plans in the `queued` state (scheduled for future purchase) can be deleted. Use this resource with caution. * * > Importing an active Savings Plan will add it to your Terraform state, but destroying it will only remove it from state - the actual Savings Plan will continue until its term ends. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.savingsplans.SavingsPlan("example", { * savingsPlanOfferingId: "00000000-0000-0000-0000-000000000000", * commitment: "1.0", * tags: { * Environment: "production", * }, * }); * ``` * * ### Scheduled Purchase * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const scheduled = new aws.savingsplans.SavingsPlan("scheduled", { * savingsPlanOfferingId: "00000000-0000-0000-0000-000000000000", * commitment: "5.0", * purchaseTime: "2026-12-01T00:00:00Z", * tags: { * Environment: "production", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import Savings Plans using the `id`. For example: * * Using `terraform state mv`, import Savings Plans using the `id`. For example: * * ```sh * $ pulumi import aws:savingsplans/savingsPlan:SavingsPlan example sp-12345678901234567 * ``` */ export declare class SavingsPlan extends pulumi.CustomResource { /** * Get an existing SavingsPlan resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: SavingsPlanState, opts?: pulumi.CustomResourceOptions): SavingsPlan; /** * Returns true if the given object is an instance of SavingsPlan. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is SavingsPlan; /** * The hourly commitment, in USD. This is the amount you commit to pay per hour, regardless of actual usage. * * The following arguments are optional: */ readonly commitment: pulumi.Output; /** * The currency of the Savings Plan (e.g., `USD`). */ readonly currency: pulumi.Output; /** * The description. */ readonly description: pulumi.Output; /** * The EC2 instance family for the Savings Plan (only applicable to EC2 Instance Savings Plans). */ readonly ec2InstanceFamily: pulumi.Output; /** * The end time of the Savings Plan in RFC3339 format. */ readonly end: pulumi.Output; /** * The ID of the offering. * * @deprecated offering_id is deprecated. Use savingsPlanOfferingId instead. */ readonly offeringId: pulumi.Output; /** * The payment option for the Savings Plan (e.g., `All Upfront`, `Partial Upfront`, `No Upfront`). */ readonly paymentOption: pulumi.Output; /** * The product types. */ readonly productTypes: pulumi.Output; /** * The time at which to purchase the Savings Plan, in UTC format (`YYYY-MM-DDTHH:MM:SSZ`). If not specified, the plan is purchased immediately. Plans with a future purchase time are placed in `queued` state and can be deleted before they become active. */ readonly purchaseTime: pulumi.Output; /** * The recurring payment amount. */ readonly recurringPaymentAmount: pulumi.Output; /** * The AWS Region. */ readonly region: pulumi.Output; /** * The recurring payment amount. */ readonly returnableUntil: pulumi.Output; /** * The ARN of the Savings Plan. */ readonly savingsPlanArn: pulumi.Output; /** * The ID of the Savings Plan. */ readonly savingsPlanId: pulumi.Output; /** * The unique ID of a Savings Plan offering. You can find available offerings using the `aws savingsplans describe-savings-plans-offerings` CLI command. */ readonly savingsPlanOfferingId: pulumi.Output; /** * The type of Savings Plan (e.g., `Compute`, `EC2Instance`). */ readonly savingsPlanType: pulumi.Output; /** * The start time of the Savings Plan in RFC3339 format. */ readonly start: pulumi.Output; /** * The current state of the Savings Plan (e.g., `active`, `queued`, `retired`). */ readonly state: pulumi.Output; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * The duration of the term, in seconds. */ readonly termDurationInSeconds: pulumi.Output; readonly timeouts: pulumi.Output; /** * The up-front payment amount. Required for offerings with an `All Upfront` or `Partial Upfront` payment option. Must be omitted for `No Upfront` offerings. */ readonly upfrontPaymentAmount: pulumi.Output; /** * Create a SavingsPlan resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: SavingsPlanArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering SavingsPlan resources. */ export interface SavingsPlanState { /** * The hourly commitment, in USD. This is the amount you commit to pay per hour, regardless of actual usage. * * The following arguments are optional: */ commitment?: pulumi.Input; /** * The currency of the Savings Plan (e.g., `USD`). */ currency?: pulumi.Input; /** * The description. */ description?: pulumi.Input; /** * The EC2 instance family for the Savings Plan (only applicable to EC2 Instance Savings Plans). */ ec2InstanceFamily?: pulumi.Input; /** * The end time of the Savings Plan in RFC3339 format. */ end?: pulumi.Input; /** * The ID of the offering. * * @deprecated offering_id is deprecated. Use savingsPlanOfferingId instead. */ offeringId?: pulumi.Input; /** * The payment option for the Savings Plan (e.g., `All Upfront`, `Partial Upfront`, `No Upfront`). */ paymentOption?: pulumi.Input; /** * The product types. */ productTypes?: pulumi.Input[] | undefined>; /** * The time at which to purchase the Savings Plan, in UTC format (`YYYY-MM-DDTHH:MM:SSZ`). If not specified, the plan is purchased immediately. Plans with a future purchase time are placed in `queued` state and can be deleted before they become active. */ purchaseTime?: pulumi.Input; /** * The recurring payment amount. */ recurringPaymentAmount?: pulumi.Input; /** * The AWS Region. */ region?: pulumi.Input; /** * The recurring payment amount. */ returnableUntil?: pulumi.Input; /** * The ARN of the Savings Plan. */ savingsPlanArn?: pulumi.Input; /** * The ID of the Savings Plan. */ savingsPlanId?: pulumi.Input; /** * The unique ID of a Savings Plan offering. You can find available offerings using the `aws savingsplans describe-savings-plans-offerings` CLI command. */ savingsPlanOfferingId?: pulumi.Input; /** * The type of Savings Plan (e.g., `Compute`, `EC2Instance`). */ savingsPlanType?: pulumi.Input; /** * The start time of the Savings Plan in RFC3339 format. */ start?: pulumi.Input; /** * The current state of the Savings Plan (e.g., `active`, `queued`, `retired`). */ state?: pulumi.Input; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The duration of the term, in seconds. */ termDurationInSeconds?: pulumi.Input; timeouts?: pulumi.Input; /** * The up-front payment amount. Required for offerings with an `All Upfront` or `Partial Upfront` payment option. Must be omitted for `No Upfront` offerings. */ upfrontPaymentAmount?: pulumi.Input; } /** * The set of arguments for constructing a SavingsPlan resource. */ export interface SavingsPlanArgs { /** * The hourly commitment, in USD. This is the amount you commit to pay per hour, regardless of actual usage. * * The following arguments are optional: */ commitment: pulumi.Input; /** * The time at which to purchase the Savings Plan, in UTC format (`YYYY-MM-DDTHH:MM:SSZ`). If not specified, the plan is purchased immediately. Plans with a future purchase time are placed in `queued` state and can be deleted before they become active. */ purchaseTime?: pulumi.Input; /** * The unique ID of a Savings Plan offering. You can find available offerings using the `aws savingsplans describe-savings-plans-offerings` CLI command. */ savingsPlanOfferingId: pulumi.Input; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; timeouts?: pulumi.Input; /** * The up-front payment amount. Required for offerings with an `All Upfront` or `Partial Upfront` payment option. Must be omitted for `No Upfront` offerings. */ upfrontPaymentAmount?: pulumi.Input; } //# sourceMappingURL=savingsPlan.d.ts.map