listProfiles method
Returns a list of the profiles for your system. If you want to limit the
results to a certain number, supply a value for the
MaxResults parameter. If you ran the command previously and
received a value for NextToken, you can supply that value to
continue listing profiles from where you left off.
May throw InternalServiceError.
May throw InvalidNextTokenException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
Parameter maxResults :
The maximum number of items to return.
Parameter nextToken :
When there are additional results that were not returned, a
NextToken parameter is returned. You can use that value for a
subsequent call to ListProfiles to continue listing results.
Parameter profileType :
Indicates whether to list only LOCAL type profiles or only
PARTNER type profiles. If not supplied in the request, the
command lists all types of profiles.
Implementation
Future<ListProfilesResponse> listProfiles({
int? maxResults,
String? nextToken,
ProfileType? profileType,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'TransferService.ListProfiles'
};
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,
if (profileType != null) 'ProfileType': profileType.value,
},
);
return ListProfilesResponse.fromJson(jsonResponse.body);
}