public class CommandInvocation
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
An invocation is copy of a command sent to a specific instance. A command can apply to one or more instances. A command invocation applies to one instance. For example, if a user executes SendCommand against three instances, then a command invocation is created for each requested instance ID. A command invocation returns status and detail information about a command you executed.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
commandId
The command against which this invocation was requested.
|
private SdkInternalList<CommandPlugin> |
commandPlugins |
private java.lang.String |
comment
User-specified information about the command, such as a brief description
of what the command should do.
|
private java.lang.String |
documentName
The document name that was requested for execution.
|
private java.lang.String |
instanceId
The instance ID in which this invocation was requested.
|
private java.util.Date |
requestedDateTime
The time and date the request was sent to this instance.
|
private java.lang.String |
status
Whether or not the invocation succeeded, failed, or is pending.
|
private java.lang.String |
traceOutput
Gets the trace output sent by the agent.
|
Constructor and Description |
---|
CommandInvocation() |
Modifier and Type | Method and Description |
---|---|
CommandInvocation |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getCommandId()
The command against which this invocation was requested.
|
java.util.List<CommandPlugin> |
getCommandPlugins() |
java.lang.String |
getComment()
User-specified information about the command, such as a brief description
of what the command should do.
|
java.lang.String |
getDocumentName()
The document name that was requested for execution.
|
java.lang.String |
getInstanceId()
The instance ID in which this invocation was requested.
|
java.util.Date |
getRequestedDateTime()
The time and date the request was sent to this instance.
|
java.lang.String |
getStatus()
Whether or not the invocation succeeded, failed, or is pending.
|
java.lang.String |
getTraceOutput()
Gets the trace output sent by the agent.
|
int |
hashCode() |
void |
setCommandId(java.lang.String commandId)
The command against which this invocation was requested.
|
void |
setCommandPlugins(java.util.Collection<CommandPlugin> commandPlugins) |
void |
setComment(java.lang.String comment)
User-specified information about the command, such as a brief description
of what the command should do.
|
void |
setDocumentName(java.lang.String documentName)
The document name that was requested for execution.
|
void |
setInstanceId(java.lang.String instanceId)
The instance ID in which this invocation was requested.
|
void |
setRequestedDateTime(java.util.Date requestedDateTime)
The time and date the request was sent to this instance.
|
void |
setStatus(CommandInvocationStatus status)
Whether or not the invocation succeeded, failed, or is pending.
|
void |
setStatus(java.lang.String status)
Whether or not the invocation succeeded, failed, or is pending.
|
void |
setTraceOutput(java.lang.String traceOutput)
Gets the trace output sent by the agent.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CommandInvocation |
withCommandId(java.lang.String commandId)
The command against which this invocation was requested.
|
CommandInvocation |
withCommandPlugins(java.util.Collection<CommandPlugin> commandPlugins) |
CommandInvocation |
withCommandPlugins(CommandPlugin... commandPlugins)
NOTE: This method appends the values to the existing list (if
any).
|
CommandInvocation |
withComment(java.lang.String comment)
User-specified information about the command, such as a brief description
of what the command should do.
|
CommandInvocation |
withDocumentName(java.lang.String documentName)
The document name that was requested for execution.
|
CommandInvocation |
withInstanceId(java.lang.String instanceId)
The instance ID in which this invocation was requested.
|
CommandInvocation |
withRequestedDateTime(java.util.Date requestedDateTime)
The time and date the request was sent to this instance.
|
CommandInvocation |
withStatus(CommandInvocationStatus status)
Whether or not the invocation succeeded, failed, or is pending.
|
CommandInvocation |
withStatus(java.lang.String status)
Whether or not the invocation succeeded, failed, or is pending.
|
CommandInvocation |
withTraceOutput(java.lang.String traceOutput)
Gets the trace output sent by the agent.
|
private java.lang.String commandId
The command against which this invocation was requested.
private java.lang.String instanceId
The instance ID in which this invocation was requested.
private java.lang.String comment
User-specified information about the command, such as a brief description of what the command should do.
private java.lang.String documentName
The document name that was requested for execution.
private java.util.Date requestedDateTime
The time and date the request was sent to this instance.
private java.lang.String status
Whether or not the invocation succeeded, failed, or is pending.
private java.lang.String traceOutput
Gets the trace output sent by the agent.
private SdkInternalList<CommandPlugin> commandPlugins
public void setCommandId(java.lang.String commandId)
The command against which this invocation was requested.
commandId
- The command against which this invocation was requested.public java.lang.String getCommandId()
The command against which this invocation was requested.
public CommandInvocation withCommandId(java.lang.String commandId)
The command against which this invocation was requested.
commandId
- The command against which this invocation was requested.public void setInstanceId(java.lang.String instanceId)
The instance ID in which this invocation was requested.
instanceId
- The instance ID in which this invocation was requested.public java.lang.String getInstanceId()
The instance ID in which this invocation was requested.
public CommandInvocation withInstanceId(java.lang.String instanceId)
The instance ID in which this invocation was requested.
instanceId
- The instance ID in which this invocation was requested.public void setComment(java.lang.String comment)
User-specified information about the command, such as a brief description of what the command should do.
comment
- User-specified information about the command, such as a brief
description of what the command should do.public java.lang.String getComment()
User-specified information about the command, such as a brief description of what the command should do.
public CommandInvocation withComment(java.lang.String comment)
User-specified information about the command, such as a brief description of what the command should do.
comment
- User-specified information about the command, such as a brief
description of what the command should do.public void setDocumentName(java.lang.String documentName)
The document name that was requested for execution.
documentName
- The document name that was requested for execution.public java.lang.String getDocumentName()
The document name that was requested for execution.
public CommandInvocation withDocumentName(java.lang.String documentName)
The document name that was requested for execution.
documentName
- The document name that was requested for execution.public void setRequestedDateTime(java.util.Date requestedDateTime)
The time and date the request was sent to this instance.
requestedDateTime
- The time and date the request was sent to this instance.public java.util.Date getRequestedDateTime()
The time and date the request was sent to this instance.
public CommandInvocation withRequestedDateTime(java.util.Date requestedDateTime)
The time and date the request was sent to this instance.
requestedDateTime
- The time and date the request was sent to this instance.public void setStatus(java.lang.String status)
Whether or not the invocation succeeded, failed, or is pending.
status
- Whether or not the invocation succeeded, failed, or is pending.CommandInvocationStatus
public java.lang.String getStatus()
Whether or not the invocation succeeded, failed, or is pending.
CommandInvocationStatus
public CommandInvocation withStatus(java.lang.String status)
Whether or not the invocation succeeded, failed, or is pending.
status
- Whether or not the invocation succeeded, failed, or is pending.CommandInvocationStatus
public void setStatus(CommandInvocationStatus status)
Whether or not the invocation succeeded, failed, or is pending.
status
- Whether or not the invocation succeeded, failed, or is pending.CommandInvocationStatus
public CommandInvocation withStatus(CommandInvocationStatus status)
Whether or not the invocation succeeded, failed, or is pending.
status
- Whether or not the invocation succeeded, failed, or is pending.CommandInvocationStatus
public void setTraceOutput(java.lang.String traceOutput)
Gets the trace output sent by the agent.
traceOutput
- Gets the trace output sent by the agent.public java.lang.String getTraceOutput()
Gets the trace output sent by the agent.
public CommandInvocation withTraceOutput(java.lang.String traceOutput)
Gets the trace output sent by the agent.
traceOutput
- Gets the trace output sent by the agent.public java.util.List<CommandPlugin> getCommandPlugins()
public void setCommandPlugins(java.util.Collection<CommandPlugin> commandPlugins)
commandPlugins
- public CommandInvocation withCommandPlugins(CommandPlugin... commandPlugins)
NOTE: This method appends the values to the existing list (if
any). Use setCommandPlugins(java.util.Collection)
or
withCommandPlugins(java.util.Collection)
if you want to override
the existing values.
commandPlugins
- public CommandInvocation withCommandPlugins(java.util.Collection<CommandPlugin> commandPlugins)
commandPlugins
- public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public CommandInvocation clone()
clone
in class java.lang.Object