constructor()

in src/constructs/ses/index.ts [40:60]


  constructor(scope: GuStack, id: string, props: GuEmailIdentityProps) {
    const { app, domainName } = props;

    if (!validDomains.some((validDomain) => domainName.endsWith(validDomain))) {
      throw new Error(`Auto verification is only supported for certain domains. ${domainName} is not supported.`);
    }

    super(scope, id, {
      identity: Identity.domain(domainName),
      ...props,
    });

    this.dkimRecords.forEach(({ name, value }, index) => {
      new GuCname(scope, `EmailIdentityDkim-${app}-${index}`, {
        app,
        domainName: name,
        resourceRecord: value,
        ttl: Duration.hours(1),
      });
    });
  }