@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class DeploymentAlarms extends Object implements Serializable, Cloneable, StructuredPojo
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 .
Constructor and Description |
---|
DeploymentAlarms() |
Modifier and Type | Method and Description |
---|---|
DeploymentAlarms |
clone() |
boolean |
equals(Object obj) |
List<String> |
getAlarmNames()
One or more CloudWatch alarm names.
|
Boolean |
getEnable()
Determines whether to use the CloudWatch alarm option in the service deployment process.
|
Boolean |
getRollback()
Determines whether to configure Amazon ECS to roll back the service if a service deployment fails.
|
int |
hashCode() |
Boolean |
isEnable()
Determines whether to use the CloudWatch alarm option in the service deployment process.
|
Boolean |
isRollback()
Determines whether to configure Amazon ECS to roll back the service if a service deployment fails.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setAlarmNames(Collection<String> alarmNames)
One or more CloudWatch alarm names.
|
void |
setEnable(Boolean enable)
Determines whether to use the CloudWatch alarm option in the service deployment process.
|
void |
setRollback(Boolean rollback)
Determines whether to configure Amazon ECS to roll back the service if a service deployment fails.
|
String |
toString()
Returns a string representation of this object.
|
DeploymentAlarms |
withAlarmNames(Collection<String> alarmNames)
One or more CloudWatch alarm names.
|
DeploymentAlarms |
withAlarmNames(String... alarmNames)
One or more CloudWatch alarm names.
|
DeploymentAlarms |
withEnable(Boolean enable)
Determines whether to use the CloudWatch alarm option in the service deployment process.
|
DeploymentAlarms |
withRollback(Boolean rollback)
Determines whether to configure Amazon ECS to roll back the service if a service deployment fails.
|
public List<String> getAlarmNames()
One or more CloudWatch alarm names. Use a "," to separate the alarms.
public void setAlarmNames(Collection<String> alarmNames)
One or more CloudWatch alarm names. Use a "," to separate the alarms.
alarmNames
- One or more CloudWatch alarm names. Use a "," to separate the alarms.public DeploymentAlarms withAlarmNames(String... alarmNames)
One or more CloudWatch alarm names. Use a "," to separate the alarms.
NOTE: This method appends the values to the existing list (if any). Use
setAlarmNames(java.util.Collection)
or withAlarmNames(java.util.Collection)
if you want to
override the existing values.
alarmNames
- One or more CloudWatch alarm names. Use a "," to separate the alarms.public DeploymentAlarms withAlarmNames(Collection<String> alarmNames)
One or more CloudWatch alarm names. Use a "," to separate the alarms.
alarmNames
- One or more CloudWatch alarm names. Use a "," to separate the alarms.public void setEnable(Boolean enable)
Determines whether to use the CloudWatch alarm option in the service deployment process.
enable
- Determines whether to use the CloudWatch alarm option in the service deployment process.public Boolean getEnable()
Determines whether to use the CloudWatch alarm option in the service deployment process.
public DeploymentAlarms withEnable(Boolean enable)
Determines whether to use the CloudWatch alarm option in the service deployment process.
enable
- Determines whether to use the CloudWatch alarm option in the service deployment process.public Boolean isEnable()
Determines whether to use the CloudWatch alarm option in the service deployment process.
public void setRollback(Boolean rollback)
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.
rollback
- 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.public Boolean 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.
public DeploymentAlarms withRollback(Boolean rollback)
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.
rollback
- 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.public Boolean isRollback()
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.
public String toString()
toString
in class Object
Object.toString()
public DeploymentAlarms clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.