listServiceQuotas method
Lists the applied quota values for the specified Amazon Web Services service. For some quotas, only the default values are available. If the applied quota value is not available for a quota, the quota is not retrieved. Filter responses to return applied quota values at either the account level, resource level, or all levels.
May throw AccessDeniedException.
May throw IllegalArgumentException.
May throw InvalidPaginationTokenException.
May throw NoSuchResourceException.
May throw ServiceException.
May throw TooManyRequestsException.
Parameter serviceCode :
Specifies the service identifier. To find the service code value for an
Amazon Web Services service, use the ListServices operation.
Parameter maxResults :
Specifies the maximum number of results that you want included on each
page of the response. If you do not include this parameter, it defaults to
a value appropriate to the operation. If additional items exist beyond
those included in the current response, the NextToken
response element is present and has a value (is not null). Include that
value as the NextToken request parameter in the next call to
the operation to get the next part of the results.
Parameter nextToken :
Specifies a value for receiving additional results after you receive a
NextToken response in a previous request. A
NextToken response indicates that more output is available.
Set this parameter to the value of the previous call's
NextToken response to indicate where the output should
continue from.
Parameter quotaAppliedAtLevel :
Filters the response to return applied quota values for the
ACCOUNT, RESOURCE, or ALL levels.
ACCOUNT is the default.
Parameter quotaCode :
Specifies the quota identifier. To find the quota code for a specific
quota, use the ListServiceQuotas operation, and look for the
QuotaCode response in the output for the quota you want.
Implementation
Future<ListServiceQuotasResponse> listServiceQuotas({
required String serviceCode,
int? maxResults,
String? nextToken,
AppliedLevelEnum? quotaAppliedAtLevel,
String? quotaCode,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'ServiceQuotasV20190624.ListServiceQuotas'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ServiceCode': serviceCode,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (quotaAppliedAtLevel != null)
'QuotaAppliedAtLevel': quotaAppliedAtLevel.value,
if (quotaCode != null) 'QuotaCode': quotaCode,
},
);
return ListServiceQuotasResponse.fromJson(jsonResponse.body);
}