getAccessToken method
Returns a credentials set to be used with just-in-time node access.
May throw AccessDeniedException.
May throw InternalServerError.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter accessRequestId :
The ID of a just-in-time node access request.
Implementation
Future<GetAccessTokenResponse> getAccessToken({
required String accessRequestId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonSSM.GetAccessToken'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AccessRequestId': accessRequestId,
},
);
return GetAccessTokenResponse.fromJson(jsonResponse.body);
}