putConfigurationSetTrackingOptions method

Future<void> putConfigurationSetTrackingOptions({
  1. required String configurationSetName,
  2. String? customRedirectDomain,
  3. HttpsPolicy? httpsPolicy,
})

Specify a custom domain to use for open and click tracking elements in email that you send.

May throw BadRequestException. May throw NotFoundException. May throw TooManyRequestsException.

Parameter configurationSetName : The name of the configuration set.

Parameter customRedirectDomain : The domain to use to track open and click events.

Implementation

Future<void> putConfigurationSetTrackingOptions({
  required String configurationSetName,
  String? customRedirectDomain,
  HttpsPolicy? httpsPolicy,
}) async {
  final $payload = <String, dynamic>{
    if (customRedirectDomain != null)
      'CustomRedirectDomain': customRedirectDomain,
    if (httpsPolicy != null) 'HttpsPolicy': httpsPolicy.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/v2/email/configuration-sets/${Uri.encodeComponent(configurationSetName)}/tracking-options',
    exceptionFnMap: _exceptionFns,
  );
}