AWS Classic v5.41.0, May 15 23
AWS Classic v5.41.0, May 15 23
aws.sesv2.EmailIdentityMailFromAttributes
Explore with Pulumi AI
Resource for managing an AWS SESv2 (Simple Email V2) Email Identity Mail From Attributes.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
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:
- Email
Identity string The verified email identity.
- Behavior
On stringMx Failure 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 stringDomain The custom MAIL FROM domain that you want the verified identity to use. Required if
behavior_on_mx_failure
isREJECT_MESSAGE
.
- Email
Identity string The verified email identity.
- Behavior
On stringMx Failure 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 stringDomain The custom MAIL FROM domain that you want the verified identity to use. Required if
behavior_on_mx_failure
isREJECT_MESSAGE
.
- email
Identity String The verified email identity.
- behavior
On StringMx Failure 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 StringDomain The custom MAIL FROM domain that you want the verified identity to use. Required if
behavior_on_mx_failure
isREJECT_MESSAGE
.
- email
Identity string The verified email identity.
- behavior
On stringMx Failure 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 stringDomain The custom MAIL FROM domain that you want the verified identity to use. Required if
behavior_on_mx_failure
isREJECT_MESSAGE
.
- email_
identity str The verified email identity.
- behavior_
on_ strmx_ failure 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_ strdomain The custom MAIL FROM domain that you want the verified identity to use. Required if
behavior_on_mx_failure
isREJECT_MESSAGE
.
- email
Identity String The verified email identity.
- behavior
On StringMx Failure 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 StringDomain The custom MAIL FROM domain that you want the verified identity to use. Required if
behavior_on_mx_failure
isREJECT_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.
- Behavior
On stringMx Failure 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 string The verified email identity.
- Mail
From stringDomain The custom MAIL FROM domain that you want the verified identity to use. Required if
behavior_on_mx_failure
isREJECT_MESSAGE
.
- Behavior
On stringMx Failure 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 string The verified email identity.
- Mail
From stringDomain The custom MAIL FROM domain that you want the verified identity to use. Required if
behavior_on_mx_failure
isREJECT_MESSAGE
.
- behavior
On StringMx Failure 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 String The verified email identity.
- mail
From StringDomain The custom MAIL FROM domain that you want the verified identity to use. Required if
behavior_on_mx_failure
isREJECT_MESSAGE
.
- behavior
On stringMx Failure 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 string The verified email identity.
- mail
From stringDomain The custom MAIL FROM domain that you want the verified identity to use. Required if
behavior_on_mx_failure
isREJECT_MESSAGE
.
- behavior_
on_ strmx_ failure 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_ strdomain The custom MAIL FROM domain that you want the verified identity to use. Required if
behavior_on_mx_failure
isREJECT_MESSAGE
.
- behavior
On StringMx Failure 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 String The verified email identity.
- mail
From StringDomain The custom MAIL FROM domain that you want the verified identity to use. Required if
behavior_on_mx_failure
isREJECT_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.