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
8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 | |