Class LambdaDeploymentGroup.Builder

java.lang.Object
software.amazon.awscdk.services.codedeploy.LambdaDeploymentGroup.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<LambdaDeploymentGroup>
Enclosing class:
LambdaDeploymentGroup

@Stability(Stable) public static final class LambdaDeploymentGroup.Builder extends Object implements software.amazon.jsii.Builder<LambdaDeploymentGroup>
A fluent builder for LambdaDeploymentGroup.
  • Method Details

    • create

      @Stability(Stable) public static LambdaDeploymentGroup.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of LambdaDeploymentGroup.Builder.
    • alias

      @Stability(Stable) public LambdaDeploymentGroup.Builder alias(Alias alias)
      Lambda Alias to shift traffic. Updating the version of the alias will trigger a CodeDeploy deployment.

      [disable-awslint:ref-via-interface] since we need to modify the alias CFN resource update policy

      Parameters:
      alias - Lambda Alias to shift traffic. Updating the version of the alias will trigger a CodeDeploy deployment. This parameter is required.
      Returns:
      this
    • alarms

      @Stability(Stable) public LambdaDeploymentGroup.Builder alarms(List<? extends IAlarm> alarms)
      The CloudWatch alarms associated with this Deployment Group.

      CodeDeploy will stop (and optionally roll back) a deployment if during it any of the alarms trigger. Alarms can also be added after the Deployment Group is created using the LambdaDeploymentGroup.addAlarm(software.amazon.awscdk.services.cloudwatch.IAlarm) method.

      Default: []

      Parameters:
      alarms - The CloudWatch alarms associated with this Deployment Group. This parameter is required.
      Returns:
      this
      See Also:
    • application

      @Stability(Stable) public LambdaDeploymentGroup.Builder application(ILambdaApplication application)
      The reference to the CodeDeploy Lambda Application that this Deployment Group belongs to.

      Default: - One will be created for you.

      Parameters:
      application - The reference to the CodeDeploy Lambda Application that this Deployment Group belongs to. This parameter is required.
      Returns:
      this
    • autoRollback

      @Stability(Stable) public LambdaDeploymentGroup.Builder autoRollback(AutoRollbackConfig autoRollback)
      The auto-rollback configuration for this Deployment Group.

      Default: - default AutoRollbackConfig.

      Parameters:
      autoRollback - The auto-rollback configuration for this Deployment Group. This parameter is required.
      Returns:
      this
    • deploymentConfig

      @Stability(Stable) public LambdaDeploymentGroup.Builder deploymentConfig(ILambdaDeploymentConfig deploymentConfig)
      The Deployment Configuration this Deployment Group uses.

      Default: LambdaDeploymentConfig.CANARY_10PERCENT_5MINUTES

      Parameters:
      deploymentConfig - The Deployment Configuration this Deployment Group uses. This parameter is required.
      Returns:
      this
    • deploymentGroupName

      @Stability(Stable) public LambdaDeploymentGroup.Builder deploymentGroupName(String deploymentGroupName)
      The physical, human-readable name of the CodeDeploy Deployment Group.

      Default: - An auto-generated name will be used.

      Parameters:
      deploymentGroupName - The physical, human-readable name of the CodeDeploy Deployment Group. This parameter is required.
      Returns:
      this
    • ignorePollAlarmsFailure

      @Stability(Stable) public LambdaDeploymentGroup.Builder ignorePollAlarmsFailure(Boolean ignorePollAlarmsFailure)
      Whether to continue a deployment even if fetching the alarm status from CloudWatch failed.

      Default: false

      Parameters:
      ignorePollAlarmsFailure - Whether to continue a deployment even if fetching the alarm status from CloudWatch failed. This parameter is required.
      Returns:
      this
    • postHook

      @Stability(Stable) public LambdaDeploymentGroup.Builder postHook(IFunction postHook)
      The Lambda function to run after traffic routing starts.

      Default: - None.

      Parameters:
      postHook - The Lambda function to run after traffic routing starts. This parameter is required.
      Returns:
      this
    • preHook

      @Stability(Stable) public LambdaDeploymentGroup.Builder preHook(IFunction preHook)
      The Lambda function to run before traffic routing starts.

      Default: - None.

      Parameters:
      preHook - The Lambda function to run before traffic routing starts. This parameter is required.
      Returns:
      this
    • role

      @Stability(Stable) public LambdaDeploymentGroup.Builder role(IRole role)
      The service Role of this Deployment Group.

      Default: - A new Role will be created.

      Parameters:
      role - The service Role of this Deployment Group. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public LambdaDeploymentGroup build()
      Specified by:
      build in interface software.amazon.jsii.Builder<LambdaDeploymentGroup>
      Returns:
      a newly built instance of LambdaDeploymentGroup.