listProjects method
Lists all projects in AWS CodeStar associated with your AWS account.
May throw InvalidNextTokenException. May throw ValidationException.
Parameter maxResults
:
The maximum amount of data that can be contained in a single set of
results.
Parameter nextToken
:
The continuation token to be used to return the next set of results, if
the results cannot be returned in one response.
Implementation
Future<ListProjectsResult> listProjects({
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
512,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeStar_20170419.ListProjects'
};
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 ListProjectsResult.fromJson(jsonResponse.body);
}