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 },
},
},
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Lambda
Assembly: Pulumi.Aws.dll
Syntax
public class Alias : CustomResource
Constructors
View SourceAlias(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 SourceArn
The Amazon Resource Name (ARN) identifying your Lambda function alias.
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
Description of the alias.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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> |
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> |
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> |
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> |
RoutingConfig
The Lambda alias' route configuration settings. Fields documented below
Declaration
public Output<AliasRoutingConfig> RoutingConfig { get; }
Property Value
| Type | Description |
|---|---|
| Output<AliasRoutingConfig> |
Methods
View SourceGet(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 |