mongodb.go 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. // Copyright 2019 Yunion
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package compute
  15. import (
  16. "yunion.io/x/onecloud/pkg/apis"
  17. )
  18. type MongoDBCreateInput struct {
  19. apis.VirtualResourceCreateInput
  20. DeletePreventableCreateInput
  21. }
  22. type SMongoDBChangeConfigInput struct {
  23. apis.Meta
  24. InstanceType string `json:"instance_type"`
  25. DiskSizeGB int `json:"disk_size_gb"`
  26. }
  27. type MongoDBListInput struct {
  28. apis.VirtualResourceListInput
  29. apis.ExternalizedResourceBaseListInput
  30. apis.DeletePreventableResourceBaseListInput
  31. VpcFilterListInput
  32. ZoneResourceInput
  33. VcpuCount int `json:"vcpu_count"`
  34. VmemSizeMb int `json:"vmem_size_mb"`
  35. Category string `json:"category"`
  36. Engine string `json:"engine"`
  37. EngineVersion string `json:"engine_version"`
  38. InstanceType string `json:"instance_type"`
  39. }
  40. type MongoDBDetails struct {
  41. apis.VirtualResourceDetails
  42. CloudregionResourceInfo
  43. ZoneResourceInfoBase
  44. ManagedResourceInfo
  45. VpcResourceInfoBase
  46. SMongoDB
  47. // IP子网名称
  48. // example: test-network
  49. Network string `json:"network"`
  50. }
  51. type MongoDBResourceInfoBase struct {
  52. // MongoDB实例名称
  53. MongoDB string `json:"mongodb"`
  54. }
  55. type MongoDBResourceInfo struct {
  56. MongoDBResourceInfoBase
  57. // 归属VPC ID
  58. VpcId string `json:"vpc_id"`
  59. VpcResourceInfo
  60. }
  61. type MongoDBResourceInput struct {
  62. // MongoDB实例(ID or Name)
  63. MongoDBId string `json:"mongodb_id"`
  64. // swagger:ignore
  65. // Deprecated
  66. MongoDB string `json:"mongodb" yunion-deprecated-by:"mongodb_id"`
  67. }
  68. type MongoDBFilterListInputBase struct {
  69. MongoDBResourceInput
  70. // 以MongoDB实例名字排序
  71. OrderByMongoDB string `json:"order_by_mongodb"`
  72. }
  73. type MongoDBFilterListInput struct {
  74. MongoDBFilterListInputBase
  75. VpcFilterListInput
  76. }
  77. type MongoDBJoinListInput struct {
  78. apis.VirtualJointResourceBaseListInput
  79. MongoDBFilterListInput
  80. }
  81. type MongoDBRemoteUpdateInput struct {
  82. // 是否覆盖替换所有标签
  83. ReplaceTags *bool `json:"replace_tags" help:"replace all remote tags"`
  84. }
  85. type MongoDBNetworkListInput struct {
  86. MongoDBJoinListInput
  87. NetworkFilterListInput
  88. }
  89. type MongoDBAutoRenewInput struct {
  90. // 是否自动续费
  91. AutoRenew bool `json:"auto_renew"`
  92. }
  93. type MongoDBSetSecgroupInput struct {
  94. SecgroupIds []string `json:"secgroup_ids"`
  95. }