Class EC2Computer

    • Method Detail

      • getInstanceId

        @CheckForNull
        public String getInstanceId()
      • getEc2Type

        public String getEc2Type()
      • getSpotInstanceRequestId

        public String getSpotInstanceRequestId()
      • getSlaveTemplate

        @CheckForNull
        public SlaveTemplate getSlaveTemplate()
      • getConsoleOutput

        public String getConsoleOutput()
                                throws com.amazonaws.AmazonClientException
        Gets the EC2 console output.
        Throws:
        com.amazonaws.AmazonClientException
      • getDecodedConsoleOutput

        public String getDecodedConsoleOutput()
                                       throws com.amazonaws.AmazonClientException
        Gets the EC2 decoded console output.
        Throws:
        com.amazonaws.AmazonClientException
        Since:
        TODO
      • describeInstance

        public com.amazonaws.services.ec2.model.Instance describeInstance()
                                                                   throws com.amazonaws.AmazonClientException,
                                                                          InterruptedException
        Obtains the instance state description in EC2.

        This method returns a cached state, so it's not suitable to check Instance.getState() from the returned instance (but all the other fields are valid as it won't change.) The cache can be flushed using updateInstanceDescription()

        Throws:
        com.amazonaws.AmazonClientException
        InterruptedException
      • updateInstanceDescription

        public com.amazonaws.services.ec2.model.Instance updateInstanceDescription()
                                                                            throws com.amazonaws.AmazonClientException,
                                                                                   InterruptedException
        This will flush any cached description held by describeInstance().
        Throws:
        com.amazonaws.AmazonClientException
        InterruptedException
      • getUptime

        public long getUptime()
                       throws com.amazonaws.AmazonClientException,
                              InterruptedException
        Number of milli-secs since the instance was started.
        Throws:
        com.amazonaws.AmazonClientException
        InterruptedException
      • getLaunchTime

        public long getLaunchTime()
                           throws InterruptedException
        Return the time this instance was launched in ms since the epoch.
        Returns:
        Time this instance was launched, in ms since the epoch.
        Throws:
        InterruptedException
      • doDoDelete

        @POST
        public org.kohsuke.stapler.HttpResponse doDoDelete()
                                                    throws IOException
        When the agent is deleted, terminate the instance.
        Overrides:
        doDoDelete in class Computer
        Throws:
        IOException
      • getRemoteAdmin

        @CheckForNull
        public String getRemoteAdmin()
        What username to use to run root-like commands
        Returns:
        remote admin or null if the associated Node is null
      • getSshPort

        public int getSshPort()
      • getRootCommandPrefix

        public String getRootCommandPrefix()
      • getSlaveCommandPrefix

        public String getSlaveCommandPrefix()
      • getSlaveCommandSuffix

        public String getSlaveCommandSuffix()
      • onConnected

        public void onConnected()