getConnectionStatus method
Retrieves the Session Manager connection status for an instance to determine whether it is running and ready to receive Session Manager connections.
May throw InternalServerError.
Parameter target
:
The ID of the instance.
Implementation
Future<GetConnectionStatusResponse> getConnectionStatus({
required String target,
}) async {
ArgumentError.checkNotNull(target, 'target');
_s.validateStringLength(
'target',
target,
1,
400,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonSSM.GetConnectionStatus'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Target': target,
},
);
return GetConnectionStatusResponse.fromJson(jsonResponse.body);
}