Class AliasOptions
Options for lambda.Alias
.
Inheritance
Namespace: Amazon.CDK.AWS.Lambda
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AliasOptions : Object, IAliasOptions, IEventInvokeConfigOptions
Syntax (vb)
Public Class AliasOptions
Inherits Object
Implements IAliasOptions, IEventInvokeConfigOptions
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.Lambda;
IDestination destination;
Version version;
var aliasOptions = new AliasOptions {
AdditionalVersions = new [] { new VersionWeight {
Version = version,
Weight = 123
} },
Description = "description",
MaxEventAge = Duration.Minutes(30),
OnFailure = destination,
OnSuccess = destination,
ProvisionedConcurrentExecutions = 123,
RetryAttempts = 123
};
Synopsis
Constructors
AliasOptions() |
Properties
AdditionalVersions | Additional versions with individual weights this alias points to. |
Description | Description for the alias. |
MaxEventAge | The maximum age of a request that Lambda sends to a function for processing. |
OnFailure | The destination for failed invocations. |
OnSuccess | The destination for successful invocations. |
ProvisionedConcurrentExecutions | Specifies a provisioned concurrency configuration for a function's alias. |
RetryAttempts | The maximum number of times to retry when the function returns an error. |
Constructors
AliasOptions()
public AliasOptions()
Properties
AdditionalVersions
Additional versions with individual weights this alias points to.
public IVersionWeight[] AdditionalVersions { get; set; }
Property Value
Remarks
Individual additional version weights specified here should add up to (less than) one. All remaining weight is routed to the default version.
For example, the config is
version: "1" additionalVersions: [{ version: "2", weight: 0.05 }]
Then 5% of traffic will be routed to function version 2, while the remaining 95% of traffic will be routed to function version 1.
Default: No additional versions
Description
Description for the alias.
public string Description { get; set; }
Property Value
System.String
Remarks
Default: No description
MaxEventAge
The maximum age of a request that Lambda sends to a function for processing.
public Duration MaxEventAge { get; set; }
Property Value
Remarks
Minimum: 60 seconds Maximum: 6 hours
Default: Duration.hours(6)
OnFailure
The destination for failed invocations.
public IDestination OnFailure { get; set; }
Property Value
Remarks
Default: - no destination
OnSuccess
The destination for successful invocations.
public IDestination OnSuccess { get; set; }
Property Value
Remarks
Default: - no destination
ProvisionedConcurrentExecutions
Specifies a provisioned concurrency configuration for a function's alias.
public Nullable<double> ProvisionedConcurrentExecutions { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Default: No provisioned concurrency
RetryAttempts
The maximum number of times to retry when the function returns an error.
public Nullable<double> RetryAttempts { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Minimum: 0 Maximum: 2
Default: 2