putConfigurationSetTrackingOptions method

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

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

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

Parameter configurationSetName : The name of the configuration set that you want to add a custom tracking domain to.

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

Implementation

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