CreateEmailIdentityPolicy - Amazon Simple Email Service

CreateEmailIdentityPolicy

Creates the specified sending authorization policy for the given identity (an email address or a domain).

Note

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.

Request Syntax

POST /v2/email/identities/EmailIdentity/policies/PolicyName HTTP/1.1 Content-type: application/json { "Policy": "string" }

URI Request Parameters

The request uses the following URI parameters.

EmailIdentity

The email identity.

Length Constraints: Minimum length of 1.

Required: Yes

PolicyName

The name of the policy.

The policy name cannot exceed 64 characters and can only include alphanumeric characters, dashes, and underscores.

Length Constraints: Minimum length of 1. Maximum length of 64.

Required: Yes

Request Body

The request accepts the following data in JSON format.

Policy

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.

Type: String

Length Constraints: Minimum length of 1.

Required: Yes

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors.

AlreadyExistsException

The resource specified in your request already exists.

HTTP Status Code: 400

BadRequestException

The input you provided is invalid.

HTTP Status Code: 400

LimitExceededException

There are too many instances of the specified resource type.

HTTP Status Code: 400

NotFoundException

The resource you attempted to access doesn't exist.

HTTP Status Code: 404

TooManyRequestsException

Too many requests have been made to the operation.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: