swagger_cloudevent.yaml 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142
  1. basePath: /
  2. consumes:
  3. - application/json
  4. definitions:
  5. CloudeventDetails:
  6. properties:
  7. account:
  8. type: string
  9. x-go-name: Account
  10. action:
  11. type: string
  12. x-go-name: Action
  13. brand:
  14. type: string
  15. x-go-name: Brand
  16. can_delete:
  17. description: 资源是否可以删除, 若为flase, delete_fail_reason会返回不能删除的原因
  18. example: true
  19. type: boolean
  20. x-go-name: CanDelete
  21. can_update:
  22. description: 资源是否可以更新, 若为false,update_fail_reason会返回资源不能删除的原因
  23. example: true
  24. type: boolean
  25. x-go-name: CanUpdate
  26. cloudprovider_id:
  27. type: string
  28. x-go-name: CloudproviderId
  29. created_at:
  30. format: date-time
  31. type: string
  32. x-go-name: CreatedAt
  33. delete_fail_reason:
  34. $ref: '#/definitions/Error'
  35. domain_id:
  36. description: 域Id
  37. type: string
  38. x-go-name: DomainId
  39. event_id:
  40. format: int64
  41. type: integer
  42. x-go-name: EventId
  43. manager:
  44. type: string
  45. x-go-name: Manager
  46. name:
  47. type: string
  48. x-go-name: Name
  49. project_domain:
  50. description: 资源归属项目的域名称
  51. type: string
  52. x-go-name: ProjectDomain
  53. provider:
  54. type: string
  55. x-go-name: Provider
  56. request:
  57. type: object
  58. x-go-name: Request
  59. request_id:
  60. type: string
  61. x-go-name: RequestId
  62. resource_type:
  63. type: string
  64. x-go-name: ResourceType
  65. service:
  66. type: string
  67. x-go-name: Service
  68. success:
  69. type: boolean
  70. x-go-name: Success
  71. update_fail_reason:
  72. $ref: '#/definitions/Error'
  73. type: object
  74. x-go-package: yunion.io/x/onecloud/pkg/apis/cloudevent
  75. EnabledStatusStandaloneResourceBaseUpdateInput:
  76. properties:
  77. description:
  78. description: 资源描述
  79. type: string
  80. x-go-name: Description
  81. name:
  82. description: 资源名称
  83. type: string
  84. x-go-name: Name
  85. progress:
  86. format: float
  87. type: number
  88. x-go-name: Progress
  89. type: object
  90. x-go-package: yunion.io/x/onecloud/pkg/apis
  91. EnabledStatusStandaloneResourceCreateInput:
  92. properties:
  93. __meta__:
  94. additionalProperties:
  95. type: string
  96. description: 标签列表,最多支持20个
  97. example:
  98. user:rd: op
  99. type: object
  100. x-go-name: Metadata
  101. description:
  102. description: 资源描述
  103. example: test create network
  104. type: string
  105. x-go-name: Description
  106. disabled:
  107. description: 该资源是否被管理员*人为*禁用, 和enabled互斥
  108. type: boolean
  109. x-go-name: Disabled
  110. dry_run:
  111. default: false
  112. description: 预检验参数,若为true则仅检查参数,并不真正创建变更
  113. type: boolean
  114. x-go-name: DryRun
  115. enabled:
  116. description: 该资源是否被管理员*人为*启用或者禁用
  117. type: boolean
  118. x-go-name: Enabled
  119. generate_name:
  120. description: |-
  121. 生成资源名称的模板,如果name为空,则为必填项
  122. description: generated resource name, given a pattern to generate name, required if name is not given
  123. example: test###
  124. type: string
  125. x-go-name: GenerateName
  126. is_emulated:
  127. description: |-
  128. 资源是否为模拟资源
  129. description: the resource is an emulated resource
  130. type: boolean
  131. x-go-name: IsEmulated
  132. name:
  133. description: |-
  134. 资源名称,如果generate_name为空,则为必填项
  135. description: resource name, required if generated_name is not given
  136. example: test-network
  137. type: string
  138. uniqueItems: true
  139. x-go-name: Name
  140. status:
  141. description: 用来存储资源的状态
  142. type: string
  143. x-go-name: Status
  144. required:
  145. - name
  146. type: object
  147. x-go-package: yunion.io/x/onecloud/pkg/apis
  148. EnabledStatusStandaloneResourceDetails:
  149. properties:
  150. can_delete:
  151. description: 资源是否可以删除, 若为flase, delete_fail_reason会返回不能删除的原因
  152. example: true
  153. type: boolean
  154. x-go-name: CanDelete
  155. can_update:
  156. description: 资源是否可以更新, 若为false,update_fail_reason会返回资源不能删除的原因
  157. example: true
  158. type: boolean
  159. x-go-name: CanUpdate
  160. delete_fail_reason:
  161. $ref: '#/definitions/Error'
  162. metadata:
  163. additionalProperties:
  164. type: string
  165. description: 标签
  166. type: object
  167. x-go-name: Metadata
  168. update_fail_reason:
  169. $ref: '#/definitions/Error'
  170. type: object
  171. x-go-package: yunion.io/x/onecloud/pkg/apis
  172. Error:
  173. properties:
  174. class:
  175. type: string
  176. x-go-name: Class
  177. code:
  178. format: int64
  179. type: integer
  180. x-go-name: Code
  181. details:
  182. type: string
  183. x-go-name: Details
  184. type: object
  185. x-go-package: yunion.io/x/onecloud/pkg/httperrors
  186. GetDetailsStatusOutput:
  187. properties:
  188. status:
  189. description: 状态
  190. type: string
  191. x-go-name: Status
  192. type: object
  193. x-go-package: yunion.io/x/onecloud/pkg/apis
  194. ModelBaseCreateInput:
  195. type: object
  196. x-go-package: yunion.io/x/onecloud/pkg/apis
  197. ModelBaseUpdateInput:
  198. type: object
  199. x-go-package: yunion.io/x/onecloud/pkg/apis
  200. PerformDisableInput:
  201. type: object
  202. x-go-package: yunion.io/x/onecloud/pkg/apis
  203. PerformEnableInput:
  204. type: object
  205. x-go-package: yunion.io/x/onecloud/pkg/apis
  206. STag:
  207. properties:
  208. key:
  209. description: 标签Kye
  210. type: string
  211. x-go-name: Key
  212. value:
  213. description: 标签Value
  214. type: string
  215. x-go-name: Value
  216. type: object
  217. x-go-package: yunion.io/x/onecloud/pkg/util/tagutils
  218. TTagSet:
  219. items:
  220. $ref: '#/definitions/STag'
  221. type: array
  222. x-go-package: yunion.io/x/onecloud/pkg/util/tagutils
  223. TTagSetList:
  224. items:
  225. $ref: '#/definitions/TTagSet'
  226. type: array
  227. x-go-package: yunion.io/x/onecloud/pkg/util/tagutils
  228. host: '"127.0.0.1:8889"'
  229. info:
  230. contact:
  231. email: lizexi@yunion.cn
  232. name: Zexi Li
  233. description: Cloudprovider API
  234. license:
  235. name: Apache 2.0
  236. url: http://www.apache.org/licenses/LICENSE-2.0.html
  237. version: "1.0"
  238. paths:
  239. /cloudevents:
  240. get:
  241. description: 列表
  242. operationId: cloudevent_ListItemFilter
  243. parameters:
  244. - default: 20
  245. description: 查询限制量
  246. format: int64
  247. in: query
  248. name: limit
  249. type: integer
  250. x-go-name: Limit
  251. - default: 0
  252. description: 查询偏移量
  253. format: int64
  254. in: query
  255. name: offset
  256. type: integer
  257. x-go-name: Offset
  258. - description: 列表排序时,用于排序的字段的名称,该字段不提供时,则按默认字段排序。一般时按照资源的新建时间逆序排序。
  259. in: query
  260. items:
  261. type: string
  262. name: order_by
  263. type: array
  264. x-go-name: OrderBy
  265. - description: 列表排序时的顺序,desc为从高到低,asc为从低到高。默认是按照资源的创建时间desc排序。
  266. example: desc|asc
  267. in: query
  268. name: order
  269. type: string
  270. x-go-name: Order
  271. - description: 列表返回资源的更多详细信息。默认只显示基本字段,该字段为true则返回扩展字段信息。
  272. in: query
  273. name: details
  274. type: boolean
  275. x-go-name: Details
  276. - description: 模糊搜索所有字段
  277. in: query
  278. name: search
  279. type: string
  280. x-go-name: Search
  281. - description: |-
  282. 指定过滤条件,允许指定多个,每个条件的格式为"字段名称.操作符(匹配信息)",例如name字段等于test的过滤器为:name.equals('test')
  283. 支持的操作符如下:
  284. 操作符 | 参数个数 | 举例 | 说明 |
  285. ---------------|----------|------------------------------------------------|-----------------------------|
  286. in | > 0 | name.in("test", "good") | 在给定数组中 |
  287. notin | > 0 | name.notin('test') | 不在给定数组中 |
  288. between | 2 | created_at.between('2019-12-10', '2020-01-02') | 在两个值之间 |
  289. ge | 1 | created_at.ge('2020-01-01') | 大于或等于给定值 |
  290. gt | 1 | created_at.gt('2020-01-01') | 严格大于给定值 |
  291. le | 1 | created_at.le('2020-01-01') | 小于或等于给定值 |
  292. lt | 1 | sync_seconds.lt(900) | 严格大于给定值 |
  293. like | > 0 | name.like('%test%') | sql字符串匹配任意一个字符串 |
  294. contains | > 0 | name.contains('test') | 包含任意一个给定字符串 |
  295. startswith | > 0 | name.startswith('test') | 以任意一个给定字符串开头 |
  296. endswith | > 0 | name.endswith('test') | 以任意一个给定字符串结尾 |
  297. equals | > 0 | name.equals('test') | 等于任意一个给定值 |
  298. notequals | 1 | name.notequals('test') | 不等于给定值 |
  299. isnull | 0 | name.isnull() | 值为SQL的NULL |
  300. isnotnull | 0 | name.isnotnull() | 值不为SQL的NULL |
  301. isempty | 0 | name.isempty('test') | 值为空字符串 |
  302. isnotempty | 0 | name.isnotempty('test') | 值不是空字符串 |
  303. isnullorempty | 0 | name.isnullorempty('test') | 值为SQL的NULL或者空字符串 |
  304. in: query
  305. items:
  306. type: string
  307. name: filter
  308. type: array
  309. x-go-name: Filter
  310. - description: |-
  311. 指定关联过滤条件,允许指定多个,后端将根据关联过滤条件和其他表关联查询,支持的查询语法和filter相同,
  312. 和其他表关联的语法如下:
  313. joint_resources.related_key(origin_key).filter_col.filter_ops(values)
  314. 其中,joint_resources为要关联的资源名称,related_key为关联表column,origin_key为当前表column, filter_col为
  315. 关联表用于查询匹配的field名称,field_ops为filter支持的操作,values为匹配的值
  316. 举例:
  317. guestnetworks.guest_id(id).ip_addr.equals('10.168.21.222')
  318. in: query
  319. items:
  320. type: string
  321. name: joint_filter
  322. type: array
  323. x-go-name: JointFilter
  324. - description: 如果filter_any为true,则查询所有filter的并集,否则为交集
  325. in: query
  326. name: filter_any
  327. type: boolean
  328. x-go-name: FilterAny
  329. - description: 返回结果只包含指定的字段
  330. in: query
  331. items:
  332. type: string
  333. name: field
  334. type: array
  335. x-go-name: Field
  336. - description: 用于数据导出,指定导出的数据字段
  337. in: query
  338. name: export_keys
  339. type: string
  340. x-go-name: ExportKeys
  341. - description: 返回结果携带delete_fail_reason和update_fail_reason字段
  342. in: query
  343. name: show_fail_reason
  344. type: boolean
  345. x-go-name: ShowFailReason
  346. - description: 是否返回状态统计信息,默认为False
  347. in: query
  348. name: summary_stats
  349. type: boolean
  350. x-go-name: SummaryStats
  351. - description: 指定查询的权限范围,可能值为project, domain or system
  352. in: query
  353. name: scope
  354. type: string
  355. x-go-name: Scope
  356. - description: 指定项目归属域名称或ID
  357. in: query
  358. name: project_domain_id
  359. type: string
  360. x-go-name: ProjectDomainId
  361. - description: 对具有域属性的资源,严格匹配域ID
  362. in: query
  363. items:
  364. type: string
  365. name: project_domain_ids
  366. type: array
  367. x-go-name: ProjectDomainIds
  368. - description: 按domain名称排序,可能值为asc|desc
  369. in: query
  370. name: order_by_domain
  371. pattern: asc|desc
  372. type: string
  373. x-go-name: OrderByDomain
  374. - $ref: '#/definitions/TTagSetList'
  375. description: filter by domain tags
  376. in: query
  377. name: domain_tags
  378. x-go-name: DomainTags
  379. - $ref: '#/definitions/TTagSetList'
  380. description: filter by domain tags
  381. in: query
  382. name: no_domain_tags
  383. x-go-name: NoDomainTags
  384. - description: |-
  385. 列出指定云平台的资源,支持的云平台如下
  386. Provider | 开始支持版本 | 平台 |
  387. -----------|------------|-------------------------------------|
  388. OneCloud | 0.0 | OneCloud内置私有云,包括KVM和裸金属管理 |
  389. VMware | 1.2 | VMware vCenter |
  390. OpenStack | 2.6 | OpenStack M版本以上私有云 |
  391. ZStack | 2.10 | ZStack私有云 |
  392. Aliyun | 2.0 | 阿里云 |
  393. Aws | 2.3 | Amazon AWS |
  394. Azure | 2.2 | Microsoft Azure |
  395. Google | 2.13 | Google Cloud Platform |
  396. Qcloud | 2.3 | 腾讯云 |
  397. Huawei | 2.5 | 华为公有云 |
  398. Ucloud | 2.7 | UCLOUD |
  399. Ctyun | 2.13 | 天翼云 |
  400. S3 | 2.11 | 通用s3对象存储 |
  401. Ceph | 2.11 | Ceph对象存储 |
  402. Xsky | 2.11 | XSKY启明星辰Ceph对象存储 |
  403. enum:
  404. - OneCloud
  405. - VMware
  406. - Aliyun
  407. - Qcloud
  408. - Azure
  409. - Aws
  410. - Huawei
  411. - OpenStack
  412. - Ucloud
  413. - ZStack
  414. - Google
  415. - Ctyun
  416. - S3
  417. - Ceph
  418. - Xsky
  419. in: query
  420. items:
  421. type: string
  422. name: providers
  423. type: array
  424. x-go-name: Providers
  425. - in: query
  426. items:
  427. type: string
  428. name: brands
  429. type: array
  430. x-go-name: Brands
  431. - description: |-
  432. 列出指定云环境的资源,支持云环境如下:
  433. CloudEnv | 说明 |
  434. -----------|--------|
  435. public | 公有云 |
  436. private | 私有云 |
  437. onpremise | 本地IDC |
  438. enum:
  439. - public
  440. - private
  441. - onpremise
  442. in: query
  443. name: cloud_env
  444. type: string
  445. x-go-name: CloudEnv
  446. - description: 以平台名称排序
  447. in: query
  448. name: order_by_provider
  449. pattern: asc|desc
  450. type: string
  451. x-go-name: OrderByProvider
  452. - description: 以平台品牌排序
  453. in: query
  454. name: order_by_brand
  455. pattern: asc|desc
  456. type: string
  457. x-go-name: OrderByBrand
  458. - description: 服务类型
  459. in: query
  460. items:
  461. type: string
  462. name: service
  463. type: array
  464. x-go-name: Service
  465. - description: 订阅
  466. in: query
  467. items:
  468. type: string
  469. name: manager
  470. type: array
  471. x-go-name: Manager
  472. - description: 账号
  473. in: query
  474. items:
  475. type: string
  476. name: account
  477. type: array
  478. x-go-name: Account
  479. - description: 操作类型
  480. in: query
  481. items:
  482. type: string
  483. name: action
  484. type: array
  485. x-go-name: Action
  486. - description: 资源类别
  487. in: query
  488. items:
  489. type: string
  490. name: resource_type
  491. type: array
  492. x-go-name: ResourceType
  493. - description: 执行状态
  494. in: query
  495. name: success
  496. type: boolean
  497. x-go-name: Success
  498. - description: 操作日志起始时间
  499. format: date-time
  500. in: query
  501. name: since
  502. type: string
  503. x-go-name: Since
  504. - description: 操作日志截止时间
  505. format: date-time
  506. in: query
  507. name: until
  508. type: string
  509. x-go-name: Until
  510. responses:
  511. "200":
  512. $ref: '#/responses/cloudevent_ListItemFilterOutput'
  513. summary: 云平台操作日志列表
  514. tags:
  515. - cloudevent
  516. post:
  517. description: 新建
  518. operationId: cloudevent_ValidateCreateData
  519. parameters:
  520. - in: body
  521. name: body
  522. schema:
  523. properties:
  524. cloudevent:
  525. $ref: '#/definitions/ModelBaseCreateInput'
  526. count:
  527. default: 1
  528. format: int64
  529. type: integer
  530. x-go-name: Count
  531. type: object
  532. x-go-name: Body
  533. responses:
  534. "200":
  535. $ref: '#/responses/cloudevent_ValidateCreateDataOutput'
  536. summary: 新建
  537. tags:
  538. - cloudevent
  539. /cloudevents/{id}:
  540. delete:
  541. description: 删除
  542. operationId: cloudevent_CustomizeDelete
  543. parameters:
  544. - description: The Id or Name of cloudevent
  545. in: path
  546. name: id
  547. required: true
  548. type: string
  549. x-go-name: Id
  550. responses:
  551. "200":
  552. $ref: '#/responses/cloudevent_CustomizeDeleteOutput'
  553. summary: 删除
  554. tags:
  555. - cloudevent
  556. get:
  557. description: 获取详情
  558. operationId: cloudevent_FetchCustomizeColumns
  559. parameters:
  560. - description: The Id or Name of cloudevent
  561. in: path
  562. name: id
  563. required: true
  564. type: string
  565. x-go-name: Id
  566. responses:
  567. "200":
  568. $ref: '#/responses/cloudevent_FetchCustomizeColumnsOutput'
  569. summary: 获取详情
  570. tags:
  571. - cloudevent
  572. put:
  573. description: 更新
  574. operationId: cloudevent_ValidateUpdateData
  575. parameters:
  576. - description: The Id or Name of cloudevent
  577. in: path
  578. name: id
  579. required: true
  580. type: string
  581. x-go-name: Id
  582. - in: body
  583. name: body
  584. schema:
  585. properties:
  586. cloudevent:
  587. $ref: '#/definitions/ModelBaseUpdateInput'
  588. type: object
  589. x-go-name: Body
  590. responses:
  591. "200":
  592. $ref: '#/responses/cloudevent_ValidateUpdateDataOutput'
  593. summary: 更新
  594. tags:
  595. - cloudevent
  596. /cloudevents/distinct-field:
  597. get:
  598. description: 获取指定资源类的信息DistinctField
  599. operationId: cloudevent_GetPropertyDistinctField
  600. parameters:
  601. - in: query
  602. items:
  603. type: string
  604. name: field
  605. type: array
  606. x-go-name: Field
  607. - in: query
  608. items:
  609. type: string
  610. name: extra_field
  611. type: array
  612. x-go-name: ExtraField
  613. responses:
  614. "200":
  615. $ref: '#/responses/cloudevent_GetPropertyDistinctFieldOutput'
  616. summary: 获取指定资源类的信息DistinctField
  617. tags:
  618. - cloudevent
  619. /cloudproviders:
  620. get:
  621. description: 列表
  622. operationId: cloudprovider_ListItemFilter
  623. parameters:
  624. - default: 20
  625. description: 查询限制量
  626. format: int64
  627. in: query
  628. name: limit
  629. type: integer
  630. x-go-name: Limit
  631. - default: 0
  632. description: 查询偏移量
  633. format: int64
  634. in: query
  635. name: offset
  636. type: integer
  637. x-go-name: Offset
  638. - description: 列表排序时,用于排序的字段的名称,该字段不提供时,则按默认字段排序。一般时按照资源的新建时间逆序排序。
  639. in: query
  640. items:
  641. type: string
  642. name: order_by
  643. type: array
  644. x-go-name: OrderBy
  645. - description: 列表排序时的顺序,desc为从高到低,asc为从低到高。默认是按照资源的创建时间desc排序。
  646. example: desc|asc
  647. in: query
  648. name: order
  649. type: string
  650. x-go-name: Order
  651. - description: 列表返回资源的更多详细信息。默认只显示基本字段,该字段为true则返回扩展字段信息。
  652. in: query
  653. name: details
  654. type: boolean
  655. x-go-name: Details
  656. - description: 模糊搜索所有字段
  657. in: query
  658. name: search
  659. type: string
  660. x-go-name: Search
  661. - description: |-
  662. 指定过滤条件,允许指定多个,每个条件的格式为"字段名称.操作符(匹配信息)",例如name字段等于test的过滤器为:name.equals('test')
  663. 支持的操作符如下:
  664. 操作符 | 参数个数 | 举例 | 说明 |
  665. ---------------|----------|------------------------------------------------|-----------------------------|
  666. in | > 0 | name.in("test", "good") | 在给定数组中 |
  667. notin | > 0 | name.notin('test') | 不在给定数组中 |
  668. between | 2 | created_at.between('2019-12-10', '2020-01-02') | 在两个值之间 |
  669. ge | 1 | created_at.ge('2020-01-01') | 大于或等于给定值 |
  670. gt | 1 | created_at.gt('2020-01-01') | 严格大于给定值 |
  671. le | 1 | created_at.le('2020-01-01') | 小于或等于给定值 |
  672. lt | 1 | sync_seconds.lt(900) | 严格大于给定值 |
  673. like | > 0 | name.like('%test%') | sql字符串匹配任意一个字符串 |
  674. contains | > 0 | name.contains('test') | 包含任意一个给定字符串 |
  675. startswith | > 0 | name.startswith('test') | 以任意一个给定字符串开头 |
  676. endswith | > 0 | name.endswith('test') | 以任意一个给定字符串结尾 |
  677. equals | > 0 | name.equals('test') | 等于任意一个给定值 |
  678. notequals | 1 | name.notequals('test') | 不等于给定值 |
  679. isnull | 0 | name.isnull() | 值为SQL的NULL |
  680. isnotnull | 0 | name.isnotnull() | 值不为SQL的NULL |
  681. isempty | 0 | name.isempty('test') | 值为空字符串 |
  682. isnotempty | 0 | name.isnotempty('test') | 值不是空字符串 |
  683. isnullorempty | 0 | name.isnullorempty('test') | 值为SQL的NULL或者空字符串 |
  684. in: query
  685. items:
  686. type: string
  687. name: filter
  688. type: array
  689. x-go-name: Filter
  690. - description: |-
  691. 指定关联过滤条件,允许指定多个,后端将根据关联过滤条件和其他表关联查询,支持的查询语法和filter相同,
  692. 和其他表关联的语法如下:
  693. joint_resources.related_key(origin_key).filter_col.filter_ops(values)
  694. 其中,joint_resources为要关联的资源名称,related_key为关联表column,origin_key为当前表column, filter_col为
  695. 关联表用于查询匹配的field名称,field_ops为filter支持的操作,values为匹配的值
  696. 举例:
  697. guestnetworks.guest_id(id).ip_addr.equals('10.168.21.222')
  698. in: query
  699. items:
  700. type: string
  701. name: joint_filter
  702. type: array
  703. x-go-name: JointFilter
  704. - description: 如果filter_any为true,则查询所有filter的并集,否则为交集
  705. in: query
  706. name: filter_any
  707. type: boolean
  708. x-go-name: FilterAny
  709. - description: 返回结果只包含指定的字段
  710. in: query
  711. items:
  712. type: string
  713. name: field
  714. type: array
  715. x-go-name: Field
  716. - description: 用于数据导出,指定导出的数据字段
  717. in: query
  718. name: export_keys
  719. type: string
  720. x-go-name: ExportKeys
  721. - description: 返回结果携带delete_fail_reason和update_fail_reason字段
  722. in: query
  723. name: show_fail_reason
  724. type: boolean
  725. x-go-name: ShowFailReason
  726. - description: 是否返回状态统计信息,默认为False
  727. in: query
  728. name: summary_stats
  729. type: boolean
  730. x-go-name: SummaryStats
  731. - $ref: '#/definitions/TTagSet'
  732. description: 通过标签过滤(包含这些标签)
  733. in: query
  734. name: tags
  735. x-go-name: Tags
  736. - $ref: '#/definitions/TTagSetList'
  737. description: 通过一组标签过滤(还包含这些标签,OR的关系)
  738. in: query
  739. name: obj_tags
  740. x-go-name: ObjTags
  741. - $ref: '#/definitions/TTagSet'
  742. description: 通过标签过滤(不包含这些标签)
  743. in: query
  744. name: no_tags
  745. x-go-name: NoTags
  746. - $ref: '#/definitions/TTagSetList'
  747. description: 通过一组标签过滤(还不包含这些标签,AND的关系)
  748. in: query
  749. name: no_obj_tags
  750. x-go-name: NoObjTags
  751. - description: 通过标签排序
  752. in: query
  753. name: order_by_tag
  754. type: string
  755. x-go-name: OrderByTag
  756. - description: |-
  757. deprecated
  758. 返回资源的标签不包含用户标签
  759. in: query
  760. name: without_user_meta
  761. type: boolean
  762. x-go-name: WithoutUserMeta
  763. - description: 返回包含用户标签的资源
  764. in: query
  765. name: with_user_meta
  766. type: boolean
  767. x-go-name: WithUserMeta
  768. - description: 返回包含外部标签的资源
  769. in: query
  770. name: with_cloud_meta
  771. type: boolean
  772. x-go-name: WithCloudMeta
  773. - description: 返回包含任意标签的资源
  774. in: query
  775. name: with_any_meta
  776. type: boolean
  777. x-go-name: WithAnyMeta
  778. - description: 返回列表数据中包含资源的标签数据(Metadata)
  779. in: query
  780. name: with_meta
  781. type: boolean
  782. x-go-name: WithMeta
  783. - description: 显示所有的资源,包括模拟的资源
  784. in: query
  785. name: show_emulated
  786. type: boolean
  787. x-go-name: ShowEmulated
  788. - description: 以资源ID过滤列表
  789. in: query
  790. items:
  791. type: string
  792. name: id
  793. type: array
  794. x-go-name: Ids
  795. - description: 以资源名称过滤列表
  796. in: query
  797. items:
  798. type: string
  799. name: name
  800. type: array
  801. x-go-name: Names
  802. - description: 以资源的状态过滤列表
  803. in: query
  804. items:
  805. type: string
  806. name: status
  807. type: array
  808. x-go-name: Status
  809. - description: 以资源是否启用/禁用过滤列表
  810. in: query
  811. name: enabled
  812. type: boolean
  813. x-go-name: Enabled
  814. responses:
  815. "200":
  816. $ref: '#/responses/cloudprovider_ListItemFilterOutput'
  817. summary: 列表
  818. tags:
  819. - cloudprovider
  820. post:
  821. description: 新建
  822. operationId: cloudprovider_ValidateCreateData
  823. parameters:
  824. - in: body
  825. name: body
  826. schema:
  827. properties:
  828. cloudprovider:
  829. $ref: '#/definitions/EnabledStatusStandaloneResourceCreateInput'
  830. count:
  831. default: 1
  832. format: int64
  833. type: integer
  834. x-go-name: Count
  835. type: object
  836. x-go-name: Body
  837. responses:
  838. "200":
  839. $ref: '#/responses/cloudprovider_ValidateCreateDataOutput'
  840. summary: 新建
  841. tags:
  842. - cloudprovider
  843. /cloudproviders/{id}:
  844. delete:
  845. description: 删除
  846. operationId: cloudprovider_CustomizeDelete
  847. parameters:
  848. - description: The Id or Name of cloudprovider
  849. in: path
  850. name: id
  851. required: true
  852. type: string
  853. x-go-name: Id
  854. responses:
  855. "200":
  856. $ref: '#/responses/cloudprovider_CustomizeDeleteOutput'
  857. summary: 删除
  858. tags:
  859. - cloudprovider
  860. get:
  861. description: 获取详情
  862. operationId: cloudprovider_FetchCustomizeColumns
  863. parameters:
  864. - description: The Id or Name of cloudprovider
  865. in: path
  866. name: id
  867. required: true
  868. type: string
  869. x-go-name: Id
  870. responses:
  871. "200":
  872. $ref: '#/responses/cloudprovider_FetchCustomizeColumnsOutput'
  873. summary: 获取详情
  874. tags:
  875. - cloudprovider
  876. put:
  877. description: 更新
  878. operationId: cloudprovider_ValidateUpdateData
  879. parameters:
  880. - description: The Id or Name of cloudprovider
  881. in: path
  882. name: id
  883. required: true
  884. type: string
  885. x-go-name: Id
  886. - in: body
  887. name: body
  888. schema:
  889. properties:
  890. cloudprovider:
  891. $ref: '#/definitions/EnabledStatusStandaloneResourceBaseUpdateInput'
  892. type: object
  893. x-go-name: Body
  894. responses:
  895. "200":
  896. $ref: '#/responses/cloudprovider_ValidateUpdateDataOutput'
  897. summary: 更新
  898. tags:
  899. - cloudprovider
  900. /cloudproviders/{id}/disable:
  901. post:
  902. description: 执行操作Disable
  903. operationId: cloudprovider_PerformDisable
  904. parameters:
  905. - description: The Id or Name of cloudprovider
  906. in: path
  907. name: id
  908. required: true
  909. type: string
  910. x-go-name: Id
  911. - in: body
  912. name: body
  913. schema:
  914. properties:
  915. cloudprovider:
  916. $ref: '#/definitions/PerformDisableInput'
  917. type: object
  918. x-go-name: Body
  919. responses:
  920. "200":
  921. $ref: '#/responses/cloudprovider_PerformDisableOutput'
  922. summary: 禁用资源
  923. tags:
  924. - cloudprovider
  925. /cloudproviders/{id}/enable:
  926. post:
  927. description: 执行操作Enable
  928. operationId: cloudprovider_PerformEnable
  929. parameters:
  930. - description: The Id or Name of cloudprovider
  931. in: path
  932. name: id
  933. required: true
  934. type: string
  935. x-go-name: Id
  936. - in: body
  937. name: body
  938. schema:
  939. properties:
  940. cloudprovider:
  941. $ref: '#/definitions/PerformEnableInput'
  942. type: object
  943. x-go-name: Body
  944. responses:
  945. "200":
  946. $ref: '#/responses/cloudprovider_PerformEnableOutput'
  947. summary: 启用资源
  948. tags:
  949. - cloudprovider
  950. /cloudproviders/{id}/metadata:
  951. get:
  952. description: 获取指定信息Metadata
  953. operationId: cloudprovider_GetDetailsMetadata
  954. parameters:
  955. - description: |-
  956. 指定需要获取的所有标签的KEY列表,如果列表为空,则获取全部标签
  957. 标签分为
  958. 类型 | 说明 |
  959. ----------|---------------------------------------------|
  960. 系统标签 | 平台定义的标签 |
  961. 用户标签 | key以user:为前缀,用户自定义标签 |
  962. 外部标签 | key以ext:为前缀,为从其他平台同步过来的标签 |
  963. in: query
  964. items:
  965. type: string
  966. name: field
  967. type: array
  968. x-go-name: Field
  969. - description: 按标签前缀过滤
  970. in: query
  971. name: prefix
  972. type: string
  973. x-go-name: Prefix
  974. - description: The Id or Name of cloudprovider
  975. in: path
  976. name: id
  977. required: true
  978. type: string
  979. x-go-name: Id
  980. responses:
  981. "200":
  982. $ref: '#/responses/cloudprovider_GetDetailsMetadataOutput'
  983. summary: 获取资源标签(元数据)
  984. tags:
  985. - cloudprovider
  986. /cloudproviders/{id}/status:
  987. get:
  988. description: 获取指定信息Status
  989. operationId: cloudprovider_GetDetailsStatus
  990. parameters:
  991. - description: The Id or Name of cloudprovider
  992. in: path
  993. name: id
  994. required: true
  995. type: string
  996. x-go-name: Id
  997. responses:
  998. "200":
  999. $ref: '#/responses/cloudprovider_GetDetailsStatusOutput'
  1000. summary: 获取资源状态
  1001. tags:
  1002. - cloudprovider
  1003. produces:
  1004. - application/json
  1005. responses:
  1006. cloudevent_CustomizeDeleteOutput:
  1007. description: ""
  1008. schema:
  1009. properties:
  1010. cloudevent:
  1011. $ref: '#/definitions/CloudeventDetails'
  1012. type: object
  1013. cloudevent_FetchCustomizeColumnsOutput:
  1014. description: ""
  1015. schema:
  1016. properties:
  1017. cloudevent:
  1018. $ref: '#/definitions/CloudeventDetails'
  1019. type: object
  1020. cloudevent_GetPropertyDistinctFieldOutput:
  1021. description: ""
  1022. cloudevent_ListItemFilterOutput:
  1023. description: ""
  1024. schema:
  1025. properties:
  1026. cloudevents:
  1027. items:
  1028. $ref: '#/definitions/CloudeventDetails'
  1029. type: array
  1030. x-go-name: Output
  1031. limit:
  1032. format: int64
  1033. type: integer
  1034. x-go-name: Limit
  1035. offset:
  1036. format: int64
  1037. type: integer
  1038. x-go-name: Offset
  1039. total:
  1040. format: int64
  1041. type: integer
  1042. x-go-name: Total
  1043. type: object
  1044. cloudevent_ValidateCreateDataOutput:
  1045. description: ""
  1046. schema:
  1047. properties:
  1048. cloudevent:
  1049. $ref: '#/definitions/CloudeventDetails'
  1050. type: object
  1051. cloudevent_ValidateUpdateDataOutput:
  1052. description: ""
  1053. schema:
  1054. properties:
  1055. cloudevent:
  1056. $ref: '#/definitions/CloudeventDetails'
  1057. type: object
  1058. cloudprovider_CustomizeDeleteOutput:
  1059. description: ""
  1060. schema:
  1061. properties:
  1062. cloudprovider:
  1063. $ref: '#/definitions/EnabledStatusStandaloneResourceDetails'
  1064. type: object
  1065. cloudprovider_FetchCustomizeColumnsOutput:
  1066. description: ""
  1067. schema:
  1068. properties:
  1069. cloudprovider:
  1070. $ref: '#/definitions/EnabledStatusStandaloneResourceDetails'
  1071. type: object
  1072. cloudprovider_GetDetailsMetadataOutput:
  1073. description: ""
  1074. schema:
  1075. properties:
  1076. cloudprovider:
  1077. additionalProperties:
  1078. type: string
  1079. type: object
  1080. x-go-name: Output
  1081. type: object
  1082. cloudprovider_GetDetailsStatusOutput:
  1083. description: ""
  1084. schema:
  1085. properties:
  1086. cloudprovider:
  1087. $ref: '#/definitions/GetDetailsStatusOutput'
  1088. type: object
  1089. cloudprovider_ListItemFilterOutput:
  1090. description: ""
  1091. schema:
  1092. properties:
  1093. cloudproviders:
  1094. items:
  1095. $ref: '#/definitions/EnabledStatusStandaloneResourceDetails'
  1096. type: array
  1097. x-go-name: Output
  1098. limit:
  1099. format: int64
  1100. type: integer
  1101. x-go-name: Limit
  1102. offset:
  1103. format: int64
  1104. type: integer
  1105. x-go-name: Offset
  1106. total:
  1107. format: int64
  1108. type: integer
  1109. x-go-name: Total
  1110. type: object
  1111. cloudprovider_PerformDisableOutput:
  1112. description: ""
  1113. cloudprovider_PerformEnableOutput:
  1114. description: ""
  1115. cloudprovider_ValidateCreateDataOutput:
  1116. description: ""
  1117. schema:
  1118. properties:
  1119. cloudprovider:
  1120. $ref: '#/definitions/EnabledStatusStandaloneResourceDetails'
  1121. type: object
  1122. cloudprovider_ValidateUpdateDataOutput:
  1123. description: ""
  1124. schema:
  1125. properties:
  1126. cloudprovider:
  1127. $ref: '#/definitions/EnabledStatusStandaloneResourceDetails'
  1128. type: object
  1129. schemes:
  1130. - https
  1131. - http
  1132. securityDefinitions:
  1133. keystone:
  1134. in: header
  1135. name: X-Auth-Token
  1136. type: apiKey
  1137. swagger: "2.0"