Viewing docs for AWS v7.27.0
published on Thursday, Apr 23, 2026 by Pulumi
published on Thursday, Apr 23, 2026 by Pulumi
Viewing docs for AWS v7.27.0
published on Thursday, Apr 23, 2026 by Pulumi
published on Thursday, Apr 23, 2026 by Pulumi
Data source for getting AWS Savings Plans Offerings.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.savingsplans.getOfferings({
productType: "EC2",
filters: [{
name: "region",
values: ["us-west-2"],
}],
});
import pulumi
import pulumi_aws as aws
example = aws.savingsplans.get_offerings(product_type="EC2",
filters=[{
"name": "region",
"values": ["us-west-2"],
}])
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.GetOfferings(ctx, &savingsplans.GetOfferingsArgs{
ProductType: pulumi.StringRef("EC2"),
Filters: []savingsplans.GetOfferingsFilter{
{
Name: "region",
Values: []string{
"us-west-2",
},
},
},
}, nil)
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 = Aws.SavingsPlans.GetOfferings.Invoke(new()
{
ProductType = "EC2",
Filters = new[]
{
new Aws.SavingsPlans.Inputs.GetOfferingsFilterInputArgs
{
Name = "region",
Values = new[]
{
"us-west-2",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.savingsplans.SavingsplansFunctions;
import com.pulumi.aws.savingsplans.inputs.GetOfferingsArgs;
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) {
final var example = SavingsplansFunctions.getOfferings(GetOfferingsArgs.builder()
.productType("EC2")
.filters(GetOfferingsFilterArgs.builder()
.name("region")
.values("us-west-2")
.build())
.build());
}
}
variables:
example:
fn::invoke:
function: aws:savingsplans:getOfferings
arguments:
productType: EC2
filters:
- name: region
values:
- us-west-2
Using getOfferings
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getOfferings(args: GetOfferingsArgs, opts?: InvokeOptions): Promise<GetOfferingsResult>
function getOfferingsOutput(args: GetOfferingsOutputArgs, opts?: InvokeOptions): Output<GetOfferingsResult>def get_offerings(currencies: Optional[Sequence[str]] = None,
descriptions: Optional[Sequence[str]] = None,
durations: Optional[Sequence[int]] = None,
filters: Optional[Sequence[GetOfferingsFilter]] = None,
offering_ids: Optional[Sequence[str]] = None,
operations: Optional[Sequence[str]] = None,
payment_options: Optional[Sequence[str]] = None,
plan_types: Optional[Sequence[str]] = None,
product_type: Optional[str] = None,
service_codes: Optional[Sequence[str]] = None,
usage_types: Optional[Sequence[str]] = None,
opts: Optional[InvokeOptions] = None) -> GetOfferingsResult
def get_offerings_output(currencies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
descriptions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
durations: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetOfferingsFilterArgs]]]] = None,
offering_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
operations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
payment_options: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
plan_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
product_type: Optional[pulumi.Input[str]] = None,
service_codes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
usage_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetOfferingsResult]func GetOfferings(ctx *Context, args *GetOfferingsArgs, opts ...InvokeOption) (*GetOfferingsResult, error)
func GetOfferingsOutput(ctx *Context, args *GetOfferingsOutputArgs, opts ...InvokeOption) GetOfferingsResultOutput> Note: This function is named GetOfferings in the Go SDK.
public static class GetOfferings
{
public static Task<GetOfferingsResult> InvokeAsync(GetOfferingsArgs args, InvokeOptions? opts = null)
public static Output<GetOfferingsResult> Invoke(GetOfferingsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetOfferingsResult> getOfferings(GetOfferingsArgs args, InvokeOptions options)
public static Output<GetOfferingsResult> getOfferings(GetOfferingsArgs args, InvokeOptions options)
fn::invoke:
function: aws:savingsplans/getOfferings:getOfferings
arguments:
# arguments dictionaryThe following arguments are supported:
- Currencies List<string>
- List of currencies.
- Descriptions List<string>
- List of descriptions.
- Durations List<int>
- List of durations, in seconds.
- Filters
List<Get
Offerings Filter> - List of filters. See Filter.
- Offering
Ids List<string> - List of offering IDs.
- Operations List<string>
- List of operations.
- Payment
Options List<string> - List of payment options.
- Plan
Types List<string> - List of plan types.
- Product
Type string - Product type.
- Service
Codes List<string> - List of service codes.
- Usage
Types List<string> - List of usage types.
- Currencies []string
- List of currencies.
- Descriptions []string
- List of descriptions.
- Durations []int
- List of durations, in seconds.
- Filters
[]Get
Offerings Filter - List of filters. See Filter.
- Offering
Ids []string - List of offering IDs.
- Operations []string
- List of operations.
- Payment
Options []string - List of payment options.
- Plan
Types []string - List of plan types.
- Product
Type string - Product type.
- Service
Codes []string - List of service codes.
- Usage
Types []string - List of usage types.
- currencies List<String>
- List of currencies.
- descriptions List<String>
- List of descriptions.
- durations List<Integer>
- List of durations, in seconds.
- filters
List<Get
Offerings Filter> - List of filters. See Filter.
- offering
Ids List<String> - List of offering IDs.
- operations List<String>
- List of operations.
- payment
Options List<String> - List of payment options.
- plan
Types List<String> - List of plan types.
- product
Type String - Product type.
- service
Codes List<String> - List of service codes.
- usage
Types List<String> - List of usage types.
- currencies string[]
- List of currencies.
- descriptions string[]
- List of descriptions.
- durations number[]
- List of durations, in seconds.
- filters
Get
Offerings Filter[] - List of filters. See Filter.
- offering
Ids string[] - List of offering IDs.
- operations string[]
- List of operations.
- payment
Options string[] - List of payment options.
- plan
Types string[] - List of plan types.
- product
Type string - Product type.
- service
Codes string[] - List of service codes.
- usage
Types string[] - List of usage types.
- currencies Sequence[str]
- List of currencies.
- descriptions Sequence[str]
- List of descriptions.
- durations Sequence[int]
- List of durations, in seconds.
- filters
Sequence[Get
Offerings Filter] - List of filters. See Filter.
- offering_
ids Sequence[str] - List of offering IDs.
- operations Sequence[str]
- List of operations.
- payment_
options Sequence[str] - List of payment options.
- plan_
types Sequence[str] - List of plan types.
- product_
type str - Product type.
- service_
codes Sequence[str] - List of service codes.
- usage_
types Sequence[str] - List of usage types.
- currencies List<String>
- List of currencies.
- descriptions List<String>
- List of descriptions.
- durations List<Number>
- List of durations, in seconds.
- filters List<Property Map>
- List of filters. See Filter.
- offering
Ids List<String> - List of offering IDs.
- operations List<String>
- List of operations.
- payment
Options List<String> - List of payment options.
- plan
Types List<String> - List of plan types.
- product
Type String - Product type.
- service
Codes List<String> - List of service codes.
- usage
Types List<String> - List of usage types.
getOfferings Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Offerings
List<Get
Offerings Offering> - List of Savings Plans Offerings. See
offeringsAttribute Reference. - Currencies List<string>
- Descriptions List<string>
- Durations List<int>
- Filters
List<Get
Offerings Filter> - Offering
Ids List<string> - Operations List<string>
- Payment
Options List<string> - Plan
Types List<string> - Product
Type string - Service
Codes List<string> - Usage
Types List<string>
- Id string
- The provider-assigned unique ID for this managed resource.
- Offerings
[]Get
Offerings Offering - List of Savings Plans Offerings. See
offeringsAttribute Reference. - Currencies []string
- Descriptions []string
- Durations []int
- Filters
[]Get
Offerings Filter - Offering
Ids []string - Operations []string
- Payment
Options []string - Plan
Types []string - Product
Type string - Service
Codes []string - Usage
Types []string
- id String
- The provider-assigned unique ID for this managed resource.
- offerings
List<Get
Offerings Offering> - List of Savings Plans Offerings. See
offeringsAttribute Reference. - currencies List<String>
- descriptions List<String>
- durations List<Integer>
- filters
List<Get
Offerings Filter> - offering
Ids List<String> - operations List<String>
- payment
Options List<String> - plan
Types List<String> - product
Type String - service
Codes List<String> - usage
Types List<String>
- id string
- The provider-assigned unique ID for this managed resource.
- offerings
Get
Offerings Offering[] - List of Savings Plans Offerings. See
offeringsAttribute Reference. - currencies string[]
- descriptions string[]
- durations number[]
- filters
Get
Offerings Filter[] - offering
Ids string[] - operations string[]
- payment
Options string[] - plan
Types string[] - product
Type string - service
Codes string[] - usage
Types string[]
- id str
- The provider-assigned unique ID for this managed resource.
- offerings
Sequence[Get
Offerings Offering] - List of Savings Plans Offerings. See
offeringsAttribute Reference. - currencies Sequence[str]
- descriptions Sequence[str]
- durations Sequence[int]
- filters
Sequence[Get
Offerings Filter] - offering_
ids Sequence[str] - operations Sequence[str]
- payment_
options Sequence[str] - plan_
types Sequence[str] - product_
type str - service_
codes Sequence[str] - usage_
types Sequence[str]
- id String
- The provider-assigned unique ID for this managed resource.
- offerings List<Property Map>
- List of Savings Plans Offerings. See
offeringsAttribute Reference. - currencies List<String>
- descriptions List<String>
- durations List<Number>
- filters List<Property Map>
- offering
Ids List<String> - operations List<String>
- payment
Options List<String> - plan
Types List<String> - product
Type String - service
Codes List<String> - usage
Types List<String>
Supporting Types
GetOfferingsFilter
GetOfferingsOffering
- Currency string
- Currency.
- Description string
- Description.
- Duration
Seconds int - Duration, in seconds.
- Offering
Id string - Offering ID.
- Operation string
- Operation.
- Payment
Option string - Payment option.
- Plan
Type string - Plan type.
- Product
Types List<string> - List of product types.
- Properties
List<Get
Offerings Offering Property> - List of properties. See
propertiesAttribute Reference. - Service
Code string - Service code.
- Usage
Type string - Usage type.
- Currency string
- Currency.
- Description string
- Description.
- Duration
Seconds int - Duration, in seconds.
- Offering
Id string - Offering ID.
- Operation string
- Operation.
- Payment
Option string - Payment option.
- Plan
Type string - Plan type.
- Product
Types []string - List of product types.
- Properties
[]Get
Offerings Offering Property - List of properties. See
propertiesAttribute Reference. - Service
Code string - Service code.
- Usage
Type string - Usage type.
- currency String
- Currency.
- description String
- Description.
- duration
Seconds Integer - Duration, in seconds.
- offering
Id String - Offering ID.
- operation String
- Operation.
- payment
Option String - Payment option.
- plan
Type String - Plan type.
- product
Types List<String> - List of product types.
- properties
List<Get
Offerings Offering Property> - List of properties. See
propertiesAttribute Reference. - service
Code String - Service code.
- usage
Type String - Usage type.
- currency string
- Currency.
- description string
- Description.
- duration
Seconds number - Duration, in seconds.
- offering
Id string - Offering ID.
- operation string
- Operation.
- payment
Option string - Payment option.
- plan
Type string - Plan type.
- product
Types string[] - List of product types.
- properties
Get
Offerings Offering Property[] - List of properties. See
propertiesAttribute Reference. - service
Code string - Service code.
- usage
Type string - Usage type.
- currency str
- Currency.
- description str
- Description.
- duration_
seconds int - Duration, in seconds.
- offering_
id str - Offering ID.
- operation str
- Operation.
- payment_
option str - Payment option.
- plan_
type str - Plan type.
- product_
types Sequence[str] - List of product types.
- properties
Sequence[Get
Offerings Offering Property] - List of properties. See
propertiesAttribute Reference. - service_
code str - Service code.
- usage_
type str - Usage type.
- currency String
- Currency.
- description String
- Description.
- duration
Seconds Number - Duration, in seconds.
- offering
Id String - Offering ID.
- operation String
- Operation.
- payment
Option String - Payment option.
- plan
Type String - Plan type.
- product
Types List<String> - List of product types.
- properties List<Property Map>
- List of properties. See
propertiesAttribute Reference. - service
Code String - Service code.
- usage
Type String - Usage type.
GetOfferingsOfferingProperty
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
Viewing docs for AWS v7.27.0
published on Thursday, Apr 23, 2026 by Pulumi
published on Thursday, Apr 23, 2026 by Pulumi
