yunion.io/x/cloudmux@v0.3.10-0-alpha.1/pkg/cloudprovider/elasticcache.go (about)

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