Documentation
¶
Index ¶
- func NewCtyunMysqlAssociationEip() resource.Resource
- func NewCtyunPgsqlInstances() datasource.DataSource
- func NewCtyunPostgresqlInstance() resource.Resource
- type AvailabilityZoneModel
- type CtyunPgsqlAssociationEip
- func (c *CtyunPgsqlAssociationEip) BindLoop(ctx context.Context, config *CtyunPgsqlAssociationEipConfig, bindStatus int32, ...) (err error)
- func (c *CtyunPgsqlAssociationEip) Configure(ctx context.Context, request resource.ConfigureRequest, ...)
- func (c *CtyunPgsqlAssociationEip) Create(ctx context.Context, request resource.CreateRequest, ...)
- func (c *CtyunPgsqlAssociationEip) Delete(ctx context.Context, request resource.DeleteRequest, ...)
- func (c *CtyunPgsqlAssociationEip) ImportState(ctx context.Context, request resource.ImportStateRequest, ...)
- func (c *CtyunPgsqlAssociationEip) Metadata(ctx context.Context, request resource.MetadataRequest, ...)
- func (c *CtyunPgsqlAssociationEip) PgsqlBindEip(ctx context.Context, config *CtyunPgsqlAssociationEipConfig) (err error)
- func (c *CtyunPgsqlAssociationEip) Read(ctx context.Context, request resource.ReadRequest, ...)
- func (c *CtyunPgsqlAssociationEip) Schema(ctx context.Context, request resource.SchemaRequest, ...)
- func (c *CtyunPgsqlAssociationEip) Update(ctx context.Context, request resource.UpdateRequest, ...)
- type CtyunPgsqlAssociationEipConfig
- type CtyunPgsqlInstanceInfoModel
- type CtyunPgsqlInstancesConfig
- type CtyunPgsqlSpecInfoModel
- type CtyunPgsqlSpecs
- func (c *CtyunPgsqlSpecs) Configure(ctx context.Context, request datasource.ConfigureRequest, ...)
- func (c *CtyunPgsqlSpecs) Metadata(ctx context.Context, request datasource.MetadataRequest, ...)
- func (c *CtyunPgsqlSpecs) Read(ctx context.Context, request datasource.ReadRequest, ...)
- func (c *CtyunPgsqlSpecs) Schema(ctx context.Context, request datasource.SchemaRequest, ...)
- type CtyunPgsqlSpecsConfig
- type CtyunPostgresqlInstance
- func (c *CtyunPostgresqlInstance) Configure(ctx context.Context, request resource.ConfigureRequest, ...)
- func (c *CtyunPostgresqlInstance) Create(ctx context.Context, request resource.CreateRequest, ...)
- func (c *CtyunPostgresqlInstance) CreatePgsqlInstance(ctx context.Context, config *CtyunPostgresqlInstanceConfig) (err error)
- func (c *CtyunPostgresqlInstance) Delete(ctx context.Context, request resource.DeleteRequest, ...)
- func (c *CtyunPostgresqlInstance) ImportState(ctx context.Context, request resource.ImportStateRequest, ...)
- func (c *CtyunPostgresqlInstance) ListLoop(ctx context.Context, config *CtyunPostgresqlInstanceConfig, ...) (err error)
- func (c *CtyunPostgresqlInstance) Metadata(ctx context.Context, request resource.MetadataRequest, ...)
- func (c *CtyunPostgresqlInstance) ParseStorageSize(storageSize *string) string
- func (c *CtyunPostgresqlInstance) Read(ctx context.Context, request resource.ReadRequest, ...)
- func (c *CtyunPostgresqlInstance) RunningStatusLoop(ctx context.Context, state *CtyunPostgresqlInstanceConfig, runningStatus int32, ...) (err error)
- func (c *CtyunPostgresqlInstance) Schema(ctx context.Context, request resource.SchemaRequest, ...)
- func (c *CtyunPostgresqlInstance) StartedOrderLoop(ctx context.Context, state *CtyunPostgresqlInstanceConfig, orderStatus int32, ...) (err error)
- func (c *CtyunPostgresqlInstance) Update(ctx context.Context, request resource.UpdateRequest, ...)
- func (c *CtyunPostgresqlInstance) UpgradeProdLoop(ctx context.Context, state *CtyunPostgresqlInstanceConfig, ...) (err error)
- func (c *CtyunPostgresqlInstance) UpgradeSpecLoop(ctx context.Context, state *CtyunPostgresqlInstanceConfig, ...) (err error)
- func (c *CtyunPostgresqlInstance) UpgradeStorageLoop(ctx context.Context, state *CtyunPostgresqlInstanceConfig, ...) (err error)
- type CtyunPostgresqlInstanceConfig
- type InstSpecInfo
- type ProdHostConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCtyunPgsqlInstances ¶
func NewCtyunPgsqlInstances() datasource.DataSource
Types ¶
type AvailabilityZoneModel ¶
type CtyunPgsqlAssociationEip ¶
type CtyunPgsqlAssociationEip struct {
// contains filtered or unexported fields
}
func (*CtyunPgsqlAssociationEip) BindLoop ¶
func (c *CtyunPgsqlAssociationEip) BindLoop(ctx context.Context, config *CtyunPgsqlAssociationEipConfig, bindStatus int32, loopCount ...int) (err error)
func (*CtyunPgsqlAssociationEip) Configure ¶
func (c *CtyunPgsqlAssociationEip) Configure(ctx context.Context, request resource.ConfigureRequest, response *resource.ConfigureResponse)
func (*CtyunPgsqlAssociationEip) Create ¶
func (c *CtyunPgsqlAssociationEip) Create(ctx context.Context, request resource.CreateRequest, response *resource.CreateResponse)
func (*CtyunPgsqlAssociationEip) Delete ¶
func (c *CtyunPgsqlAssociationEip) Delete(ctx context.Context, request resource.DeleteRequest, response *resource.DeleteResponse)
func (*CtyunPgsqlAssociationEip) ImportState ¶
func (c *CtyunPgsqlAssociationEip) ImportState(ctx context.Context, request resource.ImportStateRequest, response *resource.ImportStateResponse)
func (*CtyunPgsqlAssociationEip) Metadata ¶
func (c *CtyunPgsqlAssociationEip) Metadata(ctx context.Context, request resource.MetadataRequest, response *resource.MetadataResponse)
func (*CtyunPgsqlAssociationEip) PgsqlBindEip ¶
func (c *CtyunPgsqlAssociationEip) PgsqlBindEip(ctx context.Context, config *CtyunPgsqlAssociationEipConfig) (err error)
func (*CtyunPgsqlAssociationEip) Read ¶
func (c *CtyunPgsqlAssociationEip) Read(ctx context.Context, request resource.ReadRequest, response *resource.ReadResponse)
func (*CtyunPgsqlAssociationEip) Schema ¶
func (c *CtyunPgsqlAssociationEip) Schema(ctx context.Context, request resource.SchemaRequest, response *resource.SchemaResponse)
func (*CtyunPgsqlAssociationEip) Update ¶
func (c *CtyunPgsqlAssociationEip) Update(ctx context.Context, request resource.UpdateRequest, response *resource.UpdateResponse)
type CtyunPgsqlAssociationEipConfig ¶
type CtyunPgsqlAssociationEipConfig struct {
EipID types.String `tfsdk:"eip_id"` //弹性id
Eip types.String `tfsdk:"eip"` //弹性ip
InstID types.String `tfsdk:"inst_id"` //实例id
ProjectID types.String `tfsdk:"project_id"` //项目id
RegionID types.String `tfsdk:"region_id"` //区域Id
EipStatus types.Int32 `tfsdk:"eip_status"` //弹性ip状态 0->unbind,1->bind
}
type CtyunPgsqlInstanceInfoModel ¶
type CtyunPgsqlInstanceInfoModel struct {
CreateTime types.String `tfsdk:"create_time"` // 创建时间
ProdDbEngine types.String `tfsdk:"prod_db_engine"` // 数据库实例引擎
ProdInstId types.String `tfsdk:"prod_inst_id"` // 实例ID
Name types.String `tfsdk:"name"` // 实例名称
ProdRunningStatus types.Int32 `tfsdk:"prod_running_status"` // 运行状态代码
Alive types.Int32 `tfsdk:"alive"` // 实例存活状态
ProdOrderStatus types.Int32 `tfsdk:"prod_order_status"` // 订单状态代码
ProdType types.Int32 `tfsdk:"prod_type"` // 实例部署方式
ReadPort types.Int32 `tfsdk:"read_port"` // 读端口
Vip types.String `tfsdk:"vip"` // 虚拟IP地址
WritePort types.Int32 `tfsdk:"write_port"` // 写端口
ReadonlyInstanceIds types.String `tfsdk:"readonly_instance_ids"` // 只读实例ID列表,用逗号分割
InstanceType types.String `tfsdk:"instance_type"` // 实例类型
ToolType types.Int32 `tfsdk:"tool_type"` // 备份工具类型
}
type CtyunPgsqlInstancesConfig ¶
type CtyunPgsqlInstancesConfig struct {
RegionID types.String `tfsdk:"region_id"` // 区域id
ProjectID types.String `tfsdk:"project_id"` // 项目id
PageNum types.Int32 `tfsdk:"page_num"` // 当前页(必填)
PageSize types.Int32 `tfsdk:"page_size"` // 页大小,范围1-500(必填)
ProdInstName types.String `tfsdk:"prod_inst_name"` // 实例名称,支持模糊匹配(可选)
LabelName types.String `tfsdk:"label_name"` // 标签名称(一级标签)(可选)
LabelValue types.String `tfsdk:"label_value"` // 标签值(二级标签)(可选)
ProdInstID types.String `tfsdk:"prod_inst_id"` // 实例id(可选)
InstanceType types.String `tfsdk:"instance_type"` // 实例类型(primary/readonly)(可选)
PgsqlInstances []CtyunPgsqlInstanceInfoModel `tfsdk:"pgsql_instances"`
}
type CtyunPgsqlSpecInfoModel ¶
type CtyunPgsqlSpecInfoModel struct {
ProdId types.Int64 `tfsdk:"prod_id"` // 产品id
ProdCode types.String `tfsdk:"prod_code"` // 产品编码
ProdSpecName types.String `tfsdk:"prod_spec_name"` // 产品名称
ProdSpecDesc types.String `tfsdk:"prod_spec_desc"` // 产品描述
InstanceDesc types.String `tfsdk:"instance_desc"` // 实例描述
ProdVersion types.String `tfsdk:"prod_version"` // 产品版本
HostSpec types.String `tfsdk:"host_spec"` // 主机规格
LvsSpec types.String `tfsdk:"lvs_spec"` // lvs规格
InstSpecInfoList []InstSpecInfo `tfsdk:"inst_spec_info_list"` // AZ支持的产品规格信息,以及规格代S6/S7
ProdHostConfig []ProdHostConfig `tfsdk:"prod_host_config"` //host实例
}
type CtyunPgsqlSpecs ¶
type CtyunPgsqlSpecs struct {
// contains filtered or unexported fields
}
func NewCtyunPgsqlSpecs ¶
func NewCtyunPgsqlSpecs() *CtyunPgsqlSpecs
func (*CtyunPgsqlSpecs) Configure ¶
func (c *CtyunPgsqlSpecs) Configure(ctx context.Context, request datasource.ConfigureRequest, response *datasource.ConfigureResponse)
func (*CtyunPgsqlSpecs) Metadata ¶
func (c *CtyunPgsqlSpecs) Metadata(ctx context.Context, request datasource.MetadataRequest, response *datasource.MetadataResponse)
func (*CtyunPgsqlSpecs) Read ¶
func (c *CtyunPgsqlSpecs) Read(ctx context.Context, request datasource.ReadRequest, response *datasource.ReadResponse)
func (*CtyunPgsqlSpecs) Schema ¶
func (c *CtyunPgsqlSpecs) Schema(ctx context.Context, request datasource.SchemaRequest, response *datasource.SchemaResponse)
type CtyunPgsqlSpecsConfig ¶
type CtyunPostgresqlInstance ¶
type CtyunPostgresqlInstance struct {
// contains filtered or unexported fields
}
func (*CtyunPostgresqlInstance) Configure ¶
func (c *CtyunPostgresqlInstance) Configure(ctx context.Context, request resource.ConfigureRequest, response *resource.ConfigureResponse)
func (*CtyunPostgresqlInstance) Create ¶
func (c *CtyunPostgresqlInstance) Create(ctx context.Context, request resource.CreateRequest, response *resource.CreateResponse)
func (*CtyunPostgresqlInstance) CreatePgsqlInstance ¶
func (c *CtyunPostgresqlInstance) CreatePgsqlInstance(ctx context.Context, config *CtyunPostgresqlInstanceConfig) (err error)
func (*CtyunPostgresqlInstance) Delete ¶
func (c *CtyunPostgresqlInstance) Delete(ctx context.Context, request resource.DeleteRequest, response *resource.DeleteResponse)
func (*CtyunPostgresqlInstance) ImportState ¶
func (c *CtyunPostgresqlInstance) ImportState(ctx context.Context, request resource.ImportStateRequest, response *resource.ImportStateResponse)
func (*CtyunPostgresqlInstance) ListLoop ¶
func (c *CtyunPostgresqlInstance) ListLoop(ctx context.Context, config *CtyunPostgresqlInstanceConfig, params *pgsql.PgsqlListRequest, headers *pgsql.PgsqlListRequestHeader, loopCount ...int) (err error)
func (*CtyunPostgresqlInstance) Metadata ¶
func (c *CtyunPostgresqlInstance) Metadata(ctx context.Context, request resource.MetadataRequest, response *resource.MetadataResponse)
func (*CtyunPostgresqlInstance) ParseStorageSize ¶
func (c *CtyunPostgresqlInstance) ParseStorageSize(storageSize *string) string
func (*CtyunPostgresqlInstance) Read ¶
func (c *CtyunPostgresqlInstance) Read(ctx context.Context, request resource.ReadRequest, response *resource.ReadResponse)
func (*CtyunPostgresqlInstance) RunningStatusLoop ¶
func (c *CtyunPostgresqlInstance) RunningStatusLoop(ctx context.Context, state *CtyunPostgresqlInstanceConfig, runningStatus int32, orderStatus int32, loopCount ...int) (err error)
func (*CtyunPostgresqlInstance) Schema ¶
func (c *CtyunPostgresqlInstance) Schema(ctx context.Context, request resource.SchemaRequest, response *resource.SchemaResponse)
func (*CtyunPostgresqlInstance) StartedOrderLoop ¶
func (c *CtyunPostgresqlInstance) StartedOrderLoop(ctx context.Context, state *CtyunPostgresqlInstanceConfig, orderStatus int32, runningStatus int32, loopCount ...int) (err error)
func (*CtyunPostgresqlInstance) Update ¶
func (c *CtyunPostgresqlInstance) Update(ctx context.Context, request resource.UpdateRequest, response *resource.UpdateResponse)
func (*CtyunPostgresqlInstance) UpgradeProdLoop ¶
func (c *CtyunPostgresqlInstance) UpgradeProdLoop(ctx context.Context, state *CtyunPostgresqlInstanceConfig, plan *CtyunPostgresqlInstanceConfig, loopCount ...int) (err error)
func (*CtyunPostgresqlInstance) UpgradeSpecLoop ¶
func (c *CtyunPostgresqlInstance) UpgradeSpecLoop(ctx context.Context, state *CtyunPostgresqlInstanceConfig, plan *CtyunPostgresqlInstanceConfig, loopCount ...int) (err error)
func (*CtyunPostgresqlInstance) UpgradeStorageLoop ¶
func (c *CtyunPostgresqlInstance) UpgradeStorageLoop(ctx context.Context, state *CtyunPostgresqlInstanceConfig, plan *CtyunPostgresqlInstanceConfig, storageType string, loopCount ...int) (err error)
type CtyunPostgresqlInstanceConfig ¶
type CtyunPostgresqlInstanceConfig struct {
CycleType types.String `tfsdk:"cycle_type"` // 计费模式: 1是包周期,2是按需
RegionID types.String `tfsdk:"region_id"` // 目标资源池Id
FlavorName types.String `tfsdk:"flavor_name"` // 规格名称
ProdID types.String `tfsdk:"prod_id"` // 产品id
BackupStorageType types.String `tfsdk:"backup_storage_type"` // 备份存储类型, SSD=超高IO、SATA=普通IO、SAS=高IO
BackupStorageSpace types.Int32 `tfsdk:"backup_storage_space"` // 备份存储空间大小
VpcID types.String `tfsdk:"vpc_id"` // 虚拟私有云Id,,回收站恢复到新实例场景非必传则取原实例配置
SubnetId types.String `tfsdk:"subnet_id"` // 子网Id,,回收站恢复到新实例场景非必传则取原实例配置
SecurityGroupId types.String `tfsdk:"security_group_id"` // 安全组,回收站恢复到新实例场景非必传则取原实例配置
AppointVip types.String `tfsdk:"appoint_vip"` // 指定vip
Name types.String `tfsdk:"name"` // 集群名称(若开通只读实例,默认在主实例名称后面加"-read")
Password types.String `tfsdk:"password"` // 管理员密码(RSA公钥加密)
CycleCount types.Int32 `tfsdk:"cycle_count"` // 购买时长:单位月(范围:1-36)
AutoRenew types.Bool `tfsdk:"auto_renew"` // 自动续订状态 (0-不自动续订,1-自动续订)
CaseSensitive types.Bool `tfsdk:"case_sensitive"` // 是否区分大小写 0 区分 1 不区分 2待定
ProjectID types.String `tfsdk:"project_id"` // 企业项目ID,默认0
IsMGR types.Bool `tfsdk:"is_mgr"` // 是否开启MRG,默认false
StorageType types.String `tfsdk:"storage_type"` // 存储类型: SSD=超高IO、SATA=普通IO、SAS=高IO、SSD-genric=通用型SSD、FAST-SSD=极速型SSD
StorageSpace types.Int32 `tfsdk:"storage_space"` // 存储空间(单位:G,范围100,32768)
AvailabilityZoneInfo types.List `tfsdk:"availability_zone_info"` // 可用区信息
ID types.String `tfsdk:"id"` // 实例ID
Alive types.Int32 `tfsdk:"alive"` // 实例是否存活,0:存活,-1:异常
DiskRated types.Int32 `tfsdk:"disk_rated"` // 磁盘使用率
OuterProdInstId types.String `tfsdk:"outer_prod_inst_id"` // 对外的实例ID,对应PaaS平台
ProdDbEngine types.String `tfsdk:"prod_db_engine"` // 数据库实例引擎
ProdOrderStatus types.Int32 `tfsdk:"prod_order_status"` // 订单状态,0:正常,1:冻结,2:删除,3:操作中,4:失败,2005:扩容中
ProdRunningStatus types.Int32 `tfsdk:"prod_running_status"` // 实例状态
ProdType types.Int32 `tfsdk:"prod_type"` // 实例部署方式 0:单机部署,1:主备部署
ReadPort types.Int32 `tfsdk:"read_port"` // 读端口
WritePort types.String `tfsdk:"write_port"` // 写端口
ToolType types.Int32 `tfsdk:"tool_type"` // 备份工具类型,1:pg_baseback,2:pgbackrest,3:s3
RunningControl types.String `tfsdk:"running_control"` //
MasterOrderID types.String `tfsdk:"master_order_id"` // 订单id
// contains filtered or unexported fields
}
type InstSpecInfo ¶
type InstSpecInfo struct {
SpecId types.String `tfsdk:"spec_id"` // 废弃
ProdPerformanceSpec types.String `tfsdk:"prod_performance_spec"` // 规格名称
AzList types.String `tfsdk:"az_list"` // 该规格支持的AZ列表
SpecName types.String `tfsdk:"spec_name"` // 主机世代完整名称
CpuType types.String `tfsdk:"cpu_type"` // cpu类型
Generation types.String `tfsdk:"generation"` // 主机世代缩写
MinRate types.String `tfsdk:"min_rate"` // 带宽下限
MaxRate types.String `tfsdk:"max_rate"` // 带宽上限
}
type ProdHostConfig ¶
type ProdHostConfig struct {
HostTypeName types.String `tfsdk:"host_type_name"` // 类型名称
HostType types.String `tfsdk:"host_type"` // 节点类型,当类型为mysql时,取值范围master(主节点)、readnode(只读节点)
ProdPerformanceSpecs types.String `tfsdk:"prod_performance_specs"` // 支持的性能指标规格列表
HostDefaultNum types.Int32 `tfsdk:"host_default_num"` // 节点默认数量
}
Click to show internal directories.
Click to hide internal directories.