Show / Hide Table of Contents

Class GetProduct

Inheritance
System.Object
GetProduct
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Pricing
Assembly: Pulumi.Aws.dll
Syntax
public static class GetProduct

Methods

View Source

InvokeAsync(GetProductArgs, InvokeOptions)

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.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var example = Output.Create(Aws.Pricing.GetProduct.InvokeAsync(new Aws.Pricing.GetProductArgs
    {
        Filters = 
        {
            new Aws.Pricing.Inputs.GetProductFilterArgs
            {
                Field = "instanceType",
                Value = "c5.xlarge",
            },
            new Aws.Pricing.Inputs.GetProductFilterArgs
            {
                Field = "operatingSystem",
                Value = "Linux",
            },
            new Aws.Pricing.Inputs.GetProductFilterArgs
            {
                Field = "location",
                Value = "US East (N. Virginia)",
            },
            new Aws.Pricing.Inputs.GetProductFilterArgs
            {
                Field = "preInstalledSw",
                Value = "NA",
            },
            new Aws.Pricing.Inputs.GetProductFilterArgs
            {
                Field = "licenseModel",
                Value = "No License required",
            },
            new Aws.Pricing.Inputs.GetProductFilterArgs
            {
                Field = "tenancy",
                Value = "Shared",
            },
            new Aws.Pricing.Inputs.GetProductFilterArgs
            {
                Field = "capacitystatus",
                Value = "Used",
            },
        },
        ServiceCode = "AmazonEC2",
    }));
}

}
using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var example = Output.Create(Aws.Pricing.GetProduct.InvokeAsync(new Aws.Pricing.GetProductArgs
    {
        Filters = 
        {
            new Aws.Pricing.Inputs.GetProductFilterArgs
            {
                Field = "instanceType",
                Value = "ds1.xlarge",
            },
            new Aws.Pricing.Inputs.GetProductFilterArgs
            {
                Field = "location",
                Value = "US East (N. Virginia)",
            },
        },
        ServiceCode = "AmazonRedshift",
    }));
}

}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetProductResult> InvokeAsync(GetProductArgs args, InvokeOptions options = null)
Parameters
Type Name Description
GetProductArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetProductResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.