constructor()

in cdk/lib/email-mvt-pixel-certificate.ts [12:34]


	constructor(scope: App, id: string, props: EmailMVTPixelCertificateProps) {
		super(scope, id, props);

		const hostedZoneParameter = new GuStringParameter(this, 'Hosted Zone ID', {
			description: 'Hosted Zone ID to register automatic validation',
		});

		const hostedZoneName = new GuStringParameter(this, 'Hosted Zone Name', {
			description: 'Hosted Zone Name to register automatic validation',
		});

		const domainNamePrefix = `email${
			props.stage === 'PROD' ? '' : `-${props.stage.toLowerCase()}`
		}`;

		const domainName = `${domainNamePrefix}.${hostedZoneName.valueAsString}`;

		new GuCertificate(this, {
			app: props.app,
			domainName: domainName,
			hostedZoneId: hostedZoneParameter.valueAsString,
		});
	}