1. Packages
  2. AWS Classic
  3. API Docs
  4. elasticbeanstalk
  5. getSolutionStack

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.elasticbeanstalk.getSolutionStack

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Use this data source to get the name of a elastic beanstalk solution stack.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const multiDocker = aws.elasticbeanstalk.getSolutionStack({
        mostRecent: true,
        nameRegex: "^64bit Amazon Linux (.*) Multi-container Docker (.*)$",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    multi_docker = aws.elasticbeanstalk.get_solution_stack(most_recent=True,
        name_regex="^64bit Amazon Linux (.*) Multi-container Docker (.*)$")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticbeanstalk"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := elasticbeanstalk.GetSolutionStack(ctx, &elasticbeanstalk.GetSolutionStackArgs{
    			MostRecent: pulumi.BoolRef(true),
    			NameRegex:  "^64bit Amazon Linux (.*) Multi-container Docker (.*)$",
    		}, 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 multiDocker = Aws.ElasticBeanstalk.GetSolutionStack.Invoke(new()
        {
            MostRecent = true,
            NameRegex = "^64bit Amazon Linux (.*) Multi-container Docker (.*)$",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.elasticbeanstalk.ElasticbeanstalkFunctions;
    import com.pulumi.aws.elasticbeanstalk.inputs.GetSolutionStackArgs;
    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 multiDocker = ElasticbeanstalkFunctions.getSolutionStack(GetSolutionStackArgs.builder()
                .mostRecent(true)
                .nameRegex("^64bit Amazon Linux (.*) Multi-container Docker (.*)$")
                .build());
    
        }
    }
    
    variables:
      multiDocker:
        fn::invoke:
          Function: aws:elasticbeanstalk:getSolutionStack
          Arguments:
            mostRecent: true
            nameRegex: ^64bit Amazon Linux (.*) Multi-container Docker (.*)$
    

    Using getSolutionStack

    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 getSolutionStack(args: GetSolutionStackArgs, opts?: InvokeOptions): Promise<GetSolutionStackResult>
    function getSolutionStackOutput(args: GetSolutionStackOutputArgs, opts?: InvokeOptions): Output<GetSolutionStackResult>
    def get_solution_stack(most_recent: Optional[bool] = None,
                           name_regex: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetSolutionStackResult
    def get_solution_stack_output(most_recent: Optional[pulumi.Input[bool]] = None,
                           name_regex: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetSolutionStackResult]
    func GetSolutionStack(ctx *Context, args *GetSolutionStackArgs, opts ...InvokeOption) (*GetSolutionStackResult, error)
    func GetSolutionStackOutput(ctx *Context, args *GetSolutionStackOutputArgs, opts ...InvokeOption) GetSolutionStackResultOutput

    > Note: This function is named GetSolutionStack in the Go SDK.

    public static class GetSolutionStack 
    {
        public static Task<GetSolutionStackResult> InvokeAsync(GetSolutionStackArgs args, InvokeOptions? opts = null)
        public static Output<GetSolutionStackResult> Invoke(GetSolutionStackInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSolutionStackResult> getSolutionStack(GetSolutionStackArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:elasticbeanstalk/getSolutionStack:getSolutionStack
      arguments:
        # arguments dictionary

    The following arguments are supported:

    NameRegex string

    Regex string to apply to the solution stack list returned by AWS. See [Elastic Beanstalk Supported Platforms][beanstalk-platforms] from AWS documentation for reference solution stack names.

    NOTE: If more or less than a single match is returned by the search, this call will fail. Ensure that your search is specific enough to return a single solution stack, or use most_recent to choose the most recent one.

    MostRecent bool
    If more than one result is returned, use the most recent solution stack.
    NameRegex string

    Regex string to apply to the solution stack list returned by AWS. See [Elastic Beanstalk Supported Platforms][beanstalk-platforms] from AWS documentation for reference solution stack names.

    NOTE: If more or less than a single match is returned by the search, this call will fail. Ensure that your search is specific enough to return a single solution stack, or use most_recent to choose the most recent one.

    MostRecent bool
    If more than one result is returned, use the most recent solution stack.
    nameRegex String

    Regex string to apply to the solution stack list returned by AWS. See [Elastic Beanstalk Supported Platforms][beanstalk-platforms] from AWS documentation for reference solution stack names.

    NOTE: If more or less than a single match is returned by the search, this call will fail. Ensure that your search is specific enough to return a single solution stack, or use most_recent to choose the most recent one.

    mostRecent Boolean
    If more than one result is returned, use the most recent solution stack.
    nameRegex string

    Regex string to apply to the solution stack list returned by AWS. See [Elastic Beanstalk Supported Platforms][beanstalk-platforms] from AWS documentation for reference solution stack names.

    NOTE: If more or less than a single match is returned by the search, this call will fail. Ensure that your search is specific enough to return a single solution stack, or use most_recent to choose the most recent one.

    mostRecent boolean
    If more than one result is returned, use the most recent solution stack.
    name_regex str

    Regex string to apply to the solution stack list returned by AWS. See [Elastic Beanstalk Supported Platforms][beanstalk-platforms] from AWS documentation for reference solution stack names.

    NOTE: If more or less than a single match is returned by the search, this call will fail. Ensure that your search is specific enough to return a single solution stack, or use most_recent to choose the most recent one.

    most_recent bool
    If more than one result is returned, use the most recent solution stack.
    nameRegex String

    Regex string to apply to the solution stack list returned by AWS. See [Elastic Beanstalk Supported Platforms][beanstalk-platforms] from AWS documentation for reference solution stack names.

    NOTE: If more or less than a single match is returned by the search, this call will fail. Ensure that your search is specific enough to return a single solution stack, or use most_recent to choose the most recent one.

    mostRecent Boolean
    If more than one result is returned, use the most recent solution stack.

    getSolutionStack Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the solution stack.
    NameRegex string
    MostRecent bool
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the solution stack.
    NameRegex string
    MostRecent bool
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the solution stack.
    nameRegex String
    mostRecent Boolean
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Name of the solution stack.
    nameRegex string
    mostRecent boolean
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Name of the solution stack.
    name_regex str
    most_recent bool
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the solution stack.
    nameRegex String
    mostRecent Boolean

    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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi