Class CfnService.DeploymentLifecycleHookProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnService.DeploymentLifecycleHookProperty>
- Enclosing interface:
CfnService.DeploymentLifecycleHookProperty
CfnService.DeploymentLifecycleHookProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.hookDetails
(Object hookDetails) Sets the value ofCfnService.DeploymentLifecycleHookProperty.getHookDetails()
hookTargetArn
(String hookTargetArn) Sets the value ofCfnService.DeploymentLifecycleHookProperty.getHookTargetArn()
lifecycleStages
(List<String> lifecycleStages) Sets the value ofCfnService.DeploymentLifecycleHookProperty.getLifecycleStages()
Sets the value ofCfnService.DeploymentLifecycleHookProperty.getRoleArn()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
hookTargetArn
@Stability(Stable) public CfnService.DeploymentLifecycleHookProperty.Builder hookTargetArn(String hookTargetArn) Sets the value ofCfnService.DeploymentLifecycleHookProperty.getHookTargetArn()
- Parameters:
hookTargetArn
- The Amazon Resource Name (ARN) of the hook target. Currently, only Lambda function ARNs are supported. This parameter is required. You must provide this parameter when configuring a deployment lifecycle hook.- Returns:
this
-
lifecycleStages
@Stability(Stable) public CfnService.DeploymentLifecycleHookProperty.Builder lifecycleStages(List<String> lifecycleStages) Sets the value ofCfnService.DeploymentLifecycleHookProperty.getLifecycleStages()
- Parameters:
lifecycleStages
- The lifecycle stages at which to run the hook. Choose from these valid values:. This parameter is required.- RECONCILE_SERVICE
The reconciliation stage that only happens when you start a new service deployment with more than 1 service revision in an ACTIVE state.
You can use a lifecycle hook for this stage.
- PRE_SCALE_UP
The green service revision has not started. The blue service revision is handling 100% of the production traffic. There is no test traffic.
You can use a lifecycle hook for this stage.
- POST_SCALE_UP
The green service revision has started. The blue service revision is handling 100% of the production traffic. There is no test traffic.
You can use a lifecycle hook for this stage.
- TEST_TRAFFIC_SHIFT
The blue and green service revisions are running. The blue service revision handles 100% of the production traffic. The green service revision is migrating from 0% to 100% of test traffic.
You can use a lifecycle hook for this stage.
- POST_TEST_TRAFFIC_SHIFT
The test traffic shift is complete. The green service revision handles 100% of the test traffic.
You can use a lifecycle hook for this stage.
- PRODUCTION_TRAFFIC_SHIFT
Production traffic is shifting to the green service revision. The green service revision is migrating from 0% to 100% of production traffic.
You can use a lifecycle hook for this stage.
- POST_PRODUCTION_TRAFFIC_SHIFT
The production traffic shift is complete.
You can use a lifecycle hook for this stage.
You must provide this parameter when configuring a deployment lifecycle hook.
- Returns:
this
-
roleArn
@Stability(Stable) public CfnService.DeploymentLifecycleHookProperty.Builder roleArn(String roleArn) Sets the value ofCfnService.DeploymentLifecycleHookProperty.getRoleArn()
- Parameters:
roleArn
- The Amazon Resource Name (ARN) of the IAM role that grants Amazon ECS permission to call Lambda functions on your behalf. This parameter is required. For more information, see Permissions required for Lambda functions in Amazon ECS blue/green deployments in the Amazon Elastic Container Service Developer Guide .- Returns:
this
-
hookDetails
@Stability(Stable) public CfnService.DeploymentLifecycleHookProperty.Builder hookDetails(Object hookDetails) Sets the value ofCfnService.DeploymentLifecycleHookProperty.getHookDetails()
- Parameters:
hookDetails
- Use this field to specify custom parameters that Amazon ECS passes to your hook target invocations (such as a Lambda function). This field must be a JSON object as a string.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnService.DeploymentLifecycleHookProperty>
- Returns:
- a new instance of
CfnService.DeploymentLifecycleHookProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-