Skip to content

Get Command Invocation

ssm_get_command_invocation R Documentation

Returns detailed information about command execution for an invocation or plugin

Description

Returns detailed information about command execution for an invocation or plugin. The Run Command API follows an eventual consistency model, due to the distributed nature of the system supporting the API. This means that the result of an API command you run that affects your resources might not be immediately visible to all subsequent commands you run. You should keep this in mind when you carry out an API command that immediately follows a previous API command.

get_command_invocation only gives the execution status of a plugin in a document. To get the command execution status on a specific managed node, use list_command_invocations. To get the command execution status across managed nodes, use list_commands.

Usage

ssm_get_command_invocation(CommandId, InstanceId, PluginName)

Arguments

CommandId

[required] (Required) The parent command ID of the invocation plugin.

InstanceId

[required] (Required) The ID of the managed node targeted by the command. A managed node can be an Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, and on-premises server or VM in your hybrid environment that is configured for Amazon Web Services Systems Manager.

PluginName

The name of the step for which you want detailed results. If the document contains only one step, you can omit the name and details for that step. If the document contains more than one step, you must specify the name of the step for which you want to view details. Be sure to specify the name of the step, not the name of a plugin like aws:RunShellScript.

To find the PluginName, check the document content and find the name of the step you want details for. Alternatively, use list_command_invocations with the CommandId and Details parameters. The PluginName is the Name attribute of the CommandPlugin object in the CommandPlugins list.

Value

A list with the following syntax:

list(
  CommandId = "string",
  InstanceId = "string",
  Comment = "string",
  DocumentName = "string",
  DocumentVersion = "string",
  PluginName = "string",
  ResponseCode = 123,
  ExecutionStartDateTime = "string",
  ExecutionElapsedTime = "string",
  ExecutionEndDateTime = "string",
  Status = "Pending"|"InProgress"|"Delayed"|"Success"|"Cancelled"|"TimedOut"|"Failed"|"Cancelling",
  StatusDetails = "string",
  StandardOutputContent = "string",
  StandardOutputUrl = "string",
  StandardErrorContent = "string",
  StandardErrorUrl = "string",
  CloudWatchOutputConfig = list(
    CloudWatchLogGroupName = "string",
    CloudWatchOutputEnabled = TRUE|FALSE
  )
)

Request syntax

svc$get_command_invocation(
  CommandId = "string",
  InstanceId = "string",
  PluginName = "string"
)