listResources method
Lists resources associated with a project in AWS CodeStar.
May throw ProjectNotFoundException. May throw InvalidNextTokenException. May throw ValidationException.
Parameter projectId
:
The ID of the project.
Parameter maxResults
:
The maximum amount of data that can be contained in a single set of
results.
Parameter nextToken
:
The continuation token for the next set of results, if the results cannot
be returned in one response.
Implementation
Future<ListResourcesResult> listResources({
required String projectId,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(projectId, 'projectId');
_s.validateStringLength(
'projectId',
projectId,
2,
15,
isRequired: true,
);
_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.ListResources'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'projectId': projectId,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
},
);
return ListResourcesResult.fromJson(jsonResponse.body);
}