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.

pricing

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-aws repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-aws repo.

class pulumi_aws.pricing.AwaitableGetProductResult(filters=None, id=None, result=None, service_code=None)
class pulumi_aws.pricing.GetProductResult(filters=None, id=None, result=None, service_code=None)

A collection of values returned by getProduct.

id = None

The provider-assigned unique ID for this managed resource.

result = None

Set to the product returned from the API.

pulumi_aws.pricing.get_product(filters=None, service_code=None, opts=None)

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.

import pulumi
import pulumi_aws as aws

example = aws.pricing.get_product(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",
        },
    ],
    service_code="AmazonEC2")
Parameters
  • filters (list) – 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.

  • service_code (str) – The code of the service. Available service codes can be fetched using the DescribeServices pricing API call.

The filters object supports the following:

  • field (str) - The product attribute name that you want to filter on.

  • value (str) - The product attribute value that you want to filter on.