AWS Classic

v5.21.1 published on Thursday, Nov 17, 2022 by Pulumi

getAlias

Provides information about a Lambda Alias.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var production = Aws.Lambda.GetAlias.Invoke(new()
    {
        FunctionName = "my-lambda-func",
        Name = "production",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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
	})
}
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.kms.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());

    }
}
import pulumi
import pulumi_aws as aws

production = aws.lambda.get_alias(function_name="my-lambda-func",
    name="production")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const production = pulumi.output(aws.lambda.getAlias({
    functionName: "my-lambda-func",
    name: "production",
}));
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
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.