getPullRequestApprovalStates method
Gets information about the approval states for a specified pull request. Approval states only apply to pull requests that have one or more approval rules applied to them.
May throw EncryptionIntegrityChecksFailedException.
May throw EncryptionKeyAccessDeniedException.
May throw EncryptionKeyDisabledException.
May throw EncryptionKeyNotFoundException.
May throw EncryptionKeyUnavailableException.
May throw InvalidPullRequestIdException.
May throw InvalidRevisionIdException.
May throw PullRequestDoesNotExistException.
May throw PullRequestIdRequiredException.
May throw RevisionIdRequiredException.
Parameter pullRequestId :
The system-generated ID for the pull request.
Parameter revisionId :
The system-generated ID for the pull request revision.
Implementation
Future<GetPullRequestApprovalStatesOutput> getPullRequestApprovalStates({
required String pullRequestId,
required String revisionId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeCommit_20150413.GetPullRequestApprovalStates'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'pullRequestId': pullRequestId,
'revisionId': revisionId,
},
);
return GetPullRequestApprovalStatesOutput.fromJson(jsonResponse.body);
}