putAccountDetails method

Future<void> putAccountDetails({
  1. required MailType mailType,
  2. required String useCaseDescription,
  3. required String websiteURL,
  4. List<String>? additionalContactEmailAddresses,
  5. ContactLanguage? contactLanguage,
  6. bool? productionAccessEnabled,
})

Update your Amazon SES account details.

May throw TooManyRequestsException. May throw BadRequestException. May throw ConflictException.

Parameter mailType : The type of email your account will send.

Parameter useCaseDescription : A description of the types of email that you plan to send.

Parameter websiteURL : The URL of your website. This information helps us better understand the type of content that you plan to send.

Parameter additionalContactEmailAddresses : Additional email addresses that you would like to be notified regarding Amazon SES matters.

Parameter contactLanguage : The language you would prefer to be contacted with.

Parameter productionAccessEnabled : Indicates whether or not your account should have production access in the current AWS Region.

If the value is false, then your account is in the sandbox. When your account is in the sandbox, you can only send email to verified identities. Additionally, the maximum number of emails you can send in a 24-hour period (your sending quota) is 200, and the maximum number of emails you can send per second (your maximum sending rate) is 1.

If the value is true, then your account has production access. When your account has production access, you can send email to any address. The sending quota and maximum sending rate for your account vary based on your specific use case.

Implementation

Future<void> putAccountDetails({
  required MailType mailType,
  required String useCaseDescription,
  required String websiteURL,
  List<String>? additionalContactEmailAddresses,
  ContactLanguage? contactLanguage,
  bool? productionAccessEnabled,
}) async {
  ArgumentError.checkNotNull(mailType, 'mailType');
  ArgumentError.checkNotNull(useCaseDescription, 'useCaseDescription');
  _s.validateStringLength(
    'useCaseDescription',
    useCaseDescription,
    1,
    5000,
    isRequired: true,
  );
  ArgumentError.checkNotNull(websiteURL, 'websiteURL');
  _s.validateStringLength(
    'websiteURL',
    websiteURL,
    1,
    1000,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'MailType': mailType.toValue(),
    'UseCaseDescription': useCaseDescription,
    'WebsiteURL': websiteURL,
    if (additionalContactEmailAddresses != null)
      'AdditionalContactEmailAddresses': additionalContactEmailAddresses,
    if (contactLanguage != null) 'ContactLanguage': contactLanguage.toValue(),
    if (productionAccessEnabled != null)
      'ProductionAccessEnabled': productionAccessEnabled,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v2/email/account/details',
    exceptionFnMap: _exceptionFns,
  );
}