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
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.sesv2.EmailIdentity("example", {emailIdentity: "example.com"});
const exampleEmailIdentityMailFromAttributes = new aws.sesv2.EmailIdentityMailFromAttributes("example", {
emailIdentity: example.emailIdentity,
behaviorOnMxFailure: "REJECT_MESSAGE",
mailFromDomain: pulumi.interpolate`subdomain.${example.emailIdentity}`,
});
import pulumi
import pulumi_aws as aws
example = aws.sesv2.EmailIdentity("example", email_identity="example.com")
example_email_identity_mail_from_attributes = aws.sesv2.EmailIdentityMailFromAttributes("example",
email_identity=example.email_identity,
behavior_on_mx_failure="REJECT_MESSAGE",
mail_from_domain=example.email_identity.apply(lambda email_identity: f"subdomain.{email_identity}"))
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sesv2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := sesv2.NewEmailIdentity(ctx, "example", &sesv2.EmailIdentityArgs{
EmailIdentity: pulumi.String("example.com"),
})
if err != nil {
return err
}
_, err = sesv2.NewEmailIdentityMailFromAttributes(ctx, "example", &sesv2.EmailIdentityMailFromAttributesArgs{
EmailIdentity: example.EmailIdentity,
BehaviorOnMxFailure: pulumi.String("REJECT_MESSAGE"),
MailFromDomain: example.EmailIdentity.ApplyT(func(emailIdentity string) (string, error) {
return fmt.Sprintf("subdomain.%v", emailIdentity), nil
}).(pulumi.StringOutput),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.SesV2.EmailIdentity("example", new()
{
EmailIdentityDetails = "example.com",
});
var exampleEmailIdentityMailFromAttributes = new Aws.SesV2.EmailIdentityMailFromAttributes("example", new()
{
EmailIdentity = example.EmailIdentityDetails,
BehaviorOnMxFailure = "REJECT_MESSAGE",
MailFromDomain = example.EmailIdentityDetails.Apply(emailIdentity => $"subdomain.{emailIdentity}"),
});
});
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 example = new EmailIdentity("example", EmailIdentityArgs.builder()
.emailIdentity("example.com")
.build());
var exampleEmailIdentityMailFromAttributes = new EmailIdentityMailFromAttributes("exampleEmailIdentityMailFromAttributes", EmailIdentityMailFromAttributesArgs.builder()
.emailIdentity(example.emailIdentity())
.behaviorOnMxFailure("REJECT_MESSAGE")
.mailFromDomain(example.emailIdentity().applyValue(emailIdentity -> String.format("subdomain.%s", emailIdentity)))
.build());
}
}
resources:
example:
type: aws:sesv2:EmailIdentity
properties:
emailIdentity: example.com
exampleEmailIdentityMailFromAttributes:
type: aws:sesv2:EmailIdentityMailFromAttributes
name: example
properties:
emailIdentity: ${example.emailIdentity}
behaviorOnMxFailure: REJECT_MESSAGE
mailFromDomain: subdomain.${example.emailIdentity}
Create EmailIdentityMailFromAttributes Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EmailIdentityMailFromAttributes(name: string, args: EmailIdentityMailFromAttributesArgs, opts?: CustomResourceOptions);
@overload
def EmailIdentityMailFromAttributes(resource_name: str,
args: EmailIdentityMailFromAttributesArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EmailIdentityMailFromAttributes(resource_name: str,
opts: Optional[ResourceOptions] = None,
email_identity: Optional[str] = None,
behavior_on_mx_failure: Optional[str] = None,
mail_from_domain: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var emailIdentityMailFromAttributesResource = new Aws.SesV2.EmailIdentityMailFromAttributes("emailIdentityMailFromAttributesResource", new()
{
EmailIdentity = "string",
BehaviorOnMxFailure = "string",
MailFromDomain = "string",
});
example, err := sesv2.NewEmailIdentityMailFromAttributes(ctx, "emailIdentityMailFromAttributesResource", &sesv2.EmailIdentityMailFromAttributesArgs{
EmailIdentity: pulumi.String("string"),
BehaviorOnMxFailure: pulumi.String("string"),
MailFromDomain: pulumi.String("string"),
})
var emailIdentityMailFromAttributesResource = new EmailIdentityMailFromAttributes("emailIdentityMailFromAttributesResource", EmailIdentityMailFromAttributesArgs.builder()
.emailIdentity("string")
.behaviorOnMxFailure("string")
.mailFromDomain("string")
.build());
email_identity_mail_from_attributes_resource = aws.sesv2.EmailIdentityMailFromAttributes("emailIdentityMailFromAttributesResource",
email_identity="string",
behavior_on_mx_failure="string",
mail_from_domain="string")
const emailIdentityMailFromAttributesResource = new aws.sesv2.EmailIdentityMailFromAttributes("emailIdentityMailFromAttributesResource", {
emailIdentity: "string",
behaviorOnMxFailure: "string",
mailFromDomain: "string",
});
type: aws:sesv2:EmailIdentityMailFromAttributes
properties:
behaviorOnMxFailure: string
emailIdentity: string
mailFromDomain: string
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
Using pulumi import
, import SESv2 (Simple Email V2) Email Identity Mail From Attributes using the email_identity
. For example:
$ pulumi import aws:sesv2/emailIdentityMailFromAttributes:EmailIdentityMailFromAttributes example example.com
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.