aws.outposts.getOutpostInstanceType
Explore with Pulumi AI
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});
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)
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
})
}
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),
});
});
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.applyValue(getOutpostInstanceTypeResult -> getOutpostInstanceTypeResult.instanceType()))
.build());
}
}
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
Using getOutpostInstanceType
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 getOutpostInstanceType(args: GetOutpostInstanceTypeArgs, opts?: InvokeOptions): Promise<GetOutpostInstanceTypeResult>
function getOutpostInstanceTypeOutput(args: GetOutpostInstanceTypeOutputArgs, opts?: InvokeOptions): Output<GetOutpostInstanceTypeResult>
def get_outpost_instance_type(arn: Optional[str] = None,
instance_type: Optional[str] = None,
preferred_instance_types: Optional[Sequence[str]] = None,
opts: Optional[InvokeOptions] = None) -> GetOutpostInstanceTypeResult
def get_outpost_instance_type_output(arn: Optional[pulumi.Input[str]] = None,
instance_type: Optional[pulumi.Input[str]] = None,
preferred_instance_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetOutpostInstanceTypeResult]
func GetOutpostInstanceType(ctx *Context, args *GetOutpostInstanceTypeArgs, opts ...InvokeOption) (*GetOutpostInstanceTypeResult, error)
func GetOutpostInstanceTypeOutput(ctx *Context, args *GetOutpostInstanceTypeOutputArgs, opts ...InvokeOption) GetOutpostInstanceTypeResultOutput
> Note: This function is named GetOutpostInstanceType
in the Go SDK.
public static class GetOutpostInstanceType
{
public static Task<GetOutpostInstanceTypeResult> InvokeAsync(GetOutpostInstanceTypeArgs args, InvokeOptions? opts = null)
public static Output<GetOutpostInstanceTypeResult> Invoke(GetOutpostInstanceTypeInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetOutpostInstanceTypeResult> getOutpostInstanceType(GetOutpostInstanceTypeArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:outposts/getOutpostInstanceType:getOutpostInstanceType
arguments:
# arguments dictionary
The following arguments are supported:
- Arn string
Outpost ARN.
The following arguments are optional:
- Instance
Type string - Desired instance type. Conflicts with
preferred_instance_types
. - Preferred
Instance List<string>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
.
- Arn string
Outpost ARN.
The following arguments are optional:
- Instance
Type string - Desired instance type. Conflicts with
preferred_instance_types
. - Preferred
Instance []stringTypes - 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
.
- arn String
Outpost ARN.
The following arguments are optional:
- instance
Type String - Desired instance type. Conflicts with
preferred_instance_types
. - preferred
Instance List<String>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
.
- arn string
Outpost ARN.
The following arguments are optional:
- instance
Type string - Desired instance type. Conflicts with
preferred_instance_types
. - preferred
Instance string[]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
.
- arn str
Outpost ARN.
The following arguments are optional:
- instance_
type str - Desired instance type. Conflicts with
preferred_instance_types
. - preferred_
instance_ Sequence[str]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
.
- arn String
Outpost ARN.
The following arguments are optional:
- instance
Type String - Desired instance type. Conflicts with
preferred_instance_types
. - preferred
Instance List<String>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
.
getOutpostInstanceType Result
The following output properties are available:
- Arn string
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Type string - Preferred
Instance List<string>Types
- Arn string
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Type string - Preferred
Instance []stringTypes
- arn String
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Type String - preferred
Instance List<String>Types
- arn string
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Type string - preferred
Instance string[]Types
- arn str
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
type str - preferred_
instance_ Sequence[str]types
- arn String
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Type String - preferred
Instance List<String>Types
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.