CreateEmailContact
Creates an email contact for the provided email address.
Request Syntax
POST /2022-09-19/emailcontacts HTTP/1.1
Content-type: application/json
{
"emailAddress": "string
",
"name": "string
",
"tags": {
"string
" : "string
"
}
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- emailAddress
-
The email address this email contact points to. The activation email and any subscribed emails are sent here.
Note
This email address can't receive emails until it's activated.
Type: String
Length Constraints: Minimum length of 6. Maximum length of 254.
Pattern:
(.+)@(.+)
Required: Yes
- name
-
The name of the email contact.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
.*[\w-.~]+.*
Required: Yes
-
A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
Type: String to string map
Map Entries: Minimum number of 0 items. Maximum number of 200 items.
Key Pattern:
(?!aws:).{1,128}
Value Length Constraints: Minimum length of 0. Maximum length of 256.
Required: No
Response Syntax
HTTP/1.1 201
Content-type: application/json
{
"arn": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 201 response.
The following data is returned in JSON format by the service.
- arn
-
The Amazon Resource Name (ARN) of the resource.
Type: String
Pattern:
arn:aws:notifications-contacts::[0-9]{12}:emailcontact/[a-z0-9]{27}
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
You do not have sufficient access to perform this action.
HTTP Status Code: 403
- ConflictException
-
Updating or deleting a resource can cause an inconsistent state.
HTTP Status Code: 409
- InternalServerException
-
Unexpected error during processing of request.
HTTP Status Code: 500
- ServiceQuotaExceededException
-
Request would cause a service quota to be exceeded.
HTTP Status Code: 402
- ThrottlingException
-
The request was denied due to request throttling.
HTTP Status Code: 429
- ValidationException
-
The input fails to satisfy the constraints specified by an AWS service.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: