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 = 
                    {
                        "t2.micro",
                        "t3.micro",
                    },
                },
            },
            PreferredInstanceTypes = 
            {
                "t3.micro",
                "t2.micro",
            },
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/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{
						"t2.micro",
						"t3.micro",
					},
				},
			},
			PreferredInstanceTypes: []string{
				"t3.micro",
				"t2.micro",
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

example = aws.ec2.get_instance_type_offering(filters=[aws.ec2.GetInstanceTypeOfferingFilterArgs(
        name="instance-type",
        values=[
            "t2.micro",
            "t3.micro",
        ],
    )],
    preferred_instance_types=[
        "t3.micro",
        "t2.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: [
            "t2.micro",
            "t3.micro",
        ],
    }],
    preferredInstanceTypes: [
        "t3.micro",
        "t2.micro",
    ],
}, { async: true }));

Using getInstanceTypeOffering

function getInstanceTypeOffering(args: GetInstanceTypeOfferingArgs, opts?: InvokeOptions): Promise<GetInstanceTypeOfferingResult>
def get_instance_type_offering(filters: Optional[Sequence[GetInstanceTypeOfferingFilter]] = None,
                               location_type: Optional[str] = None,
                               preferred_instance_types: Optional[Sequence[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> GetInstanceTypeOfferingResult
func GetInstanceTypeOffering(ctx *Context, args *GetInstanceTypeOfferingArgs, opts ...InvokeOption) (*GetInstanceTypeOfferingResult, error)

Note: This function is named GetInstanceTypeOffering in the Go SDK.

public static class GetInstanceTypeOffering {
    public static Task<GetInstanceTypeOfferingResult> InvokeAsync(GetInstanceTypeOfferingArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filters List<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 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 Sequence[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 Sequence[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 Sequence[GetInstanceTypeOfferingFilter]
location_type str
preferred_instance_types Sequence[str]

Supporting Types

GetInstanceTypeOfferingFilter

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 Sequence[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.