Document navigation

CreateSNSPluginPlatform

API Request

URLs
POST zstack/v1/sns/application-platforms/plugin
Headers
Authorization: OAuth the-session-uuid
Body
{
  "params": {
    "pluginDriverUuid": "b8fbed0254193eae88617f83930e0ca8",
    "properties": {
      "serverIp": "192.168.0.10"
    },
    "name": "SMS plugin platform"
  },
  "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":{"pluginDriverUuid":"b8fbed0254193eae88617f83930e0ca8","properties":{"serverIp":"192.168.0.10"},"name":"SMS plugin platform"}}' \
http://localhost:8080/zstack/v1/sns/application-platforms/plugin
Request Parameters
Name Type Location Description Optional Value Starting Version
name String body (contained in the params structure) The platform name. 5.5.38
description String body (contained in the params structure) Optional. The platform description. 5.5.38
pluginDriverUuid String body (contained in the params structure) The UUID of the loaded SNS EndpointDriver, which must support SEND_SNS_MESSAGE. 5.5.38
properties Map body (contained in the params structure) Optional. The fields declared in the driver's optionTypes. If the driver declares required fields, they must be provided. 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 platform",
    "type": "Plugin",
    "state": "Enabled",
    "pluginDriverUuid": "b8fbed0254193eae88617f83930e0ca8",
    "properties": {
      "serverIp": "192.168.0.10"
    }
  }
}
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 SNSPluginPlatformInventory 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 The UUID of the associated plugin driver. 5.5.38
properties Map The platform configuration declared by the plugin. For sensitive fields, only whether the field is configured is returned. 5.5.38
uuid String The resource UUID, which uniquely identifies the resource. 5.5.38
name String The resource name. 5.5.38
description String The detailed description of the resource. 5.5.38
state String The platform state. 5.5.38
type String The platform type. For plugin notification platforms, the value is fixed to Plugin. 5.5.38
createDate Timestamp The creation date. 5.5.38
lastOpDate Timestamp The last operation date. 5.5.38
driver PluginDriverInventory For more information, see driver. 5.5.38
#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

SDK Sample

Java SDK
CreateSNSPluginPlatformAction action = new CreateSNSPluginPlatformAction();
action.pluginDriverUuid = "b8fbed0254193eae88617f83930e0ca8";
action.properties = new java.util.HashMap<String, String>() {{ put("serverIp", "192.168.0.10"); }};
action.name = "SMS plugin platform";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateSNSPluginPlatformAction.Result res = action.call();
Python SDK
action = CreateSNSPluginPlatformAction()
action.pluginDriverUuid = "b8fbed0254193eae88617f83930e0ca8"
action.properties = {"serverIp": "192.168.0.10"}
action.name = "SMS plugin platform"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()
API Reference | 5.5.38 | ZStack Cloud · ZCF | ZStack Resource Center