class CustomLambdaDeploymentConfig (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CodeDeploy.CustomLambdaDeploymentConfig |
Java | software.amazon.awscdk.services.codedeploy.CustomLambdaDeploymentConfig |
Python | aws_cdk.aws_codedeploy.CustomLambdaDeploymentConfig |
TypeScript (source) | @aws-cdk/aws-codedeploy » CustomLambdaDeploymentConfig |
Implements
IConstruct
, IConstruct
, IDependable
, IResource
, ILambda
A custom Deployment Configuration for a Lambda Deployment Group.
Example
const config = new codedeploy.CustomLambdaDeploymentConfig(this, 'CustomConfig', {
type: codedeploy.CustomLambdaDeploymentConfigType.CANARY,
interval: Duration.minutes(1),
percentage: 5,
});
declare const application: codedeploy.LambdaApplication;
declare const alias: lambda.Alias;
const deploymentGroup = new codedeploy.LambdaDeploymentGroup(this, 'BlueGreenDeployment', {
application,
alias,
deploymentConfig: config,
});
Initializer
new CustomLambdaDeploymentConfig(scope: Construct, id: string, props: CustomLambdaDeploymentConfigProps)
Parameters
- scope
Construct
- id
string
- props
Custom
Lambda Deployment Config Props
Construct Props
Name | Type | Description |
---|---|---|
interval | Duration | The interval, in number of minutes: - For LINEAR, how frequently additional traffic is shifted - For CANARY, how long to shift traffic before the full deployment. |
percentage | number | The integer percentage of traffic to shift: - For LINEAR, the percentage to shift every interval - For CANARY, the percentage to shift until the interval passes, before the full deployment. |
type | Custom | The type of deployment config, either CANARY or LINEAR. |
deployment | string | The verbatim name of the deployment config. |
interval
Type:
Duration
The interval, in number of minutes: - For LINEAR, how frequently additional traffic is shifted - For CANARY, how long to shift traffic before the full deployment.
percentage
Type:
number
The integer percentage of traffic to shift: - For LINEAR, the percentage to shift every interval - For CANARY, the percentage to shift until the interval passes, before the full deployment.
type
Type:
Custom
The type of deployment config, either CANARY or LINEAR.
deploymentConfigName?
Type:
string
(optional, default: automatically generated name)
The verbatim name of the deployment config.
Must be unique per account/region. Other parameters cannot be updated if this name is provided.
Properties
Name | Type | Description |
---|---|---|
deployment | string | The arn of the deployment config. |
deployment | string | The name of the deployment config. |
env | Resource | The environment this resource belongs to. |
node | Construct | The construct tree node associated with this construct. |
stack | Stack | The stack in which this resource is defined. |
deploymentConfigArn
Type:
string
The arn of the deployment config.
deploymentConfigName
Type:
string
The name of the deployment config.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
node
Type:
Construct
The construct tree node associated with this construct.
stack
Type:
Stack
The stack in which this resource is defined.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
to | Returns a string representation of this construct. |
protected validate() | Validate the current construct. |
RemovalPolicy(policy)
applypublic applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
String()
topublic toString(): string
Returns
string
Returns a string representation of this construct.
protected validate()
protected validate(): string[]
Returns
string[]
Validate the current construct.
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.