AWS Classic

v5.16.0 published on Saturday, Sep 24, 2022 by Pulumi

DomainIdentityVerification

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

using System.Collections.Generic;
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("exampleAmazonsesVerificationRecord", new()
    {
        ZoneId = aws_route53_zone.Example.Zone_id,
        Name = example.Id.Apply(id => $"_amazonses.{id}"),
        Type = "TXT",
        Ttl = 600,
        Records = new[]
        {
            example.VerificationToken,
        },
    });

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

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/route53"
	"github.com/pulumi/pulumi-aws/sdk/v5/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, "exampleAmazonsesVerificationRecord", &route53.RecordArgs{
			ZoneId: pulumi.Any(aws_route53_zone.Example.Zone_id),
			Name: example.ID().ApplyT(func(id string) (string, error) {
				return fmt.Sprintf("_amazonses.%v", id), nil
			}).(pulumi.StringOutput),
			Type: pulumi.String("TXT"),
			Ttl:  pulumi.Int(600),
			Records: pulumi.StringArray{
				example.VerificationToken,
			},
		})
		if err != nil {
			return err
		}
		_, err = ses.NewDomainIdentityVerification(ctx, "exampleVerification", &ses.DomainIdentityVerificationArgs{
			Domain: example.ID(),
		}, pulumi.DependsOn([]pulumi.Resource{
			exampleAmazonsesVerificationRecord,
		}))
		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.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(aws_route53_zone.example().zone_id())
            .name(example.id().applyValue(id -> String.format("_amazonses.%s", id)))
            .type("TXT")
            .ttl("600")
            .records(example.verificationToken())
            .build());

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

    }
}
import pulumi
import pulumi_aws as aws

example = aws.ses.DomainIdentity("example", domain="example.com")
example_amazonses_verification_record = aws.route53.Record("exampleAmazonsesVerificationRecord",
    zone_id=aws_route53_zone["example"]["zone_id"],
    name=example.id.apply(lambda id: f"_amazonses.{id}"),
    type="TXT",
    ttl=600,
    records=[example.verification_token])
example_verification = aws.ses.DomainIdentityVerification("exampleVerification", domain=example.id,
opts=pulumi.ResourceOptions(depends_on=[example_amazonses_verification_record]))
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("exampleAmazonsesVerificationRecord", {
    zoneId: aws_route53_zone.example.zone_id,
    name: pulumi.interpolate`_amazonses.${example.id}`,
    type: "TXT",
    ttl: 600,
    records: [example.verificationToken],
});
const exampleVerification = new aws.ses.DomainIdentityVerification("exampleVerification", {domain: example.id}, {
    dependsOn: [exampleAmazonsesVerificationRecord],
});
resources:
  example:
    type: aws:ses:DomainIdentity
    properties:
      domain: example.com
  exampleAmazonsesVerificationRecord:
    type: aws:route53:Record
    properties:
      zoneId: ${aws_route53_zone.example.zone_id}
      name: _amazonses.${example.id}
      type: TXT
      ttl: 600
      records:
        - ${example.verificationToken}
  exampleVerification:
    type: aws:ses:DomainIdentityVerification
    properties:
      domain: ${example.id}
    options:
      dependson:
        - ${exampleAmazonsesVerificationRecord}

Create a DomainIdentityVerification Resource

new DomainIdentityVerification(name: string, args: DomainIdentityVerificationArgs, opts?: CustomResourceOptions);
@overload
def DomainIdentityVerification(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               domain: Optional[str] = None)
@overload
def DomainIdentityVerification(resource_name: str,
                               args: DomainIdentityVerificationArgs,
                               opts: Optional[ResourceOptions] = 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.

name string
The unique name of the resource.
args DomainIdentityVerificationArgs
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 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 string
The unique name of the resource.
args DomainIdentityVerificationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DomainIdentityVerificationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DomainIdentityVerificationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

The DomainIdentityVerification resource accepts the following input properties:

Domain string

The domain name of the SES domain identity to verify.

Domain string

The domain name of the SES domain identity to verify.

domain String

The domain name of the SES domain identity to verify.

domain string

The domain name of the SES domain identity to verify.

domain str

The domain name of the SES domain identity to verify.

domain 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 an 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)
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:
Arn string

The ARN of the domain identity.

Domain string

The domain name of the SES domain identity to verify.

Arn string

The ARN of the domain identity.

Domain string

The domain name of the SES domain identity to verify.

arn String

The ARN of the domain identity.

domain String

The domain name of the SES domain identity to verify.

arn string

The ARN of the domain identity.

domain string

The domain name of the SES domain identity to verify.

arn str

The ARN of the domain identity.

domain str

The domain name of the SES domain identity to verify.

arn String

The ARN of the domain identity.

domain String

The domain name of the SES domain identity to verify.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.