listAWSDefaultServiceQuotas method

Future<ListAWSDefaultServiceQuotasResponse> listAWSDefaultServiceQuotas({
  1. required String serviceCode,
  2. int? maxResults,
  3. String? nextToken,
})

Lists the default values for the quotas for the specified Amazon Web Services service. A default value does not reflect any quota increases.

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.

Implementation

Future<ListAWSDefaultServiceQuotasResponse> listAWSDefaultServiceQuotas({
  required String serviceCode,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'ServiceQuotasV20190624.ListAWSDefaultServiceQuotas'
  };
  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,
    },
  );

  return ListAWSDefaultServiceQuotasResponse.fromJson(jsonResponse.body);
}