- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
UpdateEmailIdentityPolicyCommand
Updates the specified sending authorization policy for the given identity (an email address or a domain). This API returns successfully even if a policy with the specified name does not exist.
This API is for the identity owner only. If you have not verified the identity, this API will return an error.
Sending authorization is a feature that enables an identity owner to authorize other senders to use its identities. For information about using sending authorization, see the Amazon SES Developer Guide .
You can execute this operation no more than once per second.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { SESv2Client, UpdateEmailIdentityPolicyCommand } from "@aws-sdk/client-sesv2"; // ES Modules import
// const { SESv2Client, UpdateEmailIdentityPolicyCommand } = require("@aws-sdk/client-sesv2"); // CommonJS import
const client = new SESv2Client(config);
const input = { // UpdateEmailIdentityPolicyRequest
EmailIdentity: "STRING_VALUE", // required
PolicyName: "STRING_VALUE", // required
Policy: "STRING_VALUE", // required
};
const command = new UpdateEmailIdentityPolicyCommand(input);
const response = await client.send(command);
// {};
UpdateEmailIdentityPolicyCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
EmailIdentity Required | string | undefined | The email identity. |
Policy Required | string | undefined | The text of the policy in JSON format. The policy cannot exceed 4 KB. For information about the syntax of sending authorization policies, see the Amazon SES Developer Guide . |
PolicyName Required | string | undefined | The name of the policy. The policy name cannot exceed 64 characters and can only include alphanumeric characters, dashes, and underscores. |
UpdateEmailIdentityPolicyCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
BadRequestException | client | The input you provided is invalid. |
NotFoundException | client | The resource you attempted to access doesn't exist. |
TooManyRequestsException | client | Too many requests have been made to the operation. |
SESv2ServiceException | Base exception class for all service exceptions from SESv2 service. |