Interface DeploymentLifecycleLambdaTargetProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
DeploymentLifecycleLambdaTargetProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-09-15T14:51:56.878Z")
@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 Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forDeploymentLifecycleLambdaTargetProps
static final class
An implementation forDeploymentLifecycleLambdaTargetProps
-
Method Summary
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getLifecycleStages
The lifecycle stages when this hook should be executed. -
getRole
The IAM role that grants permissions to invoke the lambda target.Default: - A unique role will be generated for this lambda function.
-
builder
-