getProtectConfigurationCountryRuleSet method

Future<GetProtectConfigurationCountryRuleSetResult> getProtectConfigurationCountryRuleSet({
  1. required NumberCapability numberCapability,
  2. required String protectConfigurationId,
})

Retrieve the CountryRuleSet for the specified NumberCapability from a protect configuration.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter numberCapability : The capability type to return the CountryRuleSet for. Valid values are SMS, VOICE, or MMS.

Parameter protectConfigurationId : The unique identifier for the protect configuration.

Implementation

Future<GetProtectConfigurationCountryRuleSetResult>
    getProtectConfigurationCountryRuleSet({
  required NumberCapability numberCapability,
  required String protectConfigurationId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'PinpointSMSVoiceV2.GetProtectConfigurationCountryRuleSet'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'NumberCapability': numberCapability.value,
      'ProtectConfigurationId': protectConfigurationId,
    },
  );

  return GetProtectConfigurationCountryRuleSetResult.fromJson(
      jsonResponse.body);
}