diff --git a/services/cube/apis.go b/services/cube/apis.go index 33062e45..1a2558ef 100644 --- a/services/cube/apis.go +++ b/services/cube/apis.go @@ -22,31 +22,31 @@ type CreateCubeDeploymentRequest struct { // [公共参数] 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) // Zone *string `required:"true"` - // 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Postpay, \\ 后付费;默认为后付费 + // 计费模式 ChargeType *string `required:"false"` - // Cpu平台(V6:Intel、A2:AMD),默认V6。支持的地域(北京2B、北京2E、上海2A、广东、香港 、东京)目前北京2E仅有A2,其余地域仅有V6 + // CPU平台 CpuPlatform *string `required:"false"` - // base64编码的Deployment的yaml。大小不超过16KB + // Deployment yaml,使用base64编码 Deployment *string `required:"true"` - // base64编码的kubeconfig。大小不超过16KB - KubeConfig *string `required:"false"` + // 【该字段已废弃,请谨慎使用】 + KubeConfig *string `required:"false" deprecated:"true"` // Deployment名称 Name *string `required:"false"` - // 购买时长。默认:值 1。 月付时,此参数传0,代表购买至月末。 - Quantity *int `required:"false"` + // 数量,默认为1 + Quantity *string `required:"false"` - // 子网Id + // Deployment所属子网 SubnetId *string `required:"true"` - // 业务组。默认:Default(Default即为未分组) + // 标签 Tag *string `required:"false"` - // VPCId + // Deployment所属VPC VPCId *string `required:"true"` } @@ -54,10 +54,10 @@ type CreateCubeDeploymentRequest struct { type CreateCubeDeploymentResponse struct { response.CommonBase - // 经过base64编码的Deployment的yaml + // Deployment yaml,使用base64编码 Deployment string - // 控制器ID + // Deployment ID DeploymentId string } @@ -76,7 +76,7 @@ func (c *CubeClient) NewCreateCubeDeploymentRequest() *CreateCubeDeploymentReque /* API: CreateCubeDeployment -创建Cube的Deployment +创建容器实例Deployment */ func (c *CubeClient) CreateCubeDeployment(req *CreateCubeDeploymentRequest) (*CreateCubeDeploymentResponse, error) { var err error @@ -105,37 +105,37 @@ type CreateCubePodRequest struct { // [公共参数] 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) // Zone *string `required:"true"` - // 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Postpay, \\ 后付费;默认为后付费 - ChargeType *string `required:"false"` + // 【该字段已废弃,请谨慎使用】 + ChargeType *string `required:"false" deprecated:"true"` - // 代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 - CouponId *string `required:"false"` + // 【该字段已废弃,请谨慎使用】 + CouponId *string `required:"false" deprecated:"true"` - // Cpu平台(V6:Intel、A2:AMD、Auto),默认Auto。支持的地域(北京2B、北京2E、上海2A、广东、香港 、东京)目前北京2E仅有A2,其余地域仅有V6 - CpuPlatform *string `required:"false"` + // 【该字段已废弃,请谨慎使用】 + CpuPlatform *string `required:"false" deprecated:"true"` - // pod所在组 - Group *string `required:"false"` + // 【该字段已废弃,请谨慎使用】 + Group *string `required:"false" deprecated:"true"` - // base64编码的kubeconfig。大小不超过16KB - KubeConfig *string `required:"false"` + // 【该字段已废弃,请谨慎使用】 + KubeConfig *string `required:"false" deprecated:"true"` - // pod的名字 - Name *string `required:"false"` + // 【该字段已废弃,请谨慎使用】 + Name *string `required:"false" deprecated:"true"` - // base64编码的Pod的yaml。大小不超过16KB + // Pod yaml,使用base64编码 Pod *string `required:"true"` - // 购买时长。默认:值 1。 月付时,此参数传0,代表购买至月末。 - Quantity *int `required:"false"` + // 【该字段已废弃,请谨慎使用】 + Quantity *int `required:"false" deprecated:"true"` - // 子网Id + // 容器实例所属的子网ID SubnetId *string `required:"true"` - // 业务组。默认:Default(Default即为未分组) - Tag *string `required:"false"` + // 【该字段已废弃,请谨慎使用】 + Tag *string `required:"false" deprecated:"true"` - // VPCId + // 容器实例所属的VPC ID VPCId *string `required:"true"` } @@ -146,10 +146,10 @@ type CreateCubePodResponse struct { // 【该字段已废弃,请谨慎使用】 Action string `deprecated:"true"` - // cube的资源Id + // 容器实例ID CubeId string - // base64编码的yaml + // Pod yaml,使用base64编码 Pod string // 【该字段已废弃,请谨慎使用】 @@ -171,7 +171,7 @@ func (c *CubeClient) NewCreateCubePodRequest() *CreateCubePodRequest { /* API: CreateCubePod -创建Pod +创建一个容器实例 */ func (c *CubeClient) CreateCubePod(req *CreateCubePodRequest) (*CreateCubePodResponse, error) { var err error @@ -197,11 +197,11 @@ type DeleteCubeDeploymentRequest struct { // [公共参数] 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) // Region *string `required:"true"` - // [公共参数] 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) - // Zone *string `required:"false"` + // [公共参数] 【该字段已废弃,请谨慎使用】 + // Zone *string `required:"false" deprecated:"true"` - // 控制器Id - DeploymentId *string `required:"true"` + // 【该字段已废弃,请谨慎使用】 + DeploymentId *string `required:"true" deprecated:"true"` } // DeleteCubeDeploymentResponse is response schema for DeleteCubeDeployment action @@ -224,7 +224,7 @@ func (c *CubeClient) NewDeleteCubeDeploymentRequest() *DeleteCubeDeploymentReque /* API: DeleteCubeDeployment -删除Cube的Deployment +删除容器实例Deployment */ func (c *CubeClient) DeleteCubeDeployment(req *DeleteCubeDeploymentRequest) (*DeleteCubeDeploymentResponse, error) { var err error @@ -244,22 +244,22 @@ func (c *CubeClient) DeleteCubeDeployment(req *DeleteCubeDeploymentRequest) (*De type DeleteCubePodRequest struct { request.CommonBase - // [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) - // ProjectId *string `required:"true"` + // [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + // ProjectId *string `required:"false"` - // [公共参数] 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + // [公共参数] 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) // Region *string `required:"true"` - // [公共参数] 可用区。参见 [可用区列表](../summary/regionlist.html) - // Zone *string `required:"false"` + // [公共参数] 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + // Zone *string `required:"true"` - // cubeid和uid任意一个(必须) + // 要删除的容器实例ID,若填写了Uid则可忽略 CubeId *string `required:"false"` - // 删除cube时是否释放绑定的EIP。默认为false。 - ReleaseEIP *bool `required:"false"` + // 要释放的EIP,如果容器实例绑定了EIP则可以填写,会将EIP一并释放。否则EIP会被保留。 + ReleaseEIP *string `required:"false"` - // cubeid和uid任意一个(必须) + // 要删除的容器实例UID,若填写了CubeId则可忽略 Uid *string `required:"false"` } @@ -283,7 +283,7 @@ func (c *CubeClient) NewDeleteCubePodRequest() *DeleteCubePodRequest { /* API: DeleteCubePod -删除Pod +删除容器实例 */ func (c *CubeClient) DeleteCubePod(req *DeleteCubePodRequest) (*DeleteCubePodResponse, error) { var err error @@ -310,9 +310,9 @@ type GetCubeDeploymentRequest struct { // Region *string `required:"true"` // [公共参数] 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) - // Zone *string `required:"false"` + // Zone *string `required:"true"` - // Deployment的Id + // Deployment ID DeploymentId *string `required:"true"` } @@ -320,7 +320,7 @@ type GetCubeDeploymentRequest struct { type GetCubeDeploymentResponse struct { response.CommonBase - // 经过base64编码的Deployment的yaml + // Deployment yaml,使用base64编码 Deployment string } @@ -339,7 +339,7 @@ func (c *CubeClient) NewGetCubeDeploymentRequest() *GetCubeDeploymentRequest { /* API: GetCubeDeployment -获取Deployment的详细信息 +获取容器实例Deployment详细信息 */ func (c *CubeClient) GetCubeDeployment(req *GetCubeDeploymentRequest) (*GetCubeDeploymentResponse, error) { var err error @@ -360,21 +360,21 @@ type GetCubeExecTokenRequest struct { request.CommonBase // [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) - // ProjectId *string `required:"true"` + // 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:"false"` + // Zone *string `required:"true"` - // 容器名称 + // 要执行的容器名称 ContainerName *string `required:"true"` - // CubeId 和 Uid 中必须填写任意一个。CubeId 是所有 Cube 资源的唯一 ID,如非在 UK8S 通过 Virtual Kubelet 插件创建的 Cube, 则必填 CubeId + // 容器实例ID,若填写了Uid则可忽略 CubeId *string `required:"false"` - // CubeId 和 Uid 中必须填写任意一个。Uid 是在 UK8S 中通过 Virtual Kubelet 插件创建出的 Cube 的唯一标识 + // 容器实例UID,若填写了CubeId则可忽略 Uid *string `required:"false"` } @@ -382,10 +382,10 @@ type GetCubeExecTokenRequest struct { type GetCubeExecTokenResponse struct { response.CommonBase - // terminal的登录连接地址,限单点登录,有效时间5min + // 终端url TerminalUrl string - // 有效时间5min + // 执行Token Token string } @@ -404,7 +404,7 @@ func (c *CubeClient) NewGetCubeExecTokenRequest() *GetCubeExecTokenRequest { /* API: GetCubeExecToken -获取登录容器的token +获取容器实例执行token */ func (c *CubeClient) GetCubeExecToken(req *GetCubeExecTokenRequest) (*GetCubeExecTokenResponse, error) { var err error @@ -424,24 +424,24 @@ func (c *CubeClient) GetCubeExecToken(req *GetCubeExecTokenRequest) (*GetCubeExe type GetCubeExtendInfoRequest struct { request.CommonBase - // [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) - // ProjectId *string `required:"true"` + // [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + // ProjectId *string `required:"false"` - // [公共参数] 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + // [公共参数] 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) // Region *string `required:"true"` - // [公共参数] 可用区。参见 [可用区列表](../summary/regionlist.html) - // Zone *string `required:"false"` + // [公共参数] 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + // Zone *string `required:"true"` - // id列表以逗号(,)分割 - CubeIds *string `required:"true"` + // 容器实例ID,用逗号分割 + CubeIds *string `required:"false"` } // GetCubeExtendInfoResponse is response schema for GetCubeExtendInfo action type GetCubeExtendInfoResponse struct { response.CommonBase - // CubeExtendInfo + // 容器实例的附加信息 ExtendInfo []CubeExtendInfo } @@ -460,7 +460,7 @@ func (c *CubeClient) NewGetCubeExtendInfoRequest() *GetCubeExtendInfoRequest { /* API: GetCubeExtendInfo -获取Cube的额外信息 +获取容器实例附加信息 */ func (c *CubeClient) GetCubeExtendInfo(req *GetCubeExtendInfoRequest) (*GetCubeExtendInfoResponse, error) { var err error @@ -490,18 +490,18 @@ type GetCubeMetricsRequest struct { // Zone *string `required:"true"` // 开始时间 - BeginTime *int `required:"true"` + BeginTime *string `required:"true"` - // Pod内容器名称 + // 容器名称 ContainerName *string `required:"true"` - // 结束时间,必须大于开始时间 - EndTime *int `required:"true"` + // 结束时间 + EndTime *string `required:"true"` - // 监控指标名称 - MetricName []string `required:"true"` + // 指标名称 + MetricName *string `required:"true"` - // Cube实例资源ID + // 资源ID ResourceId *string `required:"true"` } @@ -509,11 +509,11 @@ type GetCubeMetricsRequest struct { type GetCubeMetricsResponse struct { response.CommonBase - // 时间序列集合 + // 指标数据 DataSets []MetricDataSet - // 错误信息 - Message string + // 【该字段已废弃,请谨慎使用】 + Message string `deprecated:"true"` } // NewGetCubeMetricsRequest will create request of GetCubeMetrics action. @@ -531,7 +531,7 @@ func (c *CubeClient) NewGetCubeMetricsRequest() *GetCubeMetricsRequest { /* API: GetCubeMetrics -获取Cube实例(Pod,PodX,Deploy等)监控数据时间序列 +获取容器实例指标 */ func (c *CubeClient) GetCubeMetrics(req *GetCubeMetricsRequest) (*GetCubeMetricsResponse, error) { var err error @@ -682,21 +682,21 @@ type GetCubeTokenRequest struct { request.CommonBase // [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) - // ProjectId *string `required:"true"` + // 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:"false"` + // Zone *string `required:"true"` // 容器名称 ContainerName *string `required:"true"` - // CubeId 和 Uid 中必须填写任意一个。CubeId 是所有 Cube 资源的唯一 ID,如非在 UK8S 通过 Virtual Kubelet 插件创建的 Cube, 则必填 CubeId + // 容器实例ID,若填写了Uid则可忽略 CubeId *string `required:"false"` - // CubeId 和 Uid 中必须填写任意一个。Uid 是在 UK8S 中通过 Virtual Kubelet 插件创建出的 Cube 的唯一标识 + // 容器实例UID,若填写了CubeId则可忽略 Uid *string `required:"false"` } @@ -704,7 +704,7 @@ type GetCubeTokenRequest struct { type GetCubeTokenResponse struct { response.CommonBase - // 有效时间5min + // 容器实例Token Token string } @@ -723,7 +723,7 @@ func (c *CubeClient) NewGetCubeTokenRequest() *GetCubeTokenRequest { /* API: GetCubeToken -获取Cube的token,可用于terminal登录、log获取 +获取容器实例Token */ func (c *CubeClient) GetCubeToken(req *GetCubeTokenRequest) (*GetCubeTokenResponse, error) { var err error @@ -812,24 +812,24 @@ type ListCubePodRequest struct { // Region *string `required:"true"` // [公共参数] 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) - // Zone *string `required:"false"` + // Zone *string `required:"true"` - // Deployment的Id + // 容器实例所属Deployment DeploymentId *string `required:"false"` - // 组名称 + // 容器实例组 Group *string `required:"false"` - // 默认20 + // 返回数据长度,默认为20,最大100 Limit *int `required:"false"` - // 默认0 + // 列表起始位置偏移量,默认为0 Offset *int `required:"false"` - // 子网Id + // 容器实例所属子网 SubnetId *string `required:"false"` - // VPC的Id + // 容器实例所属VPC VPCId *string `required:"false"` } @@ -837,10 +837,10 @@ type ListCubePodRequest struct { type ListCubePodResponse struct { response.CommonBase - // Pod列表,每条数据都做了base64编码 + // 容器实例yaml列表,以base64编码 Pods []string - // Cube的总数 + // 容器实例总数 TotalCount int } @@ -859,7 +859,7 @@ func (c *CubeClient) NewListCubePodRequest() *ListCubePodRequest { /* API: ListCubePod -获取Pods列表 +获取容器实例详细列表 */ func (c *CubeClient) ListCubePod(req *ListCubePodRequest) (*ListCubePodResponse, error) { var err error @@ -994,19 +994,19 @@ func (c *CubeClient) ModifyCubeTag(req *ModifyCubeTagRequest) (*ModifyCubeTagRes type RenewCubePodRequest struct { request.CommonBase - // [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) - // ProjectId *string `required:"true"` + // [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + // ProjectId *string `required:"false"` - // [公共参数] 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + // [公共参数] 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) // Region *string `required:"true"` - // [公共参数] 可用区。参见 [可用区列表](../summary/regionlist.html) - // Zone *string `required:"false"` + // [公共参数] 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + // Zone *string `required:"true"` - // 容器Id - CubeId *string `required:"true"` + // 要更新的容器实例ID + CubeId *string `required:"false"` - // base64编码的Pod的yaml + // Pod yaml,以base64编码 Pod *string `required:"true"` } @@ -1014,7 +1014,7 @@ type RenewCubePodRequest struct { type RenewCubePodResponse struct { response.CommonBase - // base64编码过的yaml,需要解码获取信息 + // Pod yaml,以base64编码 Pod string } @@ -1033,7 +1033,7 @@ func (c *CubeClient) NewRenewCubePodRequest() *RenewCubePodRequest { /* API: RenewCubePod -更新Pod +更新容器实例 */ func (c *CubeClient) RenewCubePod(req *RenewCubePodRequest) (*RenewCubePodResponse, error) { var err error diff --git a/services/pathx/models.go b/services/pathx/models.go index 98001362..2f0feddf 100644 --- a/services/pathx/models.go +++ b/services/pathx/models.go @@ -380,42 +380,6 @@ type AccelerationInfo struct { NodeInfo []NodeDelays } -/* -UGAL7Forwarder - UGA实例 7层转发器信息 -*/ -type UGAL7Forwarder struct { - - // 接入端口 - Port int - - // 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 - Protocol string - - // RSPort,源站监听端口 - RSPort int - - // 证书ID - SSLId string - - // 证书名称 - SSLName string -} - -/* -UGAL4Forwarder - UGA实例 4层转发器信息 -*/ -type UGAL4Forwarder struct { - - // 接入端口 - Port int - - // 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 - Protocol string - - // RSPort,源站监听端口 - RSPort int -} - /* UGAATask - 用户在UGAA实例下配置的多端口任务 */ @@ -458,6 +422,42 @@ type UPathSet struct { UPathName string } +/* +UGAL7Forwarder - UGA实例 7层转发器信息 +*/ +type UGAL7Forwarder struct { + + // 接入端口 + Port int + + // 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 + Protocol string + + // RSPort,源站监听端口 + RSPort int + + // 证书ID + SSLId string + + // 证书名称 + SSLName string +} + +/* +UGAL4Forwarder - UGA实例 4层转发器信息 +*/ +type UGAL4Forwarder struct { + + // 接入端口 + Port int + + // 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 + Protocol string + + // RSPort,源站监听端口 + RSPort int +} + /* UGAAInfo - 全球加速实例信息 */ diff --git a/services/uaccount/apis.go b/services/uaccount/apis.go index 4a1571f8..d561d19f 100644 --- a/services/uaccount/apis.go +++ b/services/uaccount/apis.go @@ -13,7 +13,7 @@ import ( type AddMemberToProjectRequest struct { request.CommonBase - // [公共参数] 项目ID,请参考[GetProjectList接口](../summary/get_project_list.html)的描述。不填写为创建时间最早的项目。 + // [公共参数] 项目ID,请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)的描述。不填写为创建时间最早的项目。 // ProjectId *string `required:"false"` // 被加入成员归属角色ID diff --git a/services/uads/apis.go b/services/uads/apis.go index 7bea7e18..7dcbb196 100644 --- a/services/uads/apis.go +++ b/services/uads/apis.go @@ -199,9 +199,6 @@ type BuyHighProtectGameServiceRequest struct { // [公共参数] 项目ID。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) // ProjectId *string `required:"true"` - // 接入模式,默认为:IP;Domain:网站接入、IP:非网站接入 - AccessMode *string `required:"false"` - // 线路区域, 可取范围{"SouthChina", "EastChina"} AreaLine *string `required:"true"` @@ -1247,9 +1244,6 @@ func (c *UADSClient) GetBGPServiceIP(req *GetBGPServiceIPRequest) (*GetBGPServic type GetBuyNapServicePriceRequest struct { request.CommonBase - // 接入模式,Domain:网站接入、IP:非网站接入;默认为:IP - AccessMode *string `required:"false"` - // 地区线路 AreaLine *string `required:"true"` diff --git a/services/uads/models.go b/services/uads/models.go index 78646a95..f983783f 100644 --- a/services/uads/models.go +++ b/services/uads/models.go @@ -152,6 +152,21 @@ type ServiceInfo struct { Vendor int } +/* +EIPAddrSet - EIP地址信息 +*/ +type EIPAddrSet struct { + + // IP类型:gaofang + EIPType string + + // 弹性IP地址 + IP string + + // 运营商信息, 枚举值为: BGP: BGP; International: 国际. + OperatorName string +} + /* Resouce - 资源信息 */ @@ -173,21 +188,6 @@ type Resouce struct { Zone string } -/* -EIPAddrSet - EIP地址信息 -*/ -type EIPAddrSet struct { - - // IP类型:gaofang - EIPType string - - // 弹性IP地址 - IP string - - // 运营商信息, 枚举值为: BGP: BGP; International: 国际. - OperatorName string -} - /* IPInfo - 高防IP信息 */ @@ -233,18 +233,6 @@ type FwdSourceInfoConf struct { Toa int } -/* -FwdClientProxyInfo - 转发规则,回源代理配置列表 -*/ -type FwdClientProxyInfo struct { - - // 回源IP个数 - Count int - - // 回源IP列表 - IPList []string -} - /* FwdSourceInfo - 转发规则,回源配置信息 */ @@ -257,6 +245,18 @@ type FwdSourceInfo struct { Type string } +/* +FwdClientProxyInfo - 转发规则,回源代理配置列表 +*/ +type FwdClientProxyInfo struct { + + // 回源IP个数 + Count int + + // 回源IP列表 + IPList []string +} + /* BGPFwdRule - BGP高防的转发规则信息 */ diff --git a/services/ubill/apis.go b/services/ubill/apis.go index bc71b493..a87c0d37 100644 --- a/services/ubill/apis.go +++ b/services/ubill/apis.go @@ -194,22 +194,25 @@ func (c *UBillClient) GetBalance(req *GetBalanceRequest) (*GetBalanceResponse, e type GetBillDataFileUrlRequest struct { request.CommonBase - // 此字段不推荐使用,建议使用BillingCycle. 若BillingCycle 和 BillPeriod同时存在,BillingCycle 优先 + // 账期: 时间戳格式,已弃用,请使用BillingCycle BillPeriod *int `required:"false"` - // 账单类型,传 0 时获取账单总览报表,传 1 获取账单明细报表 + // 账单类型,枚举值:\\ > 0: 账单总览报表; \\ > 1: 账单明细报表 BillType *int `required:"true"` - // 账期(字符串格式,YYYY-MM,例如2021-08). 若BillingCycle 和 BillPeriod同时存在,BillingCycle 优先 + // 账期: YYYY-MM格式的字符串,例如 ”2021-08“ BillingCycle *string `required:"true"` - // 获取账单总览报表时,账单的支付状态,传 0 时获取待支付账单,传 1 时获取已支付账单。获取账单明细报表时该参数无效 + // 文件格式,枚举值:\\ > ”csv“: csv格式;\\ > ”pdf“: pdf格式(已支付总览文件 从2023年03月开始支持PDF) + Format *string `required:"false"` + + // 账单支付状态, (获取账单明细报表,不需要填写该参数),枚举值:\\ > 0: 0待支付总览账单(只支持当前月份的账期);\\ > 1: 已支付账单总览 PaidType *int `required:"false"` - // 如需求其他语言版本的账单则使用此参数。默认中文。如 RequireVersion = "EN",则提供英文版本账单。 + // 账单语言版本,枚举值:\\ > ”“: 默认中文;\\ > ”EN“: 英文版本 RequireVersion *string `required:"false"` - // 文件版本,若为"v1"表示获取带有子用户信息的账单,可以为空 + // 文件版本,固定值"v1"。 Version *string `required:"false"` } @@ -217,10 +220,10 @@ type GetBillDataFileUrlRequest struct { type GetBillDataFileUrlResponse struct { response.CommonBase - // 交易账单数据下载URL + // 交易账单文件下载URL FileUrl string - // 生成的 URL是否有效,即有对应数据文件 + // 是否有对应数据文件。(该参数返回no,表示文件正在生成中,需要用户发起重试获取。 IsValid string } @@ -239,7 +242,7 @@ func (c *UBillClient) NewGetBillDataFileUrlRequest() *GetBillDataFileUrlRequest /* API: GetBillDataFileUrl -生成账单数据文件下载的 url +生成账单数据文件下载的 url,包含三类文件,1. 已支付总览账单(支持CSV和PDF,从2023年03月开始支持PDF);2. 未支付总览文件(支持CSV,只有当月账期可以查看);3 账单详情文件(支持CSV)。 备注:文件生成有延迟,若返回值 IsValid=‘no’,需要使用者发起重试。 */ func (c *UBillClient) GetBillDataFileUrl(req *GetBillDataFileUrlRequest) (*GetBillDataFileUrlResponse, error) { var err error @@ -262,7 +265,7 @@ type ListUBillDetailRequest struct { // 账期,YYYY-MM,比如2021-08,只支持2018-05之后的查询 BillingCycle *string `required:"true"` - // 计费方式 (筛选项, 默认全部)。枚举值:\\ > Dynamic:按时 \\ > Month:按月 \\ > Year:按年 \\ > Once:一次性按量 \\ > Used:按量 \\ > Post:后付费 + // 计费方式 (筛选项, 默认全部)。枚举值:\\ > Year:按年\\ > Month:按月 \\ > Day:按天 \\ > Dynamic:按时 \\ > Used:按量 \\ > Donate:赠送 \\ > Trial:试用 \\ > Post:后付费 \\ > Spot:抢占式 ChargeType *string `required:"false"` // 每页数量,默认值25,最大值:100。 @@ -271,7 +274,7 @@ type ListUBillDetailRequest struct { // 数据偏移量 (默认0) Offset *int `required:"false"` - // 订单类型 (筛选项, 默认全部) 。枚举值:\\ > OT_BUY:新购 \\ > OT_RENEW:续费 \\ > OT_UPGRADE:升级 \\ > OT_REFUND:退费 \\ > OT_DOWNGRADE:降级 \\ > OT_SUSPEND:结算 \\ > OT_PAYMENT:删除资源回款 \\ > OT_POSTPAID_PAYMENT:后付费回款 \\ > OT_RECOVER:删除恢复 \\ > OT_POSTPAID_RENEW:过期续费回款 + // 订单类型 (筛选项, 默认全部) 。枚举值:\\ > OT_BUY:新购 \\ > OT_RENEW:续费 \\ > OT_UPGRADE:升级 \\ > OT_DOWNGRADE:降级 \\ > OT_SUSPEND:结算 \\ > OT_ADDITIONAL:补单 \\ > OT_REFUND:删除 \\ > OT_POSTPAID_RENEW:过期 \\ > OT_POSTPAID_PAYMENT:后付费 \\ > OT_RECOVER:删除恢复 OrderType *string `required:"false"` // 支付状态 (筛选项, 1:仅显示未支付订单; 2:仅显示已支付订单; 0:两者都显示) diff --git a/services/ubill/models.go b/services/ubill/models.go index f2268171..e184561e 100644 --- a/services/ubill/models.go +++ b/services/ubill/models.go @@ -3,24 +3,24 @@ package ubill /* -OrderDetail - +ResourceTag - */ -type OrderDetail struct { +type ResourceTag struct { // - ProductName string + KeyId string // Value string } /* -ResourceTag - +OrderDetail - */ -type ResourceTag struct { +type OrderDetail struct { // - KeyId string + ProductName string // Value string @@ -166,7 +166,7 @@ type BillDetailItem struct { // 可用区 AzGroupCName string - // 计费方式 (筛选项, 默认全部)。枚举值:\\ > Dynamic:按时 \\ > Month:按月 \\ > Year:按年 \\ > Once:一次性按量 \\ > Used:按量 \\ > Post:后付费 + // 计费方式 (筛选项, 默认全部)。枚举值:\\ > Year:按年\\ > Month:按月 \\ > Day:按天 \\ > Dynamic:按时 \\ > Used:按量 \\ > Donate:赠送 \\ > Trial:试用 \\ > Post:后付费 \\ > Spot:抢占式 ChargeType string // 创建时间(时间戳) @@ -178,7 +178,7 @@ type BillDetailItem struct { // 订单号 OrderNo string - // 订单类型 (筛选项, 默认全部) 。枚举值:\\ > OT_BUY:新购 \\ > OT_RENEW:续费 \\ > OT_UPGRADE:升级 \\ > OT_REFUND:退费 \\ > OT_DOWNGRADE:降级 \\ > OT_SUSPEND:结算 \\ > OT_PAYMENT:删除资源回款 \\ > OT_POSTPAID_PAYMENT:后付费回款 \\ > OT_RECOVER:删除恢复 \\ > OT_POSTPAID_RENEW:过期续费回款 + // 订单类型 (筛选项, 默认全部) 。枚举值:\\ > OT_BUY:新购 \\ > OT_RENEW:续费 \\ > OT_UPGRADE:升级 \\ > OT_DOWNGRADE:降级 \\ > OT_SUSPEND:结算 \\ > OT_ADDITIONAL:补单 \\ > OT_REFUND:删除 \\ > OT_POSTPAID_RENEW:过期 \\ > OT_POSTPAID_PAYMENT:后付费 \\ > OT_RECOVER:删除恢复 OrderType string // 项目名称 diff --git a/services/ucdn/apis.go b/services/ucdn/apis.go index 129eadaa..9a293466 100644 --- a/services/ucdn/apis.go +++ b/services/ucdn/apis.go @@ -1801,6 +1801,71 @@ func (c *UCDNClient) GetUcdnDomainPrefetchEnable(req *GetUcdnDomainPrefetchEnabl return &res, nil } +// GetUcdnDomainPrefetchRefreshStateRequest is request schema for GetUcdnDomainPrefetchRefreshState action +type GetUcdnDomainPrefetchRefreshStateRequest struct { + request.CommonBase + + // [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + // ProjectId *string `required:"false"` + + // 域名ID,创建加速域名时生成。 + DomainId *string `required:"true"` +} + +// GetUcdnDomainPrefetchRefreshStateResponse is response schema for GetUcdnDomainPrefetchRefreshState action +type GetUcdnDomainPrefetchRefreshStateResponse struct { + response.CommonBase + + // 预热配额 + PrefetchQuota int + + // 目录刷新配额 + RefreshDirQuota int + + // 文件刷新配额 + RefreshFileQuota int + + // 已提交预热个数 + SubmitPrefetchCount int + + // 已提交的目录刷新个数 + SubmitRefreshDir int + + // 已提交的文件刷新个数 + SubmitRefreshFile int +} + +// NewGetUcdnDomainPrefetchRefreshStateRequest will create request of GetUcdnDomainPrefetchRefreshState action. +func (c *UCDNClient) NewGetUcdnDomainPrefetchRefreshStateRequest() *GetUcdnDomainPrefetchRefreshStateRequest { + req := &GetUcdnDomainPrefetchRefreshStateRequest{} + + // 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: GetUcdnDomainPrefetchRefreshState + +获取域名预取刷新配额信息 +*/ +func (c *UCDNClient) GetUcdnDomainPrefetchRefreshState(req *GetUcdnDomainPrefetchRefreshStateRequest) (*GetUcdnDomainPrefetchRefreshStateResponse, error) { + var err error + var res GetUcdnDomainPrefetchRefreshStateResponse + + reqCopier := *req + + err = c.Client.InvokeAction("GetUcdnDomainPrefetchRefreshState", &reqCopier, &res) + if err != nil { + return &res, err + } + + return &res, nil +} + // GetUcdnDomainRequestNumV2Request is request schema for GetUcdnDomainRequestNumV2 action type GetUcdnDomainRequestNumV2Request struct { request.CommonBase diff --git a/services/ucdn/models.go b/services/ucdn/models.go index e1f36be4..02808ce1 100644 --- a/services/ucdn/models.go +++ b/services/ucdn/models.go @@ -2,15 +2,6 @@ package ucdn -/* -AccessConf - 访问控制 -*/ -type AccessConf struct { - - // 多个ip用逗号隔开 - IpBlacklist string -} - /* CacheConf - 缓存配置 */ @@ -38,6 +29,15 @@ type CacheConf struct { PathPattern string } +/* +AccessConf - 访问控制 +*/ +type AccessConf struct { + + // 多个ip用逗号隔开 + IpBlacklist string +} + /* DomainInfo - 域名配置 */ @@ -548,6 +548,21 @@ type BandwidthTrafficInfo struct { Traffic float64 } +/* +CacheKeyInfo - 忽略参数缓存配置 +*/ +type CacheKeyInfo struct { + + // 是否忽略 + Ignore bool + + // 路径模式,支持正则 + PathPattern string + + // 自定义变量,以$符号开头,多个变量用加号(+)连接,$querystring表示所有变量 + QueryString string +} + /* ReferConf - refer配置 */ @@ -564,18 +579,21 @@ type ReferConf struct { } /* -CacheKeyInfo - 忽略参数缓存配置 +CacheAllConfig - 缓存相关的配置 */ -type CacheKeyInfo struct { +type CacheAllConfig struct { - // 是否忽略 - Ignore bool + // 缓存Host,不同的域名可以配置为同一个CacheHost来实现缓存共享,默认为加速域名 + CacheHost string - // 路径模式,支持正则 - PathPattern string + // 忽略参数缓存配置列表,参见CacheKeyInfo + CacheKeyList []CacheKeyInfo - // 自定义变量,以$符号开头,多个变量用加号(+)连接,$querystring表示所有变量 - QueryString string + // 缓存配置列表,参见CacheConf + CacheList []CacheConf + + // 状态码缓存配置列表,参见CacheConf + HttpCodeCacheList []CacheConf } /* @@ -599,36 +617,6 @@ type AdvancedConf struct { WebSocketEnable bool } -/* -AccessControlConf - 访问控制配置参数 -*/ -type AccessControlConf struct { - - // ip黑名单,多个ip,可表示为:IpBlackList.0=1.1.1.1,IpBlackList.1=2.2.2.2 - IpBlackList []string - - // refer配置 - ReferConf ReferConf -} - -/* -CacheAllConfig - 缓存相关的配置 -*/ -type CacheAllConfig struct { - - // 缓存Host,不同的域名可以配置为同一个CacheHost来实现缓存共享,默认为加速域名 - CacheHost string - - // 忽略参数缓存配置列表,参见CacheKeyInfo - CacheKeyList []CacheKeyInfo - - // 缓存配置列表,参见CacheConf - CacheList []CacheConf - - // 状态码缓存配置列表,参见CacheConf - HttpCodeCacheList []CacheConf -} - /* OriginConf - 回源配置 */ @@ -665,6 +653,18 @@ type OriginConf struct { OriginProtocol string } +/* +AccessControlConf - 访问控制配置参数 +*/ +type AccessControlConf struct { + + // ip黑名单,多个ip,可表示为:IpBlackList.0=1.1.1.1,IpBlackList.1=2.2.2.2 + IpBlackList []string + + // refer配置 + ReferConf ReferConf +} + /* DomainConfigInfo - 更新域名配置 */ diff --git a/services/ucompshare/apis.go b/services/ucompshare/apis.go new file mode 100644 index 00000000..0d22195d --- /dev/null +++ b/services/ucompshare/apis.go @@ -0,0 +1,772 @@ +// Code is generated by ucloud-model, DO NOT EDIT IT. + +package ucompshare + +import ( + "github.com/ucloud/ucloud-sdk-go/ucloud/request" + "github.com/ucloud/ucloud-sdk-go/ucloud/response" +) + +// UCompShare API Schema + +// CreateULHostInstanceRequest is request schema for CreateULHostInstance action +type CreateULHostInstanceRequest 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"` + + // 套餐ID。如:"ulh.c1m1s40b30t800" + BundleId *string `required:"true"` + + // 计费模式。枚举值: \\ > Year,按年付费; \\ > Month,按月付费;默认:Month + ChargeType *string `required:"false"` + + // 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 + CouponId *string `required:"false"` + + // 镜像ID。 请通过 [DescribeImage](describe_image.html)获取 + ImageId *string `required:"true"` + + // 轻量应用主机名称。默认:套餐ID。请遵照[[api:uhost-api:specification|字段规范]]设定实例名称。 + Name *string `required:"false"` + + // ULHost密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64 + Password *string `required:"true"` + + // 购买时长。默认:1。不支持购买到月末 + Quantity *int `required:"false"` +} + +// CreateULHostInstanceResponse is response schema for CreateULHostInstance action +type CreateULHostInstanceResponse struct { + response.CommonBase + + // 错误信息 + Message string + + // 实例ID + ULHostId string +} + +// NewCreateULHostInstanceRequest will create request of CreateULHostInstance action. +func (c *UCompShareClient) NewCreateULHostInstanceRequest() *CreateULHostInstanceRequest { + req := &CreateULHostInstanceRequest{} + + // 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(false) + return req +} + +/* +API: CreateULHostInstance + +创建轻量应用云主机 +*/ +func (c *UCompShareClient) CreateULHostInstance(req *CreateULHostInstanceRequest) (*CreateULHostInstanceResponse, error) { + var err error + var res CreateULHostInstanceResponse + + reqCopier := *req + + err = c.Client.InvokeAction("CreateULHostInstance", &reqCopier, &res) + if err != nil { + return &res, err + } + + return &res, nil +} + +// DescribeULHostBundlesRequest is request schema for DescribeULHostBundles action +type DescribeULHostBundlesRequest 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"` + +} + +// DescribeULHostBundlesResponse is response schema for DescribeULHostBundles action +type DescribeULHostBundlesResponse struct { + response.CommonBase + + // 套餐列表 + Bundles []Bundle + + // 错误信息 + Message string +} + +// NewDescribeULHostBundlesRequest will create request of DescribeULHostBundles action. +func (c *UCompShareClient) NewDescribeULHostBundlesRequest() *DescribeULHostBundlesRequest { + req := &DescribeULHostBundlesRequest{} + + // 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: DescribeULHostBundles + +获取轻量应用云主机套餐列表 +*/ +func (c *UCompShareClient) DescribeULHostBundles(req *DescribeULHostBundlesRequest) (*DescribeULHostBundlesResponse, error) { + var err error + var res DescribeULHostBundlesResponse + + reqCopier := *req + + err = c.Client.InvokeAction("DescribeULHostBundles", &reqCopier, &res) + if err != nil { + return &res, err + } + + return &res, nil +} + +// DescribeULHostInstanceRequest is request schema for DescribeULHostInstance action +type DescribeULHostInstanceRequest 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"` + + // 返回数据长度,默认为20,最大100 + Limit *int `required:"false"` + + // 列表起始位置偏移量,默认为0 + Offset *int `required:"false"` + + // 【数组】轻量应用云主机ID。 + ULHostIds []string `required:"false"` +} + +// DescribeULHostInstanceResponse is response schema for DescribeULHostInstance action +type DescribeULHostInstanceResponse struct { + response.CommonBase + + // 错误信息 + Message string + + // 实例列表 + ULHostInstanceSets []ULHostInstanceSet +} + +// NewDescribeULHostInstanceRequest will create request of DescribeULHostInstance action. +func (c *UCompShareClient) NewDescribeULHostInstanceRequest() *DescribeULHostInstanceRequest { + req := &DescribeULHostInstanceRequest{} + + // 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: DescribeULHostInstance + +获取轻量应用云主机列表 +*/ +func (c *UCompShareClient) DescribeULHostInstance(req *DescribeULHostInstanceRequest) (*DescribeULHostInstanceResponse, error) { + var err error + var res DescribeULHostInstanceResponse + + reqCopier := *req + + err = c.Client.InvokeAction("DescribeULHostInstance", &reqCopier, &res) + if err != nil { + return &res, err + } + + return &res, nil +} + +// GetULHostInstancePriceRequest is request schema for GetULHostInstancePrice action +type GetULHostInstancePriceRequest 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"` + + // 套餐ID + BundleId *string `required:"true"` + + // 获取指定计费模式的价格。枚举值:\\ > Year,按年付费; \\ > Month。未指定时,返回所有计费模式价格 + ChargeType *string `required:"false"` + + // 购买台数,范围[1,5]。默认:1 + Count *int `required:"false"` + + // 购买时长。默认: 1。不支持购买到月末 + Quantity *int `required:"false"` +} + +// GetULHostInstancePriceResponse is response schema for GetULHostInstancePrice action +type GetULHostInstancePriceResponse struct { + response.CommonBase + + // 错误信息 + Message string + + // + PriceSet []ULHostPriceSet +} + +// NewGetULHostInstancePriceRequest will create request of GetULHostInstancePrice action. +func (c *UCompShareClient) NewGetULHostInstancePriceRequest() *GetULHostInstancePriceRequest { + req := &GetULHostInstancePriceRequest{} + + // 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: GetULHostInstancePrice + +获取轻量应用云主机套餐价格 +*/ +func (c *UCompShareClient) GetULHostInstancePrice(req *GetULHostInstancePriceRequest) (*GetULHostInstancePriceResponse, error) { + var err error + var res GetULHostInstancePriceResponse + + reqCopier := *req + + err = c.Client.InvokeAction("GetULHostInstancePrice", &reqCopier, &res) + if err != nil { + return &res, err + } + + return &res, nil +} + +// GetULHostRenewPriceRequest is request schema for GetULHostRenewPrice action +type GetULHostRenewPriceRequest 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"` + + // 计费类型。支持:Year/Month;默认:Month + ChargeType *string `required:"false"` + + // ULHost实例ID + ULHostId *string `required:"true"` +} + +// GetULHostRenewPriceResponse is response schema for GetULHostRenewPrice action +type GetULHostRenewPriceResponse struct { + response.CommonBase + + // + PriceSet []ULHostPriceSet +} + +// NewGetULHostRenewPriceRequest will create request of GetULHostRenewPrice action. +func (c *UCompShareClient) NewGetULHostRenewPriceRequest() *GetULHostRenewPriceRequest { + req := &GetULHostRenewPriceRequest{} + + // 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: GetULHostRenewPrice + +获取主机续费价格 +*/ +func (c *UCompShareClient) GetULHostRenewPrice(req *GetULHostRenewPriceRequest) (*GetULHostRenewPriceResponse, error) { + var err error + var res GetULHostRenewPriceResponse + + reqCopier := *req + + err = c.Client.InvokeAction("GetULHostRenewPrice", &reqCopier, &res) + if err != nil { + return &res, err + } + + return &res, nil +} + +// ModifyULHostAttributeRequest is request schema for ModifyULHostAttribute action +type ModifyULHostAttributeRequest 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"` + + // 名称。和Remark至少选择一个进行修改 + Name *string `required:"false"` + + // 备注。和Name至少选择一个进行修改 + Remark *string `required:"false"` + + // ULHost实例Id + ULHostId *string `required:"true"` +} + +// ModifyULHostAttributeResponse is response schema for ModifyULHostAttribute action +type ModifyULHostAttributeResponse struct { + response.CommonBase + + // 错误信息 + Message string + + // ULHost实例Id + ULHostId string +} + +// NewModifyULHostAttributeRequest will create request of ModifyULHostAttribute action. +func (c *UCompShareClient) NewModifyULHostAttributeRequest() *ModifyULHostAttributeRequest { + req := &ModifyULHostAttributeRequest{} + + // 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: ModifyULHostAttribute + +修改指定ULHost实例属性信息,包含名称和备注 +*/ +func (c *UCompShareClient) ModifyULHostAttribute(req *ModifyULHostAttributeRequest) (*ModifyULHostAttributeResponse, error) { + var err error + var res ModifyULHostAttributeResponse + + reqCopier := *req + + err = c.Client.InvokeAction("ModifyULHostAttribute", &reqCopier, &res) + if err != nil { + return &res, err + } + + return &res, nil +} + +// PoweroffULHostInstanceRequest is request schema for PoweroffULHostInstance action +type PoweroffULHostInstanceRequest 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"` + + // ULHost实例ID + ULHostId *string `required:"true"` +} + +// PoweroffULHostInstanceResponse is response schema for PoweroffULHostInstance action +type PoweroffULHostInstanceResponse struct { + response.CommonBase + + // ULHost实例ID + ULHostId string +} + +// NewPoweroffULHostInstanceRequest will create request of PoweroffULHostInstance action. +func (c *UCompShareClient) NewPoweroffULHostInstanceRequest() *PoweroffULHostInstanceRequest { + req := &PoweroffULHostInstanceRequest{} + + // 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: PoweroffULHostInstance + +直接关闭UHost实例电源,无需等待实例正常关闭。 +*/ +func (c *UCompShareClient) PoweroffULHostInstance(req *PoweroffULHostInstanceRequest) (*PoweroffULHostInstanceResponse, error) { + var err error + var res PoweroffULHostInstanceResponse + + reqCopier := *req + + err = c.Client.InvokeAction("PoweroffULHostInstance", &reqCopier, &res) + if err != nil { + return &res, err + } + + return &res, nil +} + +// RebootULHostInstanceRequest is request schema for RebootULHostInstance action +type RebootULHostInstanceRequest 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"` + + // ULHost实例ID + ULHostId *string `required:"true"` +} + +// RebootULHostInstanceResponse is response schema for RebootULHostInstance action +type RebootULHostInstanceResponse struct { + response.CommonBase + + // ULHost实例ID + ULHostId string +} + +// NewRebootULHostInstanceRequest will create request of RebootULHostInstance action. +func (c *UCompShareClient) NewRebootULHostInstanceRequest() *RebootULHostInstanceRequest { + req := &RebootULHostInstanceRequest{} + + // 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: RebootULHostInstance + +重新启动UHost实例。 +*/ +func (c *UCompShareClient) RebootULHostInstance(req *RebootULHostInstanceRequest) (*RebootULHostInstanceResponse, error) { + var err error + var res RebootULHostInstanceResponse + + reqCopier := *req + + err = c.Client.InvokeAction("RebootULHostInstance", &reqCopier, &res) + if err != nil { + return &res, err + } + + return &res, nil +} + +// ReinstallULHostInstanceRequest is request schema for ReinstallULHostInstance action +type ReinstallULHostInstanceRequest 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"` + + // 镜像Id。暂不支持使用自定义镜像重装 + ImageId *string `required:"true"` + + // 登陆密码 + Password *string `required:"true"` + + // 实例Id + ULHostId *string `required:"true"` +} + +// ReinstallULHostInstanceResponse is response schema for ReinstallULHostInstance action +type ReinstallULHostInstanceResponse struct { + response.CommonBase + + // 错误信息 + Message string + + // 实例Id + ULHostId string +} + +// NewReinstallULHostInstanceRequest will create request of ReinstallULHostInstance action. +func (c *UCompShareClient) NewReinstallULHostInstanceRequest() *ReinstallULHostInstanceRequest { + req := &ReinstallULHostInstanceRequest{} + + // 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: ReinstallULHostInstance + +重装轻量应用云主机 +*/ +func (c *UCompShareClient) ReinstallULHostInstance(req *ReinstallULHostInstanceRequest) (*ReinstallULHostInstanceResponse, error) { + var err error + var res ReinstallULHostInstanceResponse + + reqCopier := *req + + err = c.Client.InvokeAction("ReinstallULHostInstance", &reqCopier, &res) + if err != nil { + return &res, err + } + + return &res, nil +} + +// ResetULHostInstancePasswordRequest is request schema for ResetULHostInstancePassword action +type ResetULHostInstancePasswordRequest 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"` + + // ULHost新密码(密码格式使用BASE64编码) + Password *string `required:"true"` + + // ULHost实例ID + ULHostId *string `required:"true"` +} + +// ResetULHostInstancePasswordResponse is response schema for ResetULHostInstancePassword action +type ResetULHostInstancePasswordResponse struct { + response.CommonBase + + // ULHost实例ID + ULHostId string +} + +// NewResetULHostInstancePasswordRequest will create request of ResetULHostInstancePassword action. +func (c *UCompShareClient) NewResetULHostInstancePasswordRequest() *ResetULHostInstancePasswordRequest { + req := &ResetULHostInstancePasswordRequest{} + + // 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: ResetULHostInstancePassword + +重置轻量应用云主机管理员密码。 +*/ +func (c *UCompShareClient) ResetULHostInstancePassword(req *ResetULHostInstancePasswordRequest) (*ResetULHostInstancePasswordResponse, error) { + var err error + var res ResetULHostInstancePasswordResponse + + reqCopier := *req + + err = c.Client.InvokeAction("ResetULHostInstancePassword", &reqCopier, &res) + if err != nil { + return &res, err + } + + return &res, nil +} + +// StartULHostInstanceRequest is request schema for StartULHostInstance action +type StartULHostInstanceRequest 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"` + + // ULHost实例ID + ULHostId *string `required:"true"` +} + +// StartULHostInstanceResponse is response schema for StartULHostInstance action +type StartULHostInstanceResponse struct { + response.CommonBase + + // ULHost实例ID + ULHostId string +} + +// NewStartULHostInstanceRequest will create request of StartULHostInstance action. +func (c *UCompShareClient) NewStartULHostInstanceRequest() *StartULHostInstanceRequest { + req := &StartULHostInstanceRequest{} + + // 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: StartULHostInstance + +启动处于关闭状态的UHost实例。 +*/ +func (c *UCompShareClient) StartULHostInstance(req *StartULHostInstanceRequest) (*StartULHostInstanceResponse, error) { + var err error + var res StartULHostInstanceResponse + + reqCopier := *req + + err = c.Client.InvokeAction("StartULHostInstance", &reqCopier, &res) + if err != nil { + return &res, err + } + + return &res, nil +} + +// StopULHostInstanceRequest is request schema for StopULHostInstance action +type StopULHostInstanceRequest 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"` + + // ULHost实例ID。 + ULHostId *string `required:"true"` +} + +// StopULHostInstanceResponse is response schema for StopULHostInstance action +type StopULHostInstanceResponse struct { + response.CommonBase + + // ULHost实例ID + ULHostId string +} + +// NewStopULHostInstanceRequest will create request of StopULHostInstance action. +func (c *UCompShareClient) NewStopULHostInstanceRequest() *StopULHostInstanceRequest { + req := &StopULHostInstanceRequest{} + + // 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: StopULHostInstance + +指停止处于运行状态的ULHost实例 +*/ +func (c *UCompShareClient) StopULHostInstance(req *StopULHostInstanceRequest) (*StopULHostInstanceResponse, error) { + var err error + var res StopULHostInstanceResponse + + reqCopier := *req + + err = c.Client.InvokeAction("StopULHostInstance", &reqCopier, &res) + if err != nil { + return &res, err + } + + return &res, nil +} + +// TerminateULHostInstanceRequest is request schema for TerminateULHostInstance action +type TerminateULHostInstanceRequest 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"` + + // 删除主机时是否同时删除挂载的数据盘。默认为false。 + ReleaseUDisk *bool `required:"false"` + + // ULHost资源Id + ULHostId *string `required:"true"` +} + +// TerminateULHostInstanceResponse is response schema for TerminateULHostInstance action +type TerminateULHostInstanceResponse struct { + response.CommonBase + + // 用于判断主机删除时是否进入回收站。放入回收站:"Yes", 彻底删除:“No”。 + InRecycle string + + // ULHost 实例 Id + ULHostId string +} + +// NewTerminateULHostInstanceRequest will create request of TerminateULHostInstance action. +func (c *UCompShareClient) NewTerminateULHostInstanceRequest() *TerminateULHostInstanceRequest { + req := &TerminateULHostInstanceRequest{} + + // 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: TerminateULHostInstance + +删除指定数据中心的ULHost实例。 +*/ +func (c *UCompShareClient) TerminateULHostInstance(req *TerminateULHostInstanceRequest) (*TerminateULHostInstanceResponse, error) { + var err error + var res TerminateULHostInstanceResponse + + reqCopier := *req + + err = c.Client.InvokeAction("TerminateULHostInstance", &reqCopier, &res) + if err != nil { + return &res, err + } + + return &res, nil +} diff --git a/services/ucompshare/client.go b/services/ucompshare/client.go new file mode 100644 index 00000000..2ba5b857 --- /dev/null +++ b/services/ucompshare/client.go @@ -0,0 +1,22 @@ +// Code is generated by ucloud-model, DO NOT EDIT IT. + +package ucompshare + +import ( + "github.com/ucloud/ucloud-sdk-go/ucloud" + "github.com/ucloud/ucloud-sdk-go/ucloud/auth" +) + +// UCompShareClient is the client of UCompShare +type UCompShareClient struct { + *ucloud.Client +} + +// NewClient will return a instance of UCompShareClient +func NewClient(config *ucloud.Config, credential *auth.Credential) *UCompShareClient { + meta := ucloud.ClientMeta{Product: "UCompShare"} + client := ucloud.NewClientWithMeta(config, credential, meta) + return &UCompShareClient{ + client, + } +} diff --git a/services/ucompshare/doc.go b/services/ucompshare/doc.go new file mode 100644 index 00000000..4efbd6df --- /dev/null +++ b/services/ucompshare/doc.go @@ -0,0 +1,13 @@ +// Code is generated by ucloud-model, DO NOT EDIT IT. + +/* +Package ucompshare include resources of ucloud ucompshare product + +See also + + - API: https://docs.ucloud.cn/api/ucompshare-api/index + - Product: https://www.ucloud.cn/site/product/ucompshare.html + +for detail. +*/ +package ucompshare diff --git a/services/ucompshare/models.go b/services/ucompshare/models.go new file mode 100644 index 00000000..460d25b0 --- /dev/null +++ b/services/ucompshare/models.go @@ -0,0 +1,165 @@ +// Code is generated by ucloud-model, DO NOT EDIT IT. + +package ucompshare + +/* +Bundle - 轻量应用云主机套餐 +*/ +type Bundle struct { + + // 外网带宽。单位:Mbps。 + Bandwidth int + + // 套餐ID。 + BundleId string + + // CPU核数。 + CPU int + + // 内存大小。单位:MB。 + Memory int + + // 系统盘大小。单位:GB。 + SysDiskSpace int + + // 流量包大小。单位:GB。 + TrafficPacket int +} + +/* +ULHostDiskSet - 轻量应用主机的磁盘信息 +*/ +type ULHostDiskSet struct { + + // 磁盘Id + DiskId string + + // 磁盘类型。如:"CLOUD_RSSD"、"CLOUD_SSD" + DiskType string + + // 磁盘盘符。系统盘:"vda" + Drive string + + // 是否为系统盘。是:"True";否:"False" + IsBoot string + + // 磁盘大小。单位:GB + Size int + + // 磁盘类型。系统盘:"Boot";数据盘:"Data" + Type string +} + +/* +UHostIPSet - +*/ +type UHostIPSet struct { + + // IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) + Bandwidth int + + // 内网 Private 类型下,表示是否为默认网卡。true: 是默认网卡;其他值:不是。 + Default string + + // IP地址 + IP string + + // 外网IP资源ID 。(内网IP无对应的资源ID) + IPId string + + // IPv4/IPv6; + IPMode string + + // 内网 Private 类型下,当前网卡的Mac。 + Mac string + + // 弹性网卡为默认网卡时,返回对应的 ID 值 + NetworkInterfaceId string + + // IP地址对应的子网 ID。(北京一不支持,字段返回为空) + SubnetId string + + // 国际: Internation,BGP: Bgp,内网: Private + Type string + + // IP地址对应的VPC ID。(北京一不支持,字段返回为空) + VPCId string + + // 当前EIP的权重。权重最大的为当前的出口IP。 + Weight int +} + +/* +ULHostInstanceSet - 轻量应用云主机详情 +*/ +type ULHostInstanceSet struct { + + // 【数组】镜像包含的应用列表。 + Apps []string + + // 是否自动续费。枚举值:Yes/No + AutoRenew string + + // CPU核数。 + CPU int + + // 计费模式。枚举值:Month/Year + ChargeType string + + // 创建时间。Unix时间戳 + CreateTime int + + // 磁盘信息 + DiskSet []ULHostDiskSet + + // 过期时间。Unix时间戳 + ExpireTime int + + // IP信息 + IPSet []UHostIPSet + + // 镜像Id。 + ImageId string + + // 镜像名称。 + ImageName string + + // 是否过期。枚举值:Yes/No + IsExpire string + + // 内存。单位:MB + Memory int + + // 实例名称。默认套餐Id + Name string + + // 备注。 + Remark string + + // 实例状态。枚举值:\\ >初始化: Initializing; \\ >启动中: Starting; \\> 运行中: Running; \\> 关机中: Stopping; \\ >关机: Stopped \\ >安装失败: Install Fail; \\ >重启中: Rebooting; \\ > 未知(空字符串,获取状态超时或出错):"" + State string + + // 业务组。 + Tag string + + // 实例Id。 + ULHostId string + + // 可用区。 + Zone string +} + +/* +ULHostPriceSet - 轻量应用主机价格详情 +*/ +type ULHostPriceSet struct { + + // 计费模式 + ChargeType string + + // 原价 + OriginalPrice float64 + + // 价格 + Price float64 +} diff --git a/services/uec/apis.go b/services/uec/apis.go index 17e4efaf..002ff5d7 100644 --- a/services/uec/apis.go +++ b/services/uec/apis.go @@ -195,6 +195,30 @@ func (c *UECClient) CreateUEcFirewall(req *CreateUEcFirewallRequest) (*CreateUEc return &res, nil } +/* +CreateUEcHolderParamStorage is request schema for complex param +*/ +type CreateUEcHolderParamStorage struct { + + // 存储卷挂载路径 + Path *string `required:"false"` + + // 存储卷资源id + ResourceId *string `required:"false"` +} + +/* +CreateUEcHolderParamImage is request schema for complex param +*/ +type CreateUEcHolderParamImage struct { + + // 镜像用户名和密码(如镜像名:密码) + Message *string `required:"false"` + + // 镜像仓库地址 + StoreAddress *string `required:"false"` +} + /* CreateUEcHolderParamPack is request schema for complex param */ @@ -228,30 +252,6 @@ type CreateUEcHolderParamPack struct { WorkDir *string `required:"false"` } -/* -CreateUEcHolderParamStorage is request schema for complex param -*/ -type CreateUEcHolderParamStorage struct { - - // 存储卷挂载路径 - Path *string `required:"false"` - - // 存储卷资源id - ResourceId *string `required:"false"` -} - -/* -CreateUEcHolderParamImage is request schema for complex param -*/ -type CreateUEcHolderParamImage struct { - - // 镜像用户名和密码(如镜像名:密码) - Message *string `required:"false"` - - // 镜像仓库地址 - StoreAddress *string `required:"false"` -} - // CreateUEcHolderRequest is request schema for CreateUEcHolder action type CreateUEcHolderRequest struct { request.CommonBase diff --git a/services/uec/models.go b/services/uec/models.go index 885796cf..62e40da5 100644 --- a/services/uec/models.go +++ b/services/uec/models.go @@ -111,39 +111,33 @@ type CfgDictList struct { } /* -DockerInfo - 容器信息 +StorVolumeInfo - 容器组存储卷信息 */ -type DockerInfo struct { - - // 参数 - Args string - - // 容器配置字典(详情参考CfgDictList) - CfgDictList []CfgDictList - - // 命令 - Command string +type StorVolumeInfo struct { - // CPU核数(/核)精度0.1核 - CpuCores float64 + // 容量(单位GB) + DiskSize int - // 环境变量(详情参考EnvList) - EnvList []EnvList + // 挂载点 + MountPoint string - // 镜像名称 - ImageName string + // 名称 + Name string - // 内存大小(Gi) - MemSize float64 + // 资源id + ResourceId string +} - // 容器名称 - Name string +/* +IpList - 容器组外网ip列表 +*/ +type IpList struct { - // 容器状态,0:初始化;1:拉取镜像;2:拉取镜像失败;3:启动中;4:运行中;5:正在停止;6:已停止;7:已删除;8:镜像拉取成功;9:启动失败;99:异常 - State int + // 外网ip + Ip string - // 工作目录 - WorkDir string + // 运营商 + Isp string } /* @@ -162,33 +156,39 @@ type ImageList struct { } /* -IpList - 容器组外网ip列表 +DockerInfo - 容器信息 */ -type IpList struct { +type DockerInfo struct { - // 外网ip - Ip string + // 参数 + Args string - // 运营商 - Isp string -} + // 容器配置字典(详情参考CfgDictList) + CfgDictList []CfgDictList -/* -StorVolumeInfo - 容器组存储卷信息 -*/ -type StorVolumeInfo struct { + // 命令 + Command string - // 容量(单位GB) - DiskSize int + // CPU核数(/核)精度0.1核 + CpuCores float64 - // 挂载点 - MountPoint string + // 环境变量(详情参考EnvList) + EnvList []EnvList - // 名称 + // 镜像名称 + ImageName string + + // 内存大小(Gi) + MemSize float64 + + // 容器名称 Name string - // 资源id - ResourceId string + // 容器状态,0:初始化;1:拉取镜像;2:拉取镜像失败;3:启动中;4:运行中;5:正在停止;6:已停止;7:已删除;8:镜像拉取成功;9:启动失败;99:异常 + State int + + // 工作目录 + WorkDir string } /* diff --git a/services/uhost/apis.go b/services/uhost/apis.go index 246913b1..f32c7d4d 100644 --- a/services/uhost/apis.go +++ b/services/uhost/apis.go @@ -195,6 +195,18 @@ func (c *UHostClient) CreateIsolationGroup(req *CreateIsolationGroupRequest) (*C return &res, nil } +/* +UHostDiskCustomBackup is request schema for complex param +*/ +type UHostDiskCustomBackup struct { +} + +/* +CreateUHostInstanceParamNetworkInterfaceIPv6 is request schema for complex param +*/ +type CreateUHostInstanceParamNetworkInterfaceIPv6 struct { +} + /* CreateUHostInstanceParamNetworkInterfaceEIP is request schema for complex param */ @@ -219,36 +231,12 @@ type CreateUHostInstanceParamNetworkInterfaceEIP struct { ShareBandwidthId *string `required:"false"` } -/* -CreateUHostInstanceParamNetworkInterfaceIPv6 is request schema for complex param -*/ -type CreateUHostInstanceParamNetworkInterfaceIPv6 struct { -} - -/* -UHostDiskCustomBackup is request schema for complex param -*/ -type UHostDiskCustomBackup struct { -} - /* CreateUHostInstanceParamSecGroupId is request schema for complex param */ type CreateUHostInstanceParamSecGroupId struct { } -/* -CreateUHostInstanceParamNetworkInterface is request schema for complex param -*/ -type CreateUHostInstanceParamNetworkInterface struct { - - // 申请并绑定一个教育网EIP。True为申请并绑定,False为不会申请绑定,默认False。当前只支持具有HPC特性的机型。 - CreateCernetIp *bool `required:"false"` - - // - EIP *CreateUHostInstanceParamNetworkInterfaceEIP `required:"false"` -} - /* UHostDisk is request schema for complex param */ @@ -276,6 +264,18 @@ type UHostDisk struct { Type *string `required:"true"` } +/* +CreateUHostInstanceParamNetworkInterface is request schema for complex param +*/ +type CreateUHostInstanceParamNetworkInterface struct { + + // 申请并绑定一个教育网EIP。True为申请并绑定,False为不会申请绑定,默认False。当前只支持具有HPC特性的机型。 + CreateCernetIp *bool `required:"false"` + + // + EIP *CreateUHostInstanceParamNetworkInterfaceEIP `required:"false"` +} + /* CreateUHostInstanceParamFeatures is request schema for complex param */ @@ -744,14 +744,14 @@ type DescribeImageRequest struct { type DescribeImageResponse struct { response.CommonBase - // 操作名称 - Action string + // 【该字段已废弃,请谨慎使用】 + Action string `deprecated:"true"` // 镜像列表详见 UHostImageSet ImageSet []UHostImageSet - // 返回码 - RetCode int + // 【该字段已废弃,请谨慎使用】 + RetCode int `deprecated:"true"` // 满足条件的镜像总数 TotalCount int @@ -1123,6 +1123,21 @@ func (c *UHostClient) GetAttachedDiskUpgradePrice(req *GetAttachedDiskUpgradePri return &res, nil } +/* +GetUHostInstancePriceParamVolumes is request schema for complex param +*/ +type GetUHostInstancePriceParamVolumes struct { + + // 【该字段已废弃,请谨慎使用】 + IsBoot *string `required:"false" deprecated:"true"` + + // 【该字段已废弃,请谨慎使用】 + Size *int `required:"false" deprecated:"true"` + + // 【该字段已废弃,请谨慎使用】 + Type *string `required:"false" deprecated:"true"` +} + /* getUHostInstancePriceParamDisks is request schema for complex param */ @@ -1141,21 +1156,6 @@ type getUHostInstancePriceParamDisks struct { Type *string `required:"true"` } -/* -GetUHostInstancePriceParamVolumes is request schema for complex param -*/ -type GetUHostInstancePriceParamVolumes struct { - - // 【该字段已废弃,请谨慎使用】 - IsBoot *string `required:"false" deprecated:"true"` - - // 【该字段已废弃,请谨慎使用】 - Size *int `required:"false" deprecated:"true"` - - // 【该字段已废弃,请谨慎使用】 - Type *string `required:"false" deprecated:"true"` -} - // GetUHostInstancePriceRequest is request schema for GetUHostInstancePrice action type GetUHostInstancePriceRequest struct { request.CommonBase diff --git a/services/uhost/models.go b/services/uhost/models.go index dd447443..a01626f5 100644 --- a/services/uhost/models.go +++ b/services/uhost/models.go @@ -92,6 +92,18 @@ type BootDiskInfo struct { Name string } +/* +Performance - GPU的性能指标 +*/ +type Performance struct { + + // 交互展示参数,可忽略 + Rate int + + // 值,单位是TFlops + Value float64 +} + /* GraphicsMemory - GPU的显存指标 */ @@ -116,33 +128,6 @@ type Features struct { Name string } -/* -CpuPlatforms - CPU平台信息 -*/ -type CpuPlatforms struct { - - // 返回AMD的CPU平台信息,例如:AMD: ['Amd/Epyc2'] - Amd []string - - // 返回Arm的CPU平台信息,例如:Ampere: ['Ampere/Altra'] - Ampere []string - - // 返回Intel的CPU平台信息,例如:Intel: ['Intel/CascadeLake','Intel/CascadelakeR','Intel/IceLake'] - Intel []string -} - -/* -Performance - GPU的性能指标 -*/ -type Performance struct { - - // 交互展示参数,可忽略 - Rate int - - // 值,单位是TFlops - Value float64 -} - /* MachineSizes - GPU、CPU和内存信息 */ @@ -170,6 +155,21 @@ type Disks struct { Name string } +/* +CpuPlatforms - CPU平台信息 +*/ +type CpuPlatforms struct { + + // 返回AMD的CPU平台信息,例如:AMD: ['Amd/Epyc2'] + Amd []string + + // 返回Arm的CPU平台信息,例如:Ampere: ['Ampere/Altra'] + Ampere []string + + // 返回Intel的CPU平台信息,例如:Intel: ['Intel/CascadeLake','Intel/CascadelakeR','Intel/IceLake'] + Intel []string +} + /* AvailableInstanceTypes - https://ushare.ucloudadmin.com/pages/viewpage.action?pageId=104662646 */ @@ -214,7 +214,7 @@ type UHostImageSet struct { // 创建时间,格式为Unix时间戳 CreateTime int - // 特殊状态标识, 目前包含NetEnhnced(网络增强1.0), NetEnhanced_Ultra](网络增强2.0), HotPlug(热升级), CloudInit, IPv6 + // 特殊状态标识, 目前包含NetEnhnced(网络增强1.0), NetEnhanced_Ultra(网络增强2.0), HotPlug(热升级), GPU(GPU镜像),CloudInit, IPv6(支持IPv6网络),RssdAttachable(支持RSSD云盘),Vgpu_AMD(支持AMD的vgpu),Vgpu_NVIDIA(支持NVIDIA的vgpu),Aarch64_Type(支持arm64架构) Features []string // 行业镜像类型(仅行业镜像将返回这个值) @@ -250,9 +250,18 @@ type UHostImageSet struct { // 操作系统类型:Linux,Windows OsType string - // 镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable + // 主要安装软件 + PrimarySoftware string + + // 场景分类,目前包含Featured(精选),PreInstalledDrivers(预装驱动),AIPainting(AI绘画),AIModels(AI模型),HPC(高性能计算) + SceneCategories []string + + // 镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable,复制中:Copying State string + // 支持的GPU机型 + SupportedGPUTypes []string + // 供应商(仅行业镜像将返回这个值) Vendor string @@ -302,6 +311,39 @@ type UHostKeyPair struct { KeyPairState string } +/* +UHostDiskSet - DescribeUHostInstance +*/ +type UHostDiskSet struct { + + // 备份方案。若开通了数据方舟,则为DATAARK + BackupType string + + // 磁盘ID + DiskId string + + // 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + DiskType string + + // 磁盘盘符 + Drive string + + // "true": 加密盘 "false":非加密盘 + Encrypted string + + // 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + IsBoot string + + // UDisk名字(仅当磁盘是UDisk时返回) + Name string + + // 磁盘大小,单位: GB + Size int + + // 【建议不再使用】磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk + Type string +} + /* UHostIPSet - DescribeUHostInstance */ @@ -341,39 +383,6 @@ type UHostIPSet struct { Weight int } -/* -UHostDiskSet - DescribeUHostInstance -*/ -type UHostDiskSet struct { - - // 备份方案。若开通了数据方舟,则为DATAARK - BackupType string - - // 磁盘ID - DiskId string - - // 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 - DiskType string - - // 磁盘盘符 - Drive string - - // "true": 加密盘 "false":非加密盘 - Encrypted string - - // 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 - IsBoot string - - // UDisk名字(仅当磁盘是UDisk时返回) - Name string - - // 磁盘大小,单位: GB - Size int - - // 【建议不再使用】磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk - Type string -} - /* UHostInstanceSet - DescribeUHostInstance */ diff --git a/services/uk8s/apis.go b/services/uk8s/apis.go index dfd622b2..9f252489 100644 --- a/services/uk8s/apis.go +++ b/services/uk8s/apis.go @@ -407,15 +407,6 @@ func (c *UK8SClient) AddUK8SUHostNode(req *AddUK8SUHostNodeRequest) (*AddUK8SUHo return &res, nil } -/* -CreateUK8SClusterV2ParamMaster is request schema for complex param -*/ -type CreateUK8SClusterV2ParamMaster struct { - - // Master节点所属可用区,需要设置 Master.0.Zone、 Master.1.Zone、Master.2.Zone 三个 Master 节点的可用区。 三个节点可部署在不同可用区。参见 [可用区列表](../summary/regionlist.html) - Zone *string `required:"true"` -} - /* CreateUK8SClusterV2ParamNodes is request schema for complex param */ @@ -464,6 +455,15 @@ type CreateUK8SClusterV2ParamNodes struct { Zone *string `required:"true"` } +/* +CreateUK8SClusterV2ParamMaster is request schema for complex param +*/ +type CreateUK8SClusterV2ParamMaster struct { + + // Master节点所属可用区,需要设置 Master.0.Zone、 Master.1.Zone、Master.2.Zone 三个 Master 节点的可用区。 三个节点可部署在不同可用区。参见 [可用区列表](../summary/regionlist.html) + Zone *string `required:"true"` +} + /* CreateUK8SClusterV2ParamKubeProxy is request schema for complex param */ diff --git a/services/uk8s/models.go b/services/uk8s/models.go index 38995897..7cd9d5c1 100644 --- a/services/uk8s/models.go +++ b/services/uk8s/models.go @@ -59,6 +59,15 @@ type DiskSet struct { Type string } +/* +KubeProxy - KubeProxy信息 +*/ +type KubeProxy struct { + + // KubeProxy模式,枚举值为[ipvs,iptables] + Mode string +} + /* UhostInfo - 机器信息 */ @@ -101,15 +110,6 @@ type UhostInfo struct { Zone string } -/* -KubeProxy - KubeProxy信息 -*/ -type KubeProxy struct { - - // KubeProxy模式,枚举值为[ipvs,iptables] - Mode string -} - /* ImageInfo - UK8S 可用镜像信息 */ diff --git a/services/ulb/apis.go b/services/ulb/apis.go index abd39a5a..c9d72896 100644 --- a/services/ulb/apis.go +++ b/services/ulb/apis.go @@ -1794,6 +1794,65 @@ func (c *ULBClient) UpdateSSLAttribute(req *UpdateSSLAttributeRequest) (*UpdateS return &res, nil } +// UpdateSSLBindingRequest is request schema for UpdateSSLBinding action +type UpdateSSLBindingRequest struct { + request.CommonBase + + // [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + // ProjectId *string `required:"true"` + + // [公共参数] 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + // Region *string `required:"true"` + + // 所操作VServer实例ID(仅ListenerId传参时,将更换该Vserver所有原证书为OldSSLId的绑定关系;LoadBalancerId和ListenerId都不传参则将更新该项目下所有原证书为OldSSLId的绑定关系;若LoadBalancerId与ListenerId皆有传参,则会强校验ULB与Vsserver的所属关系,将更换该ulb下vserver所绑定的OldSSLId为NewSSLId) + ListenerId *string `required:"false"` + + // 所操作ULB实例ID(仅LoadBalancerId传参时,将更换该ULB所有原证书为OldSSLId的绑定关系;LoadBalancerId和ListenerId都不传参则将更新该项目下所有原证书为OldSSLId的绑定关系) + LoadBalancerId *string `required:"false"` + + // VServer实例需要绑定的新的证书 + NewSSLId *string `required:"true"` + + // VServer实例绑定的旧的证书 + OldSSLId *string `required:"true"` +} + +// UpdateSSLBindingResponse is response schema for UpdateSSLBinding action +type UpdateSSLBindingResponse struct { + response.CommonBase +} + +// NewUpdateSSLBindingRequest will create request of UpdateSSLBinding action. +func (c *ULBClient) NewUpdateSSLBindingRequest() *UpdateSSLBindingRequest { + req := &UpdateSSLBindingRequest{} + + // 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: UpdateSSLBinding + +将VServer绑定的证书更换为另一个证书 +*/ +func (c *ULBClient) UpdateSSLBinding(req *UpdateSSLBindingRequest) (*UpdateSSLBindingResponse, error) { + var err error + var res UpdateSSLBindingResponse + + reqCopier := *req + + err = c.Client.InvokeAction("UpdateSSLBinding", &reqCopier, &res) + if err != nil { + return &res, err + } + + return &res, nil +} + // UpdateSecurityPolicyRequest is request schema for UpdateSecurityPolicy action type UpdateSecurityPolicyRequest struct { request.CommonBase diff --git a/services/ulb/models.go b/services/ulb/models.go index d45d46c0..290e4c39 100644 --- a/services/ulb/models.go +++ b/services/ulb/models.go @@ -206,27 +206,6 @@ type PolicyBackendSet struct { SubResourceType string } -/* -BindSecurityPolicy - VServer绑定的安全策略组信息 -*/ -type BindSecurityPolicy struct { - - // 加密套件 - SSLCiphers []string - - // 安全策略组ID - SecurityPolicyId string - - // 安全策略组名称 - SecurityPolicyName string - - // 安全策略类型 0:预定义 1:自定义 - SecurityPolicyType int - - // TLS最低版本 - TLSVersion string -} - /* ULBBackendSet - DescribeULB */ @@ -278,6 +257,27 @@ type ULBBackendSet struct { Weight int } +/* +BindSecurityPolicy - VServer绑定的安全策略组信息 +*/ +type BindSecurityPolicy struct { + + // 加密套件 + SSLCiphers []string + + // 安全策略组ID + SecurityPolicyId string + + // 安全策略组名称 + SecurityPolicyName string + + // 安全策略类型 0:预定义 1:自定义 + SecurityPolicyType int + + // TLS最低版本 + TLSVersion string +} + /* ULBPolicySet - 内容转发详细列表 */ @@ -311,6 +311,54 @@ type ULBPolicySet struct { VServerId string } +/* +ULBIPSet - DescribeULB +*/ +type ULBIPSet struct { + + // 弹性IP的带宽值(暂未对外开放) + Bandwidth int + + // 弹性IP的带宽类型,枚举值:1 表示是共享带宽,0 普通带宽类型(暂未对外开放) + BandwidthType int + + // 弹性IP地址 + EIP string + + // 弹性IP的ID + EIPId string + + // 弹性IP的运营商信息,枚举值为: Bgp:BGP IP International:国际IP + OperatorName string +} + +/* +LoggerSet - ulb日志信息 +*/ +type LoggerSet struct { + + // ulb日志上传的bucket + BucketName string + + // 上传到bucket使用的token的tokenid + TokenID string + + // bucket的token名称 + TokenName string +} + +/* +FirewallSet - ulb防火墙信息 +*/ +type FirewallSet struct { + + // 防火墙ID + FirewallId string + + // 防火墙名称 + FirewallName string +} + /* ULBVServerSet - DescribeULB */ @@ -386,54 +434,6 @@ type ULBVServerSet struct { VServerName string } -/* -LoggerSet - ulb日志信息 -*/ -type LoggerSet struct { - - // ulb日志上传的bucket - BucketName string - - // 上传到bucket使用的token的tokenid - TokenID string - - // bucket的token名称 - TokenName string -} - -/* -ULBIPSet - DescribeULB -*/ -type ULBIPSet struct { - - // 弹性IP的带宽值(暂未对外开放) - Bandwidth int - - // 弹性IP的带宽类型,枚举值:1 表示是共享带宽,0 普通带宽类型(暂未对外开放) - BandwidthType int - - // 弹性IP地址 - EIP string - - // 弹性IP的ID - EIPId string - - // 弹性IP的运营商信息,枚举值为: Bgp:BGP IP International:国际IP - OperatorName string -} - -/* -FirewallSet - ulb防火墙信息 -*/ -type FirewallSet struct { - - // 防火墙ID - FirewallId string - - // 防火墙名称 - FirewallName string -} - /* ULBSet - DescribeULB */ diff --git a/services/umongodb/models.go b/services/umongodb/models.go index 5303224f..f56bef67 100644 --- a/services/umongodb/models.go +++ b/services/umongodb/models.go @@ -14,6 +14,48 @@ type DiskInfo struct { DiskSize int } +/* +ReplicaInfo - 副本集群信息 +*/ +type ReplicaInfo struct { + + // 集群ID + ClusterId string + + // 副本集创建时间 + CreateTime int + + // 副本集删除时间 + DeleteTime int + + // 隔离组ID + IsolationGroupId string + + // 机器类型 + MachineType string + + // 机器类型Id + MachineTypeId string + + // 副本集修改时间 + ModifyTime int + + // 副本集下的节点数量 + NodeCount int + + // 副本集下的节点信息 + NodeInfos []NodeInfo + + // 副本集ID + ReplicaId string + + // 副本类型,ConfigRepl或者DataRepl + ReplicaType string + + // 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败。 + State string +} + /* NodeInfo - 节点信息 */ @@ -62,48 +104,6 @@ type NodeInfo struct { ZoneId int } -/* -ReplicaInfo - 副本集群信息 -*/ -type ReplicaInfo struct { - - // 集群ID - ClusterId string - - // 副本集创建时间 - CreateTime int - - // 副本集删除时间 - DeleteTime int - - // 隔离组ID - IsolationGroupId string - - // 机器类型 - MachineType string - - // 机器类型Id - MachineTypeId string - - // 副本集修改时间 - ModifyTime int - - // 副本集下的节点数量 - NodeCount int - - // 副本集下的节点信息 - NodeInfos []NodeInfo - - // 副本集ID - ReplicaId string - - // 副本类型,ConfigRepl或者DataRepl - ReplicaType string - - // 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败。 - State string -} - /* ClusterInfo - 集群信息 */ diff --git a/services/unet/apis.go b/services/unet/apis.go index 1269879c..ba2e9f48 100644 --- a/services/unet/apis.go +++ b/services/unet/apis.go @@ -1113,6 +1113,62 @@ func (c *UNetClient) DisassociateFirewall(req *DisassociateFirewallRequest) (*Di return &res, nil } +// GetEIPExclusiveUTPInfoRequest is request schema for GetEIPExclusiveUTPInfo action +type GetEIPExclusiveUTPInfoRequest 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"` + + // EIP资源Id + EIPId *string `required:"true"` +} + +// GetEIPExclusiveUTPInfoResponse is response schema for GetEIPExclusiveUTPInfo action +type GetEIPExclusiveUTPInfoResponse struct { + response.CommonBase + + // EIP专属流量包信息 + EIPExclusiveInfo EIPExclusiveInfo +} + +// NewGetEIPExclusiveUTPInfoRequest will create request of GetEIPExclusiveUTPInfo action. +func (c *UNetClient) NewGetEIPExclusiveUTPInfoRequest() *GetEIPExclusiveUTPInfoRequest { + req := &GetEIPExclusiveUTPInfoRequest{} + + // 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: GetEIPExclusiveUTPInfo + +获取EIP专属流量包信息 +*/ +func (c *UNetClient) GetEIPExclusiveUTPInfo(req *GetEIPExclusiveUTPInfoRequest) (*GetEIPExclusiveUTPInfoResponse, error) { + var err error + var res GetEIPExclusiveUTPInfoResponse + + reqCopier := *req + + err = c.Client.InvokeAction("GetEIPExclusiveUTPInfo", &reqCopier, &res) + if err != nil { + return &res, err + } + + return &res, nil +} + // GetEIPPayModeRequest is request schema for GetEIPPayMode action type GetEIPPayModeRequest struct { request.CommonBase diff --git a/services/unet/models.go b/services/unet/models.go index 28def582..c8bfcfe8 100644 --- a/services/unet/models.go +++ b/services/unet/models.go @@ -77,36 +77,6 @@ type UnetBandwidthUsageEIPSet struct { EIPId string } -/* -EIPBinding - EIP绑定内网IP关系数据 -*/ -type EIPBinding struct { - - // 外网ip - EIP string - - // 内网ip - PrivateIP string - - // 内网ip类型:PrimaryIP(默认)、SecondaryIP(非默认) - PrivateIPType string -} - -/* -ShareBandwidthSet - DescribeEIP -*/ -type ShareBandwidthSet struct { - - // 共享带宽带宽值 - ShareBandwidth int - - // 共享带宽ID - ShareBandwidthId string - - // 共享带宽的资源名称 - ShareBandwidthName string -} - /* UnetEIPResourceSet - DescribeEIP */ @@ -137,6 +107,36 @@ type UnetEIPResourceSet struct { SubResourceType string } +/* +ShareBandwidthSet - DescribeEIP +*/ +type ShareBandwidthSet struct { + + // 共享带宽带宽值 + ShareBandwidth int + + // 共享带宽ID + ShareBandwidthId string + + // 共享带宽的资源名称 + ShareBandwidthName string +} + +/* +EIPBinding - EIP绑定内网IP关系数据 +*/ +type EIPBinding struct { + + // 外网ip + EIP string + + // 内网ip + PrivateIP string + + // 内网ip类型:PrimaryIP(默认)、SecondaryIP(非默认) + PrivateIPType string +} + /* UnetEIPSet - DescribeEIP */ @@ -341,6 +341,36 @@ type UnetShareBandwidthSet struct { ShareBandwidthId string } +/* +EIPExclusiveInfo - EIP专属流量包信息 +*/ +type EIPExclusiveInfo struct { + + // + AccountId int + + // 专属流量包剩余可用规格(单位MB) + AvailableSize int + + // 资源创建时间 + CreateTime int + + // EIP资源Id + EIPId string + + // 专属流量包上次重置时间 + LastResetTime int + + // 专属流量包下次重置时间 + NextResetTime int + + // 专属流量包重置策略枚举:Day、Month、Year + ResetPolicy string + + // 专属流量包总规格(单位MB) + TotalSize int +} + /* EIPPayModeSet - GetEIPPayModeEIP */ diff --git a/services/uphone/models.go b/services/uphone/models.go index 5c65075b..ce5cf79b 100644 --- a/services/uphone/models.go +++ b/services/uphone/models.go @@ -410,6 +410,18 @@ type UPhoneModelInstance struct { UPhoneModelName string } +/* +UPhoneSpec - +*/ +type UPhoneSpec struct { + + // 手机开数,即该服务器规格能生成对应手机规格的云手机个数 + UPhoneCount int + + // 手机规格名 + UPhoneModelName string +} + /* ServerDiskSet - */ @@ -426,15 +438,21 @@ type ServerDiskSet struct { } /* -UPhoneSpec - +IpSet - */ -type UPhoneSpec struct { +type IpSet struct { - // 手机开数,即该服务器规格能生成对应手机规格的云手机个数 - UPhoneCount int + // IP地址 + Ip string - // 手机规格名 - UPhoneModelName string + // ipv4或者ipv6 + IpMode string + + // 共有或私有 + IpType string + + // 运营商 + Isp string } /* @@ -467,24 +485,6 @@ type ServerModelInstance struct { UPhoneSpecs []UPhoneSpec } -/* -IpSet - -*/ -type IpSet struct { - - // IP地址 - Ip string - - // ipv4或者ipv6 - IpMode string - - // 共有或私有 - IpType string - - // 运营商 - Isp string -} - /* ServerInstance - */ diff --git a/services/uphost/apis.go b/services/uphost/apis.go index c0ccc714..fe69479b 100644 --- a/services/uphost/apis.go +++ b/services/uphost/apis.go @@ -9,6 +9,36 @@ import ( // UPHost API Schema +/* +CreatePHostParamNetworkInterfaceEIP is request schema for complex param +*/ +type CreatePHostParamNetworkInterfaceEIP struct { + + // 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式必须指定0M带宽, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] + Bandwidth *string `required:"false"` + + // 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + CouponId *string `required:"false"` + + // 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + OperatorName *string `required:"false"` + + // 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + PayMode *string `required:"false"` + + // 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + ShareBandwidthId *string `required:"false"` +} + +/* +CreatePHostParamNetworkInterface is request schema for complex param +*/ +type CreatePHostParamNetworkInterface struct { + + // + EIP *CreatePHostParamNetworkInterfaceEIP `required:"false"` +} + /* CreatePHostParamDisks is request schema for complex param */ @@ -40,7 +70,13 @@ type CreatePHostRequest struct { // [公共参数] 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) // Zone *string `required:"true"` - // 计费模式,枚举值为:year, 按年付费; month,按月付费;默认为按月付费 + // 短期促销活动时所需参数 + ActivityId *int `required:"false"` + + // 授权角色名, K8S专用,其他用户忽略 + CharacterName *string `required:"false"` + + // 计费模式,枚举值为:Year, 按年付费; Month,按月付费;默认按月付费 ChargeType *string `required:"false"` // 网络环境,可选千兆:1G ,万兆:10G, 默认1G。智能网卡可以选择25G。 @@ -61,18 +97,24 @@ type CreatePHostRequest struct { // 物理机名称,默认为phost Name *string `required:"false"` + // + NetworkInterface []CreatePHostParamNetworkInterface `required:"false"` + // 密码(密码需使用base64进行编码) Password *string `required:"true"` // 购买时长,1-10个月或1-10年;默认值为1。月付时,此参数传0,代表购买至月末,1代表整月。 Quantity *string `required:"false"` - // Raid配置,默认Raid10 支持:Raid0、Raid1、Raid5、Raid10,NoRaid + // 本地盘和裸金属1.0需要的参数。Raid配置,默认Raid10 支持:Raid0、Raid1、Raid5、Raid10,NoRaid Raid *string `required:"false"` // 物理机备注,默认为空 Remark *string `required:"false"` + // 短期促销活动时所需参数 + RuleId *int `required:"false"` + // 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 SecurityGroupId *string `required:"false"` diff --git a/services/uphost/models.go b/services/uphost/models.go index d0194d6a..be62a7c6 100644 --- a/services/uphost/models.go +++ b/services/uphost/models.go @@ -2,18 +2,6 @@ package uphost -/* -PHostClusterSet - 物理云主机集群库存信息 -*/ -type PHostClusterSet struct { - - // 集群名。枚举值:千兆网络集群:1G;万兆网络集群:10G;智能网卡网络:25G; - Name string - - // 库存状态。枚举值:有库存:Available;无库存:SoldOut - StockStatus string -} - /* PHostCPUSet - DescribePHost */ @@ -44,6 +32,18 @@ type PHostComponentSet struct { Name string } +/* +PHostClusterSet - 物理云主机集群库存信息 +*/ +type PHostClusterSet struct { + + // 集群名。枚举值:千兆网络集群:1G;万兆网络集群:10G;智能网卡网络:25G; + Name string + + // 库存状态。枚举值:有库存:Available;无库存:SoldOut + StockStatus string +} + /* PHostCloudMachineTypeSet - 裸金属云盘的MachineTypeSet */ @@ -65,6 +65,33 @@ type PHostCloudMachineTypeSet struct { Type string } +/* +PHostIPSet - DescribePHost +*/ +type PHostIPSet struct { + + // IP对应带宽,单位Mb,内网IP不显示带宽信息 + Bandwidth int + + // IP地址, + IPAddr string + + // IP资源ID(内网IP无资源ID)(待废弃) + IPId string + + // MAC地址 + MACAddr string + + // 国际: Internation, BGP: BGP, 内网: Private + OperatorName string + + // 子网ID + SubnetId string + + // VPC ID + VPCId string +} + /* PHostDescDiskSet - DescribePHost(包括传统和裸金属1、裸金属2) */ @@ -95,33 +122,6 @@ type PHostDescDiskSet struct { Type string } -/* -PHostIPSet - DescribePHost -*/ -type PHostIPSet struct { - - // IP对应带宽,单位Mb,内网IP不显示带宽信息 - Bandwidth int - - // IP地址, - IPAddr string - - // IP资源ID(内网IP无资源ID)(待废弃) - IPId string - - // MAC地址 - MACAddr string - - // 国际: Internation, BGP: BGP, 内网: Private - OperatorName string - - // 子网ID - SubnetId string - - // VPC ID - VPCId string -} - /* PHostSet - DescribePHost */ diff --git a/services/vpc/models.go b/services/vpc/models.go index a73868b4..3ea8def8 100644 --- a/services/vpc/models.go +++ b/services/vpc/models.go @@ -434,18 +434,6 @@ type AclInfo struct { VpcId string } -/* -UNIIpInfo - 虚拟网卡内网IP信息 -*/ -type UNIIpInfo struct { - - // ip 地址 - IpAddr []string - - // ip类型 SecondaryIp/PrimaryIp - IpType string -} - /* UNIQuotaInfo - 虚拟网卡内网IP配额使用情况 */ @@ -458,6 +446,18 @@ type UNIQuotaInfo struct { PrivateIpQuota int } +/* +UNIIpInfo - 虚拟网卡内网IP信息 +*/ +type UNIIpInfo struct { + + // ip 地址 + IpAddr []string + + // ip类型 SecondaryIp/PrimaryIp + IpType string +} + /* NetworkInterface - 虚拟网卡信息 */ diff --git a/tests/setup_test.go b/tests/setup_test.go index afd36dc8..e078b552 100644 --- a/tests/setup_test.go +++ b/tests/setup_test.go @@ -60,7 +60,7 @@ import ( "github.com/ucloud/ucloud-sdk-go/services/tidb" "github.com/ucloud/ucloud-sdk-go/services/ubox" "github.com/ucloud/ucloud-sdk-go/services/ucdn" - "github.com/ucloud/ucloud-sdk-go/services/udi" + "github.com/ucloud/ucloud-sdk-go/services/ucompshare" "github.com/ucloud/ucloud-sdk-go/services/udts" "github.com/ucloud/ucloud-sdk-go/services/uec" "github.com/ucloud/ucloud-sdk-go/services/ufs" @@ -175,12 +175,12 @@ func testSetup() { spec.AddFixture("UCDN", driver.SetupClientFixture(func() (ucloud.ServiceClient, error) { return ucdn.NewClient(&cfg, &credential), nil })) + spec.AddFixture("UCompShare", driver.SetupClientFixture(func() (ucloud.ServiceClient, error) { + return ucompshare.NewClient(&cfg, &credential), nil + })) spec.AddFixture("UDB", driver.SetupClientFixture(func() (ucloud.ServiceClient, error) { return udb.NewClient(&cfg, &credential), nil })) - spec.AddFixture("UDI", driver.SetupClientFixture(func() (ucloud.ServiceClient, error) { - return udi.NewClient(&cfg, &credential), nil - })) spec.AddFixture("UDPN", driver.SetupClientFixture(func() (ucloud.ServiceClient, error) { return udpn.NewClient(&cfg, &credential), nil })) diff --git a/ucloud/version/version.go b/ucloud/version/version.go index 605023c6..48d45f34 100644 --- a/ucloud/version/version.go +++ b/ucloud/version/version.go @@ -1,3 +1,3 @@ package version -const Version = "0.22.2" +const Version = "0.22.3"