GetInstanceTypeOfferings

Information about EC2 Instance Type Offerings.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Ec2.GetInstanceTypeOfferings.InvokeAsync(new Aws.Ec2.GetInstanceTypeOfferingsArgs
        {
            Filters = 
            {
                new Aws.Ec2.Inputs.GetInstanceTypeOfferingsFilterArgs
                {
                    Name = "instance-type",
                    Values = 
                    {
                        "t2.micro",
                        "t3.micro",
                    },
                },
                new Aws.Ec2.Inputs.GetInstanceTypeOfferingsFilterArgs
                {
                    Name = "location",
                    Values = 
                    {
                        "usw2-az4",
                    },
                },
            },
            LocationType = "availability-zone-id",
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := "availability-zone-id"
        _, err := ec2.GetInstanceTypeOfferings(ctx, &ec2.GetInstanceTypeOfferingsArgs{
            Filters: []ec2.GetInstanceTypeOfferingsFilter{
                ec2.GetInstanceTypeOfferingsFilter{
                    Name: "instance-type",
                    Values: []string{
                        "t2.micro",
                        "t3.micro",
                    },
                },
                ec2.GetInstanceTypeOfferingsFilter{
                    Name: "location",
                    Values: []string{
                        "usw2-az4",
                    },
                },
            },
            LocationType: &opt0,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ec2.get_instance_type_offerings(filters=[
        {
            "name": "instance-type",
            "values": [
                "t2.micro",
                "t3.micro",
            ],
        },
        {
            "name": "location",
            "values": ["usw2-az4"],
        },
    ],
    location_type="availability-zone-id")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.ec2.getInstanceTypeOfferings({
    filters: [
        {
            name: "instance-type",
            values: [
                "t2.micro",
                "t3.micro",
            ],
        },
        {
            name: "location",
            values: ["usw2-az4"],
        },
    ],
    locationType: "availability-zone-id",
}, { async: true }));

Using GetInstanceTypeOfferings

function getInstanceTypeOfferings(args: GetInstanceTypeOfferingsArgs, opts?: InvokeOptions): Promise<GetInstanceTypeOfferingsResult>
function  get_instance_type_offerings(filters=None, location_type=None, opts=None)
func GetInstanceTypeOfferings(ctx *Context, args *GetInstanceTypeOfferingsArgs, opts ...InvokeOption) (*GetInstanceTypeOfferingsResult, error)
public static class GetInstanceTypeOfferings {
    public static Task<GetInstanceTypeOfferingsResult> InvokeAsync(GetInstanceTypeOfferingsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filters List<GetInstanceTypeOfferingsFilterArgs>

One or more configuration blocks containing name-values filters. See the EC2 API Reference for supported filters. Detailed below.

LocationType string

Location type. Defaults to region. Valid values: availability-zone, availability-zone-id, and region.

Filters []GetInstanceTypeOfferingsFilter

One or more configuration blocks containing name-values filters. See the EC2 API Reference for supported filters. Detailed below.

LocationType string

Location type. Defaults to region. Valid values: availability-zone, availability-zone-id, and region.

filters GetInstanceTypeOfferingsFilter[]

One or more configuration blocks containing name-values filters. See the EC2 API Reference for supported filters. Detailed below.

locationType string

Location type. Defaults to region. Valid values: availability-zone, availability-zone-id, and region.

filters List[GetInstanceTypeOfferingsFilter]

One or more configuration blocks containing name-values filters. See the EC2 API Reference for supported filters. Detailed below.

location_type str

Location type. Defaults to region. Valid values: availability-zone, availability-zone-id, and region.

GetInstanceTypeOfferings Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

InstanceTypes List<string>

Set of EC2 Instance Types.

Filters List<GetInstanceTypeOfferingsFilter>
LocationType string
Id string

The provider-assigned unique ID for this managed resource.

InstanceTypes []string

Set of EC2 Instance Types.

Filters []GetInstanceTypeOfferingsFilter
LocationType string
id string

The provider-assigned unique ID for this managed resource.

instanceTypes string[]

Set of EC2 Instance Types.

filters GetInstanceTypeOfferingsFilter[]
locationType string
id str

The provider-assigned unique ID for this managed resource.

instance_types List[str]

Set of EC2 Instance Types.

filters List[GetInstanceTypeOfferingsFilter]
location_type str

Supporting Types

GetInstanceTypeOfferingsFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

Name of the filter. The location filter depends on the top-level location_type argument and if not specified, defaults to the current region.

Values List<string>

List of one or more values for the filter.

Name string

Name of the filter. The location filter depends on the top-level location_type argument and if not specified, defaults to the current region.

Values []string

List of one or more values for the filter.

name string

Name of the filter. The location filter depends on the top-level location_type argument and if not specified, defaults to the current region.

values string[]

List of one or more values for the filter.

name str

Name of the filter. The location filter depends on the top-level location_type argument and if not specified, defaults to the current region.

values List[str]

List of one or more values for the filter.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.