Module pricing
This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-awsrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-awsrepo.
Functions
Others
Functions
Function getProduct
getProduct(args: GetProductArgs, opts?: pulumi.InvokeOptions): Promise<GetProductResult>Use this data source to get the pricing information of all products in AWS. This data source is only available in a us-east-1 or ap-south-1 provider.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = pulumi.output(aws.pricing.getProduct({
filters: [
{
field: "instanceType",
value: "c5.xlarge",
},
{
field: "operatingSystem",
value: "Linux",
},
{
field: "location",
value: "US East (N. Virginia)",
},
{
field: "preInstalledSw",
value: "NA",
},
{
field: "licenseModel",
value: "No License required",
},
{
field: "tenancy",
value: "Shared",
},
{
field: "capacitystatus",
value: "Used",
},
],
serviceCode: "AmazonEC2",
}, { async: true }));Others
interface GetProductArgs
interface GetProductArgsA collection of arguments for invoking getProduct.
property filters
filters: GetProductFilter[];A list of filters. Passed directly to the API (see GetProducts API reference). These filters must describe a single product, this resource will fail if more than one product is returned by the API.
property serviceCode
serviceCode: string;The code of the service. Available service codes can be fetched using the DescribeServices pricing API call.
interface GetProductResult
interface GetProductResultA collection of values returned by getProduct.
property filters
filters: GetProductFilter[];property id
id: string;The provider-assigned unique ID for this managed resource.
property result
result: string;Set to the product returned from the API.
property serviceCode
serviceCode: string;