Interface CfnService.DeploymentCircuitBreakerProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnService.DeploymentCircuitBreakerProperty.Jsii$Proxy
- Enclosing class:
CfnService
The deployment circuit breaker can only be used for services using the rolling update (
ECS) deployment type.
The deployment circuit breaker determines whether a service deployment will fail if the service can't reach a steady state. If it is turned on, a service deployment will transition to a failed state and stop launching new tasks. You can also configure Amazon ECS to roll back your service to the last completed deployment after a failure. For more information, see Rolling update in the Amazon Elastic Container Service Developer Guide .
For more information about API failure reasons, see API failure reasons 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.*;
DeploymentCircuitBreakerProperty deploymentCircuitBreakerProperty = DeploymentCircuitBreakerProperty.builder()
.enable(false)
.rollback(false)
// the properties below are optional
.resetOnHealthyTask(false)
.thresholdConfiguration(ThresholdConfigurationProperty.builder()
.type("type")
.value(123)
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnService.DeploymentCircuitBreakerPropertystatic final classAn implementation forCfnService.DeploymentCircuitBreakerProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Determines whether to use the deployment circuit breaker logic for the service.default ObjectSpecifies whether the deployment circuit breaker resets its failure count when a task reaches a healthy state.Determines whether to configure Amazon ECS to roll back the service if a service deployment fails.default ObjectDefines the failure threshold that the deployment circuit breaker uses to monitor a deployment.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getEnable
Determines whether to use the deployment circuit breaker logic for the service.Returns union: either
BooleanorIResolvable- See Also:
-
getRollback
Determines whether to configure Amazon ECS to roll back the service if a service deployment fails.If rollback is on, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
Returns union: either
BooleanorIResolvable- See Also:
-
getResetOnHealthyTask
Specifies whether the deployment circuit breaker resets its failure count when a task reaches a healthy state.When set to
true, a task that reaches a healthy state resets the failure count to0. When set tofalse, Amazon ECS does not reset the failure count. The default istrue.Returns union: either
BooleanorIResolvable- See Also:
-
getThresholdConfiguration
Defines the failure threshold that the deployment circuit breaker uses to monitor a deployment.The
typeandvaluetogether determine the number of task failures that are tolerated before the circuit breaker triggers. By default, the threshold configuration uses atypeofBOUNDED_PERCENTwith avalueof50.Returns union: either
IResolvableorCfnService.ThresholdConfigurationProperty- See Also:
-
builder
-