listUserProfiles method

Future<ListUserProfilesResponse> listUserProfiles({
  1. String? domainIdEquals,
  2. int? maxResults,
  3. String? nextToken,
  4. UserProfileSortKey? sortBy,
  5. SortOrder? sortOrder,
  6. String? userProfileNameContains,
})

Lists user profiles.

Parameter domainIdEquals : A parameter by which to filter the results.

Parameter maxResults : This parameter defines the maximum number of results that can be return in a single response. The MaxResults parameter is an upper bound, not a target. If there are more results available than the value specified, a NextToken is provided in the response. The NextToken indicates that the user should get the next set of results by providing this token as a part of a subsequent call. The default value for MaxResults is 10.

Parameter nextToken : If the previous response was truncated, you will receive this token. Use it in your next request to receive the next set of results.

Parameter sortBy : The parameter by which to sort the results. The default is CreationTime.

Parameter sortOrder : The sort order for the results. The default is Ascending.

Parameter userProfileNameContains : A parameter by which to filter the results.

Implementation

Future<ListUserProfilesResponse> listUserProfiles({
  String? domainIdEquals,
  int? maxResults,
  String? nextToken,
  UserProfileSortKey? sortBy,
  SortOrder? sortOrder,
  String? userProfileNameContains,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.ListUserProfiles'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (domainIdEquals != null) 'DomainIdEquals': domainIdEquals,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (sortBy != null) 'SortBy': sortBy.value,
      if (sortOrder != null) 'SortOrder': sortOrder.value,
      if (userProfileNameContains != null)
        'UserProfileNameContains': userProfileNameContains,
    },
  );

  return ListUserProfilesResponse.fromJson(jsonResponse.body);
}