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<Get
Instance Type Offering 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.- Preferred
Instance List<string>Types 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
[]Get
Instance Type Offering 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.- Preferred
Instance []stringTypes 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
Get
Instance Type Offering 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.- preferred
Instance string[]Types 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[Get
Instance Type Offering 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.- preferred_
instance_ List[str]types 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.
- Instance
Type string EC2 Instance Type.
- Filters
List<Get
Instance Type Offering Filter> - Location
Type string - Preferred
Instance List<string>Types
- Id string
The provider-assigned unique ID for this managed resource.
- Instance
Type string EC2 Instance Type.
- Filters
[]Get
Instance Type Offering Filter - Location
Type string - Preferred
Instance []stringTypes
- id string
The provider-assigned unique ID for this managed resource.
- instance
Type string EC2 Instance Type.
- filters
Get
Instance Type Offering Filter[] - location
Type string - preferred
Instance string[]Types
- id str
The provider-assigned unique ID for this managed resource.
- instance_
type str EC2 Instance Type.
- filters
List[Get
Instance Type Offering Filter] - location_
type str - preferred_
instance_ List[str]types
Supporting Types
GetInstanceTypeOfferingFilter
- 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.