listApprovalRuleTemplates method
Lists all approval rule templates in the specified AWS Region in your AWS account. If an AWS Region is not specified, the AWS Region where you are signed in is used.
May throw InvalidMaxResultsException. May throw InvalidContinuationTokenException.
Parameter maxResults
:
A non-zero, non-negative integer used to limit the number of returned
results.
Parameter nextToken
:
An enumeration token that, when provided in a request, returns the next
batch of the results.
Implementation
Future<ListApprovalRuleTemplatesOutput> listApprovalRuleTemplates({
int? maxResults,
String? nextToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeCommit_20150413.ListApprovalRuleTemplates'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
},
);
return ListApprovalRuleTemplatesOutput.fromJson(jsonResponse.body);
}