Class CommandInvocation
- java.lang.Object
-
- com.amazonaws.services.simplesystemsmanagement.model.CommandInvocation
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class CommandInvocation extends Object implements Serializable, 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.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CommandInvocation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandInvocation
clone()
boolean
equals(Object obj)
String
getCommandId()
The command against which this invocation was requested.List<CommandPlugin>
getCommandPlugins()
String
getComment()
User-specified information about the command, such as a brief description of what the command should do.String
getDocumentName()
The document name that was requested for execution.String
getInstanceId()
The instance ID in which this invocation was requested.Date
getRequestedDateTime()
The time and date the request was sent to this instance.String
getStatus()
Whether or not the invocation succeeded, failed, or is pending.String
getTraceOutput()
Gets the trace output sent by the agent.int
hashCode()
void
setCommandId(String commandId)
The command against which this invocation was requested.void
setCommandPlugins(Collection<CommandPlugin> commandPlugins)
void
setComment(String comment)
User-specified information about the command, such as a brief description of what the command should do.void
setDocumentName(String documentName)
The document name that was requested for execution.void
setInstanceId(String instanceId)
The instance ID in which this invocation was requested.void
setRequestedDateTime(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(String status)
Whether or not the invocation succeeded, failed, or is pending.void
setTraceOutput(String traceOutput)
Gets the trace output sent by the agent.String
toString()
Returns a string representation of this object; useful for testing and debugging.CommandInvocation
withCommandId(String commandId)
The command against which this invocation was requested.CommandInvocation
withCommandPlugins(CommandPlugin... commandPlugins)
NOTE: This method appends the values to the existing list (if any).CommandInvocation
withCommandPlugins(Collection<CommandPlugin> commandPlugins)
CommandInvocation
withComment(String comment)
User-specified information about the command, such as a brief description of what the command should do.CommandInvocation
withDocumentName(String documentName)
The document name that was requested for execution.CommandInvocation
withInstanceId(String instanceId)
The instance ID in which this invocation was requested.CommandInvocation
withRequestedDateTime(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(String status)
Whether or not the invocation succeeded, failed, or is pending.CommandInvocation
withTraceOutput(String traceOutput)
Gets the trace output sent by the agent.
-
-
-
Method Detail
-
setCommandId
public void setCommandId(String commandId)
The command against which this invocation was requested.
- Parameters:
commandId
- The command against which this invocation was requested.
-
getCommandId
public String getCommandId()
The command against which this invocation was requested.
- Returns:
- The command against which this invocation was requested.
-
withCommandId
public CommandInvocation withCommandId(String commandId)
The command against which this invocation was requested.
- Parameters:
commandId
- The command against which this invocation was requested.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInstanceId
public void setInstanceId(String instanceId)
The instance ID in which this invocation was requested.
- Parameters:
instanceId
- The instance ID in which this invocation was requested.
-
getInstanceId
public String getInstanceId()
The instance ID in which this invocation was requested.
- Returns:
- The instance ID in which this invocation was requested.
-
withInstanceId
public CommandInvocation withInstanceId(String instanceId)
The instance ID in which this invocation was requested.
- Parameters:
instanceId
- The instance ID in which this invocation was requested.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setComment
public void setComment(String comment)
User-specified information about the command, such as a brief description of what the command should do.
- Parameters:
comment
- User-specified information about the command, such as a brief description of what the command should do.
-
getComment
public String getComment()
User-specified information about the command, such as a brief description of what the command should do.
- Returns:
- User-specified information about the command, such as a brief description of what the command should do.
-
withComment
public CommandInvocation withComment(String comment)
User-specified information about the command, such as a brief description of what the command should do.
- Parameters:
comment
- User-specified information about the command, such as a brief description of what the command should do.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDocumentName
public void setDocumentName(String documentName)
The document name that was requested for execution.
- Parameters:
documentName
- The document name that was requested for execution.
-
getDocumentName
public String getDocumentName()
The document name that was requested for execution.
- Returns:
- The document name that was requested for execution.
-
withDocumentName
public CommandInvocation withDocumentName(String documentName)
The document name that was requested for execution.
- Parameters:
documentName
- The document name that was requested for execution.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRequestedDateTime
public void setRequestedDateTime(Date requestedDateTime)
The time and date the request was sent to this instance.
- Parameters:
requestedDateTime
- The time and date the request was sent to this instance.
-
getRequestedDateTime
public Date getRequestedDateTime()
The time and date the request was sent to this instance.
- Returns:
- The time and date the request was sent to this instance.
-
withRequestedDateTime
public CommandInvocation withRequestedDateTime(Date requestedDateTime)
The time and date the request was sent to this instance.
- Parameters:
requestedDateTime
- The time and date the request was sent to this instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStatus
public void setStatus(String status)
Whether or not the invocation succeeded, failed, or is pending.
- Parameters:
status
- Whether or not the invocation succeeded, failed, or is pending.- See Also:
CommandInvocationStatus
-
getStatus
public String getStatus()
Whether or not the invocation succeeded, failed, or is pending.
- Returns:
- Whether or not the invocation succeeded, failed, or is pending.
- See Also:
CommandInvocationStatus
-
withStatus
public CommandInvocation withStatus(String status)
Whether or not the invocation succeeded, failed, or is pending.
- Parameters:
status
- Whether or not the invocation succeeded, failed, or is pending.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
CommandInvocationStatus
-
setStatus
public void setStatus(CommandInvocationStatus status)
Whether or not the invocation succeeded, failed, or is pending.
- Parameters:
status
- Whether or not the invocation succeeded, failed, or is pending.- See Also:
CommandInvocationStatus
-
withStatus
public CommandInvocation withStatus(CommandInvocationStatus status)
Whether or not the invocation succeeded, failed, or is pending.
- Parameters:
status
- Whether or not the invocation succeeded, failed, or is pending.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
CommandInvocationStatus
-
setTraceOutput
public void setTraceOutput(String traceOutput)
Gets the trace output sent by the agent.
- Parameters:
traceOutput
- Gets the trace output sent by the agent.
-
getTraceOutput
public String getTraceOutput()
Gets the trace output sent by the agent.
- Returns:
- Gets the trace output sent by the agent.
-
withTraceOutput
public CommandInvocation withTraceOutput(String traceOutput)
Gets the trace output sent by the agent.
- Parameters:
traceOutput
- Gets the trace output sent by the agent.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getCommandPlugins
public List<CommandPlugin> getCommandPlugins()
- Returns:
-
setCommandPlugins
public void setCommandPlugins(Collection<CommandPlugin> commandPlugins)
- Parameters:
commandPlugins
-
-
withCommandPlugins
public CommandInvocation withCommandPlugins(CommandPlugin... commandPlugins)
NOTE: This method appends the values to the existing list (if any). Use
setCommandPlugins(java.util.Collection)
orwithCommandPlugins(java.util.Collection)
if you want to override the existing values.- Parameters:
commandPlugins
-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withCommandPlugins
public CommandInvocation withCommandPlugins(Collection<CommandPlugin> commandPlugins)
- Parameters:
commandPlugins
-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public CommandInvocation clone()
-
-