Interface AutoRollbackConfig
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
AutoRollbackConfig.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:23:58.734Z")
@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) // whether to skip the step of checking CloudWatch alarms during the deployment process // default: false .ignoreAlarmConfiguration(false) // auto-rollback configuration .autoRollback(AutoRollbackConfig.builder() .failedDeployment(true) // default: true .stoppedDeployment(true) // default: false .deploymentInAlarm(true) .build()) // whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group // default: false .terminationHook(true) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forAutoRollbackConfig
static final class
An implementation forAutoRollbackConfig
-
Method Summary
Modifier and TypeMethodDescriptionstatic AutoRollbackConfig.Builder
builder()
default Boolean
Whether to automatically roll back a deployment during which one of the configured CloudWatch alarms for this Deployment Group went off.default Boolean
Whether to automatically roll back a deployment that fails.default Boolean
Whether to automatically roll back a deployment that was manually stopped.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
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
Whether to automatically roll back a deployment that fails.Default: true
-
getStoppedDeployment
Whether to automatically roll back a deployment that was manually stopped.Default: false
-
builder
- Returns:
- a
AutoRollbackConfig.Builder
ofAutoRollbackConfig
-