listRequestedServiceQuotaChangeHistoryByQuota method

Future<ListRequestedServiceQuotaChangeHistoryByQuotaResponse> listRequestedServiceQuotaChangeHistoryByQuota({
  1. required String quotaCode,
  2. required String serviceCode,
  3. int? maxResults,
  4. String? nextToken,
  5. RequestStatus? status,
})

Retrieves the quota increase requests for the specified quota.

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

Parameter quotaCode : The quota identifier.

Parameter serviceCode : The service identifier.

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 status : The status value of the quota increase request.

Implementation

Future<ListRequestedServiceQuotaChangeHistoryByQuotaResponse>
    listRequestedServiceQuotaChangeHistoryByQuota({
  required String quotaCode,
  required String serviceCode,
  int? maxResults,
  String? nextToken,
  RequestStatus? status,
}) async {
  ArgumentError.checkNotNull(quotaCode, 'quotaCode');
  _s.validateStringLength(
    'quotaCode',
    quotaCode,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(serviceCode, 'serviceCode');
  _s.validateStringLength(
    'serviceCode',
    serviceCode,
    1,
    63,
    isRequired: true,
  );
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    2048,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'ServiceQuotasV20190624.ListRequestedServiceQuotaChangeHistoryByQuota'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'QuotaCode': quotaCode,
      'ServiceCode': serviceCode,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (status != null) 'Status': status.toValue(),
    },
  );

  return ListRequestedServiceQuotaChangeHistoryByQuotaResponse.fromJson(
      jsonResponse.body);
}