Documentation ¶
Overview ¶
Package huaweicloud
- Copyright 2024-2025 Bilibili Inc. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Package huaweicloud
- Copyright 2024-2025 Bilibili Inc. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Package huaweicloud
- Copyright 2024-2025 Bilibili Inc. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Package huaweicloud
- Copyright 2024-2025 Bilibili Inc. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Package huaweicloud
- Copyright 2024-2025 Bilibili Inc. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Package huaweicloud
- Copyright 2024-2025 Bilibili Inc. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Package huaweicloud
- Copyright 2024-2025 Bilibili Inc. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Package huaweicloud
- Copyright 2024-2025 Bilibili Inc. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Package huaweicloud
- Copyright 2024-2025 Bilibili Inc. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Package huaweicloud
- Copyright 2024-2025 Bilibili Inc. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Package huaweicloud
- Copyright 2024-2025 Bilibili Inc. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Package huaweicloud
- Copyright 2024-2025 Bilibili Inc. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Index ¶
- Variables
- func IsNotFoundErr(err error) bool
- type Client
- func (c *Client) ChangeServerConfig(req *cloudrepo.ChangeConfigCloudServerReq) (*cloudrepo.ChangeConfigCloudServerReply, error)
- func (c *Client) DeletePostPaidServer(req *cloudrepo.DeleteCloudServerReq) (string, error)
- func (c *Client) DeletePrePaidServer(req *cloudrepo.DeleteCloudServerReq) (string, error)
- func (c *Client) DeleteServer(req *cloudrepo.DeleteCloudServerReq) (*cloudrepo.DeleteCloudServerReply, error)
- func (c *Client) DescribeServer(req *cloudrepo.DescribeCloudServerReq) (*cloudrepo.DescribeCloudServerReply, error)
- func (c *Client) ListCloudSecurityGroup(req *cloudrepo.GetCloudProductReq) ([]cloudrepo.CloudSecurityGroup, error)
- func (c *Client) ListPayPerUseCustomerResources(resourceIds []string) (instance []model.OrderInstanceV2, err error)
- func (c *Client) ListProject(_ *cloudrepo.GetCloudProductReq) ([]cloudrepo.CloudProject, error)
- func (c *Client) ListProjectIam(req *cloudrepo.GetCloudProductReq) (data []iamModel.AuthProjectResult, err error)
- func (c *Client) ListRegion(_ *cloudrepo.GetCloudProductReq) ([]cloudrepo.CloudRegion, error)
- func (c *Client) ListServer(req *cloudrepo.GetCloudProductReq) ([]cloudrepo.CloudServer, error)
- func (c *Client) ListServerImage(req *cloudrepo.GetCloudProductReq) ([]cloudrepo.CloudServerImage, error)
- func (c *Client) ListServerSpec(req *cloudrepo.GetCloudProductReq) ([]cloudrepo.CloudServerSpec, error)
- func (c *Client) ListSubnet(req *cloudrepo.GetCloudProductReq) ([]cloudrepo.CloudSubnet, error)
- func (c *Client) ListVpc(req *cloudrepo.GetCloudProductReq) ([]cloudrepo.CloudVpc, error)
- func (c *Client) ListZone(req *cloudrepo.GetCloudProductReq) ([]cloudrepo.CloudZone, error)
- func (c *Client) RebootServer(req *cloudrepo.RebootCloudServerReq) (*cloudrepo.RebootCloudServerReply, error)
- func (c *Client) ReinstallServer(req *cloudrepo.ReinstallCloudServerReq) (*cloudrepo.ReinstallCloudServerReply, error)
- func (c *Client) RenameServer(req *cloudrepo.RenameCloudServerReq) (*cloudrepo.RenameCloudServerReply, error)
- func (c *Client) StartServer(req *cloudrepo.StartCloudServerReq) (*cloudrepo.StartCloudServerReply, error)
- func (c *Client) StopServer(req *cloudrepo.StopCloudServerReq) (*cloudrepo.StopCloudServerReply, error)
- type CloudProject
- type CloudRegion
- type CloudSecurityGroup
- type CloudServer
- func (c *CloudServer) GetCID() string
- func (c *CloudServer) GetChangeType() string
- func (c *CloudServer) GetExpireTime() string
- func (c *CloudServer) GetImageCid() string
- func (c *CloudServer) GetName() string
- func (c *CloudServer) GetPrivateIP() string
- func (c *CloudServer) GetProjectCid() string
- func (c *CloudServer) GetPublicIP() string
- func (c *CloudServer) GetRenewStatus() string
- func (c *CloudServer) GetSecurityGroupCid() []string
- func (c *CloudServer) GetServerSpec() string
- func (c *CloudServer) GetStatus() string
- func (c *CloudServer) GetSubnetCid() string
- func (c *CloudServer) GetVpcCid() string
- func (c *CloudServer) GetZoneCid() string
- type CloudServerImage
- type CloudServerSpec
- func (c *CloudServerSpec) GetBandWidth() float64
- func (c *CloudServerSpec) GetCID() string
- func (c *CloudServerSpec) GetCPU() int
- func (c *CloudServerSpec) GetCategory() string
- func (c *CloudServerSpec) GetFamily() string
- func (c *CloudServerSpec) GetGPU() int
- func (c *CloudServerSpec) GetGPUModel() string
- func (c *CloudServerSpec) GetMemory() int
- func (c *CloudServerSpec) GetName() string
- func (c *CloudServerSpec) GetPPS() float64
- func (c *CloudServerSpec) GetStatus() string
- type CloudSubnet
- type CloudVpc
- type CloudZone
Constants ¶
This section is empty.
Variables ¶
var (
HwSeverSpecs = map[string]string{
"normal": "通用计算型",
"entry": "通用入门型",
"cpuv1": "计算I型",
"cpuv2": "计算II型",
"computingv3": "通用计算增强型",
"kunpeng_computing": "鲲鹏通用计算增强型",
"kunpeng_highmem": "鲲鹏内存优化型",
"highmem": "内存优化型",
"saphana": "大内存型",
"diskintensive": "磁盘增强型",
"highio": "超高I/O型",
"ultracpu": "超高性能计算型",
"gpu": "GPU加速型",
"fpga": "FPGA加速型",
"ascend": "AI加速型",
"arm64": "鲲鹏计算",
}
)
Functions ¶
Types ¶
type Client ¶
func (*Client) ChangeServerConfig ¶
func (c *Client) ChangeServerConfig(req *cloudrepo.ChangeConfigCloudServerReq) (*cloudrepo.ChangeConfigCloudServerReply, error)
ChangeServerConfig 变更云服务器配置
func (*Client) DeletePostPaidServer ¶
func (c *Client) DeletePostPaidServer(req *cloudrepo.DeleteCloudServerReq) (string, error)
DeletePostPaidServer 删除按需云服务器
func (*Client) DeletePrePaidServer ¶
func (c *Client) DeletePrePaidServer(req *cloudrepo.DeleteCloudServerReq) (string, error)
DeletePrePaidServer 删除包年/包月云服务器
func (*Client) DeleteServer ¶
func (c *Client) DeleteServer(req *cloudrepo.DeleteCloudServerReq) (*cloudrepo.DeleteCloudServerReply, error)
DeleteServer 删除云服务器
func (*Client) DescribeServer ¶
func (c *Client) DescribeServer(req *cloudrepo.DescribeCloudServerReq) (*cloudrepo.DescribeCloudServerReply, error)
DescribeServer 查询云服务器信息
func (*Client) ListCloudSecurityGroup ¶
func (c *Client) ListCloudSecurityGroup(req *cloudrepo.GetCloudProductReq) ([]cloudrepo.CloudSecurityGroup, error)
ListCloudSecurityGroup 获取安全组列表
func (*Client) ListPayPerUseCustomerResources ¶
func (c *Client) ListPayPerUseCustomerResources(resourceIds []string) (instance []model.OrderInstanceV2, err error)
ListPayPerUseCustomerResources 查询订单资源
func (*Client) ListProject ¶
func (c *Client) ListProject(_ *cloudrepo.GetCloudProductReq) ([]cloudrepo.CloudProject, error)
ListProject 获取云项目列表
func (*Client) ListProjectIam ¶
func (c *Client) ListProjectIam(req *cloudrepo.GetCloudProductReq) (data []iamModel.AuthProjectResult, err error)
ListProjectIam 获取云项目Iam列表
func (*Client) ListRegion ¶
func (c *Client) ListRegion(_ *cloudrepo.GetCloudProductReq) ([]cloudrepo.CloudRegion, error)
ListRegion 获取地域列表
func (*Client) ListServer ¶
func (c *Client) ListServer(req *cloudrepo.GetCloudProductReq) ([]cloudrepo.CloudServer, error)
ListServer 获取云服务器列表
func (*Client) ListServerImage ¶
func (c *Client) ListServerImage(req *cloudrepo.GetCloudProductReq) ([]cloudrepo.CloudServerImage, error)
ListServerImage 获取镜像列表
func (*Client) ListServerSpec ¶
func (c *Client) ListServerSpec(req *cloudrepo.GetCloudProductReq) ([]cloudrepo.CloudServerSpec, error)
ListServerSpec 获取服务器规格列表
func (*Client) ListSubnet ¶
func (c *Client) ListSubnet(req *cloudrepo.GetCloudProductReq) ([]cloudrepo.CloudSubnet, error)
ListSubnet 获取子网列表
func (*Client) RebootServer ¶
func (c *Client) RebootServer(req *cloudrepo.RebootCloudServerReq) (*cloudrepo.RebootCloudServerReply, error)
RebootServer 重启云服务器
func (*Client) ReinstallServer ¶
func (c *Client) ReinstallServer(req *cloudrepo.ReinstallCloudServerReq) (*cloudrepo.ReinstallCloudServerReply, error)
ReinstallServer 重装云服务器系统
func (*Client) RenameServer ¶
func (c *Client) RenameServer(req *cloudrepo.RenameCloudServerReq) (*cloudrepo.RenameCloudServerReply, error)
RenameServer 重命名云服务器
func (*Client) StartServer ¶
func (c *Client) StartServer(req *cloudrepo.StartCloudServerReq) (*cloudrepo.StartCloudServerReply, error)
StartServer 启动云服务器
func (*Client) StopServer ¶
func (c *Client) StopServer(req *cloudrepo.StopCloudServerReq) (*cloudrepo.StopCloudServerReply, error)
StopServer 停止云服务器
type CloudRegion ¶
type CloudRegion struct { cloudrepo.CloudProductCommon // contains filtered or unexported fields }
CloudRegion 云地域
type CloudSecurityGroup ¶
type CloudSecurityGroup struct { cloudrepo.CloudProductCommon Project string Vpc string }
CloudSecurityGroup 云安全组
func (*CloudSecurityGroup) GetProject ¶
func (c *CloudSecurityGroup) GetProject() string
GetProject 获取云安全组项目
func (*CloudSecurityGroup) GetStatus ¶
func (c *CloudSecurityGroup) GetStatus() string
GetStatus 获取云安全组状态
type CloudServer ¶
type CloudServer struct { cloudrepo.CloudProductCommon SeverSecurityGroupCid []string SubnetCid string VpcCid string ImageCid string ZoneCid string ProjectCid string ServerSpec string ChangeType string RenewStatus string PrivateIP string PublicIP string ExpireTime string }
CloudServer 云服务器
func (*CloudServer) GetChangeType ¶
func (c *CloudServer) GetChangeType() string
GetChangeType 获取云服务器计费方式
func (*CloudServer) GetExpireTime ¶
func (c *CloudServer) GetExpireTime() string
GetExpireTime 获取云服务器到期时间
func (*CloudServer) GetPrivateIP ¶
func (c *CloudServer) GetPrivateIP() string
GetPrivateIP 获取云服务器内网IP
func (*CloudServer) GetProjectCid ¶
func (c *CloudServer) GetProjectCid() string
GetProjectCid 获取云服务器项目
func (*CloudServer) GetRenewStatus ¶
func (c *CloudServer) GetRenewStatus() string
GetRenewStatus 获取云服务器续费状态
func (*CloudServer) GetSecurityGroupCid ¶
func (c *CloudServer) GetSecurityGroupCid() []string
GetSecurityGroupCid 获取云服务器安全组
func (*CloudServer) GetServerSpec ¶
func (c *CloudServer) GetServerSpec() string
GetServerSpec 获取云服务器规格
func (*CloudServer) GetSubnetCid ¶
func (c *CloudServer) GetSubnetCid() string
GetSubnetCid 获取云服务器子网
type CloudServerImage ¶
type CloudServerImage struct { cloudrepo.CloudProductCommon OsName string Type string }
CloudServerImage 云镜像
func (*CloudServerImage) GetOsName ¶
func (c *CloudServerImage) GetOsName() string
GetOsName 获取云镜像系统
func (*CloudServerImage) GetStatus ¶
func (c *CloudServerImage) GetStatus() string
GetStatus 获取云镜像状态
type CloudServerSpec ¶
type CloudServerSpec struct { cloudrepo.CloudProductCommon BandWidth float64 Category string CPU int GPU int GPUModel string Family string Memory int PPS float64 }
CloudServerSpec 云服务器规格
func (*CloudServerSpec) GetBandWidth ¶
func (c *CloudServerSpec) GetBandWidth() float64
GetBandWidth 获取云服务器规格带宽
func (*CloudServerSpec) GetCategory ¶
func (c *CloudServerSpec) GetCategory() string
GetCategory 获取云服务器规格类别
func (*CloudServerSpec) GetFamily ¶
func (c *CloudServerSpec) GetFamily() string
GetFamily 获取云服务器规格系列
func (*CloudServerSpec) GetGPUModel ¶
func (c *CloudServerSpec) GetGPUModel() string
GetGPUModel 获取云服务器规格GPU型号
func (*CloudServerSpec) GetStatus ¶
func (c *CloudServerSpec) GetStatus() string
GetStatus 获取云服务器规格状态
type CloudSubnet ¶
type CloudSubnet struct { cloudrepo.CloudProductCommon Cidr string Project string Vpc string Zone string }
CloudSubnet 云子网
type CloudVpc ¶
type CloudVpc struct { cloudrepo.CloudProductCommon Cidr string Project string }
CloudVpc 云专有网络