Class CfnService.DeploymentLifecycleHookProperty.Builder

java.lang.Object
software.amazon.awscdk.services.ecs.CfnService.DeploymentLifecycleHookProperty.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnService.DeploymentLifecycleHookProperty>
Enclosing interface:
CfnService.DeploymentLifecycleHookProperty

@Stability(Stable) public static final class CfnService.DeploymentLifecycleHookProperty.Builder extends Object implements software.amazon.jsii.Builder<CfnService.DeploymentLifecycleHookProperty>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • hookTargetArn

      @Stability(Stable) public CfnService.DeploymentLifecycleHookProperty.Builder hookTargetArn(String hookTargetArn)
      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)
      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)
      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)
      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

      @Stability(Stable) public CfnService.DeploymentLifecycleHookProperty build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnService.DeploymentLifecycleHookProperty>
      Returns:
      a new instance of CfnService.DeploymentLifecycleHookProperty
      Throws:
      NullPointerException - if any required attribute was not provided