Class ASGResource


  • @Path("/{version}/asg")
    @Produces({"application/xml","application/json"})
    public class ASGResource
    extends java.lang.Object
    A jersey resource for handling updates to 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(com.netflix.appinfo.InstanceInfo)

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ASGResource.ASGStatus  
    • Constructor Summary

      Constructors 
      Constructor Description
      ASGResource()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      jakarta.ws.rs.core.Response statusUpdate​(java.lang.String asgName, java.lang.String newStatus, java.lang.String isReplication)
      Changes the status information of the ASG.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ASGResource

        public ASGResource()
    • Method Detail

      • statusUpdate

        @PUT
        @Path("{asgName}/status")
        public jakarta.ws.rs.core.Response statusUpdate​(@PathParam("asgName")
                                                        java.lang.String asgName,
                                                        @QueryParam("value")
                                                        java.lang.String newStatus,
                                                        @HeaderParam("x-netflix-discovery-replication")
                                                        java.lang.String isReplication)
        Changes the status information of the ASG.
        Parameters:
        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.
        Returns:
        response which indicates if the operation succeeded or not.