get Outpost Instance Type
suspend fun getOutpostInstanceType(argument: GetOutpostInstanceTypePlainArgs): GetOutpostInstanceTypeResult
Information about single Outpost Instance Type.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.outposts.getOutpostInstanceType({
arn: exampleAwsOutpostsOutpost.arn,
preferredInstanceTypes: [
"m5.large",
"m5.4xlarge",
],
});
const exampleEc2Instance = new aws.index.Ec2Instance("example", {instanceType: example.instanceType});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
example = aws.outposts.get_outpost_instance_type(arn=example_aws_outposts_outpost["arn"],
preferred_instance_types=[
"m5.large",
"m5.4xlarge",
])
example_ec2_instance = aws.index.Ec2Instance("example", instance_type=example.instance_type)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Outposts.GetOutpostInstanceType.Invoke(new()
{
Arn = exampleAwsOutpostsOutpost.Arn,
PreferredInstanceTypes = new[]
{
"m5.large",
"m5.4xlarge",
},
});
var exampleEc2Instance = new Aws.Index.Ec2Instance("example", new()
{
InstanceType = example.Apply(getOutpostInstanceTypeResult => getOutpostInstanceTypeResult.InstanceType),
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/outposts"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := outposts.GetOutpostInstanceType(ctx, &outposts.GetOutpostInstanceTypeArgs{
Arn: exampleAwsOutpostsOutpost.Arn,
PreferredInstanceTypes: []string{
"m5.large",
"m5.4xlarge",
},
}, nil)
if err != nil {
return err
}
_, err = aws.NewEc2Instance(ctx, "example", &aws.Ec2InstanceArgs{
InstanceType: example.InstanceType,
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.outposts.OutpostsFunctions;
import com.pulumi.aws.outposts.inputs.GetOutpostInstanceTypeArgs;
import com.pulumi.aws.ec2Instance;
import com.pulumi.aws.ec2InstanceArgs;
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 = OutpostsFunctions.getOutpostInstanceType(GetOutpostInstanceTypeArgs.builder()
.arn(exampleAwsOutpostsOutpost.arn())
.preferredInstanceTypes(
"m5.large",
"m5.4xlarge")
.build());
var exampleEc2Instance = new Ec2Instance("exampleEc2Instance", Ec2InstanceArgs.builder()
.instanceType(example.instanceType())
.build());
}
}
Content copied to clipboard
resources:
exampleEc2Instance:
type: aws:ec2Instance
name: example
properties:
instanceType: ${example.instanceType}
variables:
example:
fn::invoke:
function: aws:outposts:getOutpostInstanceType
arguments:
arn: ${exampleAwsOutpostsOutpost.arn}
preferredInstanceTypes:
- m5.large
- m5.4xlarge
Content copied to clipboard
Return
A collection of values returned by getOutpostInstanceType.
Parameters
argument
A collection of arguments for invoking getOutpostInstanceType.
suspend fun getOutpostInstanceType(arn: String, instanceType: String? = null, preferredInstanceTypes: List<String>? = null): GetOutpostInstanceTypeResult
Return
A collection of values returned by getOutpostInstanceType.
Parameters
arn
Outpost ARN. The following arguments are optional:
instance Type
Desired instance type. Conflicts with preferred_instance_types
.
preferred Instance Types
Ordered list of preferred 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. Conflicts with instance_type
.
See also
suspend fun getOutpostInstanceType(argument: suspend GetOutpostInstanceTypePlainArgsBuilder.() -> Unit): GetOutpostInstanceTypeResult
Return
A collection of values returned by getOutpostInstanceType.
Parameters
argument
Builder for com.pulumi.aws.outposts.kotlin.inputs.GetOutpostInstanceTypePlainArgs.