createConfigurationSet method

Future<void> createConfigurationSet({
  1. required String configurationSetName,
  2. DeliveryOptions? deliveryOptions,
  3. ReputationOptions? reputationOptions,
  4. SendingOptions? sendingOptions,
  5. List<Tag>? tags,
  6. TrackingOptions? trackingOptions,
})

Create a configuration set. Configuration sets are groups of rules that you can apply to the emails you send using Amazon Pinpoint. You apply a configuration set to an email by including a reference to the configuration set in the headers of the email. When you apply a configuration set to an email, all of the rules in that configuration set are applied to the email.

May throw AlreadyExistsException. May throw NotFoundException. May throw TooManyRequestsException. May throw LimitExceededException. May throw BadRequestException. May throw ConcurrentModificationException.

Parameter configurationSetName : The name of the configuration set.

Parameter deliveryOptions : An object that defines the dedicated IP pool that is used to send emails that you send using the configuration set.

Parameter reputationOptions : An object that defines whether or not Amazon Pinpoint collects reputation metrics for the emails that you send that use the configuration set.

Parameter sendingOptions : An object that defines whether or not Amazon Pinpoint can send email that you send using the configuration set.

Parameter tags : An array of objects that define the tags (keys and values) that you want to associate with the configuration set.

Parameter trackingOptions : An object that defines the open and click tracking options for emails that you send using the configuration set.

Implementation

Future<void> createConfigurationSet({
  required String configurationSetName,
  DeliveryOptions? deliveryOptions,
  ReputationOptions? reputationOptions,
  SendingOptions? sendingOptions,
  List<Tag>? tags,
  TrackingOptions? trackingOptions,
}) async {
  ArgumentError.checkNotNull(configurationSetName, 'configurationSetName');
  final $payload = <String, dynamic>{
    'ConfigurationSetName': configurationSetName,
    if (deliveryOptions != null) 'DeliveryOptions': deliveryOptions,
    if (reputationOptions != null) 'ReputationOptions': reputationOptions,
    if (sendingOptions != null) 'SendingOptions': sendingOptions,
    if (tags != null) 'Tags': tags,
    if (trackingOptions != null) 'TrackingOptions': trackingOptions,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v1/email/configuration-sets',
    exceptionFnMap: _exceptionFns,
  );
}