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.id}`,
type: aws.route53.RecordType.TXT,
ttl: 600,
records: [example.verificationToken],
});
const exampleVerification = new aws.ses.DomainIdentityVerification("example_verification", {domain: example.id}, {
dependsOn: [exampleAmazonsesVerificationRecord],
});
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.id.apply(lambda id: f"_amazonses.{id}"),
type=aws.route53.RecordType.TXT,
ttl=600,
records=[example.verification_token])
example_verification = aws.ses.DomainIdentityVerification("example_verification", domain=example.id,
opts = pulumi.ResourceOptions(depends_on=[example_amazonses_verification_record]))
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.ID().ApplyT(func(id string) (string, error) {
return fmt.Sprintf("_amazonses.%v", id), 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.ID(),
}, pulumi.DependsOn([]pulumi.Resource{
exampleAmazonsesVerificationRecord,
}))
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.Ses.DomainIdentity("example", new()
{
Domain = "example.com",
});
var exampleAmazonsesVerificationRecord = new Aws.Route53.Record("example_amazonses_verification_record", new()
{
ZoneId = exampleAwsRoute53Zone.ZoneId,
Name = example.Id.Apply(id => $"_amazonses.{id}"),
Type = Aws.Route53.RecordType.TXT,
Ttl = 600,
Records = new[]
{
example.VerificationToken,
},
});
var exampleVerification = new Aws.Ses.DomainIdentityVerification("example_verification", new()
{
Domain = example.Id,
}, new CustomResourceOptions
{
DependsOn =
{
exampleAmazonsesVerificationRecord,
},
});
});
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.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());
}
}
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.id}
type: TXT
ttl: '600'
records:
- ${example.verificationToken}
exampleVerification:
type: aws:ses:DomainIdentityVerification
name: example_verification
properties:
domain: ${example.id}
options:
dependson:
- ${exampleAmazonsesVerificationRecord}
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 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var domainIdentityVerificationResource = new Aws.Ses.DomainIdentityVerification("domainIdentityVerificationResource", new()
{
Domain = "string",
});
example, err := ses.NewDomainIdentityVerification(ctx, "domainIdentityVerificationResource", &ses.DomainIdentityVerificationArgs{
Domain: pulumi.String("string"),
})
var domainIdentityVerificationResource = new DomainIdentityVerification("domainIdentityVerificationResource", DomainIdentityVerificationArgs.builder()
.domain("string")
.build());
domain_identity_verification_resource = aws.ses.DomainIdentityVerification("domainIdentityVerificationResource", domain="string")
const domainIdentityVerificationResource = new aws.ses.DomainIdentityVerification("domainIdentityVerificationResource", {domain: "string"});
type: aws:ses:DomainIdentityVerification
properties:
domain: string
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:
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)
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.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.