GetInstanceTypeOffering

Information about single EC2 Instance Type Offering.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Ec2.GetInstanceTypeOffering.InvokeAsync(new Aws.Ec2.GetInstanceTypeOfferingArgs
        {
            Filters = 
            {
                new Aws.Ec2.Inputs.GetInstanceTypeOfferingFilterArgs
                {
                    Name = "instance-type",
                    Values = 
                    {
                        "t1.micro",
                        "t2.micro",
                        "t3.micro",
                    },
                },
            },
            PreferredInstanceTypes = 
            {
                "t3.micro",
                "t2.micro",
                "t1.micro",
            },
        }));
    }

}
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 {
        _, err := ec2.GetInstanceTypeOffering(ctx, &ec2.GetInstanceTypeOfferingArgs{
            Filters: []ec2.GetInstanceTypeOfferingFilter{
                ec2.GetInstanceTypeOfferingFilter{
                    Name: "instance-type",
                    Values: []string{
                        "t1.micro",
                        "t2.micro",
                        "t3.micro",
                    },
                },
            },
            PreferredInstanceTypes: []string{
                "t3.micro",
                "t2.micro",
                "t1.micro",
            },
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ec2.get_instance_type_offering(filters=[{
        "name": "instance-type",
        "values": [
            "t1.micro",
            "t2.micro",
            "t3.micro",
        ],
    }],
    preferred_instance_types=[
        "t3.micro",
        "t2.micro",
        "t1.micro",
    ])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.ec2.getInstanceTypeOffering({
    filters: [{
        name: "instance-type",
        values: [
            "t1.micro",
            "t2.micro",
            "t3.micro",
        ],
    }],
    preferredInstanceTypes: [
        "t3.micro",
        "t2.micro",
        "t1.micro",
    ],
}, { async: true }));

Using GetInstanceTypeOffering

function getInstanceTypeOffering(args: GetInstanceTypeOfferingArgs, opts?: InvokeOptions): Promise<GetInstanceTypeOfferingResult>
function  get_instance_type_offering(filters=None, location_type=None, preferred_instance_types=None, opts=None)
func GetInstanceTypeOffering(ctx *Context, args *GetInstanceTypeOfferingArgs, opts ...InvokeOption) (*GetInstanceTypeOfferingResult, error)
public static class GetInstanceTypeOffering {
    public static Task<GetInstanceTypeOfferingResult> InvokeAsync(GetInstanceTypeOfferingArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filters List<GetInstanceTypeOfferingFilterArgs>

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.

PreferredInstanceTypes List<string>

Ordered list of preferred EC2 Instance Types. The first match in this list will be returned. If no preferred matches are found and the original search returned more than one result, an error is returned.

Filters []GetInstanceTypeOfferingFilter

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.

PreferredInstanceTypes []string

Ordered list of preferred EC2 Instance Types. The first match in this list will be returned. If no preferred matches are found and the original search returned more than one result, an error is returned.

filters GetInstanceTypeOfferingFilter[]

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.

preferredInstanceTypes string[]

Ordered list of preferred EC2 Instance Types. The first match in this list will be returned. If no preferred matches are found and the original search returned more than one result, an error is returned.

filters List[GetInstanceTypeOfferingFilter]

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.

preferred_instance_types List[str]

Ordered list of preferred EC2 Instance Types. The first match in this list will be returned. If no preferred matches are found and the original search returned more than one result, an error is returned.

GetInstanceTypeOffering Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

InstanceType string

EC2 Instance Type.

Filters List<GetInstanceTypeOfferingFilter>
LocationType string
PreferredInstanceTypes List<string>
Id string

The provider-assigned unique ID for this managed resource.

InstanceType string

EC2 Instance Type.

Filters []GetInstanceTypeOfferingFilter
LocationType string
PreferredInstanceTypes []string
id string

The provider-assigned unique ID for this managed resource.

instanceType string

EC2 Instance Type.

filters GetInstanceTypeOfferingFilter[]
locationType string
preferredInstanceTypes string[]
id str

The provider-assigned unique ID for this managed resource.

instance_type str

EC2 Instance Type.

filters List[GetInstanceTypeOfferingFilter]
location_type str
preferred_instance_types List[str]

Supporting Types

GetInstanceTypeOfferingFilter

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.