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

aws.lambda.getAlias

Explore with Pulumi AI

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

    Provides information about a Lambda Alias.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const production = aws.lambda.getAlias({
        functionName: "my-lambda-func",
        name: "production",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    production = aws.lambda.get_alias(function_name="my-lambda-func",
        name="production")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lambda.LookupAlias(ctx, &lambda.LookupAliasArgs{
    			FunctionName: "my-lambda-func",
    			Name:         "production",
    		}, 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 production = Aws.Lambda.GetAlias.Invoke(new()
        {
            FunctionName = "my-lambda-func",
            Name = "production",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lambda.LambdaFunctions;
    import com.pulumi.aws.lambda.inputs.GetAliasArgs;
    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 production = LambdaFunctions.getAlias(GetAliasArgs.builder()
                .functionName("my-lambda-func")
                .name("production")
                .build());
    
        }
    }
    
    variables:
      production:
        fn::invoke:
          Function: aws:lambda:getAlias
          Arguments:
            functionName: my-lambda-func
            name: production
    

    Using getAlias

    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 getAlias(args: GetAliasArgs, opts?: InvokeOptions): Promise<GetAliasResult>
    function getAliasOutput(args: GetAliasOutputArgs, opts?: InvokeOptions): Output<GetAliasResult>
    def get_alias(function_name: Optional[str] = None,
                  name: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetAliasResult
    def get_alias_output(function_name: Optional[pulumi.Input[str]] = None,
                  name: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetAliasResult]
    func LookupAlias(ctx *Context, args *LookupAliasArgs, opts ...InvokeOption) (*LookupAliasResult, error)
    func LookupAliasOutput(ctx *Context, args *LookupAliasOutputArgs, opts ...InvokeOption) LookupAliasResultOutput

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

    public static class GetAlias 
    {
        public static Task<GetAliasResult> InvokeAsync(GetAliasArgs args, InvokeOptions? opts = null)
        public static Output<GetAliasResult> Invoke(GetAliasInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAliasResult> getAlias(GetAliasArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:lambda/getAlias:getAlias
      arguments:
        # arguments dictionary

    The following arguments are supported:

    FunctionName string
    Name of the aliased Lambda function.
    Name string
    Name of the Lambda alias.
    FunctionName string
    Name of the aliased Lambda function.
    Name string
    Name of the Lambda alias.
    functionName String
    Name of the aliased Lambda function.
    name String
    Name of the Lambda alias.
    functionName string
    Name of the aliased Lambda function.
    name string
    Name of the Lambda alias.
    function_name str
    Name of the aliased Lambda function.
    name str
    Name of the Lambda alias.
    functionName String
    Name of the aliased Lambda function.
    name String
    Name of the Lambda alias.

    getAlias Result

    The following output properties are available:

    Arn string
    ARN identifying the Lambda function alias.
    Description string
    Description of alias.
    FunctionName string
    FunctionVersion string
    Lambda function version which the alias uses.
    Id string
    The provider-assigned unique ID for this managed resource.
    InvokeArn string
    ARN to be used for invoking Lambda Function from API Gateway - to be used in aws_api_gateway_integration's uri.
    Name string
    Arn string
    ARN identifying the Lambda function alias.
    Description string
    Description of alias.
    FunctionName string
    FunctionVersion string
    Lambda function version which the alias uses.
    Id string
    The provider-assigned unique ID for this managed resource.
    InvokeArn string
    ARN to be used for invoking Lambda Function from API Gateway - to be used in aws_api_gateway_integration's uri.
    Name string
    arn String
    ARN identifying the Lambda function alias.
    description String
    Description of alias.
    functionName String
    functionVersion String
    Lambda function version which the alias uses.
    id String
    The provider-assigned unique ID for this managed resource.
    invokeArn String
    ARN to be used for invoking Lambda Function from API Gateway - to be used in aws_api_gateway_integration's uri.
    name String
    arn string
    ARN identifying the Lambda function alias.
    description string
    Description of alias.
    functionName string
    functionVersion string
    Lambda function version which the alias uses.
    id string
    The provider-assigned unique ID for this managed resource.
    invokeArn string
    ARN to be used for invoking Lambda Function from API Gateway - to be used in aws_api_gateway_integration's uri.
    name string
    arn str
    ARN identifying the Lambda function alias.
    description str
    Description of alias.
    function_name str
    function_version str
    Lambda function version which the alias uses.
    id str
    The provider-assigned unique ID for this managed resource.
    invoke_arn str
    ARN to be used for invoking Lambda Function from API Gateway - to be used in aws_api_gateway_integration's uri.
    name str
    arn String
    ARN identifying the Lambda function alias.
    description String
    Description of alias.
    functionName String
    functionVersion String
    Lambda function version which the alias uses.
    id String
    The provider-assigned unique ID for this managed resource.
    invokeArn String
    ARN to be used for invoking Lambda Function from API Gateway - to be used in aws_api_gateway_integration's uri.
    name 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