Show / Hide Table of Contents

Class Alias

Creates a Lambda function alias. Creates an alias that points to the specified Lambda function version.

For information about Lambda and how to use it, see What is AWS Lambda? For information about function aliases, see CreateAlias and AliasRoutingConfiguration in the API docs.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var testAlias = new Aws.Lambda.Alias("testAlias", new Aws.Lambda.AliasArgs
    {
        Description = "a sample description",
        FunctionName = aws_lambda_function.Lambda_function_test.Arn,
        FunctionVersion = "1",
        RoutingConfig = new Aws.Lambda.Inputs.AliasRoutingConfigArgs
        {
            AdditionalVersionWeights = 
            {
                { "2", 0.5 },
            },
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Alias
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Lambda
Assembly: Pulumi.Aws.dll
Syntax
public class Alias : CustomResource

Constructors

View Source

Alias(String, AliasArgs, CustomResourceOptions)

Create a Alias resource with the given unique name, arguments, and options.

Declaration
public Alias(string name, AliasArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

AliasArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Arn

The Amazon Resource Name (ARN) identifying your Lambda function alias.

Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

Description

Description of the alias.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

FunctionName

The function ARN of the Lambda function for which you want to create an alias.

Declaration
public Output<string> FunctionName { get; }
Property Value
Type Description
Output<System.String>
View Source

FunctionVersion

Lambda function version for which you are creating the alias. Pattern: (\$LATEST|[0-9]+).

Declaration
public Output<string> FunctionVersion { get; }
Property Value
Type Description
Output<System.String>
View Source

InvokeArn

The ARN to be used for invoking Lambda Function from API Gateway - to be used in aws.apigateway.Integration's uri

Declaration
public Output<string> InvokeArn { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

Name for the alias you are creating. Pattern: (?!^[0-9]+$)([a-zA-Z0-9-_]+)

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

RoutingConfig

The Lambda alias' route configuration settings. Fields documented below

Declaration
public Output<AliasRoutingConfig> RoutingConfig { get; }
Property Value
Type Description
Output<AliasRoutingConfig>

Methods

View Source

Get(String, Input<String>, AliasState, CustomResourceOptions)

Get an existing Alias resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Alias Get(string name, Input<string> id, AliasState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

AliasState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Alias
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.