public class EC2Computer extends SlaveComputer
Computer.DisplayExecutor, Computer.TerminationRequest
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem
BUILD, CONFIGURE, CONNECT, CREATE, DELETE, DISCONNECT, EXTENDED_READ, EXTENDED_READ_AND_CONNECT, nodeName, offlineCause, PERMISSIONS, SKIP_PERMISSION_CHECK, statusChangeLock, threadPoolForRemoting, transientActions
Constructor and Description |
---|
EC2Computer(EC2AbstractSlave slave) |
Modifier and Type | Method and Description |
---|---|
com.amazonaws.services.ec2.model.Instance |
describeInstance()
Obtains the instance state description in EC2.
|
org.kohsuke.stapler.HttpResponse |
doDoDelete()
When the agent is deleted, terminate the instance.
|
EC2Cloud |
getCloud() |
String |
getConsoleOutput()
Gets the EC2 console output.
|
String |
getDecodedConsoleOutput()
Gets the EC2 decoded console output.
|
String |
getEc2Type() |
String |
getInstanceId() |
long |
getLaunchTime()
Return the time this instance was launched in ms since the epoch.
|
EC2AbstractSlave |
getNode() |
String |
getRemoteAdmin()
What username to use to run root-like commands
|
String |
getRootCommandPrefix() |
String |
getSlaveCommandPrefix() |
String |
getSlaveCommandSuffix() |
SlaveTemplate |
getSlaveTemplate() |
String |
getSpotInstanceRequestId() |
int |
getSshPort() |
InstanceState |
getState()
Gets the current state of the instance.
|
long |
getUptime()
Number of milli-secs since the instance was started.
|
String |
getUptimeString()
Returns uptime in the human readable form.
|
void |
onConnected() |
com.amazonaws.services.ec2.model.Instance |
updateInstanceDescription()
This will flush any cached description held by
describeInstance() . |
_connect, disconnect, doDoDisconnect, doJenkinsAgentJnlp, doLaunchSlaveAgent, doSlaveAgentJnlp, getAbsoluteRemoteFs, getAbsoluteRemotePath, getChannel, getChannelToMaster, getClassLoadingCount, getClassLoadingPrefetchCacheCount, getClassLoadingTime, getDefaultCharset, getDelegatedLauncher, getEnvVarsFull, getIcon, getJnlpJars, getJnlpMac, getLauncher, getListener, getLogRecords, getOSDescription, getResourceLoadingCount, getResourceLoadingTime, getRetentionStrategy, getSlaveVersion, getSystemInfoExtensions, getTarget, grabLauncher, isAcceptingTasks, isConnecting, isJnlpAgent, isLaunchSupported, isUnix, kill, openLogFile, setAcceptingTasks, setChannel, setChannel, setChannel, setChannel, setNode, taskAccepted, taskCompleted, taskCompletedWithProblems, tryReconnect
_doScript, addAction, buildEnvironment, cliConnect, cliDisconnect, cliOffline, cliOnline, connect, countBusy, countExecutors, countIdle, currentComputer, disconnect, doChangeOfflineCause, doConfigDotXml, doConfigSubmit, doDumpExportTable, doProgressiveLog, doRssAll, doRssFailed, doRssLatest, doScript, doScriptText, doToggleOffline, getACL, getActions, getAllExecutors, getApi, getAssignedLabels, getBuilds, getCaption, getComputerPanelBoxs, getConnectTime, getDemandStartMilliseconds, getDescription, getDisplayExecutors, getDisplayName, getEnvironment, getEnvVars, getExecutors, getHeapDump, getHostName, getIconAltText, getIconClassName, getIdleStartMilliseconds, getLoadStatistics, getLog, getLogDir, getLogFile, getLogText, getMonitorData, getName, getNumExecutors, getOfflineCause, getOfflineCauseReason, getOneOffExecutors, getSearchUrl, getSystemProperties, getTerminatedBy, getThreadDump, getTiedJobs, getTimeline, getUrl, getWorkspaceList, interrupt, isAlive, isIdle, isManualLaunchAllowed, isOffline, isOnline, isPartiallyIdle, isTemporarilyOffline, launch, onRemoved, recordTermination, relocateOldLogs, removeExecutor, resolveForCLI, setTemporarilyOffline, setTemporarilyOffline, updateByXml, waitUntilOffline, waitUntilOnline
addOrReplaceAction, doContextMenu, getAction, getAction, getActions, getAllActions, getDynamic, removeAction, removeActions, replaceAction, replaceActions
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
getDescriptorByName
public EC2Computer(EC2AbstractSlave slave)
public EC2AbstractSlave getNode()
getNode
in class SlaveComputer
@CheckForNull public String getInstanceId()
public String getEc2Type()
public String getSpotInstanceRequestId()
public EC2Cloud getCloud()
@CheckForNull public SlaveTemplate getSlaveTemplate()
public String getConsoleOutput() throws com.amazonaws.AmazonClientException
com.amazonaws.AmazonClientException
public String getDecodedConsoleOutput() throws com.amazonaws.AmazonClientException
com.amazonaws.AmazonClientException
public com.amazonaws.services.ec2.model.Instance describeInstance() throws com.amazonaws.AmazonClientException, InterruptedException
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()
com.amazonaws.AmazonClientException
InterruptedException
public com.amazonaws.services.ec2.model.Instance updateInstanceDescription() throws com.amazonaws.AmazonClientException, InterruptedException
describeInstance()
.com.amazonaws.AmazonClientException
InterruptedException
public InstanceState getState() throws com.amazonaws.AmazonClientException, InterruptedException
Unlike describeInstance()
, this method always return the current status by calling EC2.
com.amazonaws.AmazonClientException
InterruptedException
public long getUptime() throws com.amazonaws.AmazonClientException, InterruptedException
com.amazonaws.AmazonClientException
InterruptedException
public String getUptimeString() throws com.amazonaws.AmazonClientException, InterruptedException
com.amazonaws.AmazonClientException
InterruptedException
public long getLaunchTime() throws InterruptedException
InterruptedException
public org.kohsuke.stapler.HttpResponse doDoDelete() throws IOException
doDoDelete
in class Computer
IOException
@CheckForNull public String getRemoteAdmin()
null
if the associated Node
is null
public int getSshPort()
public String getRootCommandPrefix()
public String getSlaveCommandPrefix()
public String getSlaveCommandSuffix()
public void onConnected()
Copyright © 2016–2022. All rights reserved.