Identity Class
Identity.
| Source | aws-ses/lib/email-identity.ts |
|---|---|
| Type last changed |
Example
ts
import * as iam from 'aws-cdk-lib/aws-iam';
declare const user: iam.User;
const identity = new ses.EmailIdentity(this, 'Identity', {
identity: ses.Identity.domain('cdk.dev'),
});
identity.grantSendEmail(user);
python
import aws_cdk.aws_iam as iam
# user: iam.User
identity = ses.EmailIdentity(self, "Identity",
identity=ses.Identity.domain("cdk.dev")
)
identity.grant_send_email(user)
java
import software.amazon.awscdk.services.iam.*;
User user;
EmailIdentity identity = EmailIdentity.Builder.create(this, "Identity")
.identity(Identity.domain("cdk.dev"))
.build();
identity.grantSendEmail(user);
csharp
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK.AWS.IAM;
User user;
var identity = new EmailIdentity(this, "Identity", new EmailIdentityProps {
Identity = Identity.Domain("cdk.dev")
});
identity.GrantSendEmail(user);
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import iam "github.com/aws/aws-cdk-go/awscdk"
var user User
identity := ses.NewEmailIdentity(this, jsii.String("Identity"), &EmailIdentityProps{
Identity: ses.Identity_Domain(jsii.String("cdk.dev")),
})
identity.grantSendEmail(user)
Initializer
ts
new Identity()
python
Identity()
java
new Identity()
csharp
new Identity()
go
NewIdentity()
Properties
hostedZonemay be undefinedIPublicHostedZonehosted_zonemay be undefinedIPublicHostedZonehostedZonemay be undefinedIPublicHostedZoneHostedZonemay be undefinedIPublicHostedZoneHostedZonemay be undefinedIPublicHostedZone #The hosted zone associated with this identity.
Default: no hosted zone is associated and no records are created
The value of the identity.
Methods
domain(domain: string): Identity // chainable@staticmethod def domain(domain: str) -> Identitypublic static Identity domain(String domain)public static Identity Domain(string domain)func Domain(Domain *string) Identity static #Verify a domain name.
DKIM records will have to be added manually to complete the verification process
email(email: string): Identity // chainable@staticmethod def email(email: str) -> Identitypublic static Identity email(String email)public static Identity Email(string email)func Email(Email *string) Identity static #Verify an email address.
To complete the verification process look for an email from no-reply-aws@amazon.com, open it and click the link.
publicHostedZone(hostedZone: IPublicHostedZone): Identity // chainable@staticmethod def public_hosted_zone(hosted_zone: IPublicHostedZone) -> Identitypublic static Identity publicHostedZone(IPublicHostedZone hostedZone)public static Identity PublicHostedZone(IPublicHostedZone hostedZone)func PublicHostedZone(HostedZone IPublicHostedZone) Identity static #Verify a public hosted zone.
DKIM and MAIL FROM records will be added automatically to the hosted zone