public class ASGResource
extends java.lang.Object
ASGResource.ASGStatus.
The ASG status is used in AWS environments to automatically enable/disable instance registration based on the status of the ASG. This is particularly useful in red/black deployment scenarios where it is easy to switch to a new version and incase of problems switch back to the old versions of the deployment.
During such a scenario, when an ASG is disabled and the instances go away and
get refilled by an ASG - which is normal in AWS environments,the instances
automatically go in the InstanceInfo.InstanceStatus.OUT_OF_SERVICE state when they
are refilled by the ASG and if the ASG is disabled by as indicated by a flag
in the ASG as described in AwsAsgUtil.isASGEnabled(String)
| Modifier and Type | Class and Description |
|---|---|
static class |
ASGResource.ASGStatus |
| Constructor and Description |
|---|
ASGResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
statusUpdate(java.lang.String asgName,
java.lang.String newStatus,
java.lang.String isReplication)
Changes the status information of the ASG.
|
public javax.ws.rs.core.Response statusUpdate(java.lang.String asgName,
java.lang.String newStatus,
@HeaderParam(value="x-netflix-discovery-replication")
java.lang.String isReplication)
asgName - the name of the ASG for which the status needs to be changed.newStatus - the new status ASGResource.ASGStatus of the ASG.isReplication - a header parameter containing information whether this is
replicated from other nodes.