Interface DeploymentLifecycleLambdaTargetProps
- All Superinterfaces:
- software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
- DeploymentLifecycleLambdaTargetProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
           date="2025-10-29T11:15:39.160Z")
@Stability(Stable)
public interface DeploymentLifecycleLambdaTargetProps
extends software.amazon.jsii.JsiiSerializable
Configuration for a lambda deployment lifecycle hook.
 
Example:
 import software.amazon.awscdk.services.lambda.*;
 Cluster cluster;
 TaskDefinition taskDefinition;
 Function lambdaHook;
 ApplicationTargetGroup blueTargetGroup;
 ApplicationTargetGroup greenTargetGroup;
 ApplicationListenerRule prodListenerRule;
 FargateService service = FargateService.Builder.create(this, "Service")
         .cluster(cluster)
         .taskDefinition(taskDefinition)
         .deploymentStrategy(DeploymentStrategy.BLUE_GREEN)
         .build();
 service.addLifecycleHook(DeploymentLifecycleLambdaTarget.Builder.create(lambdaHook, "PreScaleHook")
         .lifecycleStages(List.of(DeploymentLifecycleStage.PRE_SCALE_UP))
         .build());
 IEcsLoadBalancerTarget target = service.loadBalancerTarget(LoadBalancerTargetOptions.builder()
         .containerName("nginx")
         .containerPort(80)
         .protocol(Protocol.TCP)
         .alternateTarget(AlternateTarget.Builder.create("AlternateTarget")
                 .alternateTargetGroup(greenTargetGroup)
                 .productionListener(ListenerRuleConfiguration.applicationListenerRule(prodListenerRule))
                 .build())
         .build());
 target.attachToApplicationTargetGroup(blueTargetGroup);
 - 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forDeploymentLifecycleLambdaTargetPropsstatic final classAn implementation forDeploymentLifecycleLambdaTargetProps
- 
Method SummaryMethods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJson
- 
Method Details- 
getLifecycleStagesThe lifecycle stages when this hook should be executed.
- 
getRoleThe IAM role that grants permissions to invoke the lambda target.Default: - A unique role will be generated for this lambda function. 
- 
builder
 
-