CreateSNSPluginEndpoint
API Request
URLs
POST zstack/v1/sns/application-endpoints/pluginHeaders
Authorization: OAuth the-session-uuidBody
Note: In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.
{
"params": {
"type": "demo",
"timeoutInSeconds": 10,
"name": "SNS plugin"
},
"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":{"type":"demo","timeoutInSeconds":10,"name":"SNS plugin"}}' \
http://localhost:8080/zstack/v1/sns/application-endpoints/pluginRequest Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| type | String | body (contained in the params structure) | The driver type used to look up a loaded driver. This field cannot be empty, and the associated platform cannot be omitted. | 5.3.0 | |
| timeoutInSeconds | long | body (contained in the params structure) | The sending timeout, in seconds. | 5.3.0 | |
| properties | Map | body (contained in the params structure) | Optional. The plugin notification endpoint configuration. | 5.3.0 | |
| name | String | body (contained in the params structure) | The resource name. | 5.3.0 | |
| description | String | body (contained in the params structure) | Optional. The detailed description of the resource. | 5.3.0 | |
| platformUuid | String | body (contained in the params structure) | Optional. The UUID of the associated platform. If omitted, the system platform is used, but type must still be specified. | 5.3.0 | |
| resourceUuid | String | body (contained in the params structure) | Optional. The resource UUID. | 5.3.0 | |
| tagUuids | List | body (contained in the params structure) | Optional. The tag UUID list. | 5.3.0 | |
| systemTags | List | body | Optional. The system tags. | 5.3.0 | |
| userTags | List | body | Optional. The user tags. | 5.3.0 |
API Response
Sample Response
{
"inventory": {
"uuid": "9ba1ed979c7c4774b30292bc683141b6",
"name": "SNS plugin",
"type": "Plugin",
"state": "Enabled",
"pluginDriverUuid": "b8fbed0254193eae88617f83930e0ca8",
"properties": {},
"platformUuid": "02d24b9b0a7f4ee1846f15cda248ceb7",
"timeoutInSeconds": 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. | 5.3.0 |
| inventory | SNSPluginEndpointInventory | See inventory. | 5.3.0 |
#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 |
#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 |
SDK Sample
Java SDK
CreateSNSPluginEndpointAction action = new CreateSNSPluginEndpointAction();
action.type = "demo";
action.timeoutInSeconds = 10;
action.name = "SNS plugin";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateSNSPluginEndpointAction.Result res = action.call();Python SDK
action = CreateSNSPluginEndpointAction()
action.type = "demo"
action.timeoutInSeconds = 10
action.name = "SNS plugin"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()