AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.4.0 published on Wednesday, May 4, 2022 by Pulumi

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/v5/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, 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: pulumi.StringRef("availability-zone-id"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(Ec2Functions.getInstanceTypeOfferings(GetInstanceTypeOfferingsArgs.builder()
            .filters(            
                GetInstanceTypeOfferingsFilter.builder()
                    .name("instance-type")
                    .values(                    
                        "t2.micro",
                        "t3.micro")
                    .build(),
                GetInstanceTypeOfferingsFilter.builder()
                    .name("location")
                    .values("usw2-az4")
                    .build())
            .locationType("availability-zone-id")
            .build()));

        }
}
import pulumi
import pulumi_aws as aws

example = aws.ec2.get_instance_type_offerings(filters=[
        aws.ec2.GetInstanceTypeOfferingsFilterArgs(
            name="instance-type",
            values=[
                "t2.micro",
                "t3.micro",
            ],
        ),
        aws.ec2.GetInstanceTypeOfferingsFilterArgs(
            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",
}));
variables:
  example:
    Fn::Invoke:
      Function: aws:ec2:getInstanceTypeOfferings
      Arguments:
        filters:
          - name: instance-type
            values:
              - t2.micro
              - t3.micro
          - name: location
            values:
              - usw2-az4
        locationType: availability-zone-id

Using getInstanceTypeOfferings

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getInstanceTypeOfferings(args: GetInstanceTypeOfferingsArgs, opts?: InvokeOptions): Promise<GetInstanceTypeOfferingsResult>
function getInstanceTypeOfferingsOutput(args: GetInstanceTypeOfferingsOutputArgs, opts?: InvokeOptions): Output<GetInstanceTypeOfferingsResult>
def get_instance_type_offerings(filters: Optional[Sequence[GetInstanceTypeOfferingsFilter]] = None,
                                location_type: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetInstanceTypeOfferingsResult
def get_instance_type_offerings_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetInstanceTypeOfferingsFilterArgs]]]] = None,
                                location_type: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetInstanceTypeOfferingsResult]
func GetInstanceTypeOfferings(ctx *Context, args *GetInstanceTypeOfferingsArgs, opts ...InvokeOption) (*GetInstanceTypeOfferingsResult, error)
func GetInstanceTypeOfferingsOutput(ctx *Context, args *GetInstanceTypeOfferingsOutputArgs, opts ...InvokeOption) GetInstanceTypeOfferingsResultOutput

> Note: This function is named GetInstanceTypeOfferings in the Go SDK.

public static class GetInstanceTypeOfferings 
{
    public static Task<GetInstanceTypeOfferingsResult> InvokeAsync(GetInstanceTypeOfferingsArgs args, InvokeOptions? opts = null)
    public static Output<GetInstanceTypeOfferingsResult> Invoke(GetInstanceTypeOfferingsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstanceTypeOfferingsResult> getInstanceTypeOfferings(GetInstanceTypeOfferingsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:ec2/getInstanceTypeOfferings:getInstanceTypeOfferings
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Filters List<Pulumi.Aws.Ec2.Inputs.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 ListInstanceTypeOfferingsFilter>

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

filters List

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.

getInstanceTypeOfferings Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

InstanceTypes List<string>

List of EC2 Instance Types.

LocationTypes List<string>

List of location types.

Locations List<string>

List of locations.

Filters List<Pulumi.Aws.Ec2.Outputs.GetInstanceTypeOfferingsFilter>
LocationType string
Id string

The provider-assigned unique ID for this managed resource.

InstanceTypes []string

List of EC2 Instance Types.

LocationTypes []string

List of location types.

Locations []string

List of locations.

Filters []GetInstanceTypeOfferingsFilter
LocationType string
id String

The provider-assigned unique ID for this managed resource.

instanceTypes List

List of EC2 Instance Types.

locationTypes List

List of location types.

locations List

List of locations.

filters ListInstanceTypeOfferingsFilter>
locationType String
id string

The provider-assigned unique ID for this managed resource.

instanceTypes string[]

List of EC2 Instance Types.

locationTypes string[]

List of location types.

locations string[]

List of locations.

filters GetInstanceTypeOfferingsFilter[]
locationType string
id str

The provider-assigned unique ID for this managed resource.

instance_types Sequence[str]

List of EC2 Instance Types.

location_types Sequence[str]

List of location types.

locations Sequence[str]

List of locations.

filters Sequence[GetInstanceTypeOfferingsFilter]
location_type str
id String

The provider-assigned unique ID for this managed resource.

instanceTypes List

List of EC2 Instance Types.

locationTypes List

List of location types.

locations List

List of locations.

filters List
locationType String

Supporting Types

GetInstanceTypeOfferingsFilter

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 List

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.

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

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.