1. Packages
  2. AWS
  3. API Docs
  4. savingsplans
  5. SavingsPlan
AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi
aws logo
AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi

    Example Usage

    Basic Usage

    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",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.savingsplans.SavingsPlan("example",
        savings_plan_offering_id="00000000-0000-0000-0000-000000000000",
        commitment="1.0",
        tags={
            "Environment": "production",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/savingsplans"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := savingsplans.NewSavingsPlan(ctx, "example", &savingsplans.SavingsPlanArgs{
    			SavingsPlanOfferingId: pulumi.String("00000000-0000-0000-0000-000000000000"),
    			Commitment:            pulumi.String("1.0"),
    			Tags: pulumi.StringMap{
    				"Environment": pulumi.String("production"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.SavingsPlans.SavingsPlan("example", new()
        {
            SavingsPlanOfferingId = "00000000-0000-0000-0000-000000000000",
            Commitment = "1.0",
            Tags = 
            {
                { "Environment", "production" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.savingsplans.SavingsPlan;
    import com.pulumi.aws.savingsplans.SavingsPlanArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new SavingsPlan("example", SavingsPlanArgs.builder()
                .savingsPlanOfferingId("00000000-0000-0000-0000-000000000000")
                .commitment("1.0")
                .tags(Map.of("Environment", "production"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:savingsplans:SavingsPlan
        properties:
          savingsPlanOfferingId: 00000000-0000-0000-0000-000000000000
          commitment: '1.0'
          tags:
            Environment: production
    

    Scheduled Purchase

    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 pulumi
    import pulumi_aws as aws
    
    scheduled = aws.savingsplans.SavingsPlan("scheduled",
        savings_plan_offering_id="00000000-0000-0000-0000-000000000000",
        commitment="5.0",
        purchase_time="2026-12-01T00:00:00Z",
        tags={
            "Environment": "production",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/savingsplans"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := savingsplans.NewSavingsPlan(ctx, "scheduled", &savingsplans.SavingsPlanArgs{
    			SavingsPlanOfferingId: pulumi.String("00000000-0000-0000-0000-000000000000"),
    			Commitment:            pulumi.String("5.0"),
    			PurchaseTime:          pulumi.String("2026-12-01T00:00:00Z"),
    			Tags: pulumi.StringMap{
    				"Environment": pulumi.String("production"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var scheduled = new Aws.SavingsPlans.SavingsPlan("scheduled", new()
        {
            SavingsPlanOfferingId = "00000000-0000-0000-0000-000000000000",
            Commitment = "5.0",
            PurchaseTime = "2026-12-01T00:00:00Z",
            Tags = 
            {
                { "Environment", "production" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.savingsplans.SavingsPlan;
    import com.pulumi.aws.savingsplans.SavingsPlanArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var scheduled = new SavingsPlan("scheduled", SavingsPlanArgs.builder()
                .savingsPlanOfferingId("00000000-0000-0000-0000-000000000000")
                .commitment("5.0")
                .purchaseTime("2026-12-01T00:00:00Z")
                .tags(Map.of("Environment", "production"))
                .build());
    
        }
    }
    
    resources:
      scheduled:
        type: aws:savingsplans:SavingsPlan
        properties:
          savingsPlanOfferingId: 00000000-0000-0000-0000-000000000000
          commitment: '5.0'
          purchaseTime: 2026-12-01T00:00:00Z
          tags:
            Environment: production
    

    Create SavingsPlan Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SavingsPlan(name: string, args: SavingsPlanArgs, opts?: CustomResourceOptions);
    @overload
    def SavingsPlan(resource_name: str,
                    args: SavingsPlanArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def SavingsPlan(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    commitment: Optional[str] = None,
                    savings_plan_offering_id: Optional[str] = None,
                    purchase_time: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    timeouts: Optional[SavingsPlanTimeoutsArgs] = None,
                    upfront_payment_amount: Optional[str] = None)
    func NewSavingsPlan(ctx *Context, name string, args SavingsPlanArgs, opts ...ResourceOption) (*SavingsPlan, error)
    public SavingsPlan(string name, SavingsPlanArgs args, CustomResourceOptions? opts = null)
    public SavingsPlan(String name, SavingsPlanArgs args)
    public SavingsPlan(String name, SavingsPlanArgs args, CustomResourceOptions options)
    
    type: aws:savingsplans:SavingsPlan
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SavingsPlanArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SavingsPlanArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SavingsPlanArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SavingsPlanArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SavingsPlanArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var savingsPlanResource = new Aws.SavingsPlans.SavingsPlan("savingsPlanResource", new()
    {
        Commitment = "string",
        SavingsPlanOfferingId = "string",
        PurchaseTime = "string",
        Tags = 
        {
            { "string", "string" },
        },
        Timeouts = new Aws.SavingsPlans.Inputs.SavingsPlanTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
        UpfrontPaymentAmount = "string",
    });
    
    example, err := savingsplans.NewSavingsPlan(ctx, "savingsPlanResource", &savingsplans.SavingsPlanArgs{
    	Commitment:            pulumi.String("string"),
    	SavingsPlanOfferingId: pulumi.String("string"),
    	PurchaseTime:          pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Timeouts: &savingsplans.SavingsPlanTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    	UpfrontPaymentAmount: pulumi.String("string"),
    })
    
    var savingsPlanResource = new SavingsPlan("savingsPlanResource", SavingsPlanArgs.builder()
        .commitment("string")
        .savingsPlanOfferingId("string")
        .purchaseTime("string")
        .tags(Map.of("string", "string"))
        .timeouts(SavingsPlanTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .upfrontPaymentAmount("string")
        .build());
    
    savings_plan_resource = aws.savingsplans.SavingsPlan("savingsPlanResource",
        commitment="string",
        savings_plan_offering_id="string",
        purchase_time="string",
        tags={
            "string": "string",
        },
        timeouts={
            "create": "string",
            "delete": "string",
        },
        upfront_payment_amount="string")
    
    const savingsPlanResource = new aws.savingsplans.SavingsPlan("savingsPlanResource", {
        commitment: "string",
        savingsPlanOfferingId: "string",
        purchaseTime: "string",
        tags: {
            string: "string",
        },
        timeouts: {
            create: "string",
            "delete": "string",
        },
        upfrontPaymentAmount: "string",
    });
    
    type: aws:savingsplans:SavingsPlan
    properties:
        commitment: string
        purchaseTime: string
        savingsPlanOfferingId: string
        tags:
            string: string
        timeouts:
            create: string
            delete: string
        upfrontPaymentAmount: string
    

    SavingsPlan Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SavingsPlan resource accepts the following input properties:

    Commitment string

    The hourly commitment, in USD. This is the amount you commit to pay per hour, regardless of actual usage.

    The following arguments are optional:

    SavingsPlanOfferingId string
    The unique ID of a Savings Plan offering. You can find available offerings using the aws savingsplans describe-savings-plans-offerings CLI command.
    PurchaseTime string
    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.
    Tags Dictionary<string, string>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts SavingsPlanTimeouts
    UpfrontPaymentAmount string
    The up-front payment amount.
    Commitment string

    The hourly commitment, in USD. This is the amount you commit to pay per hour, regardless of actual usage.

    The following arguments are optional:

    SavingsPlanOfferingId string
    The unique ID of a Savings Plan offering. You can find available offerings using the aws savingsplans describe-savings-plans-offerings CLI command.
    PurchaseTime string
    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.
    Tags map[string]string
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts SavingsPlanTimeoutsArgs
    UpfrontPaymentAmount string
    The up-front payment amount.
    commitment String

    The hourly commitment, in USD. This is the amount you commit to pay per hour, regardless of actual usage.

    The following arguments are optional:

    savingsPlanOfferingId String
    The unique ID of a Savings Plan offering. You can find available offerings using the aws savingsplans describe-savings-plans-offerings CLI command.
    purchaseTime String
    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.
    tags Map<String,String>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts SavingsPlanTimeouts
    upfrontPaymentAmount String
    The up-front payment amount.
    commitment string

    The hourly commitment, in USD. This is the amount you commit to pay per hour, regardless of actual usage.

    The following arguments are optional:

    savingsPlanOfferingId string
    The unique ID of a Savings Plan offering. You can find available offerings using the aws savingsplans describe-savings-plans-offerings CLI command.
    purchaseTime string
    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.
    tags {[key: string]: string}
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts SavingsPlanTimeouts
    upfrontPaymentAmount string
    The up-front payment amount.
    commitment str

    The hourly commitment, in USD. This is the amount you commit to pay per hour, regardless of actual usage.

    The following arguments are optional:

    savings_plan_offering_id str
    The unique ID of a Savings Plan offering. You can find available offerings using the aws savingsplans describe-savings-plans-offerings CLI command.
    purchase_time str
    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.
    tags Mapping[str, str]
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts SavingsPlanTimeoutsArgs
    upfront_payment_amount str
    The up-front payment amount.
    commitment String

    The hourly commitment, in USD. This is the amount you commit to pay per hour, regardless of actual usage.

    The following arguments are optional:

    savingsPlanOfferingId String
    The unique ID of a Savings Plan offering. You can find available offerings using the aws savingsplans describe-savings-plans-offerings CLI command.
    purchaseTime String
    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.
    tags Map<String>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts Property Map
    upfrontPaymentAmount String
    The up-front payment amount.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SavingsPlan resource produces the following output properties:

    Currency string
    The currency of the Savings Plan (e.g., USD).
    Description string
    The description.
    Ec2InstanceFamily string
    The EC2 instance family for the Savings Plan (only applicable to EC2 Instance Savings Plans).
    End string
    The end time of the Savings Plan in RFC3339 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    OfferingId string
    The ID of the offering.
    PaymentOption string
    The payment option for the Savings Plan (e.g., All Upfront, Partial Upfront, No Upfront).
    ProductTypes List<string>
    The product types.
    RecurringPaymentAmount string
    The recurring payment amount.
    Region string
    The AWS Region.
    ReturnableUntil string
    The recurring payment amount.
    SavingsPlanArn string
    The ARN of the Savings Plan.
    SavingsPlanId string
    The ID of the Savings Plan.
    SavingsPlanType string
    The type of Savings Plan (e.g., Compute, EC2Instance).
    Start string
    The start time of the Savings Plan in RFC3339 format.
    State string
    The current state of the Savings Plan (e.g., active, queued, retired).
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    TermDurationInSeconds int
    The duration of the term, in seconds.
    Currency string
    The currency of the Savings Plan (e.g., USD).
    Description string
    The description.
    Ec2InstanceFamily string
    The EC2 instance family for the Savings Plan (only applicable to EC2 Instance Savings Plans).
    End string
    The end time of the Savings Plan in RFC3339 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    OfferingId string
    The ID of the offering.
    PaymentOption string
    The payment option for the Savings Plan (e.g., All Upfront, Partial Upfront, No Upfront).
    ProductTypes []string
    The product types.
    RecurringPaymentAmount string
    The recurring payment amount.
    Region string
    The AWS Region.
    ReturnableUntil string
    The recurring payment amount.
    SavingsPlanArn string
    The ARN of the Savings Plan.
    SavingsPlanId string
    The ID of the Savings Plan.
    SavingsPlanType string
    The type of Savings Plan (e.g., Compute, EC2Instance).
    Start string
    The start time of the Savings Plan in RFC3339 format.
    State string
    The current state of the Savings Plan (e.g., active, queued, retired).
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    TermDurationInSeconds int
    The duration of the term, in seconds.
    currency String
    The currency of the Savings Plan (e.g., USD).
    description String
    The description.
    ec2InstanceFamily String
    The EC2 instance family for the Savings Plan (only applicable to EC2 Instance Savings Plans).
    end String
    The end time of the Savings Plan in RFC3339 format.
    id String
    The provider-assigned unique ID for this managed resource.
    offeringId String
    The ID of the offering.
    paymentOption String
    The payment option for the Savings Plan (e.g., All Upfront, Partial Upfront, No Upfront).
    productTypes List<String>
    The product types.
    recurringPaymentAmount String
    The recurring payment amount.
    region String
    The AWS Region.
    returnableUntil String
    The recurring payment amount.
    savingsPlanArn String
    The ARN of the Savings Plan.
    savingsPlanId String
    The ID of the Savings Plan.
    savingsPlanType String
    The type of Savings Plan (e.g., Compute, EC2Instance).
    start String
    The start time of the Savings Plan in RFC3339 format.
    state String
    The current state of the Savings Plan (e.g., active, queued, retired).
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    termDurationInSeconds Integer
    The duration of the term, in seconds.
    currency string
    The currency of the Savings Plan (e.g., USD).
    description string
    The description.
    ec2InstanceFamily string
    The EC2 instance family for the Savings Plan (only applicable to EC2 Instance Savings Plans).
    end string
    The end time of the Savings Plan in RFC3339 format.
    id string
    The provider-assigned unique ID for this managed resource.
    offeringId string
    The ID of the offering.
    paymentOption string
    The payment option for the Savings Plan (e.g., All Upfront, Partial Upfront, No Upfront).
    productTypes string[]
    The product types.
    recurringPaymentAmount string
    The recurring payment amount.
    region string
    The AWS Region.
    returnableUntil string
    The recurring payment amount.
    savingsPlanArn string
    The ARN of the Savings Plan.
    savingsPlanId string
    The ID of the Savings Plan.
    savingsPlanType string
    The type of Savings Plan (e.g., Compute, EC2Instance).
    start string
    The start time of the Savings Plan in RFC3339 format.
    state string
    The current state of the Savings Plan (e.g., active, queued, retired).
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    termDurationInSeconds number
    The duration of the term, in seconds.
    currency str
    The currency of the Savings Plan (e.g., USD).
    description str
    The description.
    ec2_instance_family str
    The EC2 instance family for the Savings Plan (only applicable to EC2 Instance Savings Plans).
    end str
    The end time of the Savings Plan in RFC3339 format.
    id str
    The provider-assigned unique ID for this managed resource.
    offering_id str
    The ID of the offering.
    payment_option str
    The payment option for the Savings Plan (e.g., All Upfront, Partial Upfront, No Upfront).
    product_types Sequence[str]
    The product types.
    recurring_payment_amount str
    The recurring payment amount.
    region str
    The AWS Region.
    returnable_until str
    The recurring payment amount.
    savings_plan_arn str
    The ARN of the Savings Plan.
    savings_plan_id str
    The ID of the Savings Plan.
    savings_plan_type str
    The type of Savings Plan (e.g., Compute, EC2Instance).
    start str
    The start time of the Savings Plan in RFC3339 format.
    state str
    The current state of the Savings Plan (e.g., active, queued, retired).
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    term_duration_in_seconds int
    The duration of the term, in seconds.
    currency String
    The currency of the Savings Plan (e.g., USD).
    description String
    The description.
    ec2InstanceFamily String
    The EC2 instance family for the Savings Plan (only applicable to EC2 Instance Savings Plans).
    end String
    The end time of the Savings Plan in RFC3339 format.
    id String
    The provider-assigned unique ID for this managed resource.
    offeringId String
    The ID of the offering.
    paymentOption String
    The payment option for the Savings Plan (e.g., All Upfront, Partial Upfront, No Upfront).
    productTypes List<String>
    The product types.
    recurringPaymentAmount String
    The recurring payment amount.
    region String
    The AWS Region.
    returnableUntil String
    The recurring payment amount.
    savingsPlanArn String
    The ARN of the Savings Plan.
    savingsPlanId String
    The ID of the Savings Plan.
    savingsPlanType String
    The type of Savings Plan (e.g., Compute, EC2Instance).
    start String
    The start time of the Savings Plan in RFC3339 format.
    state String
    The current state of the Savings Plan (e.g., active, queued, retired).
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    termDurationInSeconds Number
    The duration of the term, in seconds.

    Look up Existing SavingsPlan Resource

    Get an existing SavingsPlan resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SavingsPlanState, opts?: CustomResourceOptions): SavingsPlan
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            commitment: Optional[str] = None,
            currency: Optional[str] = None,
            description: Optional[str] = None,
            ec2_instance_family: Optional[str] = None,
            end: Optional[str] = None,
            offering_id: Optional[str] = None,
            payment_option: Optional[str] = None,
            product_types: Optional[Sequence[str]] = None,
            purchase_time: Optional[str] = None,
            recurring_payment_amount: Optional[str] = None,
            region: Optional[str] = None,
            returnable_until: Optional[str] = None,
            savings_plan_arn: Optional[str] = None,
            savings_plan_id: Optional[str] = None,
            savings_plan_offering_id: Optional[str] = None,
            savings_plan_type: Optional[str] = None,
            start: Optional[str] = None,
            state: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            term_duration_in_seconds: Optional[int] = None,
            timeouts: Optional[SavingsPlanTimeoutsArgs] = None,
            upfront_payment_amount: Optional[str] = None) -> SavingsPlan
    func GetSavingsPlan(ctx *Context, name string, id IDInput, state *SavingsPlanState, opts ...ResourceOption) (*SavingsPlan, error)
    public static SavingsPlan Get(string name, Input<string> id, SavingsPlanState? state, CustomResourceOptions? opts = null)
    public static SavingsPlan get(String name, Output<String> id, SavingsPlanState state, CustomResourceOptions options)
    resources:  _:    type: aws:savingsplans:SavingsPlan    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Commitment string

    The hourly commitment, in USD. This is the amount you commit to pay per hour, regardless of actual usage.

    The following arguments are optional:

    Currency string
    The currency of the Savings Plan (e.g., USD).
    Description string
    The description.
    Ec2InstanceFamily string
    The EC2 instance family for the Savings Plan (only applicable to EC2 Instance Savings Plans).
    End string
    The end time of the Savings Plan in RFC3339 format.
    OfferingId string
    The ID of the offering.
    PaymentOption string
    The payment option for the Savings Plan (e.g., All Upfront, Partial Upfront, No Upfront).
    ProductTypes List<string>
    The product types.
    PurchaseTime string
    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.
    RecurringPaymentAmount string
    The recurring payment amount.
    Region string
    The AWS Region.
    ReturnableUntil string
    The recurring payment amount.
    SavingsPlanArn string
    The ARN of the Savings Plan.
    SavingsPlanId string
    The ID of the Savings Plan.
    SavingsPlanOfferingId string
    The unique ID of a Savings Plan offering. You can find available offerings using the aws savingsplans describe-savings-plans-offerings CLI command.
    SavingsPlanType string
    The type of Savings Plan (e.g., Compute, EC2Instance).
    Start string
    The start time of the Savings Plan in RFC3339 format.
    State string
    The current state of the Savings Plan (e.g., active, queued, retired).
    Tags Dictionary<string, string>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    TermDurationInSeconds int
    The duration of the term, in seconds.
    Timeouts SavingsPlanTimeouts
    UpfrontPaymentAmount string
    The up-front payment amount.
    Commitment string

    The hourly commitment, in USD. This is the amount you commit to pay per hour, regardless of actual usage.

    The following arguments are optional:

    Currency string
    The currency of the Savings Plan (e.g., USD).
    Description string
    The description.
    Ec2InstanceFamily string
    The EC2 instance family for the Savings Plan (only applicable to EC2 Instance Savings Plans).
    End string
    The end time of the Savings Plan in RFC3339 format.
    OfferingId string
    The ID of the offering.
    PaymentOption string
    The payment option for the Savings Plan (e.g., All Upfront, Partial Upfront, No Upfront).
    ProductTypes []string
    The product types.
    PurchaseTime string
    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.
    RecurringPaymentAmount string
    The recurring payment amount.
    Region string
    The AWS Region.
    ReturnableUntil string
    The recurring payment amount.
    SavingsPlanArn string
    The ARN of the Savings Plan.
    SavingsPlanId string
    The ID of the Savings Plan.
    SavingsPlanOfferingId string
    The unique ID of a Savings Plan offering. You can find available offerings using the aws savingsplans describe-savings-plans-offerings CLI command.
    SavingsPlanType string
    The type of Savings Plan (e.g., Compute, EC2Instance).
    Start string
    The start time of the Savings Plan in RFC3339 format.
    State string
    The current state of the Savings Plan (e.g., active, queued, retired).
    Tags map[string]string
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    TermDurationInSeconds int
    The duration of the term, in seconds.
    Timeouts SavingsPlanTimeoutsArgs
    UpfrontPaymentAmount string
    The up-front payment amount.
    commitment String

    The hourly commitment, in USD. This is the amount you commit to pay per hour, regardless of actual usage.

    The following arguments are optional:

    currency String
    The currency of the Savings Plan (e.g., USD).
    description String
    The description.
    ec2InstanceFamily String
    The EC2 instance family for the Savings Plan (only applicable to EC2 Instance Savings Plans).
    end String
    The end time of the Savings Plan in RFC3339 format.
    offeringId String
    The ID of the offering.
    paymentOption String
    The payment option for the Savings Plan (e.g., All Upfront, Partial Upfront, No Upfront).
    productTypes List<String>
    The product types.
    purchaseTime String
    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.
    recurringPaymentAmount String
    The recurring payment amount.
    region String
    The AWS Region.
    returnableUntil String
    The recurring payment amount.
    savingsPlanArn String
    The ARN of the Savings Plan.
    savingsPlanId String
    The ID of the Savings Plan.
    savingsPlanOfferingId String
    The unique ID of a Savings Plan offering. You can find available offerings using the aws savingsplans describe-savings-plans-offerings CLI command.
    savingsPlanType String
    The type of Savings Plan (e.g., Compute, EC2Instance).
    start String
    The start time of the Savings Plan in RFC3339 format.
    state String
    The current state of the Savings Plan (e.g., active, queued, retired).
    tags Map<String,String>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    termDurationInSeconds Integer
    The duration of the term, in seconds.
    timeouts SavingsPlanTimeouts
    upfrontPaymentAmount String
    The up-front payment amount.
    commitment string

    The hourly commitment, in USD. This is the amount you commit to pay per hour, regardless of actual usage.

    The following arguments are optional:

    currency string
    The currency of the Savings Plan (e.g., USD).
    description string
    The description.
    ec2InstanceFamily string
    The EC2 instance family for the Savings Plan (only applicable to EC2 Instance Savings Plans).
    end string
    The end time of the Savings Plan in RFC3339 format.
    offeringId string
    The ID of the offering.
    paymentOption string
    The payment option for the Savings Plan (e.g., All Upfront, Partial Upfront, No Upfront).
    productTypes string[]
    The product types.
    purchaseTime string
    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.
    recurringPaymentAmount string
    The recurring payment amount.
    region string
    The AWS Region.
    returnableUntil string
    The recurring payment amount.
    savingsPlanArn string
    The ARN of the Savings Plan.
    savingsPlanId string
    The ID of the Savings Plan.
    savingsPlanOfferingId string
    The unique ID of a Savings Plan offering. You can find available offerings using the aws savingsplans describe-savings-plans-offerings CLI command.
    savingsPlanType string
    The type of Savings Plan (e.g., Compute, EC2Instance).
    start string
    The start time of the Savings Plan in RFC3339 format.
    state string
    The current state of the Savings Plan (e.g., active, queued, retired).
    tags {[key: string]: string}
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    termDurationInSeconds number
    The duration of the term, in seconds.
    timeouts SavingsPlanTimeouts
    upfrontPaymentAmount string
    The up-front payment amount.
    commitment str

    The hourly commitment, in USD. This is the amount you commit to pay per hour, regardless of actual usage.

    The following arguments are optional:

    currency str
    The currency of the Savings Plan (e.g., USD).
    description str
    The description.
    ec2_instance_family str
    The EC2 instance family for the Savings Plan (only applicable to EC2 Instance Savings Plans).
    end str
    The end time of the Savings Plan in RFC3339 format.
    offering_id str
    The ID of the offering.
    payment_option str
    The payment option for the Savings Plan (e.g., All Upfront, Partial Upfront, No Upfront).
    product_types Sequence[str]
    The product types.
    purchase_time str
    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.
    recurring_payment_amount str
    The recurring payment amount.
    region str
    The AWS Region.
    returnable_until str
    The recurring payment amount.
    savings_plan_arn str
    The ARN of the Savings Plan.
    savings_plan_id str
    The ID of the Savings Plan.
    savings_plan_offering_id str
    The unique ID of a Savings Plan offering. You can find available offerings using the aws savingsplans describe-savings-plans-offerings CLI command.
    savings_plan_type str
    The type of Savings Plan (e.g., Compute, EC2Instance).
    start str
    The start time of the Savings Plan in RFC3339 format.
    state str
    The current state of the Savings Plan (e.g., active, queued, retired).
    tags Mapping[str, str]
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    term_duration_in_seconds int
    The duration of the term, in seconds.
    timeouts SavingsPlanTimeoutsArgs
    upfront_payment_amount str
    The up-front payment amount.
    commitment String

    The hourly commitment, in USD. This is the amount you commit to pay per hour, regardless of actual usage.

    The following arguments are optional:

    currency String
    The currency of the Savings Plan (e.g., USD).
    description String
    The description.
    ec2InstanceFamily String
    The EC2 instance family for the Savings Plan (only applicable to EC2 Instance Savings Plans).
    end String
    The end time of the Savings Plan in RFC3339 format.
    offeringId String
    The ID of the offering.
    paymentOption String
    The payment option for the Savings Plan (e.g., All Upfront, Partial Upfront, No Upfront).
    productTypes List<String>
    The product types.
    purchaseTime String
    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.
    recurringPaymentAmount String
    The recurring payment amount.
    region String
    The AWS Region.
    returnableUntil String
    The recurring payment amount.
    savingsPlanArn String
    The ARN of the Savings Plan.
    savingsPlanId String
    The ID of the Savings Plan.
    savingsPlanOfferingId String
    The unique ID of a Savings Plan offering. You can find available offerings using the aws savingsplans describe-savings-plans-offerings CLI command.
    savingsPlanType String
    The type of Savings Plan (e.g., Compute, EC2Instance).
    start String
    The start time of the Savings Plan in RFC3339 format.
    state String
    The current state of the Savings Plan (e.g., active, queued, retired).
    tags Map<String>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    termDurationInSeconds Number
    The duration of the term, in seconds.
    timeouts Property Map
    upfrontPaymentAmount String
    The up-front payment amount.

    Supporting Types

    SavingsPlanTimeouts, SavingsPlanTimeoutsArgs

    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.

    Import

    Using pulumi import, import Savings Plans using the id. For example:

    Using terraform state mv, import Savings Plans using the id. For example:

    $ pulumi import aws:savingsplans/savingsPlan:SavingsPlan example sp-12345678901234567
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate