1. Packages
  2. AWS
  3. API Docs
  4. ses
  5. DomainIdentityVerification
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.ses.DomainIdentityVerification

Explore with Pulumi AI

Represents a successful verification of an SES domain identity.

Most commonly, this resource is used together with aws.route53.Record and aws.ses.DomainIdentity to request an SES domain identity, deploy the required DNS verification records, and wait for verification to complete.

WARNING: This resource implements a part of the verification workflow. It does not represent a real-world entity in AWS, therefore changing or deleting this resource on its own has no immediate effect.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.ses.DomainIdentity("example", {domain: "example.com"});
const exampleAmazonsesVerificationRecord = new aws.route53.Record("example_amazonses_verification_record", {
    zoneId: exampleAwsRoute53Zone.zoneId,
    name: pulumi.interpolate`_amazonses.${example.domain}`,
    type: aws.route53.RecordType.TXT,
    ttl: 600,
    records: [example.verificationToken],
});
const exampleVerification = new aws.ses.DomainIdentityVerification("example_verification", {domain: example.domain}, {
    dependsOn: [exampleAmazonsesVerificationRecord],
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.ses.DomainIdentity("example", domain="example.com")
example_amazonses_verification_record = aws.route53.Record("example_amazonses_verification_record",
    zone_id=example_aws_route53_zone["zoneId"],
    name=example.domain.apply(lambda domain: f"_amazonses.{domain}"),
    type=aws.route53.RecordType.TXT,
    ttl=600,
    records=[example.verification_token])
example_verification = aws.ses.DomainIdentityVerification("example_verification", domain=example.domain,
opts = pulumi.ResourceOptions(depends_on=[example_amazonses_verification_record]))
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ses"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := ses.NewDomainIdentity(ctx, "example", &ses.DomainIdentityArgs{
			Domain: pulumi.String("example.com"),
		})
		if err != nil {
			return err
		}
		exampleAmazonsesVerificationRecord, err := route53.NewRecord(ctx, "example_amazonses_verification_record", &route53.RecordArgs{
			ZoneId: pulumi.Any(exampleAwsRoute53Zone.ZoneId),
			Name: example.Domain.ApplyT(func(domain string) (string, error) {
				return fmt.Sprintf("_amazonses.%v", domain), nil
			}).(pulumi.StringOutput),
			Type: pulumi.String(route53.RecordTypeTXT),
			Ttl:  pulumi.Int(600),
			Records: pulumi.StringArray{
				example.VerificationToken,
			},
		})
		if err != nil {
			return err
		}
		_, err = ses.NewDomainIdentityVerification(ctx, "example_verification", &ses.DomainIdentityVerificationArgs{
			Domain: example.Domain,
		}, pulumi.DependsOn([]pulumi.Resource{
			exampleAmazonsesVerificationRecord,
		}))
		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 = new Aws.Ses.DomainIdentity("example", new()
    {
        Domain = "example.com",
    });

    var exampleAmazonsesVerificationRecord = new Aws.Route53.Record("example_amazonses_verification_record", new()
    {
        ZoneId = exampleAwsRoute53Zone.ZoneId,
        Name = example.Domain.Apply(domain => $"_amazonses.{domain}"),
        Type = Aws.Route53.RecordType.TXT,
        Ttl = 600,
        Records = new[]
        {
            example.VerificationToken,
        },
    });

    var exampleVerification = new Aws.Ses.DomainIdentityVerification("example_verification", new()
    {
        Domain = example.Domain,
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            exampleAmazonsesVerificationRecord,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ses.DomainIdentity;
import com.pulumi.aws.ses.DomainIdentityArgs;
import com.pulumi.aws.route53.Record;
import com.pulumi.aws.route53.RecordArgs;
import com.pulumi.aws.ses.DomainIdentityVerification;
import com.pulumi.aws.ses.DomainIdentityVerificationArgs;
import com.pulumi.resources.CustomResourceOptions;
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 DomainIdentity("example", DomainIdentityArgs.builder()
            .domain("example.com")
            .build());

        var exampleAmazonsesVerificationRecord = new Record("exampleAmazonsesVerificationRecord", RecordArgs.builder()
            .zoneId(exampleAwsRoute53Zone.zoneId())
            .name(example.domain().applyValue(_domain -> String.format("_amazonses.%s", _domain)))
            .type("TXT")
            .ttl(600)
            .records(example.verificationToken())
            .build());

        var exampleVerification = new DomainIdentityVerification("exampleVerification", DomainIdentityVerificationArgs.builder()
            .domain(example.domain())
            .build(), CustomResourceOptions.builder()
                .dependsOn(exampleAmazonsesVerificationRecord)
                .build());

    }
}
Copy
resources:
  example:
    type: aws:ses:DomainIdentity
    properties:
      domain: example.com
  exampleAmazonsesVerificationRecord:
    type: aws:route53:Record
    name: example_amazonses_verification_record
    properties:
      zoneId: ${exampleAwsRoute53Zone.zoneId}
      name: _amazonses.${example.domain}
      type: TXT
      ttl: '600'
      records:
        - ${example.verificationToken}
  exampleVerification:
    type: aws:ses:DomainIdentityVerification
    name: example_verification
    properties:
      domain: ${example.domain}
    options:
      dependsOn:
        - ${exampleAmazonsesVerificationRecord}
Copy

Create DomainIdentityVerification Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new DomainIdentityVerification(name: string, args: DomainIdentityVerificationArgs, opts?: CustomResourceOptions);
@overload
def DomainIdentityVerification(resource_name: str,
                               args: DomainIdentityVerificationArgs,
                               opts: Optional[ResourceOptions] = None)

@overload
def DomainIdentityVerification(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               domain: Optional[str] = None)
func NewDomainIdentityVerification(ctx *Context, name string, args DomainIdentityVerificationArgs, opts ...ResourceOption) (*DomainIdentityVerification, error)
public DomainIdentityVerification(string name, DomainIdentityVerificationArgs args, CustomResourceOptions? opts = null)
public DomainIdentityVerification(String name, DomainIdentityVerificationArgs args)
public DomainIdentityVerification(String name, DomainIdentityVerificationArgs args, CustomResourceOptions options)
type: aws:ses:DomainIdentityVerification
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DomainIdentityVerificationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DomainIdentityVerificationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DomainIdentityVerificationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DomainIdentityVerificationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DomainIdentityVerificationArgs
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 domainIdentityVerificationResource = new Aws.Ses.DomainIdentityVerification("domainIdentityVerificationResource", new()
{
    Domain = "string",
});
Copy
example, err := ses.NewDomainIdentityVerification(ctx, "domainIdentityVerificationResource", &ses.DomainIdentityVerificationArgs{
	Domain: pulumi.String("string"),
})
Copy
var domainIdentityVerificationResource = new DomainIdentityVerification("domainIdentityVerificationResource", DomainIdentityVerificationArgs.builder()
    .domain("string")
    .build());
Copy
domain_identity_verification_resource = aws.ses.DomainIdentityVerification("domainIdentityVerificationResource", domain="string")
Copy
const domainIdentityVerificationResource = new aws.ses.DomainIdentityVerification("domainIdentityVerificationResource", {domain: "string"});
Copy
type: aws:ses:DomainIdentityVerification
properties:
    domain: string
Copy

DomainIdentityVerification Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The DomainIdentityVerification resource accepts the following input properties:

Domain
This property is required.
Changes to this property will trigger replacement.
string
The domain name of the SES domain identity to verify.
Domain
This property is required.
Changes to this property will trigger replacement.
string
The domain name of the SES domain identity to verify.
domain
This property is required.
Changes to this property will trigger replacement.
String
The domain name of the SES domain identity to verify.
domain
This property is required.
Changes to this property will trigger replacement.
string
The domain name of the SES domain identity to verify.
domain
This property is required.
Changes to this property will trigger replacement.
str
The domain name of the SES domain identity to verify.
domain
This property is required.
Changes to this property will trigger replacement.
String
The domain name of the SES domain identity to verify.

Outputs

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

Arn string
The ARN of the domain identity.
Id string
The provider-assigned unique ID for this managed resource.
Arn string
The ARN of the domain identity.
Id string
The provider-assigned unique ID for this managed resource.
arn String
The ARN of the domain identity.
id String
The provider-assigned unique ID for this managed resource.
arn string
The ARN of the domain identity.
id string
The provider-assigned unique ID for this managed resource.
arn str
The ARN of the domain identity.
id str
The provider-assigned unique ID for this managed resource.
arn String
The ARN of the domain identity.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing DomainIdentityVerification Resource

Get an existing DomainIdentityVerification 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?: DomainIdentityVerificationState, opts?: CustomResourceOptions): DomainIdentityVerification
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        domain: Optional[str] = None) -> DomainIdentityVerification
func GetDomainIdentityVerification(ctx *Context, name string, id IDInput, state *DomainIdentityVerificationState, opts ...ResourceOption) (*DomainIdentityVerification, error)
public static DomainIdentityVerification Get(string name, Input<string> id, DomainIdentityVerificationState? state, CustomResourceOptions? opts = null)
public static DomainIdentityVerification get(String name, Output<String> id, DomainIdentityVerificationState state, CustomResourceOptions options)
resources:  _:    type: aws:ses:DomainIdentityVerification    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Arn string
The ARN of the domain identity.
Domain Changes to this property will trigger replacement. string
The domain name of the SES domain identity to verify.
Arn string
The ARN of the domain identity.
Domain Changes to this property will trigger replacement. string
The domain name of the SES domain identity to verify.
arn String
The ARN of the domain identity.
domain Changes to this property will trigger replacement. String
The domain name of the SES domain identity to verify.
arn string
The ARN of the domain identity.
domain Changes to this property will trigger replacement. string
The domain name of the SES domain identity to verify.
arn str
The ARN of the domain identity.
domain Changes to this property will trigger replacement. str
The domain name of the SES domain identity to verify.
arn String
The ARN of the domain identity.
domain Changes to this property will trigger replacement. String
The domain name of the SES domain identity to verify.

Package Details

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