@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
150 lines (149 loc) • 6.66 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides an SES domain MAIL FROM resource.
*
* > **NOTE:** For the MAIL FROM domain to be fully usable, this resource should be paired with the aws.ses.DomainIdentity resource. To validate the MAIL FROM domain, a DNS MX record is required. To pass SPF checks, a DNS TXT record may also be required. See the [Amazon SES MAIL FROM documentation](https://docs.aws.amazon.com/ses/latest/dg/mail-from.html) for more information.
*
* ## Example Usage
*
* ### Domain Identity MAIL FROM
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* // Example SES Domain Identity
* const exampleDomainIdentity = new aws.ses.DomainIdentity("example", {domain: "example.com"});
* const example = new aws.ses.MailFrom("example", {
* domain: exampleDomainIdentity.domain,
* mailFromDomain: pulumi.interpolate`bounce.${exampleDomainIdentity.domain}`,
* });
* // Example Route53 MX record
* const exampleSesDomainMailFromMx = new aws.route53.Record("example_ses_domain_mail_from_mx", {
* zoneId: exampleAwsRoute53Zone.id,
* name: example.mailFromDomain,
* type: aws.route53.RecordType.MX,
* ttl: 600,
* records: ["10 feedback-smtp.us-east-1.amazonses.com"],
* });
* // Example Route53 TXT record for SPF
* const exampleSesDomainMailFromTxt = new aws.route53.Record("example_ses_domain_mail_from_txt", {
* zoneId: exampleAwsRoute53Zone.id,
* name: example.mailFromDomain,
* type: aws.route53.RecordType.TXT,
* ttl: 600,
* records: ["v=spf1 include:amazonses.com ~all"],
* });
* ```
*
* ### Email Identity MAIL FROM
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* // Example SES Email Identity
* const example = new aws.ses.EmailIdentity("example", {email: "user@example.com"});
* const exampleMailFrom = new aws.ses.MailFrom("example", {
* domain: example.email,
* mailFromDomain: "mail.example.com",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import MAIL FROM domain using the `domain` attribute. For example:
*
* ```sh
* $ pulumi import aws:ses/mailFrom:MailFrom example example.com
* ```
*/
export declare class MailFrom extends pulumi.CustomResource {
/**
* Get an existing MailFrom resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MailFromState, opts?: pulumi.CustomResourceOptions): MailFrom;
/**
* Returns true if the given object is an instance of MailFrom. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is MailFrom;
/**
* The action that you want Amazon SES to take if it cannot successfully read the required MX record when you send an email. Defaults to `UseDefaultValue`. See the [SES API documentation](https://docs.aws.amazon.com/ses/latest/APIReference/API_SetIdentityMailFromDomain.html) for more information.
*/
readonly behaviorOnMxFailure: pulumi.Output<string | undefined>;
/**
* Verified domain name or email identity to generate DKIM tokens for.
*/
readonly domain: pulumi.Output<string>;
/**
* Subdomain (of above domain) which is to be used as MAIL FROM address (Required for DMARC validation)
*
* The following arguments are optional:
*/
readonly mailFromDomain: pulumi.Output<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* Create a MailFrom resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: MailFromArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering MailFrom resources.
*/
export interface MailFromState {
/**
* The action that you want Amazon SES to take if it cannot successfully read the required MX record when you send an email. Defaults to `UseDefaultValue`. See the [SES API documentation](https://docs.aws.amazon.com/ses/latest/APIReference/API_SetIdentityMailFromDomain.html) for more information.
*/
behaviorOnMxFailure?: pulumi.Input<string>;
/**
* Verified domain name or email identity to generate DKIM tokens for.
*/
domain?: pulumi.Input<string>;
/**
* Subdomain (of above domain) which is to be used as MAIL FROM address (Required for DMARC validation)
*
* The following arguments are optional:
*/
mailFromDomain?: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a MailFrom resource.
*/
export interface MailFromArgs {
/**
* The action that you want Amazon SES to take if it cannot successfully read the required MX record when you send an email. Defaults to `UseDefaultValue`. See the [SES API documentation](https://docs.aws.amazon.com/ses/latest/APIReference/API_SetIdentityMailFromDomain.html) for more information.
*/
behaviorOnMxFailure?: pulumi.Input<string>;
/**
* Verified domain name or email identity to generate DKIM tokens for.
*/
domain: pulumi.Input<string>;
/**
* Subdomain (of above domain) which is to be used as MAIL FROM address (Required for DMARC validation)
*
* The following arguments are optional:
*/
mailFromDomain: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
}