Skip to content

Commit

Permalink
sdk: rolling update for 0.22.18 (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
ucloud-bot authored May 28, 2024
1 parent 3659889 commit f617cb5
Show file tree
Hide file tree
Showing 8 changed files with 1,212 additions and 16 deletions.
865 changes: 865 additions & 0 deletions services/nlb/apis.go

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions services/nlb/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Code is generated by ucloud-model, DO NOT EDIT IT.

package nlb

import (
"github.com/ucloud/ucloud-sdk-go/ucloud"
"github.com/ucloud/ucloud-sdk-go/ucloud/auth"
)

// NLBClient is the client of NLB
type NLBClient struct {
*ucloud.Client
}

// NewClient will return a instance of NLBClient
func NewClient(config *ucloud.Config, credential *auth.Credential) *NLBClient {
meta := ucloud.ClientMeta{Product: "NLB"}
client := ucloud.NewClientWithMeta(config, credential, meta)
return &NLBClient{
client,
}
}
13 changes: 13 additions & 0 deletions services/nlb/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Code is generated by ucloud-model, DO NOT EDIT IT.

/*
Package nlb include resources of ucloud nlb product
See also
- API: https://docs.ucloud.cn/api/nlb-api/index
- Product: https://www.ucloud.cn/site/product/nlb.html
for detail.
*/
package nlb
210 changes: 210 additions & 0 deletions services/nlb/models.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
// Code is generated by ucloud-model, DO NOT EDIT IT.

package nlb

/*
Target - 服务节点信息
*/
type Target struct {

// 服务节点的标识 ID说明:添加服务节点的时候无需传更新服务节点属性时必传
Id string

// 服务节点的端口
Port int

// 服务节点的IP。在IP类型时,必传
ResourceIP string

// 服务节点的资源ID。在非IP类型时,必传
ResourceId string

// 服务节点的资源名称
ResourceName string

// 服务节点的类型
ResourceType string

// 服务节点的健康检查状态说明:描述服务节点信息时显示限定枚举值:"Healthy"/"Unhealthy"
State string

// 服务节点的子网资源ID。在IP类型时,必传
SubnetId string

// 服务节点的VPC资源ID。在IP类型时,必传
VPCId string

// 服务节点的权重。支持更新
Weight int
}

/*
HealthCheckConfig - 健康检查配置
*/
type HealthCheckConfig struct {

// 是否开启健康检查功能。
Enabled bool

// 健康检查间隔时间限定取值:[1-60] 单位秒默认 2s
Interval int

// 健康检查最大失败数限定取值:[1-10] 默认 3
MaxFail int

// 健康检查最小成功数限定取值:[1-10] 默认 3
MinSuccess int

// 健康检查探测端口说明:限定取值:[1-65535]
Port int

// UDP" 检查模式的请求字符串"HTTP" 检查模式的请求 json 字符串
ReqMsg string

// "UDP" 检查模式的预期响应字符串"HTTP" 检查模式的响应状态码
ResMsg string

// 健康检查方式限定取值:"Port"/"UDP"/"Ping" /"HTTP"默认值:“Port”
Type string
}

/*
Listener - 监听器信息
*/
type Listener struct {

// 端口范围的结束端口
EndPort int

// 健康检查相关配置
HealthCheckConfig HealthCheckConfig

// 监听器的ID
ListenerId string

// 监听器的名称
Name string

// 监听协议,限定取值:"TCP"/"UDP"
Protocol string

// 监听器的备注信息
Remark string

// 负载均衡算法,限定取值:"RoundRobin"/"SourceHash"/"LeastConn"/"WeightLeastConn "/"WeightRoundRobin "
Scheduler string

// 端口范围的起始端口
StartPort int

// listener 健康状态,"Healthy"/"Unhealthy"/"PartialHealth"/"None"
State string

// 会话保持超时时间。单位:秒,0表示不开启会话保持
StickinessTimeout int

// 服务节点信息
Targets []Target
}

/*
IPInfo - 绑定的IP信息
*/
type IPInfo struct {

// 网络模式,限定枚举值:"Internet" / "Intranet"
AddressType string

// 带宽值。单位 M
Bandwidth int

// 带宽类型,限定枚举值:0(普通带宽)/ 1(共享带宽)
BandwidthType int

// IP 地址
IP string

// IP协议版本,限定枚举值:"IPv4" / "IPv6"
IPVersion string

// 唯一标识 ID
Id string

// 外网IP的运营商信息,限定枚举值:"Telecom" / "Unicom"/"International"/"Bgp"/"Duplet"/"BGPPro"/"China-mobile"/"Anycast"
OperatorName string

// IP 类型,1(前向 IP)/ 2(后向 IP)
Type int
}

/*
NetworkLoadBalancer - 负载均衡实例信息
*/
type NetworkLoadBalancer struct {

// 是否开启自动续费
AutoRenewEnabled bool

// 付费模式
ChargeType string

// 负载均衡实例创建时间。格式为 Unix Timestamp
CreateTime int

// 负载均衡实例的转发模式
ForwardingMode string

// 绑定的IP信息
IPInfos []IPInfo

// 负载均衡实例支持的IP协议版本
IPVersion string

//
Listeners []Listener

// 负载均衡实例的ID
NLBId string

// 负载均衡实例的名称
Name string

// 有效期(计费)
PurchaseValue int

// 负载均衡实例的备注信息
Remark string

// NLB 状态:Normal-正常;Closed-欠费停服;Deleted 已删除
Status string

// 负载均衡实例所属的子网资源ID
SubnetId string

// 负载均衡实例所属的业务组ID
Tag string

// 负载均衡实例所属的VPC资源ID
VPCId string
}

/*
PriceDetail - 负载均衡实例的价格信息
*/
type PriceDetail struct {

// 负载均衡付费方式
ChargeType string

// 用户折后价,单位“元”。CustomPrice=OriginalPrice*用户折扣
CustomPrice float64

// 购买负载均衡的原价,单位“元”
OriginalPrice float64

// 购买负载均衡的实际价格,单位“元”
Price float64

// 资源有效期,以Unix Timestamp表示
PurchaseValue int
}
62 changes: 62 additions & 0 deletions services/udb/apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -2967,6 +2967,68 @@ func (c *UDBClient) GetUDBInstanceSSLCertURL(req *GetUDBInstanceSSLCertURLReques
return &res, nil
}

// ListUDBMachineTypeRequest is request schema for ListUDBMachineType action
type ListUDBMachineTypeRequest struct {
request.CommonBase

// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
// ProjectId *string `required:"false"`

// [公共参数] 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
// Region *string `required:"true"`

// [公共参数] 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
// Zone *string `required:"true"`

// UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal"
InstanceMode *string `required:"false"`
}

// ListUDBMachineTypeResponse is response schema for ListUDBMachineType action
type ListUDBMachineTypeResponse struct {
response.CommonBase

// 计算规格列表
DataSet []MachineType

// 默认计算规格
DefaultMachineType MachineType

// 接口返回信息
Message string
}

// NewListUDBMachineTypeRequest will create request of ListUDBMachineType action.
func (c *UDBClient) NewListUDBMachineTypeRequest() *ListUDBMachineTypeRequest {
req := &ListUDBMachineTypeRequest{}

// setup request with client config
c.Client.SetupRequest(req)

// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}

/*
API: ListUDBMachineType
获取UDB云数据库支持的计算规格列表,暂不支持获取跨可用区实例的计算规格,目前支持的数据库品类包括:NVMe版和SSD云盘版MySQL
*/
func (c *UDBClient) ListUDBMachineType(req *ListUDBMachineTypeRequest) (*ListUDBMachineTypeResponse, error) {
var err error
var res ListUDBMachineTypeResponse

reqCopier := *req

err = c.Client.InvokeAction("ListUDBMachineType", &reqCopier, &res)
if err != nil {
return &res, err
}

return &res, nil
}

// ListUDBUserTablesRequest is request schema for ListUDBUserTables action
type ListUDBUserTablesRequest struct {
request.CommonBase
Expand Down
48 changes: 36 additions & 12 deletions services/udb/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ type UDBBackupSet struct {
Zone string
}

/*
UFileDataSet - 增加ufile的描述
*/
type UFileDataSet struct {

// bucket名称
Bucket string

// Ufile的令牌tokenid
TokenID string
}

/*
UDBSlaveInstanceSet - DescribeUDBSlaveInstance
*/
Expand Down Expand Up @@ -173,18 +185,6 @@ type UDBSlaveInstanceSet struct {
Zone string
}

/*
UFileDataSet - 增加ufile的描述
*/
type UFileDataSet struct {

// bucket名称
Bucket string

// Ufile的令牌tokenid
TokenID string
}

/*
UDBInstanceSet - DescribeUDBInstance
*/
Expand Down Expand Up @@ -509,6 +509,30 @@ type ConnNumMap struct {
Num int
}

/*
MachineType - mysql数据库机型
*/
type MachineType struct {

// 规格cpu核数
Cpu int

// 计算规格描述,格式为"nCmG",表示n核mG内存实例
Description string

// 内存/cpu配比
Group string

// 计算规格id, 目前支持CPU和内存比1:2、1:4、1:8三类配比规格;规格的格式为:"机型.配比.CPU核数规格";机型支持o和n两种机型,分别代表快杰NVMe和SSD云盘机型;配比映射关系如下:2m代表CPU内存配比1比2,4m代表CPU内存配比1比4,8m代表CPU内存配比1比8,CPU核数规格射关系如下:small代表1C,medium代表2C,xlarge代表4C,2xlarge代表8C,4xlarge代表16C,8xlarge代表32C,16xlarge代表64C,例如 "o.mysql4m.medium"表示创建快杰NVMe机型2C8G的实例,"o.mysql8m.4xlarge"表示创建快杰NVMe机型16C128G的实例
ID string

// 规格内存大小,单位(GB)
Memory int

// 内部云主机机型,可选"o/n"
Os string
}

/*
TableData - 用户表详情
*/
Expand Down
Loading

0 comments on commit f617cb5

Please sign in to comment.