listPlacements method
Lists the placement(s) of a project.
May throw InternalFailureException. May throw InvalidRequestException. May throw ResourceNotFoundException.
Parameter projectName
:
The project containing the placements to be listed.
Parameter maxResults
:
The maximum number of results to return per request. If not set, a default
value of 100 is used.
Parameter nextToken
:
The token to retrieve the next set of results.
Implementation
Future<ListPlacementsResponse> listPlacements({
required String projectName,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(projectName, 'projectName');
_s.validateStringLength(
'projectName',
projectName,
1,
128,
isRequired: true,
);
_s.validateNumRange(
'maxResults',
maxResults,
1,
250,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
1024,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/projects/${Uri.encodeComponent(projectName)}/placements',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListPlacementsResponse.fromJson(response);
}