1. Packages
  2. AWS
  3. API Docs
  4. outposts
  5. getOutpostInstanceType
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.outposts.getOutpostInstanceType

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    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:

    InstanceType string
    Desired instance type. Conflicts with preferred_instance_types.
    PreferredInstanceTypes List<string>
    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:

    InstanceType string
    Desired instance type. Conflicts with preferred_instance_types.
    PreferredInstanceTypes []string
    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:

    instanceType String
    Desired instance type. Conflicts with preferred_instance_types.
    preferredInstanceTypes List<String>
    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:

    instanceType string
    Desired instance type. Conflicts with preferred_instance_types.
    preferredInstanceTypes string[]
    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_types Sequence[str]
    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:

    instanceType String
    Desired instance type. Conflicts with preferred_instance_types.
    preferredInstanceTypes List<String>
    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.
    InstanceType string
    PreferredInstanceTypes List<string>
    Arn string
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceType string
    PreferredInstanceTypes []string
    arn String
    id String
    The provider-assigned unique ID for this managed resource.
    instanceType String
    preferredInstanceTypes List<String>
    arn string
    id string
    The provider-assigned unique ID for this managed resource.
    instanceType string
    preferredInstanceTypes string[]
    arn str
    id str
    The provider-assigned unique ID for this managed resource.
    instance_type str
    preferred_instance_types Sequence[str]
    arn String
    id String
    The provider-assigned unique ID for this managed resource.
    instanceType String
    preferredInstanceTypes List<String>

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi