通用参数

接口参数

字段 类型 必选 描述
project_id string 项目ID
scope string bk_biz_id 检索的作用域。默认为 cmdb_biz,此时检索的是绑定的 CMDB 业务 ID 为 project_id 的项目;当值为 project 时则检索项目 ID 为 project_id 的项目
  1. "data": [
  2. {
  3. "inputs": [
  4. {
  5. "required": true,
  6. "type": "string",
  7. "name": "业务 ID",
  8. "key": "biz_cc_id",
  9. "schema": {
  10. "enum": [],
  11. "type": "string",
  12. "description": "当前操作所属的 CMDB 业务 ID"
  13. }
  14. },
  15. {
  16. "required": true,
  17. "type": "string",
  18. "name": "定时作业名称",
  19. "key": "job_cron_name",
  20. "schema": {
  21. "enum": [],
  22. "type": "string",
  23. "description": "待创建的定时作业名称"
  24. }
  25. },
  26. {
  27. "required": true,
  28. "type": "string",
  29. "name": "定时规则",
  30. "key": "job_cron_expression",
  31. "schema": {
  32. "enum": [],
  33. "type": "string",
  34. "description": "待创建的定时作业定时规则"
  35. }
  36. },
  37. {
  38. "required": true,
  39. "type": "string",
  40. "name": "定时作业状态",
  41. "key": "job_cron_status",
  42. "schema": {
  43. "enum": [
  44. 1,
  45. 2
  46. ],
  47. "type": "int",
  48. "description": "待创建的定时作业状态,暂停(1) 启动(2)"
  49. }
  50. ],
  51. "code": "job_cron_task",
  52. "name": "新建定时作业",
  53. "group_name": "作业平台(JOB)",
  54. "output": [
  55. {
  56. "type": "int",
  57. "key": "cron_id",
  58. "schema": {
  59. "enum": [],
  60. "type": "int",
  61. "description": "成功创建的定时作业 ID"
  62. }
  63. },
  64. {
  65. "type": "string",
  66. "name": "定时作业状态",
  67. "key": "status",
  68. "schema": {
  69. "enum": [],
  70. "type": "string",
  71. "description": "成功创建的定时作业状态"
  72. }
  73. },
  74. {
  75. "type": "bool",
  76. "name": "执行结果",
  77. "key": "_result",
  78. "schema": {
  79. "enum": [],
  80. "type": "boolean",
  81. "description": "是否执行成功"
  82. }
  83. }
  84. ],
  85. "desc": ""
  86. },
  87. {
  88. "inputs": [
  89. {
  90. "required": true,
  91. "type": "string",
  92. "name": "业务 ID",
  93. "key": "biz_cc_id",
  94. "schema": {
  95. "enum": [],
  96. "type": "string",
  97. "description": "当前操作所属的 CMDB 业务 ID"
  98. }
  99. },
  100. {
  101. "required": true,
  102. "type": "string",
  103. "name": "主机 IP",
  104. "key": "cc_host_ip",
  105. "schema": {
  106. "enum": [],
  107. "type": "string",
  108. "description": "转移到资源池的主机内网 IP,多个以 \",\" 分隔"
  109. }
  110. ],
  111. "code": "cmdb_transfer_host_resource",
  112. "name": "转移主机至资源池",
  113. "output": [
  114. {
  115. "type": "bool",
  116. "name": "执行结果",
  117. "key": "_result",
  118. "schema": {
  119. "enum": [],
  120. "type": "boolean",
  121. "description": "是否执行成功"
  122. }
  123. }
  124. ],
  125. "desc": ""
  126. },
  127. {
  128. "inputs": [
  129. {
  130. "required": true,
  131. "type": "string",
  132. "name": "业务 ID",
  133. "key": "biz_cc_id",
  134. "schema": {
  135. "enum": [],
  136. "type": "string",
  137. "description": "当前操作所属的 CMDB 业务 ID"
  138. }
  139. },
  140. {
  141. "required": true,
  142. "type": "string",
  143. "name": "主机 IP",
  144. "key": "cc_host_ip",
  145. "schema": {
  146. "enum": [],
  147. "type": "string",
  148. "description": "转移到故障机的主机内网 IP,多个以 \",\" 分隔"
  149. }
  150. }
  151. ],
  152. "code": "cmdb_transfer_fault_host",
  153. "name": "转移主机到业务的故障机模块",
  154. "group_name": "配置平台(CMDB)",
  155. "output": [
  156. {
  157. "type": "bool",
  158. "name": "执行结果",
  159. "key": "_result",
  160. "schema": {
  161. "enum": [],
  162. "type": "boolean",
  163. "description": "是否执行成功"
  164. }
  165. }
  166. ],
  167. "desc": ""
  168. }
  169. ],
  170. }

data

名称 类型 说明
inputs list 插件的输入参数
code string 插件的编码
name string 插件名
group_name string 插件所属的组名
outputs list 插件的输出参数
desc string 插件描述
inputs
inputs.schema
名称 类型 说明
type string 参数类型
enum list 参数可选范围
description string 参数描述
properties dict 对象属性 schema,当 type 为 object 时,会存在该字段,该对象的属性的值为另一个 schema 对象
items dict 列表元素 schema,当 type 为 array 时,会存在该字段
outputs
outputs.schema
名称 类型 说明
type string 参数类型
enum list 参数可选范围
description string 参数描述
properties dict 对象属性 schema,当 type 为 object 时,会存在该字段,该对象的属性的值为另一个 schema 对象
items dict 列表元素 schema,当 type 为 array 时,会存在该字段