文档目录

更新插件通知平台(UpdateSNSPluginPlatform)

API请求

URLs
PUT zstack/v1/sns/application-platforms/plugin/{uuid}/actions
Headers
Authorization: OAuth the-session-uuid
Body
{
  "updateSNSPluginPlatform": {
    "properties": {
      "serverIp": "192.168.0.11"
    },
    "name": "updated plugin platform"
  },
  "systemTags": [],
  "userTags": []
}
Note: 上述示例中systemTags、userTags字段可以省略。列出是为了表示body中可以包含这两个字段。
Curl示例
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateSNSPluginPlatform":{"properties":{"serverIp":"192.168.0.11"},"name":"updated plugin platform"}}' \
http://localhost:8080/zstack/v1/sns/application-platforms/plugin/1082bba4e9c03420b3158555364f748c/actions
参数列表
名字 类型 位置 描述 可选值 起始版本
uuid String url 平台 UUID 5.5.38
name (可选) String body(包含在updateSNSPluginPlatform结构中) 平台名称 5.5.38
description (可选) String body(包含在updateSNSPluginPlatform结构中) 平台描述 5.5.38
properties (可选) Map body(包含在updateSNSPluginPlatform结构中) 省略时保留原配置;传入时重新校验全部声明项,未传普通字段使用默认值或删除,必填项仍须提供;未传敏感字段保留已有加密值 5.5.38
systemTags (可选) List body 系统标签 5.5.38
userTags (可选) List body 用户标签 5.5.38

API返回

返回示例
{
  "inventory": {
    "uuid": "1082bba4e9c03420b3158555364f748c",
    "name": "updated plugin platform",
    "type": "Plugin",
    "state": "Enabled",
    "pluginDriverUuid": "b8fbed0254193eae88617f83930e0ca8",
    "properties": {
      "serverIp": "192.168.0.11"
    }
  }
}
名字 类型 描述 起始版本
error ErrorCode 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error 5.5.38
inventory SNSPluginPlatformInventory 详情参考inventory 5.5.38
#inventory
名字 类型 描述 起始版本
pluginDriverUuid String 关联的插件Driver UUID 5.5.38
properties Map 插件声明的平台配置;敏感字段仅返回是否已配置 5.5.38
uuid String 资源的UUID,唯一标示该资源 5.5.38
name String 资源名称 5.5.38
description String 资源的详细描述 5.5.38
state String 平台状态 5.5.38
type String 平台类型,插件通知平台固定为Plugin 5.5.38
createDate Timestamp 创建时间 5.5.38
lastOpDate Timestamp 最后一次修改时间 5.5.38
driver PluginDriverInventory 详情参考driver 5.5.38
#driver
名字 类型 描述 起始版本
uuid String 插件Driver UUID 5.3.28
name String 资源名称 5.3.0
type String 资源类型 5.3.0
vendor String 插件供应商 5.3.0
features String 插件特性 5.3.0
deleted boolean 插件是否已被软删除 5.3.28
license String 插件许可证 5.3.0
version String 插件版本 5.3.0
description String 资源的详细描述 5.3.0
createDate Timestamp 创建时间 5.3.28
lastOpDate Timestamp 最后一次修改时间 5.3.28
optionTypes Collection 详情参考optionTypes 5.3.28
#optionTypes
名字 类型 描述 起始版本
uuid String 配置字段UUID 5.3.28
name String 配置字段名称 5.3.28
code String 配置字段唯一编码 5.3.28
category String 配置字段分类 5.3.28
required Boolean 是否必填 5.3.28
editable Boolean 是否允许编辑 5.3.28
enabled Boolean 是否启用 5.3.28
displayOrder Integer 字段显示顺序 5.3.28
placeHolderText String 输入框占位提示 5.3.28
defaultValue String 字段默认值 5.3.28
noSelection String 未选择选项时使用的值 5.3.28
noBlank Boolean 是否禁止空白值 5.3.28
secretField Boolean 是否为敏感字段 5.3.28
minVal Long 允许的最小数值 5.3.28
maxVal Long 允许的最大数值 5.3.28
minLength Long 允许的最小输入长度 5.3.28
maxLength Long 允许的最大输入长度 5.3.28
fieldContext String 字段所属配置上下文 5.3.28
fieldClass String 字段展示样式类 5.3.28
fieldLabel String 字段展示名称 5.3.28
fieldCode String 字段国际化编码 5.3.28
fieldName String 字段保存键名 5.3.28
fieldGetName String 读取字段值时使用的键名 5.3.28
fieldSetName String 保存字段值时使用的键名 5.3.28
fieldGetContext String 读取字段值时使用的配置上下文 5.3.28
fieldSetContext String 保存字段值时使用的配置上下文 5.3.28
fieldGroup String 字段所属展示分组 5.3.28
fieldGroupI18nCode String 字段分组国际化编码 5.3.28
helpText String 字段帮助信息 5.3.28
helpTextI18nCode String 字段帮助信息国际化编码 5.3.28
optionSourceType String 动态选项的数据源类型 5.3.28
optionSource String 动态选项的数据源 5.3.28
dependsOn String 当前字段依赖的其他字段 5.3.28
showOnEdit Boolean 编辑时是否显示 5.3.28
displayValueOnDetails Boolean 详情页是否显示字段值 5.3.28
showOnCreate Boolean 创建时是否显示 5.3.28
verifyPattern String 字段值校验正则表达式 5.3.28
inputType InputType 详情参考inputType 5.3.28
#inputType
名字 类型 描述 起始版本
text InputType 单行文本输入框 5.3.28
password InputType 密码输入框 5.3.28
number InputType 数字输入框 5.3.28
textarea InputType 多行文本输入框 5.3.28
select InputType 单选下拉框 5.3.28
multiSelect InputType 多选下拉框 5.3.28
checkbox InputType 复选框 5.3.28
radio InputType 单选按钮 5.3.28
credential InputType 凭证选择器 5.3.28
typeahead InputType 支持搜索的单选输入框 5.3.28
multiTypeahead InputType 支持搜索的多选输入框 5.3.28
code-editor InputType 代码编辑器 5.3.28
hidden InputType 隐藏字段 5.3.28
#error
名字 类型 描述 起始版本
code String 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 5.3.20
description String 错误的概要描述 5.3.20
details String 错误的详细信息 5.3.20
elaboration String 保留字段,默认为null 5.3.20
opaque LinkedHashMap 保留字段,默认为null 5.3.20
cause ErrorCode 根错误,引发当前错误的源错误,若无原错误,该字段为null 5.3.20

SDK示例

Java SDK
UpdateSNSPluginPlatformAction action = new UpdateSNSPluginPlatformAction();
action.properties = new java.util.HashMap<String, String>() {{ put("serverIp", "192.168.0.11"); }};
action.uuid = "1082bba4e9c03420b3158555364f748c";
action.name = "updated plugin platform";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateSNSPluginPlatformAction.Result res = action.call();
Python SDK
action = UpdateSNSPluginPlatformAction()
action.properties = {"serverIp": "192.168.0.11"}
action.uuid = "1082bba4e9c03420b3158555364f748c"
action.name = "updated plugin platform"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()
开发手册 | 5.5.38 | ZStack Cloud · ZCF | ZStack 资源中心