Documentation
¶
Index ¶
- func NewCtyunRedisAssociationEip() resource.Resource
- func NewCtyunRedisInstance() resource.Resource
- func NewCtyunRedisInstances() datasource.DataSource
- func NewCtyunRedisSpecs() datasource.DataSource
- type CtyunRedisAssociationEipConfig
- type CtyunRedisInstanceConfig
- type CtyunRedisInstancesConfig
- type CtyunRedisInstancesModel
- type CtyunRedisSpecsConfig
- type CtyunRedisSpecsMirror
- type CtyunRedisSpecsSeriesInfo
- type CtyunRedisSpecsSeriesInfoListResItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCtyunRedisInstance ¶
func NewCtyunRedisInstances ¶
func NewCtyunRedisInstances() datasource.DataSource
func NewCtyunRedisSpecs ¶
func NewCtyunRedisSpecs() datasource.DataSource
Types ¶
type CtyunRedisInstanceConfig ¶
type CtyunRedisInstanceConfig struct {
ID types.String `tfsdk:"id"`
Name types.String `tfsdk:"name"`
MasterOrderID types.String `tfsdk:"master_order_id"`
RegionID types.String `tfsdk:"region_id"`
ProjectID types.String `tfsdk:"project_id"`
CycleCount types.Int32 `tfsdk:"cycle_count"`
CycleType types.String `tfsdk:"cycle_type"` // on_demand 和 month
AzName types.String `tfsdk:"az_name"` /* 主可用区名称,您可以查看<a href="https://www.ctyun.cn/document/10026730/10028695">地域和可用区</a>来了解可用区<br><span style="background-color: rgb(73, 204, 144);color: rgb(255,255,255);padding: 2px; margin:2px">查</span> <a href="https://eop.ctyun.cn/ebp/ctapiDocument/search?sid=49&api=17764&isNormal=1&vid=270">查询可用区信息</a> name字段 */
SecondaryAzName types.String `tfsdk:"secondary_az_name"` /* 备可用区名称(双/多副本建议填写)<br>默认与主可用区相同 */
EngineVersion types.String `tfsdk:"engine_version"` /* Redis引擎版本<br><span style="background-color: rgb(73, 204, 144);color: rgb(255,255,255);padding: 2px; margin:2px">查</span> <a href="https://eop.ctyun.cn/ebp/ctapiDocument/search?sid=49&api=7726&isNormal=1&vid=270">资源池可创建规格</a> 使用表SeriesInfo中的engineTypeItems(引擎版本可选值) */
Version types.String `tfsdk:"version"` /* 版本类型。<br><span style="background-color: rgb(73, 204, 144);color: rgb(255,255,255);padding: 2px; margin:2px">查</span> <a href="https://eop.ctyun.cn/ebp/ctapiDocument/search?sid=49&api=7726&isNormal=1&vid=270">资源池可创建规格</a> 使用表SeriesInfo中的version值<br>可选值:<li>BASIC:基础版<li>PLUS:增强版<li>Classic:经典版 */
Edition types.String `tfsdk:"edition"` /* 实例类型<br><span style="background-color: rgb(73, 204, 144);color: rgb(255,255,255);padding: 2px; margin:2px">查</span> <a href="https://eop.ctyun.cn/ebp/ctapiDocument/search?sid=49&api=7726&isNormal=1&vid=270">资源池可创建规格</a> 使用表SeriesInfo中的seriesCode值 */
HostType types.String `tfsdk:"host_type"` /* 主机类型<br><span style="background-color: rgb(73, 204, 144);color: rgb(255,255,255);padding: 2px; margin:2px">查</span> <a href="https://eop.ctyun.cn/ebp/ctapiDocument/search?sid=49&api=7726&isNormal=1&vid=270">资源池可创建规格</a> 使用表resItems中resType==ecs的items(主机类型可选值) */
DataDiskType types.String `tfsdk:"data_disk_type"`
ShardMemSize types.Int32 `tfsdk:"shard_mem_size"` /* 单分片内存(GB)<br><span style="background-color: rgb(73, 204, 144);color: rgb(255,255,255);padding: 2px; margin:2px">查</span> <a href="https://eop.ctyun.cn/ebp/ctapiDocument/search?sid=49&api=7726&isNormal=1&vid=270">资源池可创建规格</a> 使用表SeriesInfo中shardMemSizeItems(单分片内存可选值),若shardMemSizeItems为空则无需填写 */
ShardCount types.Int32 `tfsdk:"shard_count"`
CopiesCount types.Int32 `tfsdk:"copies_count"` /* 副本数量,取值范围2-6。<li>OriginalMultipleReadLvs:必填</li><li>StandardDual/DirectCluster/ClusterOriginalProxy:选填</li><li>其他实例类型:无需填写</li> */
InstanceName types.String `tfsdk:"instance_name"` /* 实例名称<li>字母开头</li><li>可包含字母/数字/中划线</li><li>长度1-39<li>实例名称不可重复</li> */
VpcID types.String `tfsdk:"vpc_id"` /* 虚拟私有云ID,您可以查看<a href="https://www.ctyun.cn/document/10026755/10028310">产品定义-虚拟私有云</a>来了解虚拟私有云<br><span style="background-color: rgb(73, 204, 144);color: rgb(255,255,255);padding: 2px; margin:2px">查</span> <a href="https://eop.ctyun.cn/ebp/ctapiDocument/search?sid=18&api=4814&data=94&vid=88">查询VPC列表</a> vpcID字段。<br><span style="background-color: rgb(97, 175, 254);color: rgb(255,255,255);padding: 2px; margin:2px">创</span> <a href="https://eop.ctyun.cn/ebp/ctapiDocument/search?sid=18&api=4811&data=94&vid=88">创建VPC</a> */
SubnetID types.String `tfsdk:"subnet_id"` /* 子网ID,您可以查看<a href="https://www.ctyun.cn/document/10026755/10098380">基本概念</a>来查找子网的相关定义<br><span style="background-color: rgb(73, 204, 144);color: rgb(255,255,255);padding: 2px; margin:2px">查</span> <a href="https://eop.ctyun.cn/ebp/ctapiDocument/search?sid=18&api=8659&data=94&vid=88">查询子网列表</a> subnetID字段。 */
SecurityGroupID types.String `tfsdk:"security_group_id"` /* 安全组ID,您可以查看<a href="https://www.ctyun.cn/document/10026755/10028520">安全组概述</a>了解安全组相关信息<br><span style="background-color: rgb(73, 204, 144);color: rgb(255,255,255);padding: 2px; margin:2px">查</span> <a href="https://eop.ctyun.cn/ebp/searchCtapi/ctApiDebug?product=18&api=4817&vid=88">查询用户安全组列表</a> id字段。 */
Password types.String `tfsdk:"password"` /* 实例密码<li>长度8-26字符</li><li>必须同时包含大写字母、小写字母、数字、英文格式特殊符号(@%^*_+!$-=.) 中的三种类型</li><li>不能有空格</li> */
AutoRenew types.Bool `tfsdk:"auto_renew"` /* 自动续费开关<li>true:开启</li><li>false:关闭(默认)</li> */
AutoRenewCycleCount types.Int32 `tfsdk:"auto_renew_cycle_count"` /* 自动续费周期(月)<br>autoRenew=true时必填,可选:1-6,12,24,36 */
MaintenanceTime types.String `tfsdk:"maintenance_time"`
ProtectionStatus types.Bool `tfsdk:"protection_status"`
}
type CtyunRedisInstancesConfig ¶
type CtyunRedisInstancesConfig struct {
RegionID types.String `tfsdk:"region_id"`
PageNo types.Int32 `tfsdk:"page_no"`
PageSize types.Int32 `tfsdk:"page_size"`
InstanceName types.String `tfsdk:"instance_name"`
ProjectID types.String `tfsdk:"project_id"`
Instances []CtyunRedisInstancesModel `tfsdk:"instances"`
}
type CtyunRedisInstancesModel ¶
type CtyunRedisInstancesModel struct {
ID types.String `tfsdk:"id"`
InstanceName types.String `tfsdk:"instance_name"`
AzName types.String `tfsdk:"az_name"`
SecondaryAzName types.String `tfsdk:"secondary_az_name"`
EngineVersion types.String `tfsdk:"engine_version"`
DataDiskType types.String `tfsdk:"data_disk_type"`
ShardMemSize types.Int32 `tfsdk:"shard_mem_size"`
ShardCount types.Int32 `tfsdk:"shard_count"`
CopiesCount types.Int32 `tfsdk:"copies_count"`
EipAddress types.String `tfsdk:"eip_address"`
CreateTime types.String `tfsdk:"create_time"`
}
type CtyunRedisSpecsConfig ¶
type CtyunRedisSpecsConfig struct {
RegionID types.String `tfsdk:"region_id"`
Mirrors []CtyunRedisSpecsMirror `tfsdk:"mirrors"`
Series []CtyunRedisSpecsSeriesInfo `tfsdk:"series_infos"`
}
type CtyunRedisSpecsMirror ¶
type CtyunRedisSpecsSeriesInfo ¶
type CtyunRedisSpecsSeriesInfo struct {
Version types.String `tfsdk:"version"` /* 版本类型<li>BASIC:基础版<li>PLUS:增强版<li>Classic:经典版<li>Capacity:容量型 */
SeriesCode types.String `tfsdk:"series_code"` /* 产品系列编码 */
SeriesName types.String `tfsdk:"series_name"` /* 产品系列名称 */
SeriesId types.Int64 `tfsdk:"series_id"` /* 产品系列ID */
EngineTypeItems []string `tfsdk:"engine_type_items"` /* 引擎版本 */
MemSizeItems []string `tfsdk:"mem_size_items"` /* 内存容量可选值(GB)<br>说明:version为Classic和Capacity有值 */
ShardMemSizeItems []string `tfsdk:"shard_mem_size_items"` /* 单分片内存可选值(GB)。<br>说明:version为BASIC和PLUS有值 */
ResItems []CtyunRedisSpecsSeriesInfoListResItem `tfsdk:"res_items"`
}
type CtyunRedisSpecsSeriesInfoListResItem ¶
type CtyunRedisSpecsSeriesInfoListResItem struct {
ResType types.String `tfsdk:"res_type"` /* 资源类型<li>ecs:云服务器<li>ebs:磁盘 */
ResName types.String `tfsdk:"res_name"` /* 资源名称 */
Items []string `tfsdk:"items"` /* 资源类型可选值<br>说明:以实际返回为准<br><br>云服务器<li>S7:通用型<li>C7:计算型<li>M7:内存型<li>HS1:海光通用型<li>HC1:海光计算增强型<li>KS1:鲲鹏通用型<li>KC1:鲲鹏计算增强型 <br><br>磁盘<li>SATA:普通IO<li>SAS:高IO<li>SSD:超高IO<li>FAST-SSD:极速型SSD */
}
Click to show internal directories.
Click to hide internal directories.