listRequestedServiceQuotaChangeHistory method

Future<ListRequestedServiceQuotaChangeHistoryResponse> listRequestedServiceQuotaChangeHistory({
  1. int? maxResults,
  2. String? nextToken,
  3. String? serviceCode,
  4. RequestStatus? status,
})

Retrieves the quota increase requests for the specified service.

May throw AccessDeniedException. May throw NoSuchResourceException. May throw IllegalArgumentException. May throw InvalidPaginationTokenException. May throw ServiceException. May throw TooManyRequestsException.

Parameter maxResults : The maximum number of results to return with a single call. To retrieve the remaining results, if any, make another call with the token returned from this call.

Parameter nextToken : The token for the next page of results.

Parameter serviceCode : The service identifier.

Parameter status : The status of the quota increase request.

Implementation

Future<ListRequestedServiceQuotaChangeHistoryResponse>
    listRequestedServiceQuotaChangeHistory({
  int? maxResults,
  String? nextToken,
  String? serviceCode,
  RequestStatus? status,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    2048,
  );
  _s.validateStringLength(
    'serviceCode',
    serviceCode,
    1,
    63,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'ServiceQuotasV20190624.ListRequestedServiceQuotaChangeHistory'
  };
  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 (serviceCode != null) 'ServiceCode': serviceCode,
      if (status != null) 'Status': status.toValue(),
    },
  );

  return ListRequestedServiceQuotaChangeHistoryResponse.fromJson(
      jsonResponse.body);
}