Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi
aws.ec2.getInstanceTypeOfferings
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi
Information about EC2 Instance Type Offerings.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ec2.getInstanceTypeOfferings({
filters: [
{
name: "instance-type",
values: [
"t2.micro",
"t3.micro",
],
},
{
name: "location",
values: ["usw2-az4"],
},
],
locationType: "availability-zone-id",
});
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")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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{
{
Name: "instance-type",
Values: []string{
"t2.micro",
"t3.micro",
},
},
{
Name: "location",
Values: []string{
"usw2-az4",
},
},
},
LocationType: pulumi.StringRef("availability-zone-id"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Ec2.GetInstanceTypeOfferings.Invoke(new()
{
Filters = new[]
{
new Aws.Ec2.Inputs.GetInstanceTypeOfferingsFilterInputArgs
{
Name = "instance-type",
Values = new[]
{
"t2.micro",
"t3.micro",
},
},
new Aws.Ec2.Inputs.GetInstanceTypeOfferingsFilterInputArgs
{
Name = "location",
Values = new[]
{
"usw2-az4",
},
},
},
LocationType = "availability-zone-id",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetInstanceTypeOfferingsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = Ec2Functions.getInstanceTypeOfferings(GetInstanceTypeOfferingsArgs.builder()
.filters(
GetInstanceTypeOfferingsFilterArgs.builder()
.name("instance-type")
.values(
"t2.micro",
"t3.micro")
.build(),
GetInstanceTypeOfferingsFilterArgs.builder()
.name("location")
.values("usw2-az4")
.build())
.locationType("availability-zone-id")
.build());
}
}
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<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 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
Sequence[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
.
- filters List<Property Map>
- 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
.
getInstanceTypeOfferings Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Types List<string> - List of EC2 Instance Types.
- Location
Types List<string> - List of location types.
- Locations List<string>
- List of locations.
- Filters
List<Get
Instance Type Offerings Filter> - Location
Type string
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Types []string - List of EC2 Instance Types.
- Location
Types []string - List of location types.
- Locations []string
- List of locations.
- Filters
[]Get
Instance Type Offerings Filter - Location
Type string
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Types List<String> - List of EC2 Instance Types.
- location
Types List<String> - List of location types.
- locations List<String>
- List of locations.
- filters
List<Get
Instance Type Offerings Filter> - location
Type String
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Types string[] - List of EC2 Instance Types.
- location
Types string[] - List of location types.
- locations string[]
- List of locations.
- filters
Get
Instance Type Offerings Filter[] - location
Type 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[Get
Instance Type Offerings Filter] - location_
type str
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Types List<String> - List of EC2 Instance Types.
- location
Types List<String> - List of location types.
- locations List<String>
- List of locations.
- filters List<Property Map>
- location
Type String
Supporting Types
GetInstanceTypeOfferingsFilter
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi