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<Get
Instance Type Offerings Filter Args> One or more configuration blocks containing name-values filters. See the EC2 API Reference for supported filters. Detailed below.
- Location
Type string Location type. Defaults to
region. Valid values:availability-zone,availability-zone-id, andregion.
- Filters
[]Get
Instance Type Offerings Filter One or more configuration blocks containing name-values filters. See the EC2 API Reference for supported filters. Detailed below.
- Location
Type string Location type. Defaults to
region. Valid values:availability-zone,availability-zone-id, andregion.
- filters
Get
Instance Type Offerings Filter[] One or more configuration blocks containing name-values filters. See the EC2 API Reference for supported filters. Detailed below.
- location
Type string Location type. Defaults to
region. Valid values:availability-zone,availability-zone-id, andregion.
- filters
List[Get
Instance Type Offerings Filter] 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, andregion.
GetInstanceTypeOfferings Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Instance
Types List<string> Set of EC2 Instance Types.
- Filters
List<Get
Instance Type Offerings Filter> - Location
Type string
- Id string
The provider-assigned unique ID for this managed resource.
- Instance
Types []string Set of EC2 Instance Types.
- Filters
[]Get
Instance Type Offerings Filter - Location
Type string
- id string
The provider-assigned unique ID for this managed resource.
- instance
Types string[] Set of EC2 Instance Types.
- filters
Get
Instance Type Offerings Filter[] - location
Type string
- id str
The provider-assigned unique ID for this managed resource.
- instance_
types List[str] Set of EC2 Instance Types.
- filters
List[Get
Instance Type Offerings Filter] - location_
type str
Supporting Types
GetInstanceTypeOfferingsFilter
- Name string
Name of the filter. The
locationfilter depends on the top-levellocation_typeargument and if not specified, defaults to the current region.- Values List<string>
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
awsTerraform Provider.