AddEmailAddressToSNSEmailEndpoint
API Request
URLs
POST zstack/v1/sns/application-endpoints/emails/email-addresses
Headers
Authorization: OAuth the-session-uuid
Body
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"emailAddress": "example@zstack.io",
"endpointUuid": "74220bbf0d8b3c6b943a294c2679ca69"
},
"systemTags": [],
"userTags": []
}

Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"emailAddress":"example@zstack.io","endpointUuid":"74220bbf0d8b3c6b943a294c2679ca69"}}' http://localhost:8080/zstack/v1/sns/application-endpoints/emails/email-addresses
Request Parameters
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
emailAddress | String | body (contained in the params structure) | The email address. | 3.7.0 | |
endpointUuid | String | body (contained in the params structure) | The endpoint UUID. | 3.7.0 | |
resourceUuid | String | body (contained in the params structure) | Optional. | 3.7.0 | |
tagUuids | List | body (contained in the params structure) | Optional. The tag UUID list. | 3.7.0 | |
systemTags | List | body | Optional. The system tags. | 3.7.0 | |
userTags | List | body | Optional. The user tags. | 3.7.0 |
API Response
Sample
Response
{
"inventory": {
"uuid": "f5682eb7abaa4bbe9bfd35b271138e9f",
"emailAddress": "example@zstack.io",
"endpointUuid": "a6bc3b6aa6b749db88a465530ea23f9e"
}
}
Name | Type | Description | Starting Version |
---|---|---|---|
error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 3.7.0 |
inventory | SNSEmailAddressInventory | See inventory. | 3.7.0 |
#error
Name | Type | Description | Starting Version |
---|---|---|---|
code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 3.7.0 |
description | String | The brief description of the error. | 3.7.0 |
details | String | The details about the error. | 3.7.0 |
elaboration | String | The reserved field. Default value: null. | 3.7.0 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 3.7.0 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 3.7.0 |
#inventory
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 3.7.0 |
emailAddress | String | 3.7.0 | |
endpointUuid | String | 3.7.0 |
SDK Sample
Java
SDK
AddEmailAddressToSNSEmailEndpointAction action = new AddEmailAddressToSNSEmailEndpointAction();
action.emailAddress = "example@zstack.io";
action.endpointUuid = "74220bbf0d8b3c6b943a294c2679ca69";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddEmailAddressToSNSEmailEndpointAction.Result res = action.call();
Python
SDK
AddEmailAddressToSNSEmailEndpointAction action = AddEmailAddressToSNSEmailEndpointAction()
action.emailAddress = "example@zstack.io"
action.endpointUuid = "74220bbf0d8b3c6b943a294c2679ca69"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddEmailAddressToSNSEmailEndpointAction.Result res = action.call()