Document navigation

CreateSNSSmsPluginEndpoint

API Request

URLs
POST zstack/v1/sns/application-endpoints/plugin/sms
Headers
Authorization: OAuth the-session-uuid
Body
{
  "params": {
    "receivers": [
      "+86-18612345678"
    ],
    "timeoutInSeconds": 30,
    "name": "SMS plugin endpoint",
    "platformUuid": "8d7ef42fe7873d88a59c383b16c96bc3"
  },
  "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":{"receivers":["+86-18612345678"],"timeoutInSeconds":30,"name":"SMS plugin endpoint","platformUuid":"8d7ef42fe7873d88a59c383b16c96bc3"}}' \
http://localhost:8080/zstack/v1/sns/application-endpoints/plugin/sms
Request Parameters
Name Type Location Description Optional Value Starting Version
name String body (contained in the params structure) The notification endpoint name. 5.5.38
description String body (contained in the params structure) Optional. The notification endpoint description. 5.5.38
platformUuid String body (contained in the params structure) The platform must exist, be enabled, and be owned by or shared with the current account. The associated driver must be an SMS driver and support SEND_SNS_MESSAGE. 5.5.38
timeoutInSeconds long body (contained in the params structure) The sending timeout. 5.5.38
properties Map body (contained in the params structure) Optional. The notification endpoint configuration. 5.5.38
receivers List body (contained in the params structure) The SMS receiver phone numbers. Specify one to 200 unique phone numbers. 5.5.38
type String body (contained in the params structure) Optional. The SMS driver is determined by the platform associated with platformUuid. 5.5.38
resourceUuid String body (contained in the params structure) Optional. The resource UUID. 5.5.38
tagUuids List body (contained in the params structure) Optional. The tag UUID list. 5.5.38
systemTags List body Optional. The system tags. 5.5.38
userTags List body Optional. The user tags. 5.5.38

API Response

Sample Response
{
  "inventory": {
    "uuid": "9ba1ed979c7c4774b30292bc683141b6",
    "name": "SMS plugin endpoint",
    "type": "Plugin",
    "state": "Enabled",
    "pluginDriverUuid": "b8fbed0254193eae88617f83930e0ca8",
    "properties": {},
    "platformUuid": "8d7ef42fe7873d88a59c383b16c96bc3",
    "timeoutInSeconds": 30
  }
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 2.3
inventory SNSPluginEndpointInventory See inventory. 2.3
#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.3.20
description String The brief description of the error. 5.3.20
details String The details about the error. 5.3.20
elaboration String The reserved field. Default value: null. 5.3.20
opaque LinkedHashMap The reserved field. Default value: null. 5.3.20
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.3.20
#inventory
Name Type Description Starting Version
pluginDriverUuid String 5.3.0
timeoutInSeconds long 5.3.0
properties Map 5.3.0
name String The resource name. 5.3.0
uuid String The resource UUID, which uniquely identifies the resource. 5.3.0
description String The detailed description of the resource. 5.3.0
type String 5.3.0
state String 5.3.0
platformUuid String 5.3.0
createDate Timestamp The creation date. 5.3.0
lastOpDate Timestamp The last operation date. 5.3.0
connectionStatus String 5.3.0
driver PluginDriverInventory For more information, see driver. 5.3.0
platform SNSApplicationPlatformInventory For more information, see platform. 5.3.0
#driver
Name Type Description Starting Version
uuid String The plugin driver UUID. 5.3.28
name String The resource name. 5.3.0
type String The resource type. 5.3.0
vendor String The plugin vendor. 5.3.0
features String The plugin features. 5.3.0
deleted boolean Whether the plugin has been soft deleted. 5.3.28
license String The plugin license. 5.3.0
version String The plugin version. 5.3.0
description String The detailed description of the resource. 5.3.0
createDate Timestamp The creation date. 5.3.28
lastOpDate Timestamp The last operation date. 5.3.28
optionTypes Collection For more information, see optionTypes. 5.3.28
#optionTypes
Name Type Description Starting Version
uuid String The configuration field UUID. 5.3.28
name String The configuration field name. 5.3.28
code String The unique code of the configuration field. 5.3.28
category String The configuration field category. 5.3.28
required Boolean Whether the field is required. 5.3.28
editable Boolean Whether the field can be edited. 5.3.28
enabled Boolean Whether the field is enabled. 5.3.28
displayOrder Integer The display order of the field. 5.3.28
placeHolderText String The input placeholder. 5.3.28
defaultValue String The default value of the field. 5.3.28
noSelection String The value used when no option is selected. 5.3.28
noBlank Boolean Whether blank values are prohibited. 5.3.28
secretField Boolean Whether the field is sensitive. 5.3.28
minVal Long The minimum allowed value. 5.3.28
maxVal Long The maximum allowed value. 5.3.28
minLength Long The minimum allowed input length. 5.3.28
maxLength Long The maximum allowed input length. 5.3.28
fieldContext String The configuration context to which the field belongs. 5.3.28
fieldClass String The field display style class. 5.3.28
fieldLabel String The field display name. 5.3.28
fieldCode String The field internationalization code. 5.3.28
fieldName String The key name used to save the field. 5.3.28
fieldGetName String The key name used to read the field value. 5.3.28
fieldSetName String The key name used to save the field value. 5.3.28
fieldGetContext String The configuration context used to read the field value. 5.3.28
fieldSetContext String The configuration context used to save the field value. 5.3.28
fieldGroup String The display group to which the field belongs. 5.3.28
fieldGroupI18nCode String The internationalization code of the field group. 5.3.28
helpText String The field help information. 5.3.28
helpTextI18nCode String The internationalization code of the field help information. 5.3.28
optionSourceType String The data source type of the dynamic options. 5.3.28
optionSource String The data source of the dynamic options. 5.3.28
dependsOn String The other fields on which the current field depends. 5.3.28
showOnEdit Boolean Whether the field is displayed during editing. 5.3.28
displayValueOnDetails Boolean Whether the field value is displayed on the details page. 5.3.28
showOnCreate Boolean Whether the field is displayed during creation. 5.3.28
verifyPattern String The regular expression used to validate the field value. 5.3.28
inputType InputType For more information, see inputType. 5.3.28
#inputType
Name Type Description Starting Version
text InputType A single-line text input. 5.3.28
password InputType A password input. 5.3.28
number InputType A numeric input. 5.3.28
textarea InputType A multiline text input. 5.3.28
select InputType A single-select drop-down list. 5.3.28
multiSelect InputType A multi-select drop-down list. 5.3.28
checkbox InputType A checkbox. 5.3.28
radio InputType A radio button. 5.3.28
credential InputType A credential selector. 5.3.28
typeahead InputType A searchable single-select input. 5.3.28
multiTypeahead InputType A searchable multi-select input. 5.3.28
code-editor InputType A code editor. 5.3.28
hidden InputType A hidden field. 5.3.28
#platform
Name Type Description Starting Version
uuid String The resource UUID, which uniquely identifies the resource. 2.3
name String The resource name. 2.3
description String The detailed description of the resource. 2.3
state String The resource state. 2.3
type String Type 2.3
createDate Timestamp The creation date. 2.3
lastOpDate Timestamp The last operation date. 2.3

SDK Sample

Java SDK
CreateSNSSmsPluginEndpointAction action = new CreateSNSSmsPluginEndpointAction();
action.receivers = java.util.Arrays.asList("+86-18612345678");
action.timeoutInSeconds = 30;
action.name = "SMS plugin endpoint";
action.platformUuid = "8d7ef42fe7873d88a59c383b16c96bc3";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateSNSSmsPluginEndpointAction.Result res = action.call();
Python SDK
action = CreateSNSSmsPluginEndpointAction()
action.receivers = ["+86-18612345678"]
action.timeoutInSeconds = 30
action.name = "SMS plugin endpoint"
action.platformUuid = "8d7ef42fe7873d88a59c383b16c96bc3"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()
API Reference | 5.5.38 | ZStack Cloud · ZCF | ZStack Resource Center