CreateSNSUniversalSmsEndpoint

API Request

URLs
POST zstack/v1/sns/application-endpoints/universal-sms
Headers
Authorization: OAuth the-session-uuid
Body
{
  "params": {
    "smsAccessKeyId": "smsAccessKeyId",
    "smsAccessKeySecret": "smsAccessKeySecret",
    "supplier": "Emay",
    "name": "Universal Sms"
  },
  "systemTags": [],
  "userTags": []
}
Note: In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"smsAccessKeyId":"smsAccessKeyId","smsAccessKeySecret":"smsAccessKeySecret","supplier":"Emay","name":"Universal Sms"}}' http://localhost:8080/zstack/v1/sns/application-endpoints/universal-sms
Request Parameters
Name Type Location Description Valid Values Starting Version
smsAccessKeyId String body (contained in the params structure) 5.1.8
smsAccessKeySecret String body (contained in the params structure) 5.1.8
supplier String body (contained in the params structure) 5.1.8
additionParam Map body (contained in the params structure) Optional. 5.1.8
name String body (contained in the params structure) The resource name. 5.1.8
description String body (contained in the params structure) Optional. The resource description. 5.1.8
platformUuid String body (contained in the params structure) Optional 5.1.8
resourceUuid String body (contained in the params structure) Optional. The resource UUID. 5.1.8
tagUuids List body (contained in the params structure) Optional. The tag UUID. 5.1.8
systemTags List body Optional. The system tag. 5.1.8
userTags List body Optional. The user tag. 5.1.8

API Response

Sample Response
{
  "inventory": {
    "smsAccessKeyId": "smsAccessKeyId",
    "smsAccessKeySecret": "smsAccessKeySecret",
    "name": "example",
    "uuid": "917fe66f76b241f0843dfbd6be685fc1",
    "description": "description example",
    "type": "UniversalSms",
    "state": "Enabled",
    "platformUuid": "4eb0ceebf95b452585ebeacd647d9f35",
    "createDate": "Jun 13, 2024 5:28:34 PM",
    "lastOpDate": "Jun 13, 2024 5:28:34 PM",
    "connectionStatus": "UP"
  }
}
Name Type Description Starting Version
success boolean 5.1.8
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 5.1.8
inventory SNSUniversalSmsEndpointInventory See inventory. 5.1.8
#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. 5.1.8
description String The brief description of the error. 5.1.8
details String The details about the error. 5.1.8
elaboration String The reserved field. Default value: null. 5.1.8
opaque LinkedHashMap The reserved field. Default value: null. 5.1.8
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 5.1.8
#inventory
Name Type Description Starting Version
smsAccessKeyId String The access key ID. 5.1.8
smsAccessKeySecret String The access key secret. 5.1.8
supplier String The SMS service supplier. 5.1.8
name String The resource name. 5.1.8
uuid String The resource UUID. 5.1.8
description String The resource description. 5.1.8
state String 5.1.8
platformUuid String 5.1.8
createDate Timestamp The creation date. 5.1.8
lastOpDate Timestamp The last operation date. 5.1.8
platform SNSApplicationPlatformInventory See #platform. 5.1.8
#platform
Name Type Description Starting Version
uuid String The resource UUID. 5.1.8
name String The resource name. 5.1.8
description String The resource description. 5.1.8
type String The type. 5.1.8
createDate Timestamp The creation date. 5.1.8
lastOpDate Timestamp The last operation date. 5.1.8

SDK Sample

Java SDK
CreateSNSUniversalSmsEndpointAction action = new CreateSNSUniversalSmsEndpointAction();
action.smsAccessKeyId = "smsAccessKeyId";
action.smsAccessKeySecret = "smsAccessKeySecret";
action.supplier = "Emay";
action.name = "Universal Sms";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateSNSUniversalSmsEndpointAction.Result res = action.call();
Python SDK
CreateSNSUniversalSmsEndpointAction action = CreateSNSUniversalSmsEndpointAction()
action.smsAccessKeyId = "smsAccessKeyId"
action.smsAccessKeySecret = "smsAccessKeySecret"
action.supplier = "Emay"
action.name = "Universal Sms"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
CreateSNSUniversalSmsEndpointAction.Result res = action.call()
API Reference | 5.4.12 | ZStack Cloud · ZCF | ZStack Resource Center