aws logo
AWS Classic v5.28.0, Jan 23 23

aws.sesv2.EmailIdentityMailFromAttributes

Resource for managing an AWS SESv2 (Simple Email V2) Email Identity Mail From Attributes.

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var exampleEmailIdentity = new Aws.SesV2.EmailIdentity("exampleEmailIdentity", new()
    {
        EmailIdentityDetails = "example.com",
    });

    var exampleEmailIdentityMailFromAttributes = new Aws.SesV2.EmailIdentityMailFromAttributes("exampleEmailIdentityMailFromAttributes", new()
    {
        EmailIdentity = exampleEmailIdentity.EmailIdentityDetails,
        BehaviorOnMxFailure = "REJECT_MESSAGE",
        MailFromDomain = exampleEmailIdentity.EmailIdentityDetails.Apply(emailIdentity => $"subdomain.{emailIdentity}"),
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sesv2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleEmailIdentity, err := sesv2.NewEmailIdentity(ctx, "exampleEmailIdentity", &sesv2.EmailIdentityArgs{
			EmailIdentity: pulumi.String("example.com"),
		})
		if err != nil {
			return err
		}
		_, err = sesv2.NewEmailIdentityMailFromAttributes(ctx, "exampleEmailIdentityMailFromAttributes", &sesv2.EmailIdentityMailFromAttributesArgs{
			EmailIdentity:       exampleEmailIdentity.EmailIdentity,
			BehaviorOnMxFailure: pulumi.String("REJECT_MESSAGE"),
			MailFromDomain: exampleEmailIdentity.EmailIdentity.ApplyT(func(emailIdentity string) (string, error) {
				return fmt.Sprintf("subdomain.%v", emailIdentity), nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sesv2.EmailIdentity;
import com.pulumi.aws.sesv2.EmailIdentityArgs;
import com.pulumi.aws.sesv2.EmailIdentityMailFromAttributes;
import com.pulumi.aws.sesv2.EmailIdentityMailFromAttributesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var exampleEmailIdentity = new EmailIdentity("exampleEmailIdentity", EmailIdentityArgs.builder()        
            .emailIdentity("example.com")
            .build());

        var exampleEmailIdentityMailFromAttributes = new EmailIdentityMailFromAttributes("exampleEmailIdentityMailFromAttributes", EmailIdentityMailFromAttributesArgs.builder()        
            .emailIdentity(exampleEmailIdentity.emailIdentity())
            .behaviorOnMxFailure("REJECT_MESSAGE")
            .mailFromDomain(exampleEmailIdentity.emailIdentity().applyValue(emailIdentity -> String.format("subdomain.%s", emailIdentity)))
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example_email_identity = aws.sesv2.EmailIdentity("exampleEmailIdentity", email_identity="example.com")
example_email_identity_mail_from_attributes = aws.sesv2.EmailIdentityMailFromAttributes("exampleEmailIdentityMailFromAttributes",
    email_identity=example_email_identity.email_identity,
    behavior_on_mx_failure="REJECT_MESSAGE",
    mail_from_domain=example_email_identity.email_identity.apply(lambda email_identity: f"subdomain.{email_identity}"))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleEmailIdentity = new aws.sesv2.EmailIdentity("exampleEmailIdentity", {emailIdentity: "example.com"});
const exampleEmailIdentityMailFromAttributes = new aws.sesv2.EmailIdentityMailFromAttributes("exampleEmailIdentityMailFromAttributes", {
    emailIdentity: exampleEmailIdentity.emailIdentity,
    behaviorOnMxFailure: "REJECT_MESSAGE",
    mailFromDomain: pulumi.interpolate`subdomain.${exampleEmailIdentity.emailIdentity}`,
});
resources:
  exampleEmailIdentity:
    type: aws:sesv2:EmailIdentity
    properties:
      emailIdentity: example.com
  exampleEmailIdentityMailFromAttributes:
    type: aws:sesv2:EmailIdentityMailFromAttributes
    properties:
      emailIdentity: ${exampleEmailIdentity.emailIdentity}
      behaviorOnMxFailure: REJECT_MESSAGE
      mailFromDomain: subdomain.${exampleEmailIdentity.emailIdentity}

Create EmailIdentityMailFromAttributes Resource

new EmailIdentityMailFromAttributes(name: string, args: EmailIdentityMailFromAttributesArgs, opts?: CustomResourceOptions);
@overload
def EmailIdentityMailFromAttributes(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    behavior_on_mx_failure: Optional[str] = None,
                                    email_identity: Optional[str] = None,
                                    mail_from_domain: Optional[str] = None)
@overload
def EmailIdentityMailFromAttributes(resource_name: str,
                                    args: EmailIdentityMailFromAttributesArgs,
                                    opts: Optional[ResourceOptions] = None)
func NewEmailIdentityMailFromAttributes(ctx *Context, name string, args EmailIdentityMailFromAttributesArgs, opts ...ResourceOption) (*EmailIdentityMailFromAttributes, error)
public EmailIdentityMailFromAttributes(string name, EmailIdentityMailFromAttributesArgs args, CustomResourceOptions? opts = null)
public EmailIdentityMailFromAttributes(String name, EmailIdentityMailFromAttributesArgs args)
public EmailIdentityMailFromAttributes(String name, EmailIdentityMailFromAttributesArgs args, CustomResourceOptions options)
type: aws:sesv2:EmailIdentityMailFromAttributes
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args EmailIdentityMailFromAttributesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args EmailIdentityMailFromAttributesArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args EmailIdentityMailFromAttributesArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args EmailIdentityMailFromAttributesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args EmailIdentityMailFromAttributesArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

EmailIdentityMailFromAttributes Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The EmailIdentityMailFromAttributes resource accepts the following input properties:

EmailIdentity string

The verified email identity.

BehaviorOnMxFailure string

The action to take if the required MX record isn't found when you send an email. Valid values: USE_DEFAULT_VALUE, REJECT_MESSAGE.

MailFromDomain string

The custom MAIL FROM domain that you want the verified identity to use. Required if behavior_on_mx_failure is REJECT_MESSAGE.

EmailIdentity string

The verified email identity.

BehaviorOnMxFailure string

The action to take if the required MX record isn't found when you send an email. Valid values: USE_DEFAULT_VALUE, REJECT_MESSAGE.

MailFromDomain string

The custom MAIL FROM domain that you want the verified identity to use. Required if behavior_on_mx_failure is REJECT_MESSAGE.

emailIdentity String

The verified email identity.

behaviorOnMxFailure String

The action to take if the required MX record isn't found when you send an email. Valid values: USE_DEFAULT_VALUE, REJECT_MESSAGE.

mailFromDomain String

The custom MAIL FROM domain that you want the verified identity to use. Required if behavior_on_mx_failure is REJECT_MESSAGE.

emailIdentity string

The verified email identity.

behaviorOnMxFailure string

The action to take if the required MX record isn't found when you send an email. Valid values: USE_DEFAULT_VALUE, REJECT_MESSAGE.

mailFromDomain string

The custom MAIL FROM domain that you want the verified identity to use. Required if behavior_on_mx_failure is REJECT_MESSAGE.

email_identity str

The verified email identity.

behavior_on_mx_failure str

The action to take if the required MX record isn't found when you send an email. Valid values: USE_DEFAULT_VALUE, REJECT_MESSAGE.

mail_from_domain str

The custom MAIL FROM domain that you want the verified identity to use. Required if behavior_on_mx_failure is REJECT_MESSAGE.

emailIdentity String

The verified email identity.

behaviorOnMxFailure String

The action to take if the required MX record isn't found when you send an email. Valid values: USE_DEFAULT_VALUE, REJECT_MESSAGE.

mailFromDomain String

The custom MAIL FROM domain that you want the verified identity to use. Required if behavior_on_mx_failure is REJECT_MESSAGE.

Outputs

All input properties are implicitly available as output properties. Additionally, the EmailIdentityMailFromAttributes resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing EmailIdentityMailFromAttributes Resource

Get an existing EmailIdentityMailFromAttributes resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: EmailIdentityMailFromAttributesState, opts?: CustomResourceOptions): EmailIdentityMailFromAttributes
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        behavior_on_mx_failure: Optional[str] = None,
        email_identity: Optional[str] = None,
        mail_from_domain: Optional[str] = None) -> EmailIdentityMailFromAttributes
func GetEmailIdentityMailFromAttributes(ctx *Context, name string, id IDInput, state *EmailIdentityMailFromAttributesState, opts ...ResourceOption) (*EmailIdentityMailFromAttributes, error)
public static EmailIdentityMailFromAttributes Get(string name, Input<string> id, EmailIdentityMailFromAttributesState? state, CustomResourceOptions? opts = null)
public static EmailIdentityMailFromAttributes get(String name, Output<String> id, EmailIdentityMailFromAttributesState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
BehaviorOnMxFailure string

The action to take if the required MX record isn't found when you send an email. Valid values: USE_DEFAULT_VALUE, REJECT_MESSAGE.

EmailIdentity string

The verified email identity.

MailFromDomain string

The custom MAIL FROM domain that you want the verified identity to use. Required if behavior_on_mx_failure is REJECT_MESSAGE.

BehaviorOnMxFailure string

The action to take if the required MX record isn't found when you send an email. Valid values: USE_DEFAULT_VALUE, REJECT_MESSAGE.

EmailIdentity string

The verified email identity.

MailFromDomain string

The custom MAIL FROM domain that you want the verified identity to use. Required if behavior_on_mx_failure is REJECT_MESSAGE.

behaviorOnMxFailure String

The action to take if the required MX record isn't found when you send an email. Valid values: USE_DEFAULT_VALUE, REJECT_MESSAGE.

emailIdentity String

The verified email identity.

mailFromDomain String

The custom MAIL FROM domain that you want the verified identity to use. Required if behavior_on_mx_failure is REJECT_MESSAGE.

behaviorOnMxFailure string

The action to take if the required MX record isn't found when you send an email. Valid values: USE_DEFAULT_VALUE, REJECT_MESSAGE.

emailIdentity string

The verified email identity.

mailFromDomain string

The custom MAIL FROM domain that you want the verified identity to use. Required if behavior_on_mx_failure is REJECT_MESSAGE.

behavior_on_mx_failure str

The action to take if the required MX record isn't found when you send an email. Valid values: USE_DEFAULT_VALUE, REJECT_MESSAGE.

email_identity str

The verified email identity.

mail_from_domain str

The custom MAIL FROM domain that you want the verified identity to use. Required if behavior_on_mx_failure is REJECT_MESSAGE.

behaviorOnMxFailure String

The action to take if the required MX record isn't found when you send an email. Valid values: USE_DEFAULT_VALUE, REJECT_MESSAGE.

emailIdentity String

The verified email identity.

mailFromDomain String

The custom MAIL FROM domain that you want the verified identity to use. Required if behavior_on_mx_failure is REJECT_MESSAGE.

Import

SESv2 (Simple Email V2) Email Identity Mail From Attributes can be imported using the email_identity, e.g.,

 $ pulumi import aws:sesv2/emailIdentityMailFromAttributes:EmailIdentityMailFromAttributes example example.com

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.