listHostedConfigurationVersions method
View a list of configurations stored in the AppConfig configuration store by version.
May throw BadRequestException. May throw ResourceNotFoundException. May throw InternalServerException.
Parameter applicationId
:
The application ID.
Parameter configurationProfileId
:
The configuration profile 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.
Implementation
Future<HostedConfigurationVersions> listHostedConfigurationVersions({
required String applicationId,
required String configurationProfileId,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(applicationId, 'applicationId');
ArgumentError.checkNotNull(
configurationProfileId, 'configurationProfileId');
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
2048,
);
final $query = <String, List<String>>{
if (maxResults != null) 'max_results': [maxResults.toString()],
if (nextToken != null) 'next_token': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/applications/${Uri.encodeComponent(applicationId)}/configurationprofiles/${Uri.encodeComponent(configurationProfileId)}/hostedconfigurationversions',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return HostedConfigurationVersions.fromJson(response);
}