swagger_image.yaml 102 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727
  1. basePath: /
  2. consumes:
  3. - application/json
  4. definitions:
  5. Error:
  6. properties:
  7. class:
  8. type: string
  9. x-go-name: Class
  10. code:
  11. format: int64
  12. type: integer
  13. x-go-name: Code
  14. details:
  15. type: string
  16. x-go-name: Details
  17. type: object
  18. x-go-package: yunion.io/x/onecloud/pkg/httperrors
  19. GetDetailsStatusOutput:
  20. properties:
  21. status:
  22. description: 状态
  23. type: string
  24. x-go-name: Status
  25. type: object
  26. x-go-package: yunion.io/x/onecloud/pkg/apis
  27. GuestImageCreateInput:
  28. properties:
  29. __meta__:
  30. additionalProperties:
  31. type: string
  32. description: 标签列表,最多支持20个
  33. example:
  34. user:rd: op
  35. type: object
  36. x-go-name: Metadata
  37. description:
  38. description: 资源描述
  39. example: test create network
  40. type: string
  41. x-go-name: Description
  42. disk_format:
  43. description: 镜像格式
  44. type: string
  45. x-go-name: DiskFormat
  46. dry_run:
  47. default: false
  48. description: 预检验参数,若为true则仅检查参数,并不真正创建变更
  49. type: boolean
  50. x-go-name: DryRun
  51. encrypt_key_alg:
  52. description: 新建密钥算法
  53. type: string
  54. x-go-name: EncryptKeyAlg
  55. encrypt_key_id:
  56. description: 加密密钥的ID
  57. type: string
  58. x-go-name: EncryptKeyId
  59. encrypt_key_new:
  60. description: 是否新建密钥
  61. type: boolean
  62. x-go-name: EncryptKeyNew
  63. encrypt_key_user_id:
  64. description: 加密密钥的用户ID
  65. type: string
  66. x-go-name: EncryptKeyUserId
  67. generate_name:
  68. description: |-
  69. 生成资源名称的模板,如果name为空,则为必填项
  70. description: generated resource name, given a pattern to generate name, required if name is not given
  71. example: test###
  72. type: string
  73. x-go-name: GenerateName
  74. images:
  75. description: 镜像列表
  76. items:
  77. $ref: '#/definitions/GuestImageCreateInputSubimage'
  78. type: array
  79. x-go-name: Images
  80. is_emulated:
  81. description: |-
  82. 资源是否为模拟资源
  83. description: the resource is an emulated resource
  84. type: boolean
  85. x-go-name: IsEmulated
  86. is_public:
  87. description: 是否共享
  88. type: boolean
  89. x-go-name: IsPublic
  90. is_system:
  91. description: 'description: indicate the resource is a system resource, which is not visible to user'
  92. type: boolean
  93. x-go-name: IsSystem
  94. name:
  95. description: |-
  96. 资源名称,如果generate_name为空,则为必填项
  97. description: resource name, required if generated_name is not given
  98. example: test-network
  99. type: string
  100. uniqueItems: true
  101. x-go-name: Name
  102. notes:
  103. description: 备注
  104. type: string
  105. x-go-name: Notes
  106. os_arch:
  107. description: CPU架构 x86_64 or aarch64
  108. type: string
  109. x-go-name: OsArch
  110. project_domain_id:
  111. description: 指定项目归属域名称或ID
  112. type: string
  113. x-go-name: ProjectDomainId
  114. project_id:
  115. description: 指定项目的名称或ID
  116. type: string
  117. x-go-name: ProjectId
  118. properties:
  119. additionalProperties:
  120. type: string
  121. description: 镜像属性
  122. type: object
  123. x-go-name: Properties
  124. protected:
  125. description: 是否有删除保护
  126. type: boolean
  127. x-go-name: Protected
  128. public_scope:
  129. description: 共享范围
  130. type: string
  131. x-go-name: PublicScope
  132. size:
  133. description: 镜像大小, 单位Byte
  134. format: int64
  135. type: integer
  136. x-go-name: Size
  137. status:
  138. description: 用来存储资源的状态
  139. type: string
  140. x-go-name: Status
  141. required:
  142. - name
  143. type: object
  144. x-go-package: yunion.io/x/onecloud/pkg/apis/image
  145. GuestImageCreateInputSubimage:
  146. properties:
  147. disk_format:
  148. description: 磁盘格式
  149. type: string
  150. x-go-name: DiskFormat
  151. id:
  152. description: Id
  153. type: string
  154. x-go-name: Id
  155. virtual_size:
  156. description: 磁盘大小
  157. format: int64
  158. type: integer
  159. x-go-name: VirtualSize
  160. type: object
  161. x-go-package: yunion.io/x/onecloud/pkg/apis/image
  162. GuestImageDetails:
  163. properties:
  164. can_delete:
  165. description: 资源是否可以删除, 若为flase, delete_fail_reason会返回不能删除的原因
  166. example: true
  167. type: boolean
  168. x-go-name: CanDelete
  169. can_update:
  170. description: 资源是否可以更新, 若为false,update_fail_reason会返回资源不能删除的原因
  171. example: true
  172. type: boolean
  173. x-go-name: CanUpdate
  174. created_at:
  175. description: 资源创建时间
  176. format: date-time
  177. type: string
  178. x-go-name: CreatedAt
  179. data_images:
  180. items:
  181. $ref: '#/definitions/SubImageInfo'
  182. type: array
  183. x-go-name: DataImages
  184. delete_fail_reason:
  185. $ref: '#/definitions/Error'
  186. deleted:
  187. description: 资源是否被删除
  188. type: boolean
  189. x-go-name: Deleted
  190. deleted_at:
  191. description: 资源删除时间
  192. format: date-time
  193. type: string
  194. x-go-name: DeletedAt
  195. description:
  196. description: 资源描述信息
  197. type: string
  198. x-go-name: Description
  199. disable_delete:
  200. type: boolean
  201. x-go-name: DisableDelete
  202. disk_format:
  203. type: string
  204. x-go-name: DiskFormat
  205. domain_id:
  206. description: 域Id
  207. type: string
  208. x-go-name: DomainId
  209. encrypt_alg:
  210. description: 加密算法,aes-256 or sm4
  211. type: string
  212. x-go-name: EncryptAlg
  213. encrypt_key:
  214. description: 秘钥名称
  215. type: string
  216. x-go-name: EncryptKey
  217. encrypt_key_id:
  218. description: 加密密钥ID
  219. type: string
  220. x-go-name: EncryptKeyId
  221. encrypt_key_user:
  222. description: 密钥用户
  223. type: string
  224. x-go-name: EncryptKeyUser
  225. encrypt_key_user_domain:
  226. description: 密钥用户域
  227. type: string
  228. x-go-name: EncryptKeyUserDomain
  229. encrypt_key_user_domain_id:
  230. description: 密钥用户域ID
  231. type: string
  232. x-go-name: EncryptKeyUserDomainId
  233. encrypt_key_user_id:
  234. description: 密钥用户ID
  235. type: string
  236. x-go-name: EncryptKeyUserId
  237. freezed:
  238. description: 资源是否被冻结
  239. type: boolean
  240. x-go-name: Freezed
  241. id:
  242. description: 资源UUID
  243. type: string
  244. x-go-name: Id
  245. is_emulated:
  246. description: |-
  247. 是否是模拟资源, 部分从公有云上同步的资源并不真实存在, 例如宿主机
  248. list 接口默认不会返回这类资源,除非显示指定 is_emulate=true 过滤参数
  249. type: boolean
  250. x-go-name: IsEmulated
  251. is_public:
  252. description: 是否共享
  253. type: boolean
  254. x-go-name: IsPublic
  255. is_system:
  256. description: 是否是系统资源
  257. type: boolean
  258. x-go-name: IsSystem
  259. metadata:
  260. additionalProperties:
  261. type: string
  262. description: 标签
  263. type: object
  264. x-go-name: Metadata
  265. min_ram_mb:
  266. format: int32
  267. type: integer
  268. x-go-name: MinRamMb
  269. name:
  270. description: 资源名称
  271. type: string
  272. x-go-name: Name
  273. org_node_md5:
  274. description: 用以组织架构变更通知其他服务权限变更
  275. type: string
  276. x-go-name: OrgNodeMd5
  277. os_arch:
  278. description: 操作系统 CPU 架构
  279. example: x86 arm
  280. type: string
  281. x-go-name: OsArch
  282. pending_deleted:
  283. description: 资源是否处于回收站中
  284. type: boolean
  285. x-go-name: PendingDeleted
  286. pending_deleted_at:
  287. description: 资源放入回收站时间
  288. format: date-time
  289. type: string
  290. x-go-name: PendingDeletedAt
  291. progress:
  292. description: 操作进度0-100
  293. format: float
  294. type: number
  295. x-go-name: Progress
  296. project:
  297. description: |-
  298. 资源归属项目的名称(向后兼容别名)
  299. Deprecated
  300. type: string
  301. x-go-name: Tenant
  302. project_domain:
  303. description: 资源归属项目的域名称
  304. type: string
  305. x-go-name: ProjectDomain
  306. project_id:
  307. description: |-
  308. 资源归属项目的ID(向后兼容别名)
  309. Deprecated
  310. type: string
  311. x-go-name: TenantId
  312. project_metadata:
  313. additionalProperties:
  314. type: string
  315. type: object
  316. x-go-name: ProjectMetadata
  317. project_src:
  318. description: '云上同步资源是否在本地被更改过配置, local: 更改过, cloud: 未更改过'
  319. example: local
  320. type: string
  321. x-go-name: ProjectSrc
  322. properties:
  323. type: object
  324. x-go-name: Properties
  325. protected:
  326. type: boolean
  327. x-go-name: Protected
  328. public_scope:
  329. description: 默认共享范围
  330. type: string
  331. x-go-name: PublicScope
  332. public_src:
  333. description: '共享设置的来源, local: 本地设置, cloud: 从云上同步过来'
  334. example: local
  335. type: string
  336. x-go-name: PublicSrc
  337. root_image:
  338. $ref: '#/definitions/SubImageInfo'
  339. shared_domains:
  340. description: 共享的域列表
  341. items:
  342. $ref: '#/definitions/SharedDomain'
  343. type: array
  344. x-go-name: SharedDomains
  345. shared_projects:
  346. description: 共享的项目列表
  347. items:
  348. $ref: '#/definitions/SharedProject'
  349. type: array
  350. x-go-name: SharedProjects
  351. size:
  352. description: Status string `json:"status"`
  353. format: int64
  354. type: integer
  355. x-go-name: Size
  356. status:
  357. description: 资源状态
  358. type: string
  359. x-go-name: Status
  360. tenant:
  361. description: |-
  362. 资源归属项目的名称
  363. alias:project
  364. type: string
  365. x-go-name: Project
  366. tenant_id:
  367. description: 项目Id
  368. type: string
  369. x-go-name: ProjectId
  370. update_fail_reason:
  371. $ref: '#/definitions/Error'
  372. update_version:
  373. description: 资源被更新次数
  374. format: int64
  375. type: integer
  376. x-go-name: UpdateVersion
  377. updated_at:
  378. description: 资源更新时间
  379. format: date-time
  380. type: string
  381. x-go-name: UpdatedAt
  382. type: object
  383. x-go-package: yunion.io/x/onecloud/pkg/apis/image
  384. ImageCreateInput:
  385. properties:
  386. __meta__:
  387. additionalProperties:
  388. type: string
  389. description: 标签列表,最多支持20个
  390. example:
  391. user:rd: op
  392. type: object
  393. x-go-name: Metadata
  394. description:
  395. description: 资源描述
  396. example: test create network
  397. type: string
  398. x-go-name: Description
  399. disk_format:
  400. description: 镜像格式
  401. type: string
  402. x-go-name: DiskFormat
  403. dry_run:
  404. default: false
  405. description: 预检验参数,若为true则仅检查参数,并不真正创建变更
  406. type: boolean
  407. x-go-name: DryRun
  408. encrypt_key_alg:
  409. description: 新建密钥算法
  410. type: string
  411. x-go-name: EncryptKeyAlg
  412. encrypt_key_id:
  413. description: 加密密钥的ID
  414. type: string
  415. x-go-name: EncryptKeyId
  416. encrypt_key_new:
  417. description: 是否新建密钥
  418. type: boolean
  419. x-go-name: EncryptKeyNew
  420. encrypt_key_user_id:
  421. description: 加密密钥的用户ID
  422. type: string
  423. x-go-name: EncryptKeyUserId
  424. generate_name:
  425. description: |-
  426. 生成资源名称的模板,如果name为空,则为必填项
  427. description: generated resource name, given a pattern to generate name, required if name is not given
  428. example: test###
  429. type: string
  430. x-go-name: GenerateName
  431. is_data:
  432. description: 是否是数据盘镜像
  433. type: boolean
  434. x-go-name: IsData
  435. is_emulated:
  436. description: |-
  437. 资源是否为模拟资源
  438. description: the resource is an emulated resource
  439. type: boolean
  440. x-go-name: IsEmulated
  441. is_guest_image:
  442. description: 是否是主机镜像
  443. type: boolean
  444. x-go-name: IsGuestImage
  445. is_public:
  446. description: 是否共享
  447. type: boolean
  448. x-go-name: IsPublic
  449. is_standard:
  450. description: 是否是标准镜像
  451. type: boolean
  452. x-go-name: IsStandard
  453. is_system:
  454. description: 'description: indicate the resource is a system resource, which is not visible to user'
  455. type: boolean
  456. x-go-name: IsSystem
  457. min_disk:
  458. description: 最小系统盘要求
  459. format: int32
  460. type: integer
  461. x-go-name: MinDiskMB
  462. min_ram:
  463. description: 最小内存要求
  464. format: int32
  465. type: integer
  466. x-go-name: MinRamMB
  467. name:
  468. description: |-
  469. 资源名称,如果generate_name为空,则为必填项
  470. description: resource name, required if generated_name is not given
  471. example: test-network
  472. type: string
  473. uniqueItems: true
  474. x-go-name: Name
  475. project_domain_id:
  476. description: 指定项目归属域名称或ID
  477. type: string
  478. x-go-name: ProjectDomainId
  479. project_id:
  480. description: 指定项目的名称或ID
  481. type: string
  482. x-go-name: ProjectId
  483. properties:
  484. additionalProperties:
  485. type: string
  486. description: 镜像属性
  487. type: object
  488. x-go-name: Properties
  489. protected:
  490. description: 是否有删除保护
  491. type: boolean
  492. x-go-name: Protected
  493. public_scope:
  494. description: 共享范围
  495. type: string
  496. x-go-name: PublicScope
  497. size:
  498. description: 镜像大小, 单位Byte
  499. format: int64
  500. type: integer
  501. x-go-name: Size
  502. status:
  503. description: 用来存储资源的状态
  504. type: string
  505. x-go-name: Status
  506. required:
  507. - name
  508. type: object
  509. x-go-package: yunion.io/x/onecloud/pkg/apis/image
  510. ImageDetails:
  511. properties:
  512. auto_delete_at:
  513. description: 自动清除时间
  514. format: date-time
  515. type: string
  516. x-go-name: AutoDeleteAt
  517. can_delete:
  518. description: 资源是否可以删除, 若为flase, delete_fail_reason会返回不能删除的原因
  519. example: true
  520. type: boolean
  521. x-go-name: CanDelete
  522. can_update:
  523. description: 资源是否可以更新, 若为false,update_fail_reason会返回资源不能删除的原因
  524. example: true
  525. type: boolean
  526. x-go-name: CanUpdate
  527. checksum:
  528. description: 校验和
  529. type: string
  530. x-go-name: Checksum
  531. created_at:
  532. description: 资源创建时间
  533. format: date-time
  534. type: string
  535. x-go-name: CreatedAt
  536. delete_fail_reason:
  537. $ref: '#/definitions/Error'
  538. deleted:
  539. description: 资源是否被删除
  540. type: boolean
  541. x-go-name: Deleted
  542. deleted_at:
  543. description: 资源删除时间
  544. format: date-time
  545. type: string
  546. x-go-name: DeletedAt
  547. description:
  548. description: 资源描述信息
  549. type: string
  550. x-go-name: Description
  551. disable_delete:
  552. description: 删除保护
  553. type: boolean
  554. x-go-name: DisableDelete
  555. disk_format:
  556. description: 镜像格式
  557. type: string
  558. x-go-name: DiskFormat
  559. domain_id:
  560. description: 域Id
  561. type: string
  562. x-go-name: DomainId
  563. encrypt_alg:
  564. description: 加密算法,aes-256 or sm4
  565. type: string
  566. x-go-name: EncryptAlg
  567. encrypt_key:
  568. description: 秘钥名称
  569. type: string
  570. x-go-name: EncryptKey
  571. encrypt_key_id:
  572. description: 加密密钥ID
  573. type: string
  574. x-go-name: EncryptKeyId
  575. encrypt_key_user:
  576. description: 密钥用户
  577. type: string
  578. x-go-name: EncryptKeyUser
  579. encrypt_key_user_domain:
  580. description: 密钥用户域
  581. type: string
  582. x-go-name: EncryptKeyUserDomain
  583. encrypt_key_user_domain_id:
  584. description: 密钥用户域ID
  585. type: string
  586. x-go-name: EncryptKeyUserDomainId
  587. encrypt_key_user_id:
  588. description: 密钥用户ID
  589. type: string
  590. x-go-name: EncryptKeyUserId
  591. encrypt_status:
  592. description: 加密状态, "",encrypting,encrypted
  593. type: string
  594. x-go-name: EncryptStatus
  595. fast_hash:
  596. type: string
  597. x-go-name: FastHash
  598. freezed:
  599. description: 资源是否被冻结
  600. type: boolean
  601. x-go-name: Freezed
  602. id:
  603. description: 资源UUID
  604. type: string
  605. x-go-name: Id
  606. is_data:
  607. description: 是否是数据盘镜像
  608. type: boolean
  609. x-go-name: IsData
  610. is_emulated:
  611. description: |-
  612. 是否是模拟资源, 部分从公有云上同步的资源并不真实存在, 例如宿主机
  613. list 接口默认不会返回这类资源,除非显示指定 is_emulate=true 过滤参数
  614. type: boolean
  615. x-go-name: IsEmulated
  616. is_guest_image:
  617. description: 是否是主机镜像
  618. type: boolean
  619. x-go-name: IsGuestImage
  620. is_public:
  621. description: 是否共享
  622. type: boolean
  623. x-go-name: IsPublic
  624. is_standard:
  625. description: 是否是标准镜像
  626. type: boolean
  627. x-go-name: IsStandard
  628. is_system:
  629. description: 是否是系统资源
  630. type: boolean
  631. x-go-name: IsSystem
  632. location:
  633. description: 存储地址
  634. type: string
  635. x-go-name: Location
  636. metadata:
  637. additionalProperties:
  638. type: string
  639. description: 标签
  640. type: object
  641. x-go-name: Metadata
  642. min_disk:
  643. description: 最小系统盘要求
  644. format: int32
  645. type: integer
  646. x-go-name: MinDiskMB
  647. min_ram:
  648. description: 最小内存要求
  649. format: int32
  650. type: integer
  651. x-go-name: MinRamMB
  652. name:
  653. description: 资源名称
  654. type: string
  655. x-go-name: Name
  656. org_node_md5:
  657. description: 用以组织架构变更通知其他服务权限变更
  658. type: string
  659. x-go-name: OrgNodeMd5
  660. os_arch:
  661. description: 操作系统 CPU 架构
  662. example: x86 arm
  663. type: string
  664. x-go-name: OsArch
  665. oss_checksum:
  666. description: |-
  667. image copy from url, save origin checksum before probe
  668. 从镜像时长导入的镜像校验和
  669. type: string
  670. x-go-name: OssChecksum
  671. owner:
  672. description: 用户Id
  673. type: string
  674. x-go-name: Owner
  675. pending_deleted:
  676. description: 资源是否处于回收站中
  677. type: boolean
  678. x-go-name: PendingDeleted
  679. pending_deleted_at:
  680. description: 资源放入回收站时间
  681. format: date-time
  682. type: string
  683. x-go-name: PendingDeletedAt
  684. progress:
  685. description: 操作进度0-100
  686. format: float
  687. type: number
  688. x-go-name: Progress
  689. project:
  690. description: |-
  691. 资源归属项目的名称(向后兼容别名)
  692. Deprecated
  693. type: string
  694. x-go-name: Tenant
  695. project_domain:
  696. description: 资源归属项目的域名称
  697. type: string
  698. x-go-name: ProjectDomain
  699. project_id:
  700. description: |-
  701. 资源归属项目的ID(向后兼容别名)
  702. Deprecated
  703. type: string
  704. x-go-name: TenantId
  705. project_metadata:
  706. additionalProperties:
  707. type: string
  708. type: object
  709. x-go-name: ProjectMetadata
  710. project_src:
  711. description: '云上同步资源是否在本地被更改过配置, local: 更改过, cloud: 未更改过'
  712. example: local
  713. type: string
  714. x-go-name: ProjectSrc
  715. properties:
  716. additionalProperties:
  717. type: string
  718. description: 镜像属性信息
  719. type: object
  720. x-go-name: Properties
  721. protected:
  722. description: 是否有删除保护
  723. type: boolean
  724. x-go-name: Protected
  725. public_scope:
  726. description: 默认共享范围
  727. type: string
  728. x-go-name: PublicScope
  729. public_src:
  730. description: '共享设置的来源, local: 本地设置, cloud: 从云上同步过来'
  731. example: local
  732. type: string
  733. x-go-name: PublicSrc
  734. shared_domains:
  735. description: 共享的域列表
  736. items:
  737. $ref: '#/definitions/SharedDomain'
  738. type: array
  739. x-go-name: SharedDomains
  740. shared_projects:
  741. description: 共享的项目列表
  742. items:
  743. $ref: '#/definitions/SharedProject'
  744. type: array
  745. x-go-name: SharedProjects
  746. size:
  747. description: 镜像大小, 单位Byte
  748. format: int64
  749. type: integer
  750. x-go-name: Size
  751. status:
  752. description: 资源状态
  753. type: string
  754. x-go-name: Status
  755. tenant:
  756. description: |-
  757. 资源归属项目的名称
  758. alias:project
  759. type: string
  760. x-go-name: Project
  761. tenant_id:
  762. description: 项目Id
  763. type: string
  764. x-go-name: ProjectId
  765. update_fail_reason:
  766. $ref: '#/definitions/Error'
  767. update_version:
  768. description: 资源被更新次数
  769. format: int64
  770. type: integer
  771. x-go-name: UpdateVersion
  772. updated_at:
  773. description: 资源更新时间
  774. format: date-time
  775. type: string
  776. x-go-name: UpdatedAt
  777. type: object
  778. x-go-package: yunion.io/x/onecloud/pkg/apis/image
  779. ImageUpdateInput:
  780. properties:
  781. description:
  782. description: 资源描述
  783. type: string
  784. x-go-name: Description
  785. is_data:
  786. description: 是否是数据盘镜像
  787. type: boolean
  788. x-go-name: IsData
  789. is_standard:
  790. description: 是否是标准镜像
  791. type: boolean
  792. x-go-name: IsStandard
  793. min_disk:
  794. description: 最小系统盘要求
  795. format: int32
  796. type: integer
  797. x-go-name: MinDiskMB
  798. min_ram:
  799. description: 最小内存要求
  800. format: int32
  801. type: integer
  802. x-go-name: MinRamMB
  803. name:
  804. description: 资源名称
  805. type: string
  806. x-go-name: Name
  807. progress:
  808. format: float
  809. type: number
  810. x-go-name: Progress
  811. properties:
  812. additionalProperties:
  813. type: string
  814. description: 镜像属性
  815. type: object
  816. x-go-name: Properties
  817. protected:
  818. description: 是否有删除保护
  819. type: boolean
  820. x-go-name: Protected
  821. type: object
  822. x-go-package: yunion.io/x/onecloud/pkg/apis/image
  823. ImageUpdateStatusInput:
  824. properties:
  825. reason:
  826. description: 更新镜像状态原因
  827. type: string
  828. x-go-name: Reason
  829. status:
  830. description: 镜像状态
  831. type: string
  832. x-go-name: Status
  833. type: object
  834. x-go-package: yunion.io/x/onecloud/pkg/apis/image
  835. PerformChangeProjectOwnerInput:
  836. properties:
  837. project_domain_id:
  838. description: 指定项目归属域名称或ID
  839. type: string
  840. x-go-name: ProjectDomainId
  841. project_id:
  842. description: 指定项目的名称或ID
  843. type: string
  844. x-go-name: ProjectId
  845. type: object
  846. x-go-package: yunion.io/x/onecloud/pkg/apis
  847. PerformPrivateInput:
  848. type: object
  849. x-go-package: yunion.io/x/onecloud/pkg/apis
  850. PerformProbeInput:
  851. type: object
  852. x-go-package: yunion.io/x/onecloud/pkg/apis/image
  853. PerformPublicProjectInput:
  854. properties:
  855. scope:
  856. description: 共享项目资源的共享范围,可能的值为:project, domain和system
  857. pattern: project|domain|system
  858. type: string
  859. x-go-name: Scope
  860. shared_domain_ids:
  861. description: 如果共享范围为域,则在此列表中指定共享的目标域
  862. items:
  863. type: string
  864. type: array
  865. x-go-name: SharedDomainIds
  866. shared_project_ids:
  867. description: 如果共享范围为项目,则在此列表中指定共享的目标项目
  868. items:
  869. type: string
  870. type: array
  871. x-go-name: SharedProjectIds
  872. type: object
  873. x-go-package: yunion.io/x/onecloud/pkg/apis
  874. SImageQuotaDetail:
  875. description: 区域配额详情
  876. properties:
  877. Image:
  878. format: int64
  879. type: integer
  880. Type:
  881. type: string
  882. created_at:
  883. description: 资源创建时间
  884. format: date-time
  885. type: string
  886. x-go-name: CreatedAt
  887. deleted:
  888. description: 资源是否被删除
  889. type: boolean
  890. x-go-name: Deleted
  891. deleted_at:
  892. description: 资源删除时间
  893. format: date-time
  894. type: string
  895. x-go-name: DeletedAt
  896. domain:
  897. description: 配额适用的项目的域名称
  898. type: string
  899. x-go-name: Domain
  900. domain_id:
  901. description: 配额适用的域ID
  902. type: string
  903. x-go-name: DomainId
  904. project:
  905. description: 配额适用的项目名称
  906. type: string
  907. x-go-name: Project
  908. project_id:
  909. description: 配额适用的项目ID
  910. type: string
  911. x-go-name: ProjectId
  912. update_version:
  913. description: 资源被更新次数
  914. format: int64
  915. type: integer
  916. x-go-name: UpdateVersion
  917. updated_at:
  918. description: 资源更新时间
  919. format: date-time
  920. type: string
  921. x-go-name: UpdatedAt
  922. type: object
  923. x-go-package: yunion.io/x/onecloud/pkg/image/models
  924. STag:
  925. properties:
  926. key:
  927. description: 标签Kye
  928. type: string
  929. x-go-name: Key
  930. value:
  931. description: 标签Value
  932. type: string
  933. x-go-name: Value
  934. type: object
  935. x-go-package: yunion.io/x/onecloud/pkg/util/tagutils
  936. SetImageQuotaInput:
  937. description: 设置镜像配额输入参数
  938. properties:
  939. Image:
  940. format: int64
  941. type: integer
  942. Type:
  943. type: string
  944. action:
  945. description: |-
  946. 设置配额操作
  947. action | 说明 |
  948. ---------|-------------------------------------------|
  949. add | 增量增加配额 |
  950. sub | 增量减少配额 |
  951. reset | 重置所有配额为0 |
  952. replace | 替换所有配额,对于不存在的配额项,设置为0 |
  953. update | 更新存在的配额 |
  954. delete | 删除配额 |
  955. type: string
  956. x-go-name: Action
  957. created_at:
  958. description: 资源创建时间
  959. format: date-time
  960. type: string
  961. x-go-name: CreatedAt
  962. deleted:
  963. description: 资源是否被删除
  964. type: boolean
  965. x-go-name: Deleted
  966. deleted_at:
  967. description: 资源删除时间
  968. format: date-time
  969. type: string
  970. x-go-name: DeletedAt
  971. domain_id:
  972. description: 配额适用的域ID
  973. type: string
  974. x-go-name: DomainId
  975. project_id:
  976. description: 配额适用的项目ID
  977. type: string
  978. x-go-name: ProjectId
  979. update_version:
  980. description: 资源被更新次数
  981. format: int64
  982. type: integer
  983. x-go-name: UpdateVersion
  984. updated_at:
  985. description: 资源更新时间
  986. format: date-time
  987. type: string
  988. x-go-name: UpdatedAt
  989. type: object
  990. x-go-package: yunion.io/x/onecloud/pkg/image/models
  991. SharableVirtualResourceBaseUpdateInput:
  992. properties:
  993. description:
  994. description: 资源描述
  995. type: string
  996. x-go-name: Description
  997. name:
  998. description: 资源名称
  999. type: string
  1000. x-go-name: Name
  1001. progress:
  1002. format: float
  1003. type: number
  1004. x-go-name: Progress
  1005. type: object
  1006. x-go-package: yunion.io/x/onecloud/pkg/apis
  1007. SharedDomain:
  1008. properties:
  1009. id:
  1010. type: string
  1011. x-go-name: Id
  1012. name:
  1013. type: string
  1014. x-go-name: Name
  1015. type: object
  1016. x-go-package: yunion.io/x/onecloud/pkg/apis
  1017. SharedProject:
  1018. properties:
  1019. domain:
  1020. type: string
  1021. x-go-name: Domain
  1022. domain_id:
  1023. type: string
  1024. x-go-name: DomainId
  1025. id:
  1026. type: string
  1027. x-go-name: Id
  1028. name:
  1029. type: string
  1030. x-go-name: Name
  1031. type: object
  1032. x-go-package: yunion.io/x/onecloud/pkg/apis
  1033. SubImageInfo:
  1034. properties:
  1035. created_at:
  1036. format: date-time
  1037. type: string
  1038. x-go-name: CreatedAt
  1039. disable_delete:
  1040. type: boolean
  1041. x-go-name: DisableDelete
  1042. disk_format:
  1043. type: string
  1044. x-go-name: DiskFormat
  1045. encrypt_key_id:
  1046. type: string
  1047. x-go-name: EncryptKeyId
  1048. id:
  1049. type: string
  1050. x-go-name: ID
  1051. min_disk_mb:
  1052. format: int32
  1053. type: integer
  1054. x-go-name: MinDiskMB
  1055. name:
  1056. type: string
  1057. x-go-name: Name
  1058. size:
  1059. format: int64
  1060. type: integer
  1061. x-go-name: Size
  1062. status:
  1063. type: string
  1064. x-go-name: Status
  1065. type: object
  1066. x-go-package: yunion.io/x/onecloud/pkg/apis/image
  1067. TTagSet:
  1068. items:
  1069. $ref: '#/definitions/STag'
  1070. type: array
  1071. x-go-package: yunion.io/x/onecloud/pkg/util/tagutils
  1072. TTagSetList:
  1073. items:
  1074. $ref: '#/definitions/TTagSet'
  1075. type: array
  1076. x-go-package: yunion.io/x/onecloud/pkg/util/tagutils
  1077. host: '"127.0.0.1:8889"'
  1078. info:
  1079. contact:
  1080. email: lizexi@yunion.cn
  1081. name: Zexi Li
  1082. description: Cloudprovider API
  1083. license:
  1084. name: Apache 2.0
  1085. url: http://www.apache.org/licenses/LICENSE-2.0.html
  1086. version: "1.0"
  1087. paths:
  1088. /guest_images:
  1089. get:
  1090. description: 列表
  1091. operationId: guest_image_ListItemFilter
  1092. parameters:
  1093. - default: 20
  1094. description: 查询限制量
  1095. format: int64
  1096. in: query
  1097. name: limit
  1098. type: integer
  1099. x-go-name: Limit
  1100. - default: 0
  1101. description: 查询偏移量
  1102. format: int64
  1103. in: query
  1104. name: offset
  1105. type: integer
  1106. x-go-name: Offset
  1107. - description: 列表排序时,用于排序的字段的名称,该字段不提供时,则按默认字段排序。一般时按照资源的新建时间逆序排序。
  1108. in: query
  1109. items:
  1110. type: string
  1111. name: order_by
  1112. type: array
  1113. x-go-name: OrderBy
  1114. - description: 列表排序时的顺序,desc为从高到低,asc为从低到高。默认是按照资源的创建时间desc排序。
  1115. example: desc|asc
  1116. in: query
  1117. name: order
  1118. type: string
  1119. x-go-name: Order
  1120. - description: 列表返回资源的更多详细信息。默认只显示基本字段,该字段为true则返回扩展字段信息。
  1121. in: query
  1122. name: details
  1123. type: boolean
  1124. x-go-name: Details
  1125. - description: 模糊搜索所有字段
  1126. in: query
  1127. name: search
  1128. type: string
  1129. x-go-name: Search
  1130. - description: |-
  1131. 指定过滤条件,允许指定多个,每个条件的格式为"字段名称.操作符(匹配信息)",例如name字段等于test的过滤器为:name.equals('test')
  1132. 支持的操作符如下:
  1133. 操作符 | 参数个数 | 举例 | 说明 |
  1134. ---------------|----------|------------------------------------------------|-----------------------------|
  1135. in | > 0 | name.in("test", "good") | 在给定数组中 |
  1136. notin | > 0 | name.notin('test') | 不在给定数组中 |
  1137. between | 2 | created_at.between('2019-12-10', '2020-01-02') | 在两个值之间 |
  1138. ge | 1 | created_at.ge('2020-01-01') | 大于或等于给定值 |
  1139. gt | 1 | created_at.gt('2020-01-01') | 严格大于给定值 |
  1140. le | 1 | created_at.le('2020-01-01') | 小于或等于给定值 |
  1141. lt | 1 | sync_seconds.lt(900) | 严格大于给定值 |
  1142. like | > 0 | name.like('%test%') | sql字符串匹配任意一个字符串 |
  1143. contains | > 0 | name.contains('test') | 包含任意一个给定字符串 |
  1144. startswith | > 0 | name.startswith('test') | 以任意一个给定字符串开头 |
  1145. endswith | > 0 | name.endswith('test') | 以任意一个给定字符串结尾 |
  1146. equals | > 0 | name.equals('test') | 等于任意一个给定值 |
  1147. notequals | 1 | name.notequals('test') | 不等于给定值 |
  1148. isnull | 0 | name.isnull() | 值为SQL的NULL |
  1149. isnotnull | 0 | name.isnotnull() | 值不为SQL的NULL |
  1150. isempty | 0 | name.isempty('test') | 值为空字符串 |
  1151. isnotempty | 0 | name.isnotempty('test') | 值不是空字符串 |
  1152. isnullorempty | 0 | name.isnullorempty('test') | 值为SQL的NULL或者空字符串 |
  1153. in: query
  1154. items:
  1155. type: string
  1156. name: filter
  1157. type: array
  1158. x-go-name: Filter
  1159. - description: |-
  1160. 指定关联过滤条件,允许指定多个,后端将根据关联过滤条件和其他表关联查询,支持的查询语法和filter相同,
  1161. 和其他表关联的语法如下:
  1162. joint_resources.related_key(origin_key).filter_col.filter_ops(values)
  1163. 其中,joint_resources为要关联的资源名称,related_key为关联表column,origin_key为当前表column, filter_col为
  1164. 关联表用于查询匹配的field名称,field_ops为filter支持的操作,values为匹配的值
  1165. 举例:
  1166. guestnetworks.guest_id(id).ip_addr.equals('10.168.21.222')
  1167. in: query
  1168. items:
  1169. type: string
  1170. name: joint_filter
  1171. type: array
  1172. x-go-name: JointFilter
  1173. - description: 如果filter_any为true,则查询所有filter的并集,否则为交集
  1174. in: query
  1175. name: filter_any
  1176. type: boolean
  1177. x-go-name: FilterAny
  1178. - description: 返回结果只包含指定的字段
  1179. in: query
  1180. items:
  1181. type: string
  1182. name: field
  1183. type: array
  1184. x-go-name: Field
  1185. - description: 用于数据导出,指定导出的数据字段
  1186. in: query
  1187. name: export_keys
  1188. type: string
  1189. x-go-name: ExportKeys
  1190. - description: 返回结果携带delete_fail_reason和update_fail_reason字段
  1191. in: query
  1192. name: show_fail_reason
  1193. type: boolean
  1194. x-go-name: ShowFailReason
  1195. - description: 是否返回状态统计信息,默认为False
  1196. in: query
  1197. name: summary_stats
  1198. type: boolean
  1199. x-go-name: SummaryStats
  1200. - $ref: '#/definitions/TTagSet'
  1201. description: 通过标签过滤(包含这些标签)
  1202. in: query
  1203. name: tags
  1204. x-go-name: Tags
  1205. - $ref: '#/definitions/TTagSetList'
  1206. description: 通过一组标签过滤(还包含这些标签,OR的关系)
  1207. in: query
  1208. name: obj_tags
  1209. x-go-name: ObjTags
  1210. - $ref: '#/definitions/TTagSet'
  1211. description: 通过标签过滤(不包含这些标签)
  1212. in: query
  1213. name: no_tags
  1214. x-go-name: NoTags
  1215. - $ref: '#/definitions/TTagSetList'
  1216. description: 通过一组标签过滤(还不包含这些标签,AND的关系)
  1217. in: query
  1218. name: no_obj_tags
  1219. x-go-name: NoObjTags
  1220. - description: 通过标签排序
  1221. in: query
  1222. name: order_by_tag
  1223. type: string
  1224. x-go-name: OrderByTag
  1225. - description: |-
  1226. deprecated
  1227. 返回资源的标签不包含用户标签
  1228. in: query
  1229. name: without_user_meta
  1230. type: boolean
  1231. x-go-name: WithoutUserMeta
  1232. - description: 返回包含用户标签的资源
  1233. in: query
  1234. name: with_user_meta
  1235. type: boolean
  1236. x-go-name: WithUserMeta
  1237. - description: 返回包含外部标签的资源
  1238. in: query
  1239. name: with_cloud_meta
  1240. type: boolean
  1241. x-go-name: WithCloudMeta
  1242. - description: 返回包含任意标签的资源
  1243. in: query
  1244. name: with_any_meta
  1245. type: boolean
  1246. x-go-name: WithAnyMeta
  1247. - description: 返回列表数据中包含资源的标签数据(Metadata)
  1248. in: query
  1249. name: with_meta
  1250. type: boolean
  1251. x-go-name: WithMeta
  1252. - description: 显示所有的资源,包括模拟的资源
  1253. in: query
  1254. name: show_emulated
  1255. type: boolean
  1256. x-go-name: ShowEmulated
  1257. - description: 以资源ID过滤列表
  1258. in: query
  1259. items:
  1260. type: string
  1261. name: id
  1262. type: array
  1263. x-go-name: Ids
  1264. - description: 以资源名称过滤列表
  1265. in: query
  1266. items:
  1267. type: string
  1268. name: name
  1269. type: array
  1270. x-go-name: Names
  1271. - description: 以资源的状态过滤列表
  1272. in: query
  1273. items:
  1274. type: string
  1275. name: status
  1276. type: array
  1277. x-go-name: Status
  1278. - description: 指定查询的权限范围,可能值为project, domain or system
  1279. in: query
  1280. name: scope
  1281. type: string
  1282. x-go-name: Scope
  1283. - description: 指定项目归属域名称或ID
  1284. in: query
  1285. name: project_domain_id
  1286. type: string
  1287. x-go-name: ProjectDomainId
  1288. - description: 对具有域属性的资源,严格匹配域ID
  1289. in: query
  1290. items:
  1291. type: string
  1292. name: project_domain_ids
  1293. type: array
  1294. x-go-name: ProjectDomainIds
  1295. - description: 按domain名称排序,可能值为asc|desc
  1296. in: query
  1297. name: order_by_domain
  1298. pattern: asc|desc
  1299. type: string
  1300. x-go-name: OrderByDomain
  1301. - $ref: '#/definitions/TTagSetList'
  1302. description: filter by domain tags
  1303. in: query
  1304. name: domain_tags
  1305. x-go-name: DomainTags
  1306. - $ref: '#/definitions/TTagSetList'
  1307. description: filter by domain tags
  1308. in: query
  1309. name: no_domain_tags
  1310. x-go-name: NoDomainTags
  1311. - description: 指定项目的名称或ID
  1312. in: query
  1313. name: project_id
  1314. type: string
  1315. x-go-name: ProjectId
  1316. - description: 对具有项目属性的资源,严格匹配项目ID
  1317. in: query
  1318. items:
  1319. type: string
  1320. name: project_ids
  1321. type: array
  1322. x-go-name: ProjectIds
  1323. - description: 按project名称排序,可能值为asc|desc
  1324. in: query
  1325. name: order_by_project
  1326. pattern: asc|desc
  1327. type: string
  1328. x-go-name: OrderByProject
  1329. - $ref: '#/definitions/TTagSetList'
  1330. description: filter by project tags
  1331. in: query
  1332. name: project_tags
  1333. x-go-name: ProjectTags
  1334. - $ref: '#/definitions/TTagSetList'
  1335. description: filter by no project tags
  1336. in: query
  1337. name: no_project_tags
  1338. x-go-name: NoProjectTags
  1339. - description: filter by project organizations
  1340. in: query
  1341. items:
  1342. type: string
  1343. name: project_organizations
  1344. type: array
  1345. x-go-name: ProjectOrganizations
  1346. - $ref: '#/definitions/TTagSetList'
  1347. description: |-
  1348. ignore
  1349. project tag fitlers imposed by policy
  1350. in: query
  1351. name: policy_project_tags
  1352. x-go-name: PolicyProjectTags
  1353. - description: 列表中包含标记为"系统资源"的资源
  1354. in: query
  1355. name: system
  1356. type: boolean
  1357. x-go-name: System
  1358. - description: 是否显示回收站内的资源,默认不显示(对实现了回收站的资源有效,例如主机,磁盘,镜像)
  1359. in: query
  1360. name: pending_delete
  1361. type: boolean
  1362. x-go-name: PendingDelete
  1363. - description: 以资源是否共享过滤列表
  1364. in: query
  1365. name: is_public
  1366. type: boolean
  1367. x-go-name: IsPublic
  1368. - description: 根据资源的共享范围过滤列表,可能值为:system, domain, project
  1369. in: query
  1370. name: public_scope
  1371. type: string
  1372. x-go-name: PublicScope
  1373. - description: |-
  1374. 通过操作系统架构过滤
  1375. x86会过滤出os_arch为空或os_arch=i386或以x86开头的资源
  1376. arm会过滤出os_arch=aarch64或os_arch=aarch32或者以arm开头的资源
  1377. 其他的输入会过滤出以输入字符开头的资源
  1378. enmu: x86, arm
  1379. in: query
  1380. items:
  1381. type: string
  1382. name: os_arch
  1383. type: array
  1384. x-go-name: OsArch
  1385. - description: 是否删除保护
  1386. in: query
  1387. name: protected
  1388. type: boolean
  1389. x-go-name: Protected
  1390. - in: query
  1391. items:
  1392. type: string
  1393. name: disk_format
  1394. type: array
  1395. x-go-name: DiskFormat
  1396. responses:
  1397. "200":
  1398. $ref: '#/responses/guest_image_ListItemFilterOutput'
  1399. summary: 主机镜像列表
  1400. tags:
  1401. - guest_image
  1402. post:
  1403. description: 新建
  1404. operationId: guest_image_ValidateCreateData
  1405. parameters:
  1406. - in: body
  1407. name: body
  1408. schema:
  1409. properties:
  1410. count:
  1411. default: 1
  1412. format: int64
  1413. type: integer
  1414. x-go-name: Count
  1415. guest_image:
  1416. $ref: '#/definitions/GuestImageCreateInput'
  1417. type: object
  1418. x-go-name: Body
  1419. responses:
  1420. "200":
  1421. $ref: '#/responses/guest_image_ValidateCreateDataOutput'
  1422. summary: 新建
  1423. tags:
  1424. - guest_image
  1425. /guest_images/{id}:
  1426. delete:
  1427. description: 删除
  1428. operationId: guest_image_CustomizeDelete
  1429. parameters:
  1430. - description: The Id or Name of guest_image
  1431. in: path
  1432. name: id
  1433. required: true
  1434. type: string
  1435. x-go-name: Id
  1436. responses:
  1437. "200":
  1438. $ref: '#/responses/guest_image_CustomizeDeleteOutput'
  1439. summary: 删除
  1440. tags:
  1441. - guest_image
  1442. get:
  1443. description: 获取详情
  1444. operationId: guest_image_FetchCustomizeColumns
  1445. parameters:
  1446. - description: The Id or Name of guest_image
  1447. in: path
  1448. name: id
  1449. required: true
  1450. type: string
  1451. x-go-name: Id
  1452. responses:
  1453. "200":
  1454. $ref: '#/responses/guest_image_FetchCustomizeColumnsOutput'
  1455. summary: 获取详情
  1456. tags:
  1457. - guest_image
  1458. put:
  1459. description: 更新
  1460. operationId: guest_image_ValidateUpdateData
  1461. parameters:
  1462. - description: The Id or Name of guest_image
  1463. in: path
  1464. name: id
  1465. required: true
  1466. type: string
  1467. x-go-name: Id
  1468. - in: body
  1469. name: body
  1470. schema:
  1471. properties:
  1472. guest_image:
  1473. $ref: '#/definitions/SharableVirtualResourceBaseUpdateInput'
  1474. type: object
  1475. x-go-name: Body
  1476. responses:
  1477. "200":
  1478. $ref: '#/responses/guest_image_ValidateUpdateDataOutput'
  1479. summary: 更新
  1480. tags:
  1481. - guest_image
  1482. /guest_images/{id}/cancel-delete:
  1483. post:
  1484. description: 执行操作CancelDelete
  1485. operationId: guest_image_PerformCancelDelete
  1486. parameters:
  1487. - description: The Id or Name of guest_image
  1488. in: path
  1489. name: id
  1490. required: true
  1491. type: string
  1492. x-go-name: Id
  1493. responses:
  1494. "200":
  1495. $ref: '#/responses/guest_image_PerformCancelDeleteOutput'
  1496. summary: 执行操作CancelDelete
  1497. tags:
  1498. - guest_image
  1499. /guest_images/{id}/change-owner:
  1500. post:
  1501. description: 执行操作ChangeOwner
  1502. operationId: guest_image_PerformChangeOwner
  1503. parameters:
  1504. - description: The Id or Name of guest_image
  1505. in: path
  1506. name: id
  1507. required: true
  1508. type: string
  1509. x-go-name: Id
  1510. - in: body
  1511. name: body
  1512. schema:
  1513. properties:
  1514. guest_image:
  1515. $ref: '#/definitions/PerformChangeProjectOwnerInput'
  1516. type: object
  1517. x-go-name: Body
  1518. responses:
  1519. "200":
  1520. $ref: '#/responses/guest_image_PerformChangeOwnerOutput'
  1521. summary: 更改项目
  1522. tags:
  1523. - guest_image
  1524. /guest_images/{id}/metadata:
  1525. get:
  1526. description: 获取指定信息Metadata
  1527. operationId: guest_image_GetDetailsMetadata
  1528. parameters:
  1529. - description: |-
  1530. 指定需要获取的所有标签的KEY列表,如果列表为空,则获取全部标签
  1531. 标签分为
  1532. 类型 | 说明 |
  1533. ----------|---------------------------------------------|
  1534. 系统标签 | 平台定义的标签 |
  1535. 用户标签 | key以user:为前缀,用户自定义标签 |
  1536. 外部标签 | key以ext:为前缀,为从其他平台同步过来的标签 |
  1537. in: query
  1538. items:
  1539. type: string
  1540. name: field
  1541. type: array
  1542. x-go-name: Field
  1543. - description: 按标签前缀过滤
  1544. in: query
  1545. name: prefix
  1546. type: string
  1547. x-go-name: Prefix
  1548. - description: The Id or Name of guest_image
  1549. in: path
  1550. name: id
  1551. required: true
  1552. type: string
  1553. x-go-name: Id
  1554. responses:
  1555. "200":
  1556. $ref: '#/responses/guest_image_GetDetailsMetadataOutput'
  1557. summary: 获取资源标签(元数据)
  1558. tags:
  1559. - guest_image
  1560. /guest_images/{id}/private:
  1561. post:
  1562. description: 执行操作Private
  1563. operationId: guest_image_PerformPrivate
  1564. parameters:
  1565. - description: The Id or Name of guest_image
  1566. in: path
  1567. name: id
  1568. required: true
  1569. type: string
  1570. x-go-name: Id
  1571. - in: body
  1572. name: body
  1573. schema:
  1574. properties:
  1575. guest_image:
  1576. $ref: '#/definitions/PerformPrivateInput'
  1577. type: object
  1578. x-go-name: Body
  1579. responses:
  1580. "200":
  1581. $ref: '#/responses/guest_image_PerformPrivateOutput'
  1582. summary: 执行操作Private
  1583. tags:
  1584. - guest_image
  1585. /guest_images/{id}/public:
  1586. post:
  1587. description: 执行操作Public
  1588. operationId: guest_image_PerformPublic
  1589. parameters:
  1590. - description: The Id or Name of guest_image
  1591. in: path
  1592. name: id
  1593. required: true
  1594. type: string
  1595. x-go-name: Id
  1596. - in: body
  1597. name: body
  1598. schema:
  1599. properties:
  1600. guest_image:
  1601. $ref: '#/definitions/PerformPublicProjectInput'
  1602. type: object
  1603. x-go-name: Body
  1604. responses:
  1605. "200":
  1606. $ref: '#/responses/guest_image_PerformPublicOutput'
  1607. summary: 执行操作Public
  1608. tags:
  1609. - guest_image
  1610. /guest_images/{id}/set-class-metadata:
  1611. post:
  1612. description: 执行操作SetClassMetadata
  1613. operationId: guest_image_PerformSetClassMetadata
  1614. parameters:
  1615. - description: The Id or Name of guest_image
  1616. in: path
  1617. name: id
  1618. required: true
  1619. type: string
  1620. x-go-name: Id
  1621. - in: body
  1622. name: body
  1623. schema:
  1624. properties:
  1625. guest_image:
  1626. additionalProperties:
  1627. type: string
  1628. type: object
  1629. x-go-name: Input
  1630. type: object
  1631. x-go-name: Body
  1632. responses:
  1633. "200":
  1634. $ref: '#/responses/guest_image_PerformSetClassMetadataOutput'
  1635. summary: 执行操作SetClassMetadata
  1636. tags:
  1637. - guest_image
  1638. /guest_images/{id}/status:
  1639. get:
  1640. description: 获取指定信息Status
  1641. operationId: guest_image_GetDetailsStatus
  1642. parameters:
  1643. - description: The Id or Name of guest_image
  1644. in: path
  1645. name: id
  1646. required: true
  1647. type: string
  1648. x-go-name: Id
  1649. responses:
  1650. "200":
  1651. $ref: '#/responses/guest_image_GetDetailsStatusOutput'
  1652. summary: 获取资源状态
  1653. tags:
  1654. - guest_image
  1655. /image_quotas/{scope}:
  1656. get:
  1657. description: 获取所有项目或者域的镜像配额
  1658. operationId: models_ListImageQuotas
  1659. parameters:
  1660. - description: |-
  1661. 只列出主配额
  1662. require:false
  1663. in: query
  1664. name: primary
  1665. type: boolean
  1666. x-go-name: Primary
  1667. - description: |-
  1668. 强制刷新使用量
  1669. require:false
  1670. in: query
  1671. name: refresh
  1672. type: boolean
  1673. x-go-name: Refresh
  1674. - description: 配额所属范围,可能值为projects和domains,分别代表项 目的配额和域的配额
  1675. in: path
  1676. name: scope
  1677. required: true
  1678. type: string
  1679. x-go-name: Scope
  1680. responses:
  1681. "200":
  1682. $ref: '#/responses/models_ListImageQuotasOutput'
  1683. summary: 获取所有项目或者域的镜像配额
  1684. tags:
  1685. - image_quota
  1686. /image_quotas/{scope}/{scopeId}:
  1687. get:
  1688. description: 获取指定项目或者域的镜像配额
  1689. operationId: models_GetImageQuota
  1690. parameters:
  1691. - description: |-
  1692. 只列出主配额
  1693. require:false
  1694. in: query
  1695. name: primary
  1696. type: boolean
  1697. x-go-name: Primary
  1698. - description: |-
  1699. 强制刷新使用量
  1700. require:false
  1701. in: query
  1702. name: refresh
  1703. type: boolean
  1704. x-go-name: Refresh
  1705. - description: 配额所属范围,可能值为projects和domains,分别代表项目的配额和域的配额
  1706. in: path
  1707. name: scope
  1708. required: true
  1709. type: string
  1710. x-go-name: Scope
  1711. - description: 指定项目或者域的ID
  1712. in: path
  1713. name: scopeId
  1714. required: true
  1715. type: string
  1716. x-go-name: ScopeId
  1717. responses:
  1718. "200":
  1719. $ref: '#/responses/models_GetImageQuotaOutput'
  1720. summary: 获取指定项目或者域的镜像配额
  1721. tags:
  1722. - image_quota
  1723. post:
  1724. description: 设置指定项目或者域的镜像配额
  1725. operationId: models_SetRegionQuotas
  1726. parameters:
  1727. - description: 配额所属范围,可能值为projects和domains,分别代表项目的配额和域的配额
  1728. in: path
  1729. name: scope
  1730. required: true
  1731. type: string
  1732. x-go-name: Scope
  1733. - description: 指定项目或者域的ID
  1734. in: path
  1735. name: scopeId
  1736. required: true
  1737. type: string
  1738. x-go-name: ScopeId
  1739. - in: body
  1740. name: body
  1741. schema:
  1742. properties:
  1743. image_quotas:
  1744. $ref: '#/definitions/SetImageQuotaInput'
  1745. type: object
  1746. x-go-name: Body
  1747. responses:
  1748. "200":
  1749. $ref: '#/responses/models_SetRegionQuotasOutput'
  1750. summary: 设置指定项目或者域的镜像配额
  1751. tags:
  1752. - image_quota
  1753. /images:
  1754. get:
  1755. description: 列表
  1756. operationId: image_ListItemFilter
  1757. parameters:
  1758. - default: 20
  1759. description: 查询限制量
  1760. format: int64
  1761. in: query
  1762. name: limit
  1763. type: integer
  1764. x-go-name: Limit
  1765. - default: 0
  1766. description: 查询偏移量
  1767. format: int64
  1768. in: query
  1769. name: offset
  1770. type: integer
  1771. x-go-name: Offset
  1772. - description: 列表排序时,用于排序的字段的名称,该字段不提供时,则按默认字段排序。一般时按照资源的新建时间逆序排序。
  1773. in: query
  1774. items:
  1775. type: string
  1776. name: order_by
  1777. type: array
  1778. x-go-name: OrderBy
  1779. - description: 列表排序时的顺序,desc为从高到低,asc为从低到高。默认是按照资源的创建时间desc排序。
  1780. example: desc|asc
  1781. in: query
  1782. name: order
  1783. type: string
  1784. x-go-name: Order
  1785. - description: 列表返回资源的更多详细信息。默认只显示基本字段,该字段为true则返回扩展字段信息。
  1786. in: query
  1787. name: details
  1788. type: boolean
  1789. x-go-name: Details
  1790. - description: 模糊搜索所有字段
  1791. in: query
  1792. name: search
  1793. type: string
  1794. x-go-name: Search
  1795. - description: |-
  1796. 指定过滤条件,允许指定多个,每个条件的格式为"字段名称.操作符(匹配信息)",例如name字段等于test的过滤器为:name.equals('test')
  1797. 支持的操作符如下:
  1798. 操作符 | 参数个数 | 举例 | 说明 |
  1799. ---------------|----------|------------------------------------------------|-----------------------------|
  1800. in | > 0 | name.in("test", "good") | 在给定数组中 |
  1801. notin | > 0 | name.notin('test') | 不在给定数组中 |
  1802. between | 2 | created_at.between('2019-12-10', '2020-01-02') | 在两个值之间 |
  1803. ge | 1 | created_at.ge('2020-01-01') | 大于或等于给定值 |
  1804. gt | 1 | created_at.gt('2020-01-01') | 严格大于给定值 |
  1805. le | 1 | created_at.le('2020-01-01') | 小于或等于给定值 |
  1806. lt | 1 | sync_seconds.lt(900) | 严格大于给定值 |
  1807. like | > 0 | name.like('%test%') | sql字符串匹配任意一个字符串 |
  1808. contains | > 0 | name.contains('test') | 包含任意一个给定字符串 |
  1809. startswith | > 0 | name.startswith('test') | 以任意一个给定字符串开头 |
  1810. endswith | > 0 | name.endswith('test') | 以任意一个给定字符串结尾 |
  1811. equals | > 0 | name.equals('test') | 等于任意一个给定值 |
  1812. notequals | 1 | name.notequals('test') | 不等于给定值 |
  1813. isnull | 0 | name.isnull() | 值为SQL的NULL |
  1814. isnotnull | 0 | name.isnotnull() | 值不为SQL的NULL |
  1815. isempty | 0 | name.isempty('test') | 值为空字符串 |
  1816. isnotempty | 0 | name.isnotempty('test') | 值不是空字符串 |
  1817. isnullorempty | 0 | name.isnullorempty('test') | 值为SQL的NULL或者空字符串 |
  1818. in: query
  1819. items:
  1820. type: string
  1821. name: filter
  1822. type: array
  1823. x-go-name: Filter
  1824. - description: |-
  1825. 指定关联过滤条件,允许指定多个,后端将根据关联过滤条件和其他表关联查询,支持的查询语法和filter相同,
  1826. 和其他表关联的语法如下:
  1827. joint_resources.related_key(origin_key).filter_col.filter_ops(values)
  1828. 其中,joint_resources为要关联的资源名称,related_key为关联表column,origin_key为当前表column, filter_col为
  1829. 关联表用于查询匹配的field名称,field_ops为filter支持的操作,values为匹配的值
  1830. 举例:
  1831. guestnetworks.guest_id(id).ip_addr.equals('10.168.21.222')
  1832. in: query
  1833. items:
  1834. type: string
  1835. name: joint_filter
  1836. type: array
  1837. x-go-name: JointFilter
  1838. - description: 如果filter_any为true,则查询所有filter的并集,否则为交集
  1839. in: query
  1840. name: filter_any
  1841. type: boolean
  1842. x-go-name: FilterAny
  1843. - description: 返回结果只包含指定的字段
  1844. in: query
  1845. items:
  1846. type: string
  1847. name: field
  1848. type: array
  1849. x-go-name: Field
  1850. - description: 用于数据导出,指定导出的数据字段
  1851. in: query
  1852. name: export_keys
  1853. type: string
  1854. x-go-name: ExportKeys
  1855. - description: 返回结果携带delete_fail_reason和update_fail_reason字段
  1856. in: query
  1857. name: show_fail_reason
  1858. type: boolean
  1859. x-go-name: ShowFailReason
  1860. - description: 是否返回状态统计信息,默认为False
  1861. in: query
  1862. name: summary_stats
  1863. type: boolean
  1864. x-go-name: SummaryStats
  1865. - $ref: '#/definitions/TTagSet'
  1866. description: 通过标签过滤(包含这些标签)
  1867. in: query
  1868. name: tags
  1869. x-go-name: Tags
  1870. - $ref: '#/definitions/TTagSetList'
  1871. description: 通过一组标签过滤(还包含这些标签,OR的关系)
  1872. in: query
  1873. name: obj_tags
  1874. x-go-name: ObjTags
  1875. - $ref: '#/definitions/TTagSet'
  1876. description: 通过标签过滤(不包含这些标签)
  1877. in: query
  1878. name: no_tags
  1879. x-go-name: NoTags
  1880. - $ref: '#/definitions/TTagSetList'
  1881. description: 通过一组标签过滤(还不包含这些标签,AND的关系)
  1882. in: query
  1883. name: no_obj_tags
  1884. x-go-name: NoObjTags
  1885. - description: 通过标签排序
  1886. in: query
  1887. name: order_by_tag
  1888. type: string
  1889. x-go-name: OrderByTag
  1890. - description: |-
  1891. deprecated
  1892. 返回资源的标签不包含用户标签
  1893. in: query
  1894. name: without_user_meta
  1895. type: boolean
  1896. x-go-name: WithoutUserMeta
  1897. - description: 返回包含用户标签的资源
  1898. in: query
  1899. name: with_user_meta
  1900. type: boolean
  1901. x-go-name: WithUserMeta
  1902. - description: 返回包含外部标签的资源
  1903. in: query
  1904. name: with_cloud_meta
  1905. type: boolean
  1906. x-go-name: WithCloudMeta
  1907. - description: 返回包含任意标签的资源
  1908. in: query
  1909. name: with_any_meta
  1910. type: boolean
  1911. x-go-name: WithAnyMeta
  1912. - description: 返回列表数据中包含资源的标签数据(Metadata)
  1913. in: query
  1914. name: with_meta
  1915. type: boolean
  1916. x-go-name: WithMeta
  1917. - description: 显示所有的资源,包括模拟的资源
  1918. in: query
  1919. name: show_emulated
  1920. type: boolean
  1921. x-go-name: ShowEmulated
  1922. - description: 以资源ID过滤列表
  1923. in: query
  1924. items:
  1925. type: string
  1926. name: id
  1927. type: array
  1928. x-go-name: Ids
  1929. - description: 以资源名称过滤列表
  1930. in: query
  1931. items:
  1932. type: string
  1933. name: name
  1934. type: array
  1935. x-go-name: Names
  1936. - description: 以资源的状态过滤列表
  1937. in: query
  1938. items:
  1939. type: string
  1940. name: status
  1941. type: array
  1942. x-go-name: Status
  1943. - description: 指定查询的权限范围,可能值为project, domain or system
  1944. in: query
  1945. name: scope
  1946. type: string
  1947. x-go-name: Scope
  1948. - description: 指定项目归属域名称或ID
  1949. in: query
  1950. name: project_domain_id
  1951. type: string
  1952. x-go-name: ProjectDomainId
  1953. - description: 对具有域属性的资源,严格匹配域ID
  1954. in: query
  1955. items:
  1956. type: string
  1957. name: project_domain_ids
  1958. type: array
  1959. x-go-name: ProjectDomainIds
  1960. - description: 按domain名称排序,可能值为asc|desc
  1961. in: query
  1962. name: order_by_domain
  1963. pattern: asc|desc
  1964. type: string
  1965. x-go-name: OrderByDomain
  1966. - $ref: '#/definitions/TTagSetList'
  1967. description: filter by domain tags
  1968. in: query
  1969. name: domain_tags
  1970. x-go-name: DomainTags
  1971. - $ref: '#/definitions/TTagSetList'
  1972. description: filter by domain tags
  1973. in: query
  1974. name: no_domain_tags
  1975. x-go-name: NoDomainTags
  1976. - description: 指定项目的名称或ID
  1977. in: query
  1978. name: project_id
  1979. type: string
  1980. x-go-name: ProjectId
  1981. - description: 对具有项目属性的资源,严格匹配项目ID
  1982. in: query
  1983. items:
  1984. type: string
  1985. name: project_ids
  1986. type: array
  1987. x-go-name: ProjectIds
  1988. - description: 按project名称排序,可能值为asc|desc
  1989. in: query
  1990. name: order_by_project
  1991. pattern: asc|desc
  1992. type: string
  1993. x-go-name: OrderByProject
  1994. - $ref: '#/definitions/TTagSetList'
  1995. description: filter by project tags
  1996. in: query
  1997. name: project_tags
  1998. x-go-name: ProjectTags
  1999. - $ref: '#/definitions/TTagSetList'
  2000. description: filter by no project tags
  2001. in: query
  2002. name: no_project_tags
  2003. x-go-name: NoProjectTags
  2004. - description: filter by project organizations
  2005. in: query
  2006. items:
  2007. type: string
  2008. name: project_organizations
  2009. type: array
  2010. x-go-name: ProjectOrganizations
  2011. - $ref: '#/definitions/TTagSetList'
  2012. description: |-
  2013. ignore
  2014. project tag fitlers imposed by policy
  2015. in: query
  2016. name: policy_project_tags
  2017. x-go-name: PolicyProjectTags
  2018. - description: 列表中包含标记为"系统资源"的资源
  2019. in: query
  2020. name: system
  2021. type: boolean
  2022. x-go-name: System
  2023. - description: 是否显示回收站内的资源,默认不显示(对实现了回收站的资源有效,例如主机,磁盘,镜像)
  2024. in: query
  2025. name: pending_delete
  2026. type: boolean
  2027. x-go-name: PendingDelete
  2028. - description: 以资源是否共享过滤列表
  2029. in: query
  2030. name: is_public
  2031. type: boolean
  2032. x-go-name: IsPublic
  2033. - description: 根据资源的共享范围过滤列表,可能值为:system, domain, project
  2034. in: query
  2035. name: public_scope
  2036. type: string
  2037. x-go-name: PublicScope
  2038. - description: |-
  2039. 通过操作系统架构过滤
  2040. x86会过滤出os_arch为空或os_arch=i386或以x86开头的资源
  2041. arm会过滤出os_arch=aarch64或os_arch=aarch32或者以arm开头的资源
  2042. 其他的输入会过滤出以输入字符开头的资源
  2043. enmu: x86, arm
  2044. in: query
  2045. items:
  2046. type: string
  2047. name: os_arch
  2048. type: array
  2049. x-go-name: OsArch
  2050. - description: 以镜像的格式过滤,可能值为:qcow2, iso, vmdk, vhd, raw等
  2051. in: query
  2052. items:
  2053. type: string
  2054. name: disk_formats
  2055. type: array
  2056. x-go-name: DiskFormats
  2057. - description: 列出是否支持UEFI启动的镜像
  2058. in: query
  2059. name: uefi
  2060. type: boolean
  2061. x-go-name: Uefi
  2062. - description: '根据已转换格式过滤, 可能值为: qcow2, vmdk, vhd, raw等'
  2063. in: query
  2064. items:
  2065. type: string
  2066. name: subFormats
  2067. type: array
  2068. x-go-name: SubFormats
  2069. - description: 是否为标准镜像
  2070. in: query
  2071. name: is_standard
  2072. type: boolean
  2073. x-go-name: IsStandard
  2074. - description: 是否删除保护
  2075. in: query
  2076. name: protected
  2077. type: boolean
  2078. x-go-name: Protected
  2079. - description: 是否为主机镜像的子镜像
  2080. in: query
  2081. name: is_guest_image
  2082. type: boolean
  2083. x-go-name: IsGuestImage
  2084. - description: 是否为数据盘
  2085. in: query
  2086. name: is_data
  2087. type: boolean
  2088. x-go-name: IsData
  2089. - description: '操作系统类型,可能值为: Linux, Windows, FreeBSD 等'
  2090. in: query
  2091. items:
  2092. type: string
  2093. name: os_types
  2094. type: array
  2095. x-go-name: OsTypes
  2096. - description: 操作系统精确匹配
  2097. in: query
  2098. name: os_type_precise_match
  2099. type: boolean
  2100. x-go-name: OsTypePreciseMatch
  2101. - description: '操作系统架构, 可能值为: arm, x86 等'
  2102. in: query
  2103. items:
  2104. type: string
  2105. name: os_archs
  2106. type: array
  2107. x-go-name: OsArchs
  2108. - description: 操作系统架构精确匹配
  2109. in: query
  2110. name: os_arch_precise_match
  2111. type: boolean
  2112. x-go-name: OsArchPreciseMatch
  2113. - description: '发行版本,可能值为: CentOS, Ubuntu, Debian, ArchLinux, OpenEuler 等'
  2114. in: query
  2115. items:
  2116. type: string
  2117. name: distributions
  2118. type: array
  2119. x-go-name: Distributions
  2120. - description: 发行版精确匹配
  2121. in: query
  2122. name: DistributionPreciseMatch
  2123. type: boolean
  2124. responses:
  2125. "200":
  2126. $ref: '#/responses/image_ListItemFilterOutput'
  2127. summary: 磁盘镜像列表
  2128. tags:
  2129. - image
  2130. post:
  2131. description: 新建
  2132. operationId: image_ValidateCreateData
  2133. parameters:
  2134. - in: body
  2135. name: body
  2136. schema:
  2137. properties:
  2138. count:
  2139. default: 1
  2140. format: int64
  2141. type: integer
  2142. x-go-name: Count
  2143. image:
  2144. $ref: '#/definitions/ImageCreateInput'
  2145. type: object
  2146. x-go-name: Body
  2147. responses:
  2148. "200":
  2149. $ref: '#/responses/image_ValidateCreateDataOutput'
  2150. summary: 新建
  2151. tags:
  2152. - image
  2153. /images/{id}:
  2154. delete:
  2155. description: 删除
  2156. operationId: image_CustomizeDelete
  2157. parameters:
  2158. - description: The Id or Name of image
  2159. in: path
  2160. name: id
  2161. required: true
  2162. type: string
  2163. x-go-name: Id
  2164. responses:
  2165. "200":
  2166. $ref: '#/responses/image_CustomizeDeleteOutput'
  2167. summary: 删除
  2168. tags:
  2169. - image
  2170. get:
  2171. description: 获取详情
  2172. operationId: image_FetchCustomizeColumns
  2173. parameters:
  2174. - description: The Id or Name of image
  2175. in: path
  2176. name: id
  2177. required: true
  2178. type: string
  2179. x-go-name: Id
  2180. responses:
  2181. "200":
  2182. $ref: '#/responses/image_FetchCustomizeColumnsOutput'
  2183. summary: 获取详情
  2184. tags:
  2185. - image
  2186. put:
  2187. description: 更新
  2188. operationId: image_ValidateUpdateData
  2189. parameters:
  2190. - description: The Id or Name of image
  2191. in: path
  2192. name: id
  2193. required: true
  2194. type: string
  2195. x-go-name: Id
  2196. - in: body
  2197. name: body
  2198. schema:
  2199. properties:
  2200. image:
  2201. $ref: '#/definitions/ImageUpdateInput'
  2202. type: object
  2203. x-go-name: Body
  2204. responses:
  2205. "200":
  2206. $ref: '#/responses/image_ValidateUpdateDataOutput'
  2207. summary: 更新
  2208. tags:
  2209. - image
  2210. /images/{id}/cancel-delete:
  2211. post:
  2212. description: 执行操作CancelDelete
  2213. operationId: image_PerformCancelDelete
  2214. parameters:
  2215. - description: The Id or Name of image
  2216. in: path
  2217. name: id
  2218. required: true
  2219. type: string
  2220. x-go-name: Id
  2221. responses:
  2222. "200":
  2223. $ref: '#/responses/image_PerformCancelDeleteOutput'
  2224. summary: 执行操作CancelDelete
  2225. tags:
  2226. - image
  2227. /images/{id}/change-owner:
  2228. post:
  2229. description: 执行操作ChangeOwner
  2230. operationId: image_PerformChangeOwner
  2231. parameters:
  2232. - description: The Id or Name of image
  2233. in: path
  2234. name: id
  2235. required: true
  2236. type: string
  2237. x-go-name: Id
  2238. - in: body
  2239. name: body
  2240. schema:
  2241. properties:
  2242. image:
  2243. $ref: '#/definitions/PerformChangeProjectOwnerInput'
  2244. type: object
  2245. x-go-name: Body
  2246. responses:
  2247. "200":
  2248. $ref: '#/responses/image_PerformChangeOwnerOutput'
  2249. summary: 执行操作ChangeOwner
  2250. tags:
  2251. - image
  2252. /images/{id}/mark-standard:
  2253. post:
  2254. description: 执行操作MarkStandard
  2255. operationId: image_PerformMarkStandard
  2256. parameters:
  2257. - description: The Id or Name of image
  2258. in: path
  2259. name: id
  2260. required: true
  2261. type: string
  2262. x-go-name: Id
  2263. responses:
  2264. "200":
  2265. $ref: '#/responses/image_PerformMarkStandardOutput'
  2266. summary: 执行操作MarkStandard
  2267. tags:
  2268. - image
  2269. /images/{id}/metadata:
  2270. get:
  2271. description: 获取指定信息Metadata
  2272. operationId: image_GetDetailsMetadata
  2273. parameters:
  2274. - description: |-
  2275. 指定需要获取的所有标签的KEY列表,如果列表为空,则获取全部标签
  2276. 标签分为
  2277. 类型 | 说明 |
  2278. ----------|---------------------------------------------|
  2279. 系统标签 | 平台定义的标签 |
  2280. 用户标签 | key以user:为前缀,用户自定义标签 |
  2281. 外部标签 | key以ext:为前缀,为从其他平台同步过来的标签 |
  2282. in: query
  2283. items:
  2284. type: string
  2285. name: field
  2286. type: array
  2287. x-go-name: Field
  2288. - description: 按标签前缀过滤
  2289. in: query
  2290. name: prefix
  2291. type: string
  2292. x-go-name: Prefix
  2293. - description: The Id or Name of image
  2294. in: path
  2295. name: id
  2296. required: true
  2297. type: string
  2298. x-go-name: Id
  2299. responses:
  2300. "200":
  2301. $ref: '#/responses/image_GetDetailsMetadataOutput'
  2302. summary: 获取资源标签(元数据)
  2303. tags:
  2304. - image
  2305. /images/{id}/private:
  2306. post:
  2307. description: 执行操作Private
  2308. operationId: image_PerformPrivate
  2309. parameters:
  2310. - description: The Id or Name of image
  2311. in: path
  2312. name: id
  2313. required: true
  2314. type: string
  2315. x-go-name: Id
  2316. - in: body
  2317. name: body
  2318. schema:
  2319. properties:
  2320. image:
  2321. $ref: '#/definitions/PerformPrivateInput'
  2322. type: object
  2323. x-go-name: Body
  2324. responses:
  2325. "200":
  2326. $ref: '#/responses/image_PerformPrivateOutput'
  2327. summary: 执行操作Private
  2328. tags:
  2329. - image
  2330. /images/{id}/probe:
  2331. post:
  2332. description: 执行操作Probe
  2333. operationId: image_PerformProbe
  2334. parameters:
  2335. - description: The Id or Name of image
  2336. in: path
  2337. name: id
  2338. required: true
  2339. type: string
  2340. x-go-name: Id
  2341. - in: body
  2342. name: body
  2343. schema:
  2344. properties:
  2345. image:
  2346. $ref: '#/definitions/PerformProbeInput'
  2347. type: object
  2348. x-go-name: Body
  2349. responses:
  2350. "200":
  2351. $ref: '#/responses/image_PerformProbeOutput'
  2352. summary: 执行操作Probe
  2353. tags:
  2354. - image
  2355. /images/{id}/public:
  2356. post:
  2357. description: 执行操作Public
  2358. operationId: image_PerformPublic
  2359. parameters:
  2360. - description: The Id or Name of image
  2361. in: path
  2362. name: id
  2363. required: true
  2364. type: string
  2365. x-go-name: Id
  2366. - in: body
  2367. name: body
  2368. schema:
  2369. properties:
  2370. image:
  2371. $ref: '#/definitions/PerformPublicProjectInput'
  2372. type: object
  2373. x-go-name: Body
  2374. responses:
  2375. "200":
  2376. $ref: '#/responses/image_PerformPublicOutput'
  2377. summary: 执行操作Public
  2378. tags:
  2379. - image
  2380. /images/{id}/set-class-metadata:
  2381. post:
  2382. description: 执行操作SetClassMetadata
  2383. operationId: image_PerformSetClassMetadata
  2384. parameters:
  2385. - description: The Id or Name of image
  2386. in: path
  2387. name: id
  2388. required: true
  2389. type: string
  2390. x-go-name: Id
  2391. - in: body
  2392. name: body
  2393. schema:
  2394. properties:
  2395. image:
  2396. additionalProperties:
  2397. type: string
  2398. type: object
  2399. x-go-name: Input
  2400. type: object
  2401. x-go-name: Body
  2402. responses:
  2403. "200":
  2404. $ref: '#/responses/image_PerformSetClassMetadataOutput'
  2405. summary: 执行操作SetClassMetadata
  2406. tags:
  2407. - image
  2408. /images/{id}/status:
  2409. get:
  2410. description: 获取指定信息Status
  2411. operationId: image_GetDetailsStatus
  2412. parameters:
  2413. - description: The Id or Name of image
  2414. in: path
  2415. name: id
  2416. required: true
  2417. type: string
  2418. x-go-name: Id
  2419. responses:
  2420. "200":
  2421. $ref: '#/responses/image_GetDetailsStatusOutput'
  2422. summary: 获取资源状态
  2423. tags:
  2424. - image
  2425. /images/{id}/subformats:
  2426. get:
  2427. description: 获取指定信息Subformats
  2428. operationId: image_GetDetailsSubformats
  2429. parameters:
  2430. - description: The Id or Name of image
  2431. in: path
  2432. name: id
  2433. required: true
  2434. type: string
  2435. x-go-name: Id
  2436. responses:
  2437. "200":
  2438. $ref: '#/responses/image_GetDetailsSubformatsOutput'
  2439. summary: 获取指定信息Subformats
  2440. tags:
  2441. - image
  2442. /images/{id}/update-status:
  2443. post:
  2444. description: 执行操作UpdateStatus
  2445. operationId: image_PerformUpdateStatus
  2446. parameters:
  2447. - description: The Id or Name of image
  2448. in: path
  2449. name: id
  2450. required: true
  2451. type: string
  2452. x-go-name: Id
  2453. - in: body
  2454. name: body
  2455. schema:
  2456. properties:
  2457. image:
  2458. $ref: '#/definitions/ImageUpdateStatusInput'
  2459. type: object
  2460. x-go-name: Body
  2461. responses:
  2462. "200":
  2463. $ref: '#/responses/image_PerformUpdateStatusOutput'
  2464. summary: 执行操作UpdateStatus
  2465. tags:
  2466. - image
  2467. /images/{id}/update-torrent-status:
  2468. post:
  2469. description: 执行操作UpdateTorrentStatus
  2470. operationId: image_PerformUpdateTorrentStatus
  2471. parameters:
  2472. - description: The Id or Name of image
  2473. in: path
  2474. name: id
  2475. required: true
  2476. type: string
  2477. x-go-name: Id
  2478. responses:
  2479. "200":
  2480. $ref: '#/responses/image_PerformUpdateTorrentStatusOutput'
  2481. summary: 执行操作UpdateTorrentStatus
  2482. tags:
  2483. - image
  2484. /images/detail:
  2485. get:
  2486. description: 获取指定资源类的信息Detail
  2487. operationId: image_GetPropertyDetail
  2488. responses:
  2489. "200":
  2490. $ref: '#/responses/image_GetPropertyDetailOutput'
  2491. summary: 获取指定资源类的信息Detail
  2492. tags:
  2493. - image
  2494. /images/vmware-account-added:
  2495. post:
  2496. description: 执行操作VmwareAccountAdded
  2497. operationId: image_PerformVmwareAccountAdded
  2498. parameters:
  2499. - in: body
  2500. name: body
  2501. schema:
  2502. properties:
  2503. image:
  2504. $ref: '#/definitions/PerformChangeProjectOwnerInput'
  2505. type: object
  2506. x-go-name: Body
  2507. responses:
  2508. "200":
  2509. $ref: '#/responses/image_PerformVmwareAccountAddedOutput'
  2510. summary: 执行操作VmwareAccountAdded
  2511. tags:
  2512. - image
  2513. produces:
  2514. - application/json
  2515. responses:
  2516. guest_image_CustomizeDeleteOutput:
  2517. description: ""
  2518. schema:
  2519. properties:
  2520. guest_image:
  2521. $ref: '#/definitions/GuestImageDetails'
  2522. type: object
  2523. guest_image_FetchCustomizeColumnsOutput:
  2524. description: ""
  2525. schema:
  2526. properties:
  2527. guest_image:
  2528. $ref: '#/definitions/GuestImageDetails'
  2529. type: object
  2530. guest_image_GetDetailsMetadataOutput:
  2531. description: ""
  2532. schema:
  2533. properties:
  2534. guest_image:
  2535. additionalProperties:
  2536. type: string
  2537. type: object
  2538. x-go-name: Output
  2539. type: object
  2540. guest_image_GetDetailsStatusOutput:
  2541. description: ""
  2542. schema:
  2543. properties:
  2544. guest_image:
  2545. $ref: '#/definitions/GetDetailsStatusOutput'
  2546. type: object
  2547. guest_image_ListItemFilterOutput:
  2548. description: ""
  2549. schema:
  2550. properties:
  2551. guest_images:
  2552. items:
  2553. $ref: '#/definitions/GuestImageDetails'
  2554. type: array
  2555. x-go-name: Output
  2556. limit:
  2557. format: int64
  2558. type: integer
  2559. x-go-name: Limit
  2560. offset:
  2561. format: int64
  2562. type: integer
  2563. x-go-name: Offset
  2564. total:
  2565. format: int64
  2566. type: integer
  2567. x-go-name: Total
  2568. type: object
  2569. guest_image_PerformCancelDeleteOutput:
  2570. description: ""
  2571. guest_image_PerformChangeOwnerOutput:
  2572. description: ""
  2573. guest_image_PerformPrivateOutput:
  2574. description: ""
  2575. guest_image_PerformPublicOutput:
  2576. description: ""
  2577. guest_image_PerformSetClassMetadataOutput:
  2578. description: ""
  2579. guest_image_ValidateCreateDataOutput:
  2580. description: ""
  2581. schema:
  2582. properties:
  2583. guest_image:
  2584. $ref: '#/definitions/GuestImageDetails'
  2585. type: object
  2586. guest_image_ValidateUpdateDataOutput:
  2587. description: ""
  2588. schema:
  2589. properties:
  2590. guest_image:
  2591. $ref: '#/definitions/GuestImageDetails'
  2592. type: object
  2593. image_CustomizeDeleteOutput:
  2594. description: ""
  2595. schema:
  2596. properties:
  2597. image:
  2598. $ref: '#/definitions/ImageDetails'
  2599. type: object
  2600. image_FetchCustomizeColumnsOutput:
  2601. description: ""
  2602. schema:
  2603. properties:
  2604. image:
  2605. $ref: '#/definitions/ImageDetails'
  2606. type: object
  2607. image_GetDetailsMetadataOutput:
  2608. description: ""
  2609. schema:
  2610. properties:
  2611. image:
  2612. additionalProperties:
  2613. type: string
  2614. type: object
  2615. x-go-name: Output
  2616. type: object
  2617. image_GetDetailsStatusOutput:
  2618. description: ""
  2619. schema:
  2620. properties:
  2621. image:
  2622. $ref: '#/definitions/GetDetailsStatusOutput'
  2623. type: object
  2624. image_GetDetailsSubformatsOutput:
  2625. description: ""
  2626. image_GetPropertyDetailOutput:
  2627. description: ""
  2628. image_ListItemFilterOutput:
  2629. description: ""
  2630. schema:
  2631. properties:
  2632. images:
  2633. items:
  2634. $ref: '#/definitions/ImageDetails'
  2635. type: array
  2636. x-go-name: Output
  2637. limit:
  2638. format: int64
  2639. type: integer
  2640. x-go-name: Limit
  2641. offset:
  2642. format: int64
  2643. type: integer
  2644. x-go-name: Offset
  2645. total:
  2646. format: int64
  2647. type: integer
  2648. x-go-name: Total
  2649. type: object
  2650. image_PerformCancelDeleteOutput:
  2651. description: ""
  2652. image_PerformChangeOwnerOutput:
  2653. description: ""
  2654. image_PerformMarkStandardOutput:
  2655. description: ""
  2656. image_PerformPrivateOutput:
  2657. description: ""
  2658. image_PerformProbeOutput:
  2659. description: ""
  2660. image_PerformPublicOutput:
  2661. description: ""
  2662. image_PerformSetClassMetadataOutput:
  2663. description: ""
  2664. image_PerformUpdateStatusOutput:
  2665. description: ""
  2666. image_PerformUpdateTorrentStatusOutput:
  2667. description: ""
  2668. image_PerformVmwareAccountAddedOutput:
  2669. description: ""
  2670. image_ValidateCreateDataOutput:
  2671. description: ""
  2672. schema:
  2673. properties:
  2674. image:
  2675. $ref: '#/definitions/ImageDetails'
  2676. type: object
  2677. image_ValidateUpdateDataOutput:
  2678. description: ""
  2679. schema:
  2680. properties:
  2681. image:
  2682. $ref: '#/definitions/ImageDetails'
  2683. type: object
  2684. models_GetImageQuotaOutput:
  2685. description: ""
  2686. schema:
  2687. properties:
  2688. image_quotas:
  2689. items:
  2690. $ref: '#/definitions/SImageQuotaDetail'
  2691. type: array
  2692. x-go-name: Output
  2693. type: object
  2694. models_ListImageQuotasOutput:
  2695. description: ""
  2696. schema:
  2697. properties:
  2698. image_quotas:
  2699. items:
  2700. $ref: '#/definitions/SImageQuotaDetail'
  2701. type: array
  2702. x-go-name: Output
  2703. type: object
  2704. models_SetRegionQuotasOutput:
  2705. description: ""
  2706. schema:
  2707. properties:
  2708. image_quotas:
  2709. items:
  2710. $ref: '#/definitions/SImageQuotaDetail'
  2711. type: array
  2712. x-go-name: Output
  2713. type: object
  2714. schemes:
  2715. - https
  2716. - http
  2717. securityDefinitions:
  2718. keystone:
  2719. in: header
  2720. name: X-Auth-Token
  2721. type: apiKey
  2722. swagger: "2.0"