list_commands
¶
list_commands(
*,
config_overrides: Optional[SSMClientConfig] = 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/ssm.py
8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 | |