list_commands
async
¶
list_commands(
*,
config_overrides: Optional[AsyncSSMClientConfig] = None,
command_id: Optional[CommandId] = None,
instance_id: Optional[InstanceId] = None,
max_results: Optional[CommandMaxResults] = None,
next_token: Optional[NextToken] = None,
filters: Optional[CommandFilterList] = None,
) -> ListCommandsResult
Lists the commands requested by users of the Amazon Web Services account.
Parameters:
-
command_id(Optional[CommandId], default:None) –(Optional) If provided, lists only the specified command.
-
instance_id(Optional[InstanceId], default:None) –(Optional) Lists commands issued against this managed node ID.
You can't specify a managed node ID in the same command that you specify
Status=Pending. This is because the command hasn't reached the managed node yet. -
max_results(Optional[CommandMaxResults], default:None) –(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.
-
next_token(Optional[NextToken], default:None) –(Optional) The token for the next set of items to return. (You received this token from a previous call.)
-
filters(Optional[CommandFilterList], default:None) –(Optional) One or more filters. Use a filter to return a more specific list of results.
Raises:
-
InternalServerError–An error occurred on the server side.
-
InvalidCommandId–The specified command ID isn't valid. Verify the ID and try again.
-
InvalidFilterKey–The specified key isn't valid.
-
InvalidInstanceId–The following problems can cause this exception:
-
You don't have permission to access the managed node.
-
Amazon Web Services Systems Manager Agent (SSM Agent) isn't running. Verify that SSM Agent is running.
-
SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM Agent.
-
The managed node isn't in a valid state. Valid states are:
Running,Pending,Stopped, andStopping. Invalid states are:Shutting-downandTerminated.
-
-
InvalidNextToken–The specified token isn't valid.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ssm/_services/async_ssm.py
8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 | |