get_connection
async
¶
get_connection(
client_id: ClientId,
*,
config_overrides: Optional[AsyncIoTDataPlaneClientConfig] = None,
include_socket_information: Optional[IncludeSocketInformation] = None,
) -> GetConnectionResponse
Retrieves connection information for the specified MQTT client.
Requires permission to access the GetConnection action.
Parameters:
-
client_id(ClientId) –The unique identifier of the MQTT client to retrieve connection information. The client ID can't start with a dollar sign ($).
MQTT client IDs must be URL encoded (percent-encoded) when they contain characters that are not valid in HTTP requests, such as spaces, forward slashes (/), and UTF-8 characters.
-
include_socket_information(Optional[IncludeSocketInformation], default:None) –Specifies if socket information (sourcePort, targetPort, sourceIp, targetIp) should be included in the GetConnection response. Set to
TRUEto include socket information. Set toFALSEto omit socket information. By default, this is set toFALSE. See the developer guide for how to authorize this parameter.
Raises:
-
ForbiddenException–The caller isn't authorized to make the request.
-
InternalFailureException–An unexpected error has occurred.
-
InvalidRequestException–The request is not valid.
-
ResourceNotFoundException–The specified resource does not exist.
-
ThrottlingException–The rate exceeds the limit.
-
UnknownServiceError–The service returned an error code this client does not model.