listConfigurationProfiles method

Future<ConfigurationProfiles> listConfigurationProfiles({
  1. required String applicationId,
  2. int? maxResults,
  3. String? nextToken,
  4. String? type,
})

Lists the configuration profiles for an application.

May throw BadRequestException. May throw InternalServerException. May throw ResourceNotFoundException.

Parameter applicationId : The application ID.

Parameter maxResults : The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

Parameter nextToken : A token to start the list. Use this token to get the next set of results.

Parameter type : A filter based on the type of configurations that the configuration profile contains. A configuration can be a feature flag or a freeform configuration.

Implementation

Future<ConfigurationProfiles> listConfigurationProfiles({
  required String applicationId,
  int? maxResults,
  String? nextToken,
  String? type,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'max_results': [maxResults.toString()],
    if (nextToken != null) 'next_token': [nextToken],
    if (type != null) 'type': [type],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/applications/${Uri.encodeComponent(applicationId)}/configurationprofiles',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ConfigurationProfiles.fromJson(response);
}