Skip to content

Commit

Permalink
feat(cdk): add the CodeDeployLambdaAlias Update Policy.
Browse files Browse the repository at this point in the history
Fixes #1177.
  • Loading branch information
skinny85 committed Dec 13, 2018
1 parent 48b9bdd commit e887774
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions packages/@aws-cdk/cdk/lib/cloudformation/resource-policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ export interface UpdatePolicy {
*/
autoScalingScheduledAction?: AutoScalingScheduledAction;

/**
* To perform an AWS CodeDeploy deployment when the version changes on an AWS::Lambda::Alias resource,
* use the CodeDeployLambdaAliasUpdate update policy.
*/
codeDeployLambdaAliasUpdate?: CodeDeployLambdaAliasUpdate;

/**
* To modify a replication group's shards by adding or removing shards, rather than replacing the entire
* AWS::ElastiCache::ReplicationGroup resource, use the UseOnlineResharding update policy.
Expand Down Expand Up @@ -236,3 +242,29 @@ export interface AutoScalingScheduledAction {
*/
ignoreUnmodifiedGroupSizeProperties?: boolean;
}

/**
* To perform an AWS CodeDeploy deployment when the version changes on an AWS::Lambda::Alias resource,
* use the CodeDeployLambdaAliasUpdate update policy.
*/
export interface CodeDeployLambdaAliasUpdate {
/**
* The name of the AWS CodeDeploy application.
*/
applicationName: string;

/**
* The name of the AWS CodeDeploy deployment group. This is where the traffic-shifting policy is set.
*/
deploymentGroupName: string;

/**
* The name of the Lambda function to run before traffic routing starts.
*/
beforeAllowTrafficHook?: string;

/**
* The name of the Lambda function to run after traffic routing completes.
*/
afterAllowTrafficHook?: string;
}

0 comments on commit e887774

Please sign in to comment.