CreateSNSAliyunSmsEndpoint
API Request
URLs
POST zstack/v1/sns/sms-endpoints/aliyunsms
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": {
"accessKeyUuid": "4eb00e2bf95bp5s505e6eccd647d9k35",
"receivers": [
"13555555555",
"18666666666"
],
"name": "AliyunSms",
"description": "This is an Aliyun SMS Endpoint"
},
"systemTags": [],
"userTags": []
}

Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"accessKeyUuid":"4eb00e2bf95bp5s505e6eccd647d9k35","receivers":["13555555555","18666666666"],"name":"AliyunSms","description":"This is an Aliyun SMS Endpoint"}}' http://localhost:8080/zstack/v1/sns/sms-endpoints/aliyunsms
Request Parameters
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
accessKeyUuid | String | body (contained in the params structure) | The UUID of the Aliyun access key. | 3.7.0 | |
receivers | List | body (contained in the params structure) | Optional. The SMS message receivers. | 3.7.0 | |
name | String | body (contained in the params structure) | The endpoint name. | 3.7.0 | |
description | String | body (contained in the params structure) | Optional. The detailed description of the endpoint. | 3.7.0 | |
platformUuid | String | body (contained in the params structure) | Optional. | 3.7.0 | |
resourceUuid | String | body (contained in the params structure) | Optional. | 3.7.0 | |
tagUuids | List | body (contained in the params structure) | 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": {
"name": "example",
"uuid": "041723a4d9d14e8686dbec7d1369c05e",
"description": "example SNSSmsEndpoint Description",
"type": "AliyunSms",
"state": "Enabled",
"platformUuid": "4eb0ceebf95b452585ebeacd647d9f35",
"createDate": "Oct 8, 2019 5:32:15 PM",
"lastOpDate": "Oct 8, 2019 5:32:15 PM"
}
}
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 | SNSSmsEndpointInventory | 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. | 0.6 |
description | String | The brief description of the error. | 0.6 |
details | String | The details about the error. | 0.6 |
elaboration | String | The reserved field. Default value: null. | 0.6 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 0.6 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 0.6 |
#inventory
Name | Type | Description | Starting Version |
---|---|---|---|
receivers | List | The SMS message receivers. | 3.7.0 |
name | String | The name of the SMS message endpoint. | 3.7.0 |
uuid | String | The UUID of the SMS message endpoint. | 3.7.0 |
description | String | The detailed description of the SMS message endpoint. | 3.7.0 |
type | String | The type of the SMS message endpoint. | 3.7.0 |
state | String | The state of the SMS message endpoint. | 3.7.0 |
platformUuid | String | 3.7.0 | |
createDate | Timestamp | The creation date. | 3.7.0 |
lastOpDate | Timestamp | The last operation date. | 3.7.0 |
SDK Sample
Java
SDK
CreateSNSAliyunSmsEndpointAction action = new CreateSNSAliyunSmsEndpointAction();
action.accessKeyUuid = "4eb00e2bf95bp5s505e6eccd647d9k35";
action.receivers = asList("13555555555","18666666666");
action.name = "AliyunSms";
action.description = "This is an Aliyun SMS Endpoint";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateSNSAliyunSmsEndpointAction.Result res = action.call();
Python
SDK
CreateSNSAliyunSmsEndpointAction action = CreateSNSAliyunSmsEndpointAction()
action.accessKeyUuid = "4eb00e2bf95bp5s505e6eccd647d9k35"
action.receivers = [13555555555, 18666666666]
action.name = "AliyunSms"
action.description = "This is an Aliyun SMS Endpoint"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
CreateSNSAliyunSmsEndpointAction.Result res = action.call()