Interface CfnService.DeploymentAlarmsProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnService.DeploymentAlarmsProperty.Jsii$Proxy
- Enclosing class:
- CfnService
@Stability(Stable)
public static interface CfnService.DeploymentAlarmsProperty
extends software.amazon.jsii.JsiiSerializable
One of the methods which provide a way for you to quickly identify when a deployment has failed, and then to optionally roll back the failure to the last working deployment.
When the alarms are generated, Amazon ECS sets the service deployment to failed. Set the rollback parameter to have Amazon ECS to roll back your service to the last completed deployment after a failure.
You can only use the DeploymentAlarms
method to detect failures when the DeploymentController
is set to ECS
(rolling update).
For more information, see Rolling update in the Amazon Elastic Container Service Developer Guide .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.ecs.*; DeploymentAlarmsProperty deploymentAlarmsProperty = DeploymentAlarmsProperty.builder() .alarmNames(List.of("alarmNames")) .enable(false) .rollback(false) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCfnService.DeploymentAlarmsProperty
static final class
An implementation forCfnService.DeploymentAlarmsProperty
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
One or more CloudWatch alarm names.Determines whether to use the CloudWatch alarm option in the service deployment process.Determines whether to configure Amazon ECS to roll back the service if a service deployment fails.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAlarmNames
One or more CloudWatch alarm names.Use a "," to separate the alarms.
-
getEnable
Determines whether to use the CloudWatch alarm option in the service deployment process. -
getRollback
Determines whether to configure Amazon ECS to roll back the service if a service deployment fails.If rollback is used, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
-
builder
-