putConfigurationSetDeliveryOptions method

Future<void> putConfigurationSetDeliveryOptions({
  1. required String configurationSetName,
  2. String? sendingPoolName,
  3. TlsPolicy? tlsPolicy,
})

Associate a configuration set with a dedicated IP pool. You can use dedicated IP pools to create groups of dedicated IP addresses for sending specific types of email.

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

Parameter configurationSetName : The name of the configuration set that you want to associate with a dedicated IP pool.

Parameter sendingPoolName : The name of the dedicated IP pool that you want to associate with the configuration set.

Parameter tlsPolicy : Specifies whether messages that use the configuration set are required to use Transport Layer Security (TLS). If the value is Require, messages are only delivered if a TLS connection can be established. If the value is Optional, messages can be delivered in plain text if a TLS connection can't be established.

Implementation

Future<void> putConfigurationSetDeliveryOptions({
  required String configurationSetName,
  String? sendingPoolName,
  TlsPolicy? tlsPolicy,
}) async {
  ArgumentError.checkNotNull(configurationSetName, 'configurationSetName');
  final $payload = <String, dynamic>{
    if (sendingPoolName != null) 'SendingPoolName': sendingPoolName,
    if (tlsPolicy != null) 'TlsPolicy': tlsPolicy.toValue(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/v1/email/configuration-sets/${Uri.encodeComponent(configurationSetName)}/delivery-options',
    exceptionFnMap: _exceptionFns,
  );
}