getServiceQuota method

Future<GetServiceQuotaResponse> getServiceQuota({
  1. required String quotaCode,
  2. required String serviceCode,
})

Retrieves the applied quota value for the specified quota. 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.

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

Parameter quotaCode : The quota identifier.

Parameter serviceCode : The service identifier.

Implementation

Future<GetServiceQuotaResponse> getServiceQuota({
  required String quotaCode,
  required String serviceCode,
}) 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,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'ServiceQuotasV20190624.GetServiceQuota'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'QuotaCode': quotaCode,
      'ServiceCode': serviceCode,
    },
  );

  return GetServiceQuotaResponse.fromJson(jsonResponse.body);
}