Class CfnService.DeploymentAlarmsProperty
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.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public class DeploymentAlarmsProperty : Object, CfnService.IDeploymentAlarmsProperty
Syntax (vb)
Public Class DeploymentAlarmsProperty
Inherits Object
Implements CfnService.IDeploymentAlarmsProperty
Remarks
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 .
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;
var deploymentAlarmsProperty = new DeploymentAlarmsProperty {
AlarmNames = new [] { "alarmNames" },
Enable = false,
Rollback = false
};
Synopsis
Constructors
DeploymentAlarmsProperty() |
Properties
AlarmNames | One or more CloudWatch alarm names. |
Enable | Determines whether to use the CloudWatch alarm option in the service deployment process. |
Rollback | Determines whether to configure Amazon ECS to roll back the service if a service deployment fails. |
Constructors
DeploymentAlarmsProperty()
public DeploymentAlarmsProperty()
Properties
AlarmNames
One or more CloudWatch alarm names.
public string[] AlarmNames { get; set; }
Property Value
System.String[]
Remarks
Use a "," to separate the alarms.
Enable
Determines whether to use the CloudWatch alarm option in the service deployment process.
public object Enable { get; set; }
Property Value
System.Object
Remarks
Rollback
Determines whether to configure Amazon ECS to roll back the service if a service deployment fails.
public object Rollback { get; set; }
Property Value
System.Object
Remarks
If rollback is used, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.