1. Packages
  2. AWS
  3. API Docs
  4. sesv2
  5. getEmailIdentityMailFromAttributes
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.sesv2.getEmailIdentityMailFromAttributes

Explore with Pulumi AI

Data source 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 = aws.sesv2.getEmailIdentity({
    emailIdentity: "example.com",
});
const exampleGetEmailIdentityMailFromAttributes = example.then(example => aws.sesv2.getEmailIdentityMailFromAttributes({
    emailIdentity: example.emailIdentity,
}));
Copy
import pulumi
import pulumi_aws as aws

example = aws.sesv2.get_email_identity(email_identity="example.com")
example_get_email_identity_mail_from_attributes = aws.sesv2.get_email_identity_mail_from_attributes(email_identity=example.email_identity)
Copy
package main

import (
	"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.LookupEmailIdentity(ctx, &sesv2.LookupEmailIdentityArgs{
			EmailIdentity: "example.com",
		}, nil)
		if err != nil {
			return err
		}
		_, err = sesv2.LookupEmailIdentityMailFromAttributes(ctx, &sesv2.LookupEmailIdentityMailFromAttributesArgs{
			EmailIdentity: example.EmailIdentity,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

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

    var exampleGetEmailIdentityMailFromAttributes = Aws.SesV2.GetEmailIdentityMailFromAttributes.Invoke(new()
    {
        EmailIdentity = example.Apply(getEmailIdentityResult => getEmailIdentityResult.EmailIdentity),
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sesv2.Sesv2Functions;
import com.pulumi.aws.sesv2.inputs.GetEmailIdentityArgs;
import com.pulumi.aws.sesv2.inputs.GetEmailIdentityMailFromAttributesArgs;
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) {
        final var example = Sesv2Functions.getEmailIdentity(GetEmailIdentityArgs.builder()
            .emailIdentity("example.com")
            .build());

        final var exampleGetEmailIdentityMailFromAttributes = Sesv2Functions.getEmailIdentityMailFromAttributes(GetEmailIdentityMailFromAttributesArgs.builder()
            .emailIdentity(example.applyValue(getEmailIdentityResult -> getEmailIdentityResult.emailIdentity()))
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:sesv2:getEmailIdentity
      arguments:
        emailIdentity: example.com
  exampleGetEmailIdentityMailFromAttributes:
    fn::invoke:
      function: aws:sesv2:getEmailIdentityMailFromAttributes
      arguments:
        emailIdentity: ${example.emailIdentity}
Copy

Using getEmailIdentityMailFromAttributes

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getEmailIdentityMailFromAttributes(args: GetEmailIdentityMailFromAttributesArgs, opts?: InvokeOptions): Promise<GetEmailIdentityMailFromAttributesResult>
function getEmailIdentityMailFromAttributesOutput(args: GetEmailIdentityMailFromAttributesOutputArgs, opts?: InvokeOptions): Output<GetEmailIdentityMailFromAttributesResult>
Copy
def get_email_identity_mail_from_attributes(email_identity: Optional[str] = None,
                                            opts: Optional[InvokeOptions] = None) -> GetEmailIdentityMailFromAttributesResult
def get_email_identity_mail_from_attributes_output(email_identity: Optional[pulumi.Input[str]] = None,
                                            opts: Optional[InvokeOptions] = None) -> Output[GetEmailIdentityMailFromAttributesResult]
Copy
func LookupEmailIdentityMailFromAttributes(ctx *Context, args *LookupEmailIdentityMailFromAttributesArgs, opts ...InvokeOption) (*LookupEmailIdentityMailFromAttributesResult, error)
func LookupEmailIdentityMailFromAttributesOutput(ctx *Context, args *LookupEmailIdentityMailFromAttributesOutputArgs, opts ...InvokeOption) LookupEmailIdentityMailFromAttributesResultOutput
Copy

> Note: This function is named LookupEmailIdentityMailFromAttributes in the Go SDK.

public static class GetEmailIdentityMailFromAttributes 
{
    public static Task<GetEmailIdentityMailFromAttributesResult> InvokeAsync(GetEmailIdentityMailFromAttributesArgs args, InvokeOptions? opts = null)
    public static Output<GetEmailIdentityMailFromAttributesResult> Invoke(GetEmailIdentityMailFromAttributesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetEmailIdentityMailFromAttributesResult> getEmailIdentityMailFromAttributes(GetEmailIdentityMailFromAttributesArgs args, InvokeOptions options)
public static Output<GetEmailIdentityMailFromAttributesResult> getEmailIdentityMailFromAttributes(GetEmailIdentityMailFromAttributesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:sesv2/getEmailIdentityMailFromAttributes:getEmailIdentityMailFromAttributes
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

EmailIdentity This property is required. string
The name of the email identity.
EmailIdentity This property is required. string
The name of the email identity.
emailIdentity This property is required. String
The name of the email identity.
emailIdentity This property is required. string
The name of the email identity.
email_identity This property is required. str
The name of the email identity.
emailIdentity This property is required. String
The name of the email identity.

getEmailIdentityMailFromAttributes Result

The following output properties are available:

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
Id string
The provider-assigned unique ID for this managed resource.
MailFromDomain string
The custom MAIL FROM domain that you want the verified identity to use.
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
Id string
The provider-assigned unique ID for this managed resource.
MailFromDomain string
The custom MAIL FROM domain that you want the verified identity to use.
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
id String
The provider-assigned unique ID for this managed resource.
mailFromDomain String
The custom MAIL FROM domain that you want the verified identity to use.
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
id string
The provider-assigned unique ID for this managed resource.
mailFromDomain string
The custom MAIL FROM domain that you want the verified identity to use.
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
id str
The provider-assigned unique ID for this managed resource.
mail_from_domain str
The custom MAIL FROM domain that you want the verified identity to use.
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
id String
The provider-assigned unique ID for this managed resource.
mailFromDomain String
The custom MAIL FROM domain that you want the verified identity to use.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.