listProjectProfiles method

Future<ListProjectProfilesOutput> listProjectProfiles({
  1. required String domainIdentifier,
  2. int? maxResults,
  3. String? name,
  4. String? nextToken,
  5. SortFieldProject? sortBy,
  6. SortOrder? sortOrder,
})

Lists project profiles.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter domainIdentifier : The ID of the domain where you want to list project profiles.

Parameter maxResults : The maximum number of project profiles to return in a single call to ListProjectProfiles. When the number of project profiles to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListProjectProfiles to list the next set of project profiles.

Parameter name : The name of a project profile.

Parameter nextToken : When the number of project profiles is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of project profiles, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListProjectProfiles to list the next set of project profiles.

Parameter sortBy : Specifies by what to sort project profiles.

Parameter sortOrder : Specifies the sort order of the project profiles.

Implementation

Future<ListProjectProfilesOutput> listProjectProfiles({
  required String domainIdentifier,
  int? maxResults,
  String? name,
  String? nextToken,
  SortFieldProject? sortBy,
  SortOrder? sortOrder,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (name != null) 'name': [name],
    if (nextToken != null) 'nextToken': [nextToken],
    if (sortBy != null) 'sortBy': [sortBy.value],
    if (sortOrder != null) 'sortOrder': [sortOrder.value],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/project-profiles',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListProjectProfilesOutput.fromJson(response);
}