@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)", date="2022-08-17T17:31:20.137Z") @Stability(value=Stable) public interface AutoRollbackConfig extends software.amazon.jsii.JsiiSerializable
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();
| Modifier and Type | Interface and Description |
|---|---|
static class |
AutoRollbackConfig.Builder
A builder for
AutoRollbackConfig |
static class |
AutoRollbackConfig.Jsii$Proxy
An implementation for
AutoRollbackConfig |
| Modifier and Type | Method and Description |
|---|---|
static AutoRollbackConfig.Builder |
builder() |
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 Boolean |
getFailedDeployment()
Whether to automatically roll back a deployment that fails.
|
default Boolean |
getStoppedDeployment()
Whether to automatically roll back a deployment that was manually stopped.
|
@Stability(value=Stable) @Nullable default Boolean getDeploymentInAlarm()
Default: true if you've provided any Alarms with the `alarms` property, false otherwise
@Stability(value=Stable) @Nullable default Boolean getFailedDeployment()
Default: true
@Stability(value=Stable) @Nullable default Boolean getStoppedDeployment()
Default: false
@Stability(value=Stable) static AutoRollbackConfig.Builder builder()
AutoRollbackConfig.Builder of AutoRollbackConfigCopyright © 2022. All rights reserved.