elasticcache.go 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 cloudprovider
  15. import "yunion.io/x/pkg/util/billing"
  16. // https://support.huaweicloud.com/api-dcs/dcs-zh-api-180423019.html
  17. // https://help.aliyun.com/document_detail/60873.html?spm=a2c4g.11174283.6.715.7412dce0qSYemb
  18. type SCloudElasticCacheInput struct {
  19. InstanceType string // 实例规格 redis.master.small.default
  20. CapacityGB int64 // 缓存容量 华为云此项参数必选
  21. InstanceName string // 实例名称
  22. UserName string // redis 用户名,可选
  23. Password string // redis 用户密码,可选
  24. ZoneIds []string // 可用区, 可选
  25. ChargeType string // 计费类型,可选
  26. NodeType string // 节点类型,可选
  27. NetworkType string // 网络类型 VPC|CLASSIC,可选
  28. VpcId string // VPC ,可选
  29. NetworkId string // 子网ID,可选
  30. Engine string // Redis|Memcache
  31. EngineVersion string // 版本类型
  32. PrivateIpAddress string // 指定新实例的内网IP地址。
  33. SecurityGroupIds []string // 安全组ID
  34. EipId string // 绑定弹性IP
  35. MaintainBegin string // 维护时间窗开始时间,格式为HH:mm:ss
  36. MaintainEnd string // 维护时间窗结束时间,格式为HH:mm:ss
  37. BillingCycle *billing.SBillingCycle // 包年包月
  38. ProjectId string
  39. Tags map[string]string
  40. }
  41. type SCloudElasticCacheAccountInput struct {
  42. AccountName string // 账号名称
  43. AccountPassword string // 账号密码
  44. AccountPrivilege string // 账号权限
  45. Description string // 账号描述
  46. }
  47. type SCloudElasticCacheAccountResetPasswordInput struct {
  48. NoPasswordAccess *bool // 免密码访问
  49. NewPassword string // 新密码
  50. OldPassword *string // 旧密码。required by huawei
  51. }
  52. type SCloudElasticCacheAccountUpdateInput struct {
  53. NoPasswordAccess *bool // 免密码访问
  54. Password *string // 新密码
  55. OldPassword *string // 旧密码。required by huawei
  56. AccountPrivilege *string
  57. Description *string
  58. }
  59. type SCloudElasticCacheBackupPolicyUpdateInput struct {
  60. BackupType string // auto:自动备份 / manual:手动备份
  61. BackupReservedDays int // 1-7
  62. PreferredBackupPeriod string // Monday(周一) / Tuesday(周二) / Wednesday(周三) / Thursday(周四) / Friday(周五) / Saturday(周六) / Sunday(周日)
  63. PreferredBackupTime string // 备份时间,格式:HH:mmZ-HH:mmZ
  64. }
  65. type SCloudElasticCacheFlushInstanceInput struct {
  66. Password string // root账号密码. requied by qcloud
  67. }