Interface AutoRollbackConfig

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
AutoRollbackConfig.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:46.277Z") @Stability(Stable) public interface AutoRollbackConfig extends software.amazon.jsii.JsiiSerializable
The configuration for automatically rolling back deployments in a given Deployment Group.

Example:

 import software.amazon.awscdk.services.autoscaling.*;
 import software.amazon.awscdk.services.cloudwatch.*;
 ServerApplication application;
 AutoScalingGroup asg;
 Alarm alarm;
 ServerDeploymentGroup deploymentGroup = ServerDeploymentGroup.Builder.create(this, "CodeDeployDeploymentGroup")
         .application(application)
         .deploymentGroupName("MyDeploymentGroup")
         .autoScalingGroups(List.of(asg))
         // adds User Data that installs the CodeDeploy agent on your auto-scaling groups hosts
         // default: true
         .installAgent(true)
         // adds EC2 instances matching tags
         .ec2InstanceTags(new InstanceTagSet(Map.of(
                 // any instance with tags satisfying
                 // key1=v1 or key1=v2 or key2 (any value) or value v3 (any key)
                 // will match this group
                 "key1", List.of("v1", "v2"),
                 "key2", List.of(),
                 "", List.of("v3"))))
         // adds on-premise instances matching tags
         .onPremiseInstanceTags(new InstanceTagSet(Map.of(
                 "key1", List.of("v1", "v2")), Map.of(
                 "key2", List.of("v3"))))
         // CloudWatch alarms
         .alarms(List.of(alarm))
         // whether to ignore failure to fetch the status of alarms from CloudWatch
         // default: false
         .ignorePollAlarmsFailure(false)
         // auto-rollback configuration
         .autoRollback(AutoRollbackConfig.builder()
                 .failedDeployment(true) // default: true
                 .stoppedDeployment(true) // default: false
                 .deploymentInAlarm(true)
                 .build())
         .build();
 
  • Method Details

    • getDeploymentInAlarm

      @Stability(Stable) @Nullable default Boolean getDeploymentInAlarm()
      Whether to automatically roll back a deployment during which one of the configured CloudWatch alarms for this Deployment Group went off.

      Default: true if you've provided any Alarms with the `alarms` property, false otherwise

    • getFailedDeployment

      @Stability(Stable) @Nullable default Boolean getFailedDeployment()
      Whether to automatically roll back a deployment that fails.

      Default: true

    • getStoppedDeployment

      @Stability(Stable) @Nullable default Boolean getStoppedDeployment()
      Whether to automatically roll back a deployment that was manually stopped.

      Default: false

    • builder

      @Stability(Stable) static AutoRollbackConfig.Builder builder()
      Returns:
      a AutoRollbackConfig.Builder of AutoRollbackConfig