listCommandInvocations method
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 runs SendCommand against three instances, then a command invocation is created for each requested instance ID. ListCommandInvocations provide status about command execution.
May throw InternalServerError. May throw InvalidCommandId. May throw InvalidInstanceId. May throw InvalidFilterKey. May throw InvalidNextToken.
Parameter commandId
:
(Optional) The invocations for a specific command ID.
Parameter details
:
(Optional) If set this returns the response of the command executions and
any command output. By default this is set to False.
Parameter filters
:
(Optional) One or more filters. Use a filter to return a more specific
list of results.
Parameter instanceId
:
(Optional) The command execution details for a specific instance ID.
Parameter maxResults
:
(Optional) The maximum number of items to return for this call. The call
also returns a token that you can specify in a subsequent call to get the
next set of results.
Parameter nextToken
:
(Optional) The token for the next set of items to return. (You received
this token from a previous call.)
Implementation
Future<ListCommandInvocationsResult> listCommandInvocations({
String? commandId,
bool? details,
List<CommandFilter>? filters,
String? instanceId,
int? maxResults,
String? nextToken,
}) async {
_s.validateStringLength(
'commandId',
commandId,
36,
36,
);
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonSSM.ListCommandInvocations'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (commandId != null) 'CommandId': commandId,
if (details != null) 'Details': details,
if (filters != null) 'Filters': filters,
if (instanceId != null) 'InstanceId': instanceId,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListCommandInvocationsResult.fromJson(jsonResponse.body);
}