hcso

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 52 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TASK_SUCCESS = "SUCCESS"
	TASK_FAIL    = "FAIL"
)

Task status

View Source
const (
	POST_PAID = "postPaid" // 按需付费
	PRE_PAID  = "prePaid"  // 包年包月
)

Charging Type

View Source
const (
	RESOURCE_TYPE_VM        = "hws.resource.type.vm"          // ECS虚拟机
	RESOURCE_TYPE_VOLUME    = "hws.resource.type.volume"      // EVS卷
	RESOURCE_TYPE_BANDWIDTH = "hws.resource.type.bandwidth"   // VPC带宽
	RESOURCE_TYPE_IP        = "hws.resource.type.ip"          // VPC公网IP
	RESOURCE_TYPE_IMAGE     = "hws.resource.type.marketplace" // 市场镜像
)

资源类型 https://support.huaweicloud.com/api-oce/zh-cn_topic_0079291752.html

View Source
const (
	VM_NOT_FOUND            = "Ecs.0114"    // 云服务器不存在
	ECS_NOT_FOUND           = "Ecs.0614"    // 弹性云服务器不存在
	IMG_ID_NOT_FOUND        = "IMG.0027"    // 请求的镜像ID不存在
	IMG_NOT_FOUND           = "IMG.0027"    // 镜像不存在
	IMG_ERR_NOT_FOUND       = "IMG.0057"    // 镜像文件不存在或者为空或者不是允许格式的文件
	IMG_BACKUP_NOT_FOUND    = "IMG.0020"    // 备份不存在
	IMG_VM_BACKUP_NOT_FOUND = "IMG.0127"    // 云服务器备份不存在
	IMG_VM_NOT_FOUND        = "IMG.0005"    // 云主机不存在
	JOB_NOT_FOUND           = "Common.0011" // jobId为空
	EVS_NOT_FOUND           = "EVS.5404"    // 磁盘、快照和备份等资源未找到。
	FIP_NOT_FOUND           = "VPC.0504"    // 未找到弹性公网IP。
	VPC_NOT_FOUND           = "VPC.0012"    // 未找到弹性公网VPC。
)

Not Found Error code 网络等资源直接通过http code 404即可判断资源不存在。另外有些资源可能不是返回404这里单独列出来

View Source
const (
	EXPIRE_MODE_TO_POSTPAID      = 1
	EXPIRE_MODE_AUTO_UNSUBSCRIBE = 2
	EXPIRE_MODE_AUTO_RENEW       = 3
)

包周期资源相关常量 https://support.huaweicloud.com/api-bpconsole/zh-cn_topic_0082522029.html expire_mode 0:进入宽限期 1:转按需 2:自动退订 3:自动续订(当前只支持ECS、EVS和VPC)

View Source
const (
	PERIOD_TYPE_MONTH = 2
	PERIOD_TYPE_YEAR  = 3
)
View Source
const (
	AUTO_PAY_TRUE  = 1
	AUTO_PAY_FALSE = 0
)
View Source
const (
	InternetChargeByTraffic   = TInternetChargeType("traffic")
	InternetChargeByBandwidth = TInternetChargeType("bandwidth")
)
View Source
const (
	CLOUD_PROVIDER_HUAWEI    = api.CLOUD_PROVIDER_HCSO
	CLOUD_PROVIDER_HUAWEI_CN = "华为云Stack"
	CLOUD_PROVIDER_HUAWEI_EN = "HCSO"

	HUAWEI_API_VERSION = ""

	SERVICE_IAM       = "iam"
	SERVICE_ELB       = "elb"
	SERVICE_VPC       = "vpc"
	SERVICE_CES       = "ces"
	SERVICE_RDS       = "rds"
	SERVICE_ECS       = "ecs"
	SERVICE_EPS       = "eps"
	SERVICE_EVS       = "evs"
	SERVICE_BSS       = "bss"
	SERVICE_SFS       = "sfs-turbo"
	SERVICE_CTS       = "cts"
	SERVICE_NAT       = "nat"
	SERVICE_BMS       = "bms"
	SERVICE_CCI       = "cci"
	SERVICE_CSBS      = "csbs"
	SERVICE_IMS       = "ims"
	SERVICE_AS        = "as"
	SERVICE_CCE       = "cce"
	SERVICE_DCS       = "dcs"
	SERVICE_MODELARTS = "modelarts"
)
View Source
const (
	ImageStatusQueued  = "queued"  // queued:表示镜像元数据已经创建成功,等待上传镜像文件。
	ImageStatusSaving  = "saving"  // saving:表示镜像正在上传文件到后端存储。
	ImageStatusDeleted = "deleted" // deleted:表示镜像已经删除。
	ImageStatusKilled  = "killed"  // killed:表示镜像上传错误。
	ImageStatusActive  = "active"  // active:表示镜像可以正常使用
)
View Source
const (
	InstanceStatusRunning    = "ACTIVE"
	InstanceStatusTerminated = "DELETED"
	InstanceStatusStopped    = "SHUTOFF"
)
View Source
const (
	HUAWEI_NAT_SKU_SMALL  = "Small"
	HUAWEI_NAT_SKU_MIDDLE = "Middle"
	HUAWEI_NAT_SKU_LARGE  = "Large"
	HUAWEI_NAT_SKU_XLARGE = "XLarge"
)
View Source
const (
	ROUTE_TYPR_IP   = "IP"
	ROUTE_TYPE_PEER = "peering"
)
View Source
const DATETIME_FORMAT = "2006-01-02T15:04:05.999999999"

华为云返回的时间格式

Variables

View Source
var FLAVOR_FAMILY_CATEGORY_MAP = map[string]string{
	"s1":    "通用型I代",
	"s2":    "通用型II代",
	"s3":    "通用型S3",
	"sn3":   "通用型",
	"s6":    "通用型S6",
	"p1":    "GPU P1型",
	"pi1":   "GPU Pi1型",
	"p2v":   "GPU P2v型",
	"t6":    "通用型T6",
	"m1":    "内存优化型I代",
	"m2":    "内存优化型II代",
	"m3":    "内存优化型",
	"m3ne":  "内存优化M3ne型",
	"h1":    "高性能计算型I代",
	"h2":    "高性能计算型II代",
	"h3":    "高性能计算型",
	"hc2":   "高性能计算HC2型",
	"hi3":   "超高性能计算型",
	"d1":    "密集存储型I代",
	"d2":    "密集存储型II代",
	"d3":    "磁盘增强型",
	"g1":    "GPU加速型I代",
	"g2":    "GPU加速型II代",
	"g3":    "GPU加速型III代",
	"f1":    "FPGA高性能型",
	"f2":    "FPGA通用型",
	"fp1":   "FPGA FP1型",
	"fp1c":  "FPGA FP1C型",
	"ai1":   "人工智能Ai1型",
	"c1":    "通用计算增强C1型",
	"c2":    "通用计算增强C2型",
	"c3":    "通用计算增强C3型",
	"c3ne":  "通用计算增强C3ne型",
	"c6":    "通用计算增强C6型",
	"e1":    "大内存E1型",
	"e2":    "大内存E2型",
	"et2":   "大内存ET2型",
	"e3":    "大内存E3型",
	"i3":    "超高I/O型",
	"kc1":   "鲲鹏通用计算增强型",
	"km1":   "鲲鹏内存优化型",
	"ki1":   "鲲鹏超高I/O型",
	"kai1s": "鲲鹏AI推理加速型",
}
View Source
var HUAWEI_REGION_CACHES sync.Map
View Source
var LB_ALGORITHM_MAP = map[string]string{
	api.LB_SCHEDULER_WRR: "ROUND_ROBIN",
	api.LB_SCHEDULER_WLC: "LEAST_CONNECTIONS",
	api.LB_SCHEDULER_SCH: "SOURCE_IP",
}
View Source
var LB_HEALTHCHECK_TYPE_MAP = map[string]string{
	api.LB_HEALTH_CHECK_HTTP: "HTTP",
	api.LB_HEALTH_CHECK_TCP:  "TCP",
	api.LB_HEALTH_CHECK_UDP:  "UDP_CONNECT",
}
View Source
var LB_STICKY_SESSION_MAP = map[string]string{
	api.LB_STICKY_SESSION_TYPE_INSERT: "HTTP_COOKIE",
	api.LB_STICKY_SESSION_TYPE_SERVER: "APP_COOKIE",
}
View Source
var LatitudeAndLongitude = map[string]cloudprovider.SGeographicInfo{
	"cn-east-2":      {Latitude: 31.210344, Longitude: 121.455364, City: api.CITY_SHANG_HAI, CountryCode: api.COUNTRY_CODE_CN},
	"cn-east-3":      {Latitude: 31.210344, Longitude: 121.455364, City: api.CITY_SHANG_HAI, CountryCode: api.COUNTRY_CODE_CN},
	"cn-north-1":     {Latitude: 39.997743, Longitude: 116.304542, City: api.CITY_BEI_JING, CountryCode: api.COUNTRY_CODE_CN},
	"cn-north-4":     {Latitude: 39.997743, Longitude: 116.304542, City: api.CITY_BEI_JING, CountryCode: api.COUNTRY_CODE_CN},
	"cn-south-1":     {Latitude: 23.12911, Longitude: 113.264385, City: api.CITY_GUANG_ZHOU, CountryCode: api.COUNTRY_CODE_CN},
	"cn-south-2":     {Latitude: 23.12911, Longitude: 113.264385, City: api.CITY_GUANG_ZHOU, CountryCode: api.COUNTRY_CODE_CN},
	"ap-southeast-1": {Latitude: 22.396428, Longitude: 114.109497, City: api.CITY_HONG_KONG, CountryCode: api.COUNTRY_CODE_CN},
	"ap-southeast-2": {Latitude: 13.7563309, Longitude: 100.5017651, City: api.CITY_BANGKOK, CountryCode: api.COUNTRY_CODE_TH},
	"ap-southeast-3": {Latitude: 1.360386, Longitude: 103.821195, City: api.CITY_SINGAPORE, CountryCode: api.COUNTRY_CODE_SG},
	"eu-west-0":      {Latitude: 48.856614, Longitude: 2.3522219, City: api.CITY_PARIS, CountryCode: api.COUNTRY_CODE_FR},
	"cn-northeast-1": {Latitude: 38.91400300000001, Longitude: 121.614682, City: api.CITY_SHANG_HAI, CountryCode: api.COUNTRY_CODE_CN},
	"cn-southwest-2": {Latitude: 26.6470035286, Longitude: 106.6302113880, City: api.CITY_GUI_YANG, CountryCode: api.COUNTRY_CODE_CN},
	"af-south-1":     {Latitude: -26.1714537, Longitude: 27.8999389, City: api.CITY_JOHANNESBURG, CountryCode: api.COUNTRY_CODE_ZA},
	"sa-brazil-1":    {Latitude: -23.5505199, Longitude: -46.6333094, City: api.CITY_SAO_PAULO, CountryCode: api.COUNTRY_CODE_BR},
	"na-mexico-1":    {Latitude: 55.1182908, Longitude: 141.0377645, City: api.CITY_MEXICO, CountryCode: api.COUNTRY_CODE_MX},
	"la-south-2":     {Latitude: -33.45206, Longitude: -70.676031, City: api.CITY_SANTIAGO, CountryCode: api.COUNTRY_CODE_CL},
	"cn-north-9":     {Latitude: 41.0178713, Longitude: 113.094978, City: api.CITY_NEI_MENG_GU, CountryCode: api.COUNTRY_CODE_CN},
	"cn-north-219":   {Latitude: 39.997743, Longitude: 116.304542, City: api.CITY_BEI_JING, CountryCode: api.COUNTRY_CODE_CN},
}

China: https://developer.huaweicloud.com/endpoint International: https://developer-intl.huaweicloud.com/endpoint ref: https://countrycode.org

Functions

func DoCreate

func DoCreate(createFunc createFunc, params jsonutils.JSONObject, result interface{}) error

func DoDelete

func DoDelete(deleteFunc deleteFunc, id string, params jsonutils.JSONObject, result interface{}) error

func DoDeleteWithSpec

func DoDeleteWithSpec(deleteFunc deleteFunc2, ctx manager.IManagerContext, id string, spec string, queries map[string]string, params jsonutils.JSONObject) error

func DoGet

func DoGet(doGet getFunc, id string, queries map[string]string, result interface{}) error

func DoListInContext

func DoListInContext(listFunc listInCtxFunc, ctx manager.IManagerContext, querys map[string]string, result interface{}) error

func DoUpdate

func DoUpdate(updateFunc updateFunc, id string, params jsonutils.JSONObject, result interface{}) error

func DoUpdateWithSpec

func DoUpdateWithSpec(updateFunc updateFunc2, id string, spec string, params jsonutils.JSONObject) error

func DoUpdateWithSpec2

func DoUpdateWithSpec2(updateFunc updateFunc2, id string, spec string, params jsonutils.JSONObject, result interface{}) error

func ErrMessage

func ErrMessage(err error) string

func GetBucketName

func GetBucketName(regionId string, imageId string) string

func NatResouceStatusTransfer

func NatResouceStatusTransfer(status string) string

func ToHuaweiHealthCheckHttpCode

func ToHuaweiHealthCheckHttpCode(c string) string

func ToOnecloudHealthCheckHttpCode

func ToOnecloudHealthCheckHttpCode(c string) string

Types

type AcceptVpcInfo

type AcceptVpcInfo struct {
	VpcID    string `json:"vpc_id"`
	TenantID string `json:"tenant_id"`
}

type Attachment

type Attachment struct {
	ServerID     string `json:"server_id"`
	AttachmentID string `json:"attachment_id"`
	AttachedAt   string `json:"attached_at"`
	HostName     string `json:"host_name"`
	VolumeID     string `json:"volume_id"`
	Device       string `json:"device"`
	ID           string `json:"id"`
}

type Bandwidth

type Bandwidth struct {
	ID                  string         `json:"id"`
	Name                string         `json:"name"`
	Size                int64          `json:"size"`
	ShareType           string         `json:"share_type"`
	PublicipInfo        []PublicipInfo `json:"publicip_info"`
	TenantID            string         `json:"tenant_id"`
	BandwidthType       string         `json:"bandwidth_type"`
	ChargeMode          string         `json:"charge_mode"`
	BillingInfo         string         `json:"billing_info"`
	EnterpriseProjectID string         `json:"enterprise_project_id"`
}

type DataVolume

type DataVolume struct {
	Volumetype    string                 `json:"volumetype"`
	SizeGB        int                    `json:"size"`
	Extendparam   *DataVolumeExtendparam `json:"extendparam,omitempty"`
	Multiattach   *bool                  `json:"multiattach,omitempty"`
	HwPassthrough *string                `json:"hw:passthrough,omitempty"`
}

type DataVolumeExtendparam

type DataVolumeExtendparam struct {
	SnapshotID string `json:"snapshotId"`
}

type DiskMeta

type DiskMeta struct {
	ResourceSpecCode string `json:"resourceSpecCode"`
	Billing          string `json:"billing"`
	ResourceType     string `json:"resourceType"`
	AttachedMode     string `json:"attached_mode"`
	Readonly         string `json:"readonly"`
}

type ExtraSpecs

type ExtraSpecs struct {
	VolumeBackendName                        string `json:"volume_backend_name"`
	AvailabilityZone                         string `json:"availability-zone"`
	RESKEYAvailabilityZones                  string `json:"RESKEY:availability_zones"`
	OSVendorExtendedSoldOutAvailabilityZones string `json:"os-vendor-extended:sold_out_availability_zones"`
}

type FixedIP

type FixedIP struct {
	SubnetID  string `json:"subnet_id"` // 子网ID, 与SNetwork中的 neutron_subnet_id对应. 注意!!! 并不是SNetwork ID。
	IPAddress string `json:"ip_address"`
}

subnet: {id: "b09877fc-90d4-4fc8-b343-e6e00cb2b233", name: "subnet-149c", cidr: "192.168.0.0/24",…} availability_zone: "cn-north-1b" cidr: "192.168.0.0/24" dhcp_enable: true dnsList: ["100.125.1.250", "100.125.21.250"] gateway_ip: "192.168.0.1" id: "b09877fc-90d4-4fc8-b343-e6e00cb2b233" ipv6_enable: false name: "subnet-149c" neutron_network_id: "b09877fc-90d4-4fc8-b343-e6e00cb2b233" neutron_subnet_id: "81fcfaa0-8e73-4472-9eba-3b2b7736d3a7" primary_dns: "100.125.1.250" secondary_dns: "100.125.21.250" status: "ACTIVE" tags: [] vpc_id: "877f1feb-3dc8-4c2d-92e9-0d94fd7d79dd"}

type Flavor

type Flavor struct {
	Disk  string `json:"disk"`
	Vcpus string `json:"vcpus"`
	RAM   string `json:"ram"`
	ID    string `json:"id"`
	Name  string `json:"name"`
}

type HuaweiClientConfig

type HuaweiClientConfig struct {
	// contains filtered or unexported fields
}

func NewHuaweiClientConfig

func NewHuaweiClientConfig(accessKey, accessSecret, projectId string, endpoints *cloudprovider.SHCSOEndpoints) *HuaweiClientConfig

func (*HuaweiClientConfig) CloudproviderConfig

func (cfg *HuaweiClientConfig) CloudproviderConfig(cpcfg cloudprovider.ProviderConfig) *HuaweiClientConfig

func (*HuaweiClientConfig) Debug

func (cfg *HuaweiClientConfig) Debug(debug bool) *HuaweiClientConfig

type Image

type Image struct {
	ID string `json:"id"`
}

type InsertHeaders

type InsertHeaders struct {
	XForwardedELBIP bool `json:"X-Forwarded-ELB-IP"`
}

type Interface

type Interface struct {
	PortState string    `json:"port_state"`
	FixedIPS  []FixedIP `json:"fixed_ips"`
	NetID     string    `json:"net_id"` // 网络ID. 与 SNetwork里的ID对应。统一使用这个ID
	PortID    string    `json:"port_id"`
	MACAddr   string    `json:"mac_addr"`
}

===========================================

type IpAddress

type IpAddress struct {
	Version            string `json:"version"`
	Addr               string `json:"addr"`
	OSEXTIPSMACMACAddr string `json:"OS-EXT-IPS-MAC:mac_addr"`
	OSEXTIPSPortID     string `json:"OS-EXT-IPS:port_id"`
	OSEXTIPSType       string `json:"OS-EXT-IPS:type"`
}

type Listener

type Listener struct {
	ID string `json:"id"`
}

type Loadbalancer

type Loadbalancer struct {
	ID string `json:"id"`
}

type Locales

type Locales struct {
	EnUs string `json:"en-us"`
	ZhCN string `json:"zh-cn"`
}

type Metadata

type Metadata struct {
	SystemEnableActive string `json:"__system__enableActive"` // 如果为true。则表明是系统盘快照
}

type MetricData

type MetricData struct {
	Namespace  string
	MetricName string
	Dimensions []struct {
		Name  string
		Value string
	}
	Datapoints []struct {
		Average   float64
		Timestamp int64
	}
	Unit string
}

type ModelartsStatistics

type ModelartsStatistics struct {
	Statistic string
	Value     float64
}

type NIC

type NIC struct {
	SubnetID  string `json:"subnet_id"` // 网络ID. 与 SNetwork里的ID对应。统一使用这个ID
	IpAddress string `json:"ip_address"`
}

type OSExtendedVolumesVolumesAttached

type OSExtendedVolumesVolumesAttached struct {
	Device              string `json:"device"`
	BootIndex           string `json:"bootIndex"`
	ID                  string `json:"id"`
	DeleteOnTermination string `json:"delete_on_termination"`
}

type OSExtraSpecs

type OSExtraSpecs struct {
	EcsPerformancetype      string `json:"ecs:performancetype"`
	EcsGeneration           string `json:"ecs:generation"`
	EcsInstanceArchitecture string `json:"ecs:instance_architecture"`
}

type OSSchedulerHints

type OSSchedulerHints struct {
}

type Pool

type Pool struct {
	ID string `json:"id"`
}

type Port

type Port struct {
	multicloud.SNetworkInterfaceBase
	huawei.HuaweiTags

	ID              string `json:"id"`
	Name            string `json:"name"`
	Status          string `json:"status"`
	AdminStateUp    string `json:"admin_state_up"`
	DNSName         string `json:"dns_name"`
	MACAddress      string `json:"mac_address"`
	NetworkID       string `json:"network_id"`
	TenantID        string `json:"tenant_id"`
	DeviceID        string `json:"device_id"`
	DeviceOwner     string `json:"device_owner"`
	BindingVnicType string `json:"binding:vnic_type"`
	FixedIps        []SFixedIP
	// contains filtered or unexported fields
}

func (*Port) GetAssociateId

func (port *Port) GetAssociateId() string

func (*Port) GetGlobalId

func (port *Port) GetGlobalId() string

func (*Port) GetICloudInterfaceAddresses

func (port *Port) GetICloudInterfaceAddresses() ([]cloudprovider.ICloudInterfaceAddress, error)

func (*Port) GetId

func (port *Port) GetId() string

func (*Port) GetMacAddress

func (port *Port) GetMacAddress() string

func (*Port) GetName

func (port *Port) GetName() string

func (*Port) GetStatus

func (port *Port) GetStatus() string

type PublicipInfo

type PublicipInfo struct {
	PublicipID      string `json:"publicip_id"`
	PublicipAddress string `json:"publicip_address"`
	PublicipType    string `json:"publicip_type"`
	IPVersion       int64  `json:"ip_version"`
}

type RequestVpcInfo

type RequestVpcInfo struct {
	VpcID    string `json:"vpc_id"`
	TenantID string `json:"tenant_id"`
}

type RootVolume

type RootVolume struct {
	Volumetype string `json:"volumetype"`
	SizeGB     int    `json:"size"`
}

type Rule

type Rule struct {
	ID string `json:"id"`
}

type SAMLProvider

type SAMLProvider struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

	Id          string
	Links       SAMLProviderLinks
	Description string
	// contains filtered or unexported fields
}

func (*SAMLProvider) Delete

func (self *SAMLProvider) Delete() error

func (*SAMLProvider) GetAuthUrl

func (self *SAMLProvider) GetAuthUrl(apiServer string) string

func (*SAMLProvider) GetGlobalId

func (self *SAMLProvider) GetGlobalId() string

func (*SAMLProvider) GetId

func (self *SAMLProvider) GetId() string

func (*SAMLProvider) GetMetadataDocument

func (self *SAMLProvider) GetMetadataDocument() (*samlutils.EntityDescriptor, error)

func (*SAMLProvider) GetName

func (self *SAMLProvider) GetName() string

func (*SAMLProvider) GetStatus

func (self *SAMLProvider) GetStatus() string

func (*SAMLProvider) UpdateMetadata

func (self *SAMLProvider) UpdateMetadata(metadata samlutils.EntityDescriptor) error
type SAMLProviderLinks struct {
	Self      string
	Protocols string
}

type SAMLProviderMapping

type SAMLProviderMapping struct {
	Id    string
	Rules jsonutils.JSONObject
}

type SAMLProviderMetadata

type SAMLProviderMetadata struct {
	DomainId     string
	UpdateTime   time.Time
	Data         string
	IdpId        string
	ProtocolId   string
	Id           string
	EntityId     string
	XaccountType string
}

type SAMLProviderProtocol

type SAMLProviderProtocol struct {
	MappingId string
	Id        string
}

type SAccessKey

type SAccessKey struct {
	AccessKey   string    `json:"access"`
	Secret      string    `json:"secret"`
	Description string    `json:"description"`
	Status      string    `json:"status"`
	CreatedAt   time.Time `json:"create_time"`
	// contains filtered or unexported fields
}

type SAccountBalance

type SAccountBalance struct {
	AvailableAmount  float64
	CreditAmount     float64
	DesignatedAmount float64
}

总账户余额

type SBackupStrategy

type SBackupStrategy struct {
	KeepDays  int
	StartTime string
}

type SBalance

type SBalance struct {
	Amount           float64 `json:"amount"`
	Currency         string  `json:"currency"`
	AccountID        string  `json:"account_id"`
	AccountType      int64   `json:"account_type"`
	DesignatedAmount float64 `json:"designated_amount,omitempty"`
	CreditAmount     float64 `json:"credit_amount,omitempty"`
	MeasureUnit      int64   `json:"measure_unit"`
}

账户余额 https://support.huaweicloud.com/api-oce/zh-cn_topic_0109685133.html

type SBucket

type SBucket struct {
	multicloud.SBaseBucket
	huawei.HuaweiTags

	Name         string
	Location     string
	CreationDate time.Time
	// contains filtered or unexported fields
}

func (*SBucket) AbortMultipartUpload

func (b *SBucket) AbortMultipartUpload(ctx context.Context, key string, uploadId string) error

func (*SBucket) CompleteMultipartUpload

func (b *SBucket) CompleteMultipartUpload(ctx context.Context, key string, uploadId string, partEtags []string) error

func (*SBucket) CopyObject

func (b *SBucket) CopyObject(ctx context.Context, destKey string, srcBucket, srcKey string, cannedAcl cloudprovider.TBucketACLType, storageClassStr string, meta http.Header) error

func (*SBucket) CopyPart

func (b *SBucket) CopyPart(ctx context.Context, key string, uploadId string, partIndex int, srcBucket string, srcKey string, srcOffset int64, srcLength int64) (string, error)

func (*SBucket) DeleteCORS

func (b *SBucket) DeleteCORS() error

func (*SBucket) DeleteObject

func (b *SBucket) DeleteObject(ctx context.Context, key string) error

func (*SBucket) DeleteWebSiteConf

func (b *SBucket) DeleteWebSiteConf() error

func (*SBucket) GetAccessUrls

func (b *SBucket) GetAccessUrls() []cloudprovider.SBucketAccessUrl

func (*SBucket) GetAcl

func (b *SBucket) GetAcl() cloudprovider.TBucketACLType

func (*SBucket) GetCORSRules

func (b *SBucket) GetCORSRules() ([]cloudprovider.SBucketCORSRule, error)

func (*SBucket) GetCreatedAt

func (b *SBucket) GetCreatedAt() time.Time

func (*SBucket) GetGlobalId

func (b *SBucket) GetGlobalId() string

func (*SBucket) GetIRegion

func (b *SBucket) GetIRegion() cloudprovider.ICloudRegion

func (*SBucket) GetLimit

func (b *SBucket) GetLimit() cloudprovider.SBucketStats

func (*SBucket) GetLocation

func (b *SBucket) GetLocation() string

func (*SBucket) GetName

func (b *SBucket) GetName() string

func (*SBucket) GetObject

func (b *SBucket) GetObject(ctx context.Context, key string, rangeOpt *cloudprovider.SGetObjectRange) (io.ReadCloser, error)

func (*SBucket) GetProjectId

func (b *SBucket) GetProjectId() string

func (*SBucket) GetStats

func (b *SBucket) GetStats() cloudprovider.SBucketStats

func (*SBucket) GetStorageClass

func (b *SBucket) GetStorageClass() string
service returned error: Status=405 Method Not Allowed, Code=MethodNotAllowed,
Message=The specified method is not allowed against this resource.,
RequestId=00000175B0E9D138440B9EF092DF8A7A

https://support.huaweicloud.com/productdesc-modelarts/modelarts_01_0017.html

func (*SBucket) GetTags

func (b *SBucket) GetTags() (map[string]string, error)

func (*SBucket) GetTempUrl

func (b *SBucket) GetTempUrl(method string, key string, expire time.Duration) (string, error)

func (*SBucket) GetWebsiteConf

func (b *SBucket) GetWebsiteConf() (cloudprovider.SBucketWebsiteConf, error)

func (*SBucket) LimitSupport

func (b *SBucket) LimitSupport() cloudprovider.SBucketStats

func (*SBucket) ListMultipartUploads

func (b *SBucket) ListMultipartUploads() ([]cloudprovider.SBucketMultipartUploads, error)

func (*SBucket) ListObjects

func (b *SBucket) ListObjects(prefix string, marker string, delimiter string, maxCount int) (cloudprovider.SListObjectResult, error)

func (*SBucket) NewMultipartUpload

func (b *SBucket) NewMultipartUpload(ctx context.Context, key string, cannedAcl cloudprovider.TBucketACLType, storageClassStr string, meta http.Header) (string, error)

func (*SBucket) PutObject

func (b *SBucket) PutObject(ctx context.Context, key string, reader io.Reader, sizeBytes int64, cannedAcl cloudprovider.TBucketACLType, storageClassStr string, meta http.Header) error

func (*SBucket) SetAcl

func (b *SBucket) SetAcl(acl cloudprovider.TBucketACLType) error

func (*SBucket) SetCORS

func (b *SBucket) SetCORS(rules []cloudprovider.SBucketCORSRule) error

func (*SBucket) SetLimit

func (b *SBucket) SetLimit(limit cloudprovider.SBucketStats) error

func (*SBucket) SetTags

func (b *SBucket) SetTags(tags map[string]string, replace bool) error

func (*SBucket) SetWebsite

func (b *SBucket) SetWebsite(websitConf cloudprovider.SBucketWebsiteConf) error

func (*SBucket) UploadPart

func (b *SBucket) UploadPart(ctx context.Context, key string, uploadId string, partIndex int, part io.Reader, partSize int64, offset, totalSize int64) (string, error)

type SCloudgroup

type SCloudgroup struct {
	Name        string
	Description string
	Id          string
	CreateTime  string
	// contains filtered or unexported fields
}

func (*SCloudgroup) AddUser

func (group *SCloudgroup) AddUser(name string) error

func (*SCloudgroup) AttachCustomPolicy

func (group *SCloudgroup) AttachCustomPolicy(roleId string) error

func (*SCloudgroup) AttachSystemPolicy

func (group *SCloudgroup) AttachSystemPolicy(roleId string) error

func (*SCloudgroup) Delete

func (group *SCloudgroup) Delete() error

func (*SCloudgroup) DetachCustomPolicy

func (group *SCloudgroup) DetachCustomPolicy(roleId string) error

func (*SCloudgroup) DetachSystemPolicy

func (group *SCloudgroup) DetachSystemPolicy(roleId string) error

func (*SCloudgroup) GetDescription

func (group *SCloudgroup) GetDescription() string

func (*SCloudgroup) GetGlobalId

func (group *SCloudgroup) GetGlobalId() string

func (*SCloudgroup) GetICloudusers

func (group *SCloudgroup) GetICloudusers() ([]cloudprovider.IClouduser, error)

func (*SCloudgroup) GetICustomCloudpolicies

func (group *SCloudgroup) GetICustomCloudpolicies() ([]cloudprovider.ICloudpolicy, error)

func (*SCloudgroup) GetISystemCloudpolicies

func (group *SCloudgroup) GetISystemCloudpolicies() ([]cloudprovider.ICloudpolicy, error)

func (*SCloudgroup) GetName

func (group *SCloudgroup) GetName() string

func (*SCloudgroup) RemoveUser

func (group *SCloudgroup) RemoveUser(name string) error

type SClouduser

type SClouduser struct {
	Description       string
	DomainId          string
	Enabled           bool
	ForceResetPwd     bool
	Id                string
	LastProjectId     string
	Links             SLink
	Name              string
	PasswordExpiresAt string
	PwdStatus         bool
	// contains filtered or unexported fields
}

func (*SClouduser) AttachCustomPolicy

func (user *SClouduser) AttachCustomPolicy(policyType string) error

func (*SClouduser) AttachSystemPolicy

func (user *SClouduser) AttachSystemPolicy(policyType string) error

func (*SClouduser) CreateAccessKey

func (user *SClouduser) CreateAccessKey(name string) (*cloudprovider.SAccessKey, error)

func (*SClouduser) Delete

func (user *SClouduser) Delete() error

func (*SClouduser) DeleteAccessKey

func (user *SClouduser) DeleteAccessKey(accessKey string) error

func (*SClouduser) DetachCustomPolicy

func (user *SClouduser) DetachCustomPolicy(policyId string) error

func (*SClouduser) DetachSystemPolicy

func (user *SClouduser) DetachSystemPolicy(policyId string) error

func (*SClouduser) GetAccessKeys

func (user *SClouduser) GetAccessKeys() ([]cloudprovider.SAccessKey, error)

func (*SClouduser) GetEmailAddr

func (user *SClouduser) GetEmailAddr() string

func (*SClouduser) GetGlobalId

func (user *SClouduser) GetGlobalId() string

func (*SClouduser) GetICloudgroups

func (user *SClouduser) GetICloudgroups() ([]cloudprovider.ICloudgroup, error)

func (*SClouduser) GetICustomCloudpolicies

func (user *SClouduser) GetICustomCloudpolicies() ([]cloudprovider.ICloudpolicy, error)

func (*SClouduser) GetISystemCloudpolicies

func (user *SClouduser) GetISystemCloudpolicies() ([]cloudprovider.ICloudpolicy, error)

func (*SClouduser) GetInviteUrl

func (user *SClouduser) GetInviteUrl() string

func (*SClouduser) GetName

func (user *SClouduser) GetName() string

func (*SClouduser) IsConsoleLogin

func (user *SClouduser) IsConsoleLogin() bool

func (*SClouduser) ResetPassword

func (user *SClouduser) ResetPassword(password string) error

type SDBInstance

type SDBInstance struct {
	multicloud.SDBInstanceBase
	huawei.HuaweiTags

	BackupStrategy      SBackupStrategy
	Created             string //time.Time
	Datastore           SDatastore
	DbUserName          string
	DIskEncryptionId    string
	FlavorRef           string
	Ha                  SHa
	Id                  string
	MaintenanceWindow   string
	Name                string
	Nodes               []SNonde
	Port                int
	PrivateIps          []string
	PublicIps           []string
	Region              string
	RelatedInstance     []SRelatedInstance
	SecurityGroupId     string
	Status              string
	SubnetId            string
	SwitchStrategy      string
	TimeZone            string
	Type                string
	Updated             string //time.Time
	Volume              SVolume
	VpcId               string
	EnterpriseProjectId string
	// contains filtered or unexported fields
}

func (*SDBInstance) ChangeConfig

func (*SDBInstance) ClosePublicConnection

func (rds *SDBInstance) ClosePublicConnection() error

func (*SDBInstance) CreateAccount

func (*SDBInstance) CreateDatabase

func (*SDBInstance) CreateIBackup

func (*SDBInstance) Delete

func (rds *SDBInstance) Delete() error

func (*SDBInstance) GetBillingType

func (rds *SDBInstance) GetBillingType() string

func (*SDBInstance) GetCategory

func (rds *SDBInstance) GetCategory() string

func (*SDBInstance) GetConnectionStr

func (rds *SDBInstance) GetConnectionStr() string

func (*SDBInstance) GetCreatedAt

func (rds *SDBInstance) GetCreatedAt() time.Time

func (*SDBInstance) GetDBNetworks

func (rds *SDBInstance) GetDBNetworks() ([]cloudprovider.SDBInstanceNetwork, error)

func (*SDBInstance) GetDiskSizeGB

func (rds *SDBInstance) GetDiskSizeGB() int

func (*SDBInstance) GetEngine

func (rds *SDBInstance) GetEngine() string

func (*SDBInstance) GetEngineVersion

func (rds *SDBInstance) GetEngineVersion() string

func (*SDBInstance) GetExpiredAt

func (rds *SDBInstance) GetExpiredAt() time.Time

func (*SDBInstance) GetGlobalId

func (rds *SDBInstance) GetGlobalId() string

func (*SDBInstance) GetIDBInstanceAccounts

func (rds *SDBInstance) GetIDBInstanceAccounts() ([]cloudprovider.ICloudDBInstanceAccount, error)

func (*SDBInstance) GetIDBInstanceBackups

func (rds *SDBInstance) GetIDBInstanceBackups() ([]cloudprovider.ICloudDBInstanceBackup, error)

func (*SDBInstance) GetIDBInstanceDatabases

func (rds *SDBInstance) GetIDBInstanceDatabases() ([]cloudprovider.ICloudDBInstanceDatabase, error)

func (*SDBInstance) GetIDBInstanceParameters

func (rds *SDBInstance) GetIDBInstanceParameters() ([]cloudprovider.ICloudDBInstanceParameter, error)

func (*SDBInstance) GetIVpcId

func (rds *SDBInstance) GetIVpcId() string

func (*SDBInstance) GetId

func (rds *SDBInstance) GetId() string

func (*SDBInstance) GetInstanceType

func (rds *SDBInstance) GetInstanceType() string

func (*SDBInstance) GetInternalConnectionStr

func (rds *SDBInstance) GetInternalConnectionStr() string

func (*SDBInstance) GetMaintainTime

func (rds *SDBInstance) GetMaintainTime() string

func (*SDBInstance) GetName

func (rds *SDBInstance) GetName() string

func (*SDBInstance) GetPort

func (rds *SDBInstance) GetPort() int

func (*SDBInstance) GetProjectId

func (rds *SDBInstance) GetProjectId() string

func (*SDBInstance) GetSecurityGroupIds

func (rds *SDBInstance) GetSecurityGroupIds() ([]string, error)

func (*SDBInstance) GetStatus

func (rds *SDBInstance) GetStatus() string

func (*SDBInstance) GetStorageType

func (rds *SDBInstance) GetStorageType() string

func (*SDBInstance) GetVcpuCount

func (rds *SDBInstance) GetVcpuCount() int

func (*SDBInstance) GetVmemSizeMB

func (rds *SDBInstance) GetVmemSizeMB() int

func (*SDBInstance) GetZone1Id

func (rds *SDBInstance) GetZone1Id() string

func (*SDBInstance) GetZone2Id

func (rds *SDBInstance) GetZone2Id() string

func (*SDBInstance) GetZone3Id

func (rds *SDBInstance) GetZone3Id() string

func (*SDBInstance) GetZoneIdByRole

func (rds *SDBInstance) GetZoneIdByRole(role string) string

func (*SDBInstance) OpenPublicConnection

func (rds *SDBInstance) OpenPublicConnection() error

func (*SDBInstance) Reboot

func (rds *SDBInstance) Reboot() error

func (*SDBInstance) RecoveryFromBackup

func (rds *SDBInstance) RecoveryFromBackup(conf *cloudprovider.SDBInstanceRecoveryConfig) error

func (*SDBInstance) Refresh

func (rds *SDBInstance) Refresh() error

func (*SDBInstance) Renew

func (rds *SDBInstance) Renew(bc billing.SBillingCycle) error

type SDBInstanceAccount

type SDBInstanceAccount struct {
	multicloud.SDBInstanceAccountBase
	huawei.HuaweiTags

	Name string
	// contains filtered or unexported fields
}

func (*SDBInstanceAccount) Delete

func (account *SDBInstanceAccount) Delete() error

func (*SDBInstanceAccount) GetIDBInstanceAccountPrivileges

func (account *SDBInstanceAccount) GetIDBInstanceAccountPrivileges() ([]cloudprovider.ICloudDBInstanceAccountPrivilege, error)

func (*SDBInstanceAccount) GetName

func (account *SDBInstanceAccount) GetName() string

func (*SDBInstanceAccount) GrantPrivilege

func (account *SDBInstanceAccount) GrantPrivilege(database, privilege string) error

func (*SDBInstanceAccount) ResetPassword

func (account *SDBInstanceAccount) ResetPassword(password string) error

func (*SDBInstanceAccount) RevokePrivilege

func (account *SDBInstanceAccount) RevokePrivilege(database string) error

type SDBInstanceBackup

type SDBInstanceBackup struct {
	multicloud.SDBInstanceBackupBase
	huawei.HuaweiTags

	BeginTime  string
	Datastore  SDatastore
	EndTime    string
	Id         string
	InstanceId string
	Name       string
	Size       int
	Status     string
	Type       string
	// contains filtered or unexported fields
}

func (*SDBInstanceBackup) CreateICloudDBInstance

func (*SDBInstanceBackup) Delete

func (backup *SDBInstanceBackup) Delete() error

func (*SDBInstanceBackup) GetBackupMode

func (backup *SDBInstanceBackup) GetBackupMode() string

func (*SDBInstanceBackup) GetBackupSizeMb

func (backup *SDBInstanceBackup) GetBackupSizeMb() int

func (*SDBInstanceBackup) GetDBInstanceId

func (backup *SDBInstanceBackup) GetDBInstanceId() string

func (*SDBInstanceBackup) GetDBNames

func (backup *SDBInstanceBackup) GetDBNames() string

func (*SDBInstanceBackup) GetEndTime

func (backup *SDBInstanceBackup) GetEndTime() time.Time

func (*SDBInstanceBackup) GetEngine

func (backup *SDBInstanceBackup) GetEngine() string

func (*SDBInstanceBackup) GetEngineVersion

func (backup *SDBInstanceBackup) GetEngineVersion() string

func (*SDBInstanceBackup) GetGlobalId

func (backup *SDBInstanceBackup) GetGlobalId() string

func (*SDBInstanceBackup) GetId

func (backup *SDBInstanceBackup) GetId() string

func (*SDBInstanceBackup) GetName

func (backup *SDBInstanceBackup) GetName() string

func (*SDBInstanceBackup) GetStartTime

func (backup *SDBInstanceBackup) GetStartTime() time.Time

func (*SDBInstanceBackup) GetStatus

func (backup *SDBInstanceBackup) GetStatus() string

func (*SDBInstanceBackup) Refresh

func (backup *SDBInstanceBackup) Refresh() error

type SDBInstanceDatabase

type SDBInstanceDatabase struct {
	multicloud.SDBInstanceDatabaseBase
	huawei.HuaweiTags

	Name         string
	CharacterSet string
	// contains filtered or unexported fields
}

func (*SDBInstanceDatabase) Delete

func (database *SDBInstanceDatabase) Delete() error

func (*SDBInstanceDatabase) GetCharacterSet

func (database *SDBInstanceDatabase) GetCharacterSet() string

func (*SDBInstanceDatabase) GetGlobalId

func (database *SDBInstanceDatabase) GetGlobalId() string

func (*SDBInstanceDatabase) GetId

func (database *SDBInstanceDatabase) GetId() string

func (*SDBInstanceDatabase) GetName

func (database *SDBInstanceDatabase) GetName() string

func (*SDBInstanceDatabase) GetStatus

func (database *SDBInstanceDatabase) GetStatus() string

type SDBInstanceDatastore

type SDBInstanceDatastore struct {
	Id   string
	Name string
}

type SDBInstanceFlavor

type SDBInstanceFlavor struct {
	Vcpus        int
	Ram          int //单位GB
	SpecCode     string
	InstanceMode string //实例模型

	StorageType   string
	AzStatus      map[string]string
	Engine        string
	EngineVersion string
}

func (*SDBInstanceFlavor) GetISkus

type SDBInstanceParameter

type SDBInstanceParameter struct {
	Name            string
	Value           string
	RestartRequired bool
	Readonly        bool
	ValueRange      string
	Type            string
	Description     string
	// contains filtered or unexported fields
}

func (*SDBInstanceParameter) GetDescription

func (param *SDBInstanceParameter) GetDescription() string

func (*SDBInstanceParameter) GetGlobalId

func (param *SDBInstanceParameter) GetGlobalId() string

func (*SDBInstanceParameter) GetKey

func (param *SDBInstanceParameter) GetKey() string

func (*SDBInstanceParameter) GetValue

func (param *SDBInstanceParameter) GetValue() string

type SDBInstanceSku

type SDBInstanceSku struct {
	Vcpus        int
	Ram          int //单位GB
	SpecCode     string
	InstanceMode string //实例模型

	StorageType   string
	Az1           string
	Az2           string
	Engine        string
	EngineVersion string
}

func (*SDBInstanceSku) GetCategory

func (self *SDBInstanceSku) GetCategory() string

func (*SDBInstanceSku) GetDiskSizeStep

func (self *SDBInstanceSku) GetDiskSizeStep() int

func (*SDBInstanceSku) GetEngine

func (sku *SDBInstanceSku) GetEngine() string

func (*SDBInstanceSku) GetEngineVersion

func (sku *SDBInstanceSku) GetEngineVersion() string

func (*SDBInstanceSku) GetGlobalId

func (self *SDBInstanceSku) GetGlobalId() string

func (*SDBInstanceSku) GetIOPS

func (self *SDBInstanceSku) GetIOPS() int

func (*SDBInstanceSku) GetMaxConnections

func (self *SDBInstanceSku) GetMaxConnections() int

func (*SDBInstanceSku) GetMaxDiskSizeGb

func (self *SDBInstanceSku) GetMaxDiskSizeGb() int

func (*SDBInstanceSku) GetMinDiskSizeGb

func (self *SDBInstanceSku) GetMinDiskSizeGb() int

func (*SDBInstanceSku) GetName

func (self *SDBInstanceSku) GetName() string

func (*SDBInstanceSku) GetQPS

func (sku *SDBInstanceSku) GetQPS() int

func (*SDBInstanceSku) GetStatus

func (self *SDBInstanceSku) GetStatus() string

func (*SDBInstanceSku) GetStorageType

func (self *SDBInstanceSku) GetStorageType() string

func (*SDBInstanceSku) GetTPS

func (self *SDBInstanceSku) GetTPS() int

func (*SDBInstanceSku) GetVcpuCount

func (self *SDBInstanceSku) GetVcpuCount() int

func (*SDBInstanceSku) GetVmemSizeMb

func (self *SDBInstanceSku) GetVmemSizeMb() int

func (*SDBInstanceSku) GetZone1Id

func (self *SDBInstanceSku) GetZone1Id() string

func (*SDBInstanceSku) GetZone2Id

func (self *SDBInstanceSku) GetZone2Id() string

func (*SDBInstanceSku) GetZone3Id

func (self *SDBInstanceSku) GetZone3Id() string

func (*SDBInstanceSku) GetZoneId

func (self *SDBInstanceSku) GetZoneId() string

type SDBInstanceStorage

type SDBInstanceStorage struct {
	Name     string
	AzStatus map[string]string
}

type SDatabasePrivilege

type SDatabasePrivilege struct {
	Name     string
	Readonly bool
	// contains filtered or unexported fields
}

func (*SDatabasePrivilege) GetDBName

func (privilege *SDatabasePrivilege) GetDBName() string

func (*SDatabasePrivilege) GetGlobalId

func (privilege *SDatabasePrivilege) GetGlobalId() string

func (*SDatabasePrivilege) GetPrivilege

func (privilege *SDatabasePrivilege) GetPrivilege() string

type SDatastore

type SDatastore struct {
	Type    string
	Version string
}

type SDisk

type SDisk struct {
	multicloud.SDisk
	huawei.HuaweiDiskTags

	ID                  string              `json:"id"`
	Name                string              `json:"name"`
	Status              string              `json:"status"`
	Attachments         []Attachment        `json:"attachments"`
	Description         string              `json:"description"`
	SizeGB              int                 `json:"size"`
	Metadata            DiskMeta            `json:"metadata"`
	Encrypted           bool                `json:"encrypted"`
	Bootable            string              `json:"bootable"`
	Multiattach         bool                `json:"multiattach"`
	AvailabilityZone    string              `json:"availability_zone"`
	SourceVolid         string              `json:"source_volid"`
	SnapshotID          string              `json:"snapshot_id"`
	CreatedAt           time.Time           `json:"created_at"`
	VolumeType          string              `json:"volume_type"`
	VolumeImageMetadata VolumeImageMetadata `json:"volume_image_metadata"`
	ReplicationStatus   string              `json:"replication_status"`
	UserID              string              `json:"user_id"`
	ConsistencygroupID  string              `json:"consistencygroup_id"`
	UpdatedAt           string              `json:"updated_at"`
	EnterpriseProjectId string

	ExpiredTime time.Time
	// contains filtered or unexported fields
}

https://support.huaweicloud.com/api-evs/zh-cn_topic_0124881427.html

func (*SDisk) Attach

func (self *SDisk) Attach(device string) error

func (*SDisk) CreateISnapshot

func (self *SDisk) CreateISnapshot(ctx context.Context, name string, desc string) (cloudprovider.ICloudSnapshot, error)

func (*SDisk) Delete

func (self *SDisk) Delete(ctx context.Context) error

func (*SDisk) Detach

func (self *SDisk) Detach() error

func (*SDisk) GetAccessPath

func (self *SDisk) GetAccessPath() string

func (*SDisk) GetBillingType

func (self *SDisk) GetBillingType() string

func (*SDisk) GetCacheMode

func (self *SDisk) GetCacheMode() string

func (*SDisk) GetCreatedAt

func (self *SDisk) GetCreatedAt() time.Time

func (*SDisk) GetDiskFormat

func (self *SDisk) GetDiskFormat() string

func (*SDisk) GetDiskSizeMB

func (self *SDisk) GetDiskSizeMB() int

func (*SDisk) GetDiskType

func (self *SDisk) GetDiskType() string

Bootable 表示硬盘是否为启动盘。 启动盘 != 系统盘(必须是启动盘且挂载在root device上)

func (*SDisk) GetDriver

func (self *SDisk) GetDriver() string

func (*SDisk) GetExpiredAt

func (self *SDisk) GetExpiredAt() time.Time

func (*SDisk) GetFsFormat

func (self *SDisk) GetFsFormat() string

func (*SDisk) GetGlobalId

func (self *SDisk) GetGlobalId() string

func (*SDisk) GetISnapshot

func (self *SDisk) GetISnapshot(snapshotId string) (cloudprovider.ICloudSnapshot, error)

func (*SDisk) GetISnapshots

func (self *SDisk) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)

func (*SDisk) GetIStorage

func (self *SDisk) GetIStorage() (cloudprovider.ICloudStorage, error)

func (*SDisk) GetId

func (self *SDisk) GetId() string

func (*SDisk) GetIsAutoDelete

func (self *SDisk) GetIsAutoDelete() bool

func (*SDisk) GetIsNonPersistent

func (self *SDisk) GetIsNonPersistent() bool

func (*SDisk) GetMountServerId

func (self *SDisk) GetMountServerId() string

func (*SDisk) GetMountpoint

func (self *SDisk) GetMountpoint() string

func (*SDisk) GetName

func (self *SDisk) GetName() string

func (*SDisk) GetProjectId

func (self *SDisk) GetProjectId() string

func (*SDisk) GetStatus

func (self *SDisk) GetStatus() string

func (*SDisk) GetTemplateId

func (self *SDisk) GetTemplateId() string

func (*SDisk) IsEmulated

func (self *SDisk) IsEmulated() bool

func (*SDisk) Rebuild

func (self *SDisk) Rebuild(ctx context.Context) error

华为云不支持重置

func (*SDisk) Refresh

func (self *SDisk) Refresh() error

func (*SDisk) Reset

func (self *SDisk) Reset(ctx context.Context, snapshotId string) (string, error)

在线卸载磁盘 https://support.huaweicloud.com/usermanual-ecs/zh-cn_topic_0036046828.html 对于挂载在系统盘盘位(也就是“/dev/sda”或“/dev/vda”挂载点)上的磁盘,当前仅支持离线卸载

func (*SDisk) Resize

func (self *SDisk) Resize(ctx context.Context, newSizeMB int64) error

type SDiskType

type SDiskType struct {
	ExtraSpecs ExtraSpecs `json:"extra_specs"`
	Name       string     `json:"name"`
	QosSpecsID string     `json:"qos_specs_id"`
	ID         string     `json:"id"`
	IsPublic   bool       `json:"is_public"`
}

func (*SDiskType) IsAvaliableInZone

func (self *SDiskType) IsAvaliableInZone(zoneId string) bool

type SDomain

type SDomain struct {
	Contacts       string `json:"contacts"`
	Description    string `json:"description"`
	Enabled        bool   `json:"enabled"`
	EnterpriseName string `json:"enterpriseName"`
	ID             string `json:"id"`
	Name           string `json:"name"`
	Tagflag        int    `json:"tagflag"`
}

https://support.huaweicloud.com/api-iam/zh-cn_topic_0057845574.html 租户列表

type SEipAddress

type SEipAddress struct {
	multicloud.SEipBase
	huawei.HuaweiTags

	ID                  string    `json:"id"`
	Status              string    `json:"status"`
	Profile             *SProfile `json:"profile,omitempty"`
	Type                string    `json:"type"`
	PublicIPAddress     string    `json:"public_ip_address"`
	PrivateIPAddress    string    `json:"private_ip_address"`
	TenantID            string    `json:"tenant_id"`
	CreateTime          time.Time `json:"create_time"`
	BandwidthID         string    `json:"bandwidth_id"`
	BandwidthShareType  string    `json:"bandwidth_share_type"`
	BandwidthSize       int64     `json:"bandwidth_size"`
	BandwidthName       string    `json:"bandwidth_name"`
	EnterpriseProjectID string    `json:"enterprise_project_id"`
	IPVersion           int64     `json:"ip_version"`
	PortId              string    `json:"port_id"`
	EnterpriseProjectId string
	// contains filtered or unexported fields
}

https://support.huaweicloud.com/api-vpc/zh-cn_topic_0020090598.html

func (*SEipAddress) Associate

func (self *SEipAddress) Associate(conf *cloudprovider.AssociateConfig) error

func (*SEipAddress) ChangeBandwidth

func (self *SEipAddress) ChangeBandwidth(bw int) error

func (*SEipAddress) Delete

func (self *SEipAddress) Delete() error

func (*SEipAddress) Dissociate

func (self *SEipAddress) Dissociate() error

func (*SEipAddress) GetAssociationExternalId

func (self *SEipAddress) GetAssociationExternalId() string

func (*SEipAddress) GetAssociationType

func (self *SEipAddress) GetAssociationType() string

func (*SEipAddress) GetBandwidth

func (self *SEipAddress) GetBandwidth() int

func (*SEipAddress) GetBillingType

func (self *SEipAddress) GetBillingType() string

func (*SEipAddress) GetCreatedAt

func (self *SEipAddress) GetCreatedAt() time.Time

func (*SEipAddress) GetExpiredAt

func (self *SEipAddress) GetExpiredAt() time.Time

func (*SEipAddress) GetGlobalId

func (self *SEipAddress) GetGlobalId() string

func (*SEipAddress) GetINetworkId

func (self *SEipAddress) GetINetworkId() string

func (*SEipAddress) GetId

func (self *SEipAddress) GetId() string

func (*SEipAddress) GetInternetChargeType

func (self *SEipAddress) GetInternetChargeType() string

func (*SEipAddress) GetIpAddr

func (self *SEipAddress) GetIpAddr() string

func (*SEipAddress) GetMode

func (self *SEipAddress) GetMode() string

func (*SEipAddress) GetName

func (self *SEipAddress) GetName() string

func (*SEipAddress) GetPort

func (self *SEipAddress) GetPort() *Port

func (*SEipAddress) GetProjectId

func (self *SEipAddress) GetProjectId() string

func (*SEipAddress) GetStatus

func (self *SEipAddress) GetStatus() string

func (*SEipAddress) IsEmulated

func (self *SEipAddress) IsEmulated() bool

func (*SEipAddress) Refresh

func (self *SEipAddress) Refresh() error

type SElasticcache

type SElasticcache struct {
	multicloud.SElasticcacheBase
	huawei.HuaweiTags

	Name                  string   `json:"name"`
	Engine                string   `json:"engine"`
	CapacityGB            int      `json:"capacity"`
	IP                    string   `json:"ip"`
	DomainName            string   `json:"domainName"`
	Port                  int      `json:"port"`
	Status                string   `json:"status"`
	Libos                 bool     `json:"libos"`
	Description           string   `json:"description"`
	Task                  string   `json:"task"`
	MaxMemoryMB           int      `json:"max_memory"`
	UsedMemoryMB          int      `json:"used_memory"`
	InstanceID            string   `json:"instance_id"`
	ResourceSpecCode      string   `json:"resource_spec_code"`
	EngineVersion         string   `json:"engine_version"`
	InternalVersion       string   `json:"internal_version"`
	ChargingMode          int      `json:"charging_mode"`
	CapacityMinor         string   `json:"capacity_minor"`
	VpcID                 string   `json:"vpc_id"`
	VpcName               string   `json:"vpc_name"`
	TaskStatus            string   `json:"task_status"`
	CreatedAt             string   `json:"created_at"`
	ErrorCode             string   `json:"error_code"`
	UserID                string   `json:"user_id"`
	UserName              string   `json:"user_name"`
	MaintainBegin         string   `json:"maintain_begin"`
	MaintainEnd           string   `json:"maintain_end"`
	NoPasswordAccess      string   `json:"no_password_access"`
	AccessUser            string   `json:"access_user"`
	EnablePublicip        bool     `json:"enable_publicip"`
	PublicipID            string   `json:"publicip_id"`
	PublicipAddress       string   `json:"publicip_address"`
	EnableSSL             bool     `json:"enable_ssl"`
	ServiceUpgrade        bool     `json:"service_upgrade"`
	ServiceTaskID         string   `json:"service_task_id"`
	IsFree                string   `json:"is_free"`
	EnterpriseProjectID   string   `json:"enterprise_project_id"`
	AvailableZones        []string `json:"available_zones"`
	SubnetID              string   `json:"subnet_id"`
	SecurityGroupID       string   `json:"security_group_id"`
	BackendAddrs          []string `json:"backend_addrs"`
	ProductID             string   `json:"product_id"`
	SecurityGroupName     string   `json:"security_group_name"`
	SubnetName            string   `json:"subnet_name"`
	OrderID               string   `json:"order_id"`
	SubnetCIDR            string   `json:"subnet_cidr"`
	InstanceBackupPolicy  string   `json:"instance_backup_policy"`
	EnterpriseProjectName string   `json:"enterprise_project_name"`
	// contains filtered or unexported fields
}

https://support.huaweicloud.com/api-dcs/dcs-zh-api-180423020.html

func (*SElasticcache) AllocatePublicConnection

func (self *SElasticcache) AllocatePublicConnection(port int) (string, error)

https://support.huaweicloud.com/usermanual-dcs/dcs-zh-ug-180314001.html 目前只有Redis3.0版本密码模式的实例支持通过公网访问Redis实例,其他版本暂不支持公网访问。 todo: 目前没找到api

func (*SElasticcache) CreateAcl

func (self *SElasticcache) CreateAcl(aclName, securityIps string) (cloudprovider.ICloudElasticcacheAcl, error)

func (*SElasticcache) FlushInstance

https://support.huaweicloud.com/api-dcs/dcs-zh-api-180423030.html 当前版本,只有DCS2.0实例支持清空数据功能,即flush操作。

func (*SElasticcache) GetArchType

func (self *SElasticcache) GetArchType() string

func (*SElasticcache) GetAuthMode

func (self *SElasticcache) GetAuthMode() string

func (*SElasticcache) GetBillingType

func (self *SElasticcache) GetBillingType() string

func (*SElasticcache) GetCapacityMB

func (self *SElasticcache) GetCapacityMB() int

func (*SElasticcache) GetCreatedAt

func (self *SElasticcache) GetCreatedAt() time.Time

func (*SElasticcache) GetEngine

func (self *SElasticcache) GetEngine() string

func (*SElasticcache) GetEngineVersion

func (self *SElasticcache) GetEngineVersion() string

func (*SElasticcache) GetExpiredAt

func (self *SElasticcache) GetExpiredAt() time.Time

func (*SElasticcache) GetGlobalId

func (self *SElasticcache) GetGlobalId() string

func (*SElasticcache) GetICloudElasticcacheAccount

func (self *SElasticcache) GetICloudElasticcacheAccount(accountId string) (cloudprovider.ICloudElasticcacheAccount, error)

func (*SElasticcache) GetICloudElasticcacheAccounts

func (self *SElasticcache) GetICloudElasticcacheAccounts() ([]cloudprovider.ICloudElasticcacheAccount, error)

func (*SElasticcache) GetICloudElasticcacheAcl

func (self *SElasticcache) GetICloudElasticcacheAcl(aclId string) (cloudprovider.ICloudElasticcacheAcl, error)

func (*SElasticcache) GetICloudElasticcacheAcls

func (self *SElasticcache) GetICloudElasticcacheAcls() ([]cloudprovider.ICloudElasticcacheAcl, error)

func (*SElasticcache) GetICloudElasticcacheBackup

func (self *SElasticcache) GetICloudElasticcacheBackup(backupId string) (cloudprovider.ICloudElasticcacheBackup, error)

func (*SElasticcache) GetICloudElasticcacheBackups

func (self *SElasticcache) GetICloudElasticcacheBackups() ([]cloudprovider.ICloudElasticcacheBackup, error)

func (*SElasticcache) GetICloudElasticcacheParameters

func (self *SElasticcache) GetICloudElasticcacheParameters() ([]cloudprovider.ICloudElasticcacheParameter, error)

func (*SElasticcache) GetId

func (self *SElasticcache) GetId() string

func (*SElasticcache) GetInstanceType

func (self *SElasticcache) GetInstanceType() string

func (*SElasticcache) GetMaintainEndTime

func (self *SElasticcache) GetMaintainEndTime() string

func (*SElasticcache) GetMaintainStartTime

func (self *SElasticcache) GetMaintainStartTime() string

func (*SElasticcache) GetName

func (self *SElasticcache) GetName() string

func (*SElasticcache) GetNetworkId

func (self *SElasticcache) GetNetworkId() string

func (*SElasticcache) GetNetworkType

func (self *SElasticcache) GetNetworkType() string

func (*SElasticcache) GetNodeType

func (self *SElasticcache) GetNodeType() string

func (*SElasticcache) GetPrivateConnectPort

func (self *SElasticcache) GetPrivateConnectPort() int

func (*SElasticcache) GetPrivateDNS

func (self *SElasticcache) GetPrivateDNS() string

func (*SElasticcache) GetPrivateIpAddr

func (self *SElasticcache) GetPrivateIpAddr() string

func (*SElasticcache) GetProjectId

func (self *SElasticcache) GetProjectId() string

func (*SElasticcache) GetPublicConnectPort

func (self *SElasticcache) GetPublicConnectPort() int

func (*SElasticcache) GetPublicDNS

func (self *SElasticcache) GetPublicDNS() string

func (*SElasticcache) GetPublicIpAddr

func (self *SElasticcache) GetPublicIpAddr() string

func (*SElasticcache) GetSecurityGroupIds

func (self *SElasticcache) GetSecurityGroupIds() ([]string, error)

func (*SElasticcache) GetStatus

func (self *SElasticcache) GetStatus() string

func (*SElasticcache) GetVpcId

func (self *SElasticcache) GetVpcId() string

func (*SElasticcache) GetZoneId

func (self *SElasticcache) GetZoneId() string

func (*SElasticcache) Refresh

func (self *SElasticcache) Refresh() error

func (*SElasticcache) ReleasePublicConnection

func (self *SElasticcache) ReleasePublicConnection() error

todo: 目前没找到api

func (*SElasticcache) Renew

func (self *SElasticcache) Renew(bc billing.SBillingCycle) error

func (*SElasticcache) SetAutoRenew

func (self *SElasticcache) SetAutoRenew(bc billing.SBillingCycle) error

func (*SElasticcache) SetMaintainTime

func (self *SElasticcache) SetMaintainTime(maintainStartTime, maintainEndTime string) error

https://support.huaweicloud.com/api-dcs/dcs-zh-api-180423021.html

func (*SElasticcache) SetTags

func (instance *SElasticcache) SetTags(tags map[string]string, replace bool) error

func (*SElasticcache) UpdateAuthMode

func (self *SElasticcache) UpdateAuthMode(noPwdAccess bool, password string) error

SElasticcacheAccount => ResetPassword

func (*SElasticcache) UpdateSecurityGroups

func (self *SElasticcache) UpdateSecurityGroups(secgroupIds []string) error

type SElasticcacheAccount

type SElasticcacheAccount struct {
	multicloud.SElasticcacheAccountBase
	huawei.HuaweiTags
	// contains filtered or unexported fields
}

func (*SElasticcacheAccount) Delete

func (self *SElasticcacheAccount) Delete() error

func (*SElasticcacheAccount) GetAccountPrivilege

func (self *SElasticcacheAccount) GetAccountPrivilege() string

func (*SElasticcacheAccount) GetAccountType

func (self *SElasticcacheAccount) GetAccountType() string

func (*SElasticcacheAccount) GetGlobalId

func (self *SElasticcacheAccount) GetGlobalId() string

func (*SElasticcacheAccount) GetId

func (self *SElasticcacheAccount) GetId() string

func (*SElasticcacheAccount) GetName

func (self *SElasticcacheAccount) GetName() string

func (*SElasticcacheAccount) GetStatus

func (self *SElasticcacheAccount) GetStatus() string

func (*SElasticcacheAccount) UpdateAccount

type SElasticcacheBackup

type SElasticcacheBackup struct {
	multicloud.SElasticcacheBackupBase
	huawei.HuaweiTags

	Status           string    `json:"status"`
	Remark           string    `json:"remark"`
	Period           string    `json:"period"`
	Progress         string    `json:"progress"`
	SizeByte         int64     `json:"size"`
	InstanceID       string    `json:"instance_id"`
	BackupID         string    `json:"backup_id"`
	CreatedAt        time.Time `json:"created_at"`
	UpdatedAt        time.Time `json:"updated_at"`
	ExecutionAt      time.Time `json:"execution_at"`
	BackupType       string    `json:"backup_type"`
	BackupName       string    `json:"backup_name"`
	ErrorCode        string    `json:"error_code"`
	IsSupportRestore string    `json:"is_support_restore"`
	// contains filtered or unexported fields
}

https://support.huaweicloud.com/api-dcs/dcs-zh-api-180423035.html

func (*SElasticcacheBackup) Delete

func (self *SElasticcacheBackup) Delete() error

func (*SElasticcacheBackup) GetBackupMode

func (self *SElasticcacheBackup) GetBackupMode() string

func (*SElasticcacheBackup) GetBackupSizeMb

func (self *SElasticcacheBackup) GetBackupSizeMb() int

func (*SElasticcacheBackup) GetBackupType

func (self *SElasticcacheBackup) GetBackupType() string

func (*SElasticcacheBackup) GetDownloadURL

func (self *SElasticcacheBackup) GetDownloadURL() string

func (*SElasticcacheBackup) GetEndTime

func (self *SElasticcacheBackup) GetEndTime() time.Time

func (*SElasticcacheBackup) GetGlobalId

func (self *SElasticcacheBackup) GetGlobalId() string

func (*SElasticcacheBackup) GetId

func (self *SElasticcacheBackup) GetId() string

func (*SElasticcacheBackup) GetName

func (self *SElasticcacheBackup) GetName() string

func (*SElasticcacheBackup) GetStartTime

func (self *SElasticcacheBackup) GetStartTime() time.Time

func (*SElasticcacheBackup) GetStatus

func (self *SElasticcacheBackup) GetStatus() string

func (*SElasticcacheBackup) Refresh

func (self *SElasticcacheBackup) Refresh() error

func (*SElasticcacheBackup) RestoreInstance

func (self *SElasticcacheBackup) RestoreInstance(instanceId string) error

https://support.huaweicloud.com/api-dcs/dcs-zh-api-180423034.html

type SElasticcacheParameter

type SElasticcacheParameter struct {
	multicloud.SElasticcacheParameterBase
	huawei.HuaweiTags

	Description  string `json:"description"`
	ParamID      int64  `json:"param_id"`
	ParamName    string `json:"param_name"`
	ParamValue   string `json:"param_value"`
	DefaultValue string `json:"default_value"`
	ValueType    string `json:"value_type"`
	ValueRange   string `json:"value_range"`
	// contains filtered or unexported fields
}

https://support.huaweicloud.com/api-dcs/dcs-zh-api-180423027.html

func (*SElasticcacheParameter) GetDescription

func (self *SElasticcacheParameter) GetDescription() string

func (*SElasticcacheParameter) GetForceRestart

func (self *SElasticcacheParameter) GetForceRestart() bool

func (*SElasticcacheParameter) GetGlobalId

func (self *SElasticcacheParameter) GetGlobalId() string

func (*SElasticcacheParameter) GetId

func (self *SElasticcacheParameter) GetId() string

func (*SElasticcacheParameter) GetModifiable

func (self *SElasticcacheParameter) GetModifiable() bool

func (*SElasticcacheParameter) GetName

func (self *SElasticcacheParameter) GetName() string

func (*SElasticcacheParameter) GetParameterKey

func (self *SElasticcacheParameter) GetParameterKey() string

func (*SElasticcacheParameter) GetParameterValue

func (self *SElasticcacheParameter) GetParameterValue() string

func (*SElasticcacheParameter) GetParameterValueRange

func (self *SElasticcacheParameter) GetParameterValueRange() string

func (*SElasticcacheParameter) GetStatus

func (self *SElasticcacheParameter) GetStatus() string

type SElbACL

type SElbACL struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

	ID              string `json:"id"`
	ListenerID      string `json:"listener_id"`
	TenantID        string `json:"tenant_id"`
	EnableWhitelist bool   `json:"enable_whitelist"`
	Whitelist       string `json:"whitelist"`
	// contains filtered or unexported fields
}

func (*SElbACL) Delete

func (self *SElbACL) Delete() error

func (*SElbACL) GetAclEntries

func (*SElbACL) GetAclListenerID

func (self *SElbACL) GetAclListenerID() string

func (*SElbACL) GetGlobalId

func (self *SElbACL) GetGlobalId() string

func (*SElbACL) GetId

func (self *SElbACL) GetId() string

func (*SElbACL) GetName

func (self *SElbACL) GetName() string

func (*SElbACL) GetProjectId

func (self *SElbACL) GetProjectId() string

func (*SElbACL) GetStatus

func (self *SElbACL) GetStatus() string

func (*SElbACL) IsEmulated

func (self *SElbACL) IsEmulated() bool

func (*SElbACL) Refresh

func (self *SElbACL) Refresh() error

func (*SElbACL) Sync

type SElbBackend

type SElbBackend struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

	Name            string `json:"name"`
	Weight          int    `json:"weight"`
	AdminStateUp    bool   `json:"admin_state_up"`
	SubnetID        string `json:"subnet_id"`
	TenantID        string `json:"tenant_id"`
	ProjectID       string `json:"project_id"`
	Address         string `json:"address"`
	ProtocolPort    int    `json:"protocol_port"`
	OperatingStatus string `json:"operating_status"`
	ID              string `json:"id"`
	// contains filtered or unexported fields
}

func (*SElbBackend) GetBackendId

func (self *SElbBackend) GetBackendId() string

func (*SElbBackend) GetBackendRole

func (self *SElbBackend) GetBackendRole() string

func (*SElbBackend) GetBackendType

func (self *SElbBackend) GetBackendType() string

func (*SElbBackend) GetGlobalId

func (self *SElbBackend) GetGlobalId() string

func (*SElbBackend) GetId

func (self *SElbBackend) GetId() string

func (*SElbBackend) GetIpAddress

func (self *SElbBackend) GetIpAddress() string

func (*SElbBackend) GetName

func (self *SElbBackend) GetName() string

func (*SElbBackend) GetPort

func (self *SElbBackend) GetPort() int

func (*SElbBackend) GetProjectId

func (self *SElbBackend) GetProjectId() string

func (*SElbBackend) GetStatus

func (self *SElbBackend) GetStatus() string

func (*SElbBackend) GetWeight

func (self *SElbBackend) GetWeight() int

func (*SElbBackend) IsEmulated

func (self *SElbBackend) IsEmulated() bool

func (*SElbBackend) Refresh

func (self *SElbBackend) Refresh() error

func (*SElbBackend) SyncConf

func (self *SElbBackend) SyncConf(ctx context.Context, port, weight int) error

type SElbBackendGroup

type SElbBackendGroup struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

	LBAlgorithm        string        `json:"lb_algorithm"`
	Protocol           string        `json:"protocol"`
	Description        string        `json:"description"`
	AdminStateUp       bool          `json:"admin_state_up"`
	Loadbalancers      []Listener    `json:"loadbalancers"`
	TenantID           string        `json:"tenant_id"`
	ProjectID          string        `json:"project_id"`
	Listeners          []Listener    `json:"listeners"`
	ID                 string        `json:"id"`
	Name               string        `json:"name"`
	HealthMonitorID    string        `json:"healthmonitor_id"`
	SessionPersistence StickySession `json:"session_persistence"`
	// contains filtered or unexported fields
}

func (*SElbBackendGroup) AddBackendServer

func (self *SElbBackendGroup) AddBackendServer(serverId string, weight int, port int) (cloudprovider.ICloudLoadbalancerBackend, error)

func (*SElbBackendGroup) Delete

func (self *SElbBackendGroup) Delete(ctx context.Context) error

func (*SElbBackendGroup) GetGlobalId

func (self *SElbBackendGroup) GetGlobalId() string

func (*SElbBackendGroup) GetHealthCheck

func (self *SElbBackendGroup) GetHealthCheck() (*cloudprovider.SLoadbalancerHealthCheck, error)

func (*SElbBackendGroup) GetILoadbalancer

func (self *SElbBackendGroup) GetILoadbalancer() cloudprovider.ICloudLoadbalancer

func (*SElbBackendGroup) GetILoadbalancerBackendById

func (self *SElbBackendGroup) GetILoadbalancerBackendById(serverId string) (cloudprovider.ICloudLoadbalancerBackend, error)

func (*SElbBackendGroup) GetILoadbalancerBackends

func (self *SElbBackendGroup) GetILoadbalancerBackends() ([]cloudprovider.ICloudLoadbalancerBackend, error)

func (*SElbBackendGroup) GetId

func (self *SElbBackendGroup) GetId() string

func (*SElbBackendGroup) GetLoadbalancerId

func (self *SElbBackendGroup) GetLoadbalancerId() string

func (*SElbBackendGroup) GetName

func (self *SElbBackendGroup) GetName() string

func (*SElbBackendGroup) GetProjectId

func (self *SElbBackendGroup) GetProjectId() string

func (*SElbBackendGroup) GetProtocolType

func (self *SElbBackendGroup) GetProtocolType() string

func (*SElbBackendGroup) GetScheduler

func (self *SElbBackendGroup) GetScheduler() string

func (*SElbBackendGroup) GetStatus

func (self *SElbBackendGroup) GetStatus() string

func (*SElbBackendGroup) GetStickySession

func (self *SElbBackendGroup) GetStickySession() (*cloudprovider.SLoadbalancerStickySession, error)

func (*SElbBackendGroup) GetType

func (self *SElbBackendGroup) GetType() string

func (*SElbBackendGroup) IsDefault

func (self *SElbBackendGroup) IsDefault() bool

func (*SElbBackendGroup) IsEmulated

func (self *SElbBackendGroup) IsEmulated() bool

func (*SElbBackendGroup) Refresh

func (self *SElbBackendGroup) Refresh() error

func (*SElbBackendGroup) RemoveBackendServer

func (self *SElbBackendGroup) RemoveBackendServer(backendId string, weight int, port int) error

func (*SElbBackendGroup) Sync

type SElbCert

type SElbCert struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

	Certificate  string    `json:"certificate"`
	CreateTime   time.Time `json:"create_time"`
	ExpireTime   time.Time `json:"expire_time"`
	Description  string    `json:"description"`
	Domain       string    `json:"domain"`
	ID           string    `json:"id"`
	AdminStateUp bool      `json:"admin_state_up"`
	TenantID     string    `json:"tenant_id"`
	Name         string    `json:"name"`
	PrivateKey   string    `json:"private_key"`
	Type         string    `json:"type"`
	UpdateTime   time.Time `json:"update_time"`
	// contains filtered or unexported fields
}

func (*SElbCert) Delete

func (self *SElbCert) Delete() error

func (*SElbCert) GetCommonName

func (self *SElbCert) GetCommonName() string

func (*SElbCert) GetExpireTime

func (self *SElbCert) GetExpireTime() time.Time

func (*SElbCert) GetFingerprint

func (self *SElbCert) GetFingerprint() string

func (*SElbCert) GetGlobalId

func (self *SElbCert) GetGlobalId() string

func (*SElbCert) GetId

func (self *SElbCert) GetId() string

func (*SElbCert) GetName

func (self *SElbCert) GetName() string

func (*SElbCert) GetPrivateKey

func (self *SElbCert) GetPrivateKey() string

func (*SElbCert) GetProjectId

func (self *SElbCert) GetProjectId() string

func (*SElbCert) GetPublickKey

func (self *SElbCert) GetPublickKey() string

func (*SElbCert) GetStatus

func (self *SElbCert) GetStatus() string

func (*SElbCert) GetSubjectAlternativeNames

func (self *SElbCert) GetSubjectAlternativeNames() string

func (*SElbCert) IsEmulated

func (self *SElbCert) IsEmulated() bool

func (*SElbCert) Refresh

func (self *SElbCert) Refresh() error

func (*SElbCert) Sync

func (self *SElbCert) Sync(name, privateKey, publickKey string) error

type SElbHealthCheck

type SElbHealthCheck struct {
	Name          string `json:"name"`
	AdminStateUp  bool   `json:"admin_state_up"`
	TenantID      string `json:"tenant_id"`
	ProjectID     string `json:"project_id"`
	DomainName    string `json:"domain_name"`
	Delay         int    `json:"delay"`
	ExpectedCodes string `json:"expected_codes"`
	MaxRetries    int    `json:"max_retries"`
	HTTPMethod    string `json:"http_method"`
	Timeout       int    `json:"timeout"`
	Pools         []Pool `json:"pools"`
	URLPath       string `json:"url_path"`
	Type          string `json:"type"`
	ID            string `json:"id"`
	MonitorPort   int    `json:"monitor_port"`
	// contains filtered or unexported fields
}

type SElbListener

type SElbListener struct {
	multicloud.SResourceBase
	multicloud.SLoadbalancerRedirectBase
	huawei.HuaweiTags

	ProtocolPort           int            `json:"protocol_port"`
	Protocol               string         `json:"protocol"`
	Description            string         `json:"description"`
	AdminStateUp           bool           `json:"admin_state_up"`
	Http2Enable            bool           `json:"http2_enable"`
	Loadbalancers          []Loadbalancer `json:"loadbalancers"`
	TenantID               string         `json:"tenant_id"`
	ProjectID              string         `json:"project_id"`
	ConnectionLimit        int            `json:"connection_limit"`
	DefaultPoolID          string         `json:"default_pool_id"`
	ID                     string         `json:"id"`
	Name                   string         `json:"name"`
	CreatedAt              time.Time      `json:"created_at"`
	UpdatedAt              time.Time      `json:"updated_at"`
	InsertHeaders          InsertHeaders  `json:"insert_headers"`
	DefaultTlsContainerRef string         `json:"default_tls_container_ref"`
	// contains filtered or unexported fields
}

func (*SElbListener) ChangeCertificate

func (listerner *SElbListener) ChangeCertificate(ctx context.Context, opts *cloudprovider.ListenerCertificateOptions) error

func (*SElbListener) ChangeScheduler

func (*SElbListener) Delete

func (self *SElbListener) Delete(ctx context.Context) error

func (*SElbListener) GetAcl

func (self *SElbListener) GetAcl() (*SElbACL, error)

func (*SElbListener) GetAclId

func (self *SElbListener) GetAclId() string

func (*SElbListener) GetAclStatus

func (self *SElbListener) GetAclStatus() string

func (*SElbListener) GetAclType

func (self *SElbListener) GetAclType() string

func (*SElbListener) GetBackendConnectTimeout

func (self *SElbListener) GetBackendConnectTimeout() int

func (*SElbListener) GetBackendGroup

func (self *SElbListener) GetBackendGroup() (*SElbBackendGroup, error)

func (*SElbListener) GetBackendGroupId

func (self *SElbListener) GetBackendGroupId() string

func (*SElbListener) GetBackendServerPort

func (self *SElbListener) GetBackendServerPort() int

func (*SElbListener) GetCertificateId

func (self *SElbListener) GetCertificateId() string

func (*SElbListener) GetClientIdleTimeout

func (self *SElbListener) GetClientIdleTimeout() int

func (*SElbListener) GetEgressMbps

func (self *SElbListener) GetEgressMbps() int

func (*SElbListener) GetGlobalId

func (self *SElbListener) GetGlobalId() string

func (*SElbListener) GetHealthCheck

func (self *SElbListener) GetHealthCheck() string

func (*SElbListener) GetHealthCheckCode

func (self *SElbListener) GetHealthCheckCode() string

func (*SElbListener) GetHealthCheckDomain

func (self *SElbListener) GetHealthCheckDomain() string

func (*SElbListener) GetHealthCheckExp

func (self *SElbListener) GetHealthCheckExp() string

func (*SElbListener) GetHealthCheckFail

func (self *SElbListener) GetHealthCheckFail() int

func (*SElbListener) GetHealthCheckInterval

func (self *SElbListener) GetHealthCheckInterval() int

func (*SElbListener) GetHealthCheckReq

func (self *SElbListener) GetHealthCheckReq() string

func (*SElbListener) GetHealthCheckRise

func (self *SElbListener) GetHealthCheckRise() int

func (*SElbListener) GetHealthCheckTimeout

func (self *SElbListener) GetHealthCheckTimeout() int

func (*SElbListener) GetHealthCheckType

func (self *SElbListener) GetHealthCheckType() string

func (*SElbListener) GetHealthCheckURI

func (self *SElbListener) GetHealthCheckURI() string

func (*SElbListener) GetILoadBalancerListenerRuleById

func (self *SElbListener) GetILoadBalancerListenerRuleById(ruleId string) (cloudprovider.ICloudLoadbalancerListenerRule, error)

func (*SElbListener) GetILoadbalancerListenerRules

func (self *SElbListener) GetILoadbalancerListenerRules() ([]cloudprovider.ICloudLoadbalancerListenerRule, error)

func (*SElbListener) GetId

func (self *SElbListener) GetId() string

func (*SElbListener) GetListenerPort

func (self *SElbListener) GetListenerPort() int

func (*SElbListener) GetListenerType

func (self *SElbListener) GetListenerType() string

func (*SElbListener) GetName

func (self *SElbListener) GetName() string

func (*SElbListener) GetProjectId

func (self *SElbListener) GetProjectId() string

func (*SElbListener) GetScheduler

func (self *SElbListener) GetScheduler() string

func (*SElbListener) GetStatus

func (self *SElbListener) GetStatus() string

func (*SElbListener) GetStickySession

func (self *SElbListener) GetStickySession() string

func (*SElbListener) GetStickySessionCookie

func (self *SElbListener) GetStickySessionCookie() string

func (*SElbListener) GetStickySessionCookieTimeout

func (self *SElbListener) GetStickySessionCookieTimeout() int

func (*SElbListener) GetStickySessionType

func (self *SElbListener) GetStickySessionType() string

func (*SElbListener) GetTLSCipherPolicy

func (self *SElbListener) GetTLSCipherPolicy() string

func (*SElbListener) GzipEnabled

func (self *SElbListener) GzipEnabled() bool

func (*SElbListener) HTTP2Enabled

func (self *SElbListener) HTTP2Enabled() bool

func (*SElbListener) IsEmulated

func (self *SElbListener) IsEmulated() bool

func (*SElbListener) Refresh

func (self *SElbListener) Refresh() error

func (*SElbListener) SetAcl

func (listerner *SElbListener) SetAcl(ctx context.Context, opts *cloudprovider.ListenerAclOptions) error

func (*SElbListener) SetHealthCheck

func (self *SElbListener) SetHealthCheck(ctx context.Context, opts *cloudprovider.ListenerHealthCheckOptions) error

func (*SElbListener) Start

func (self *SElbListener) Start() error

func (*SElbListener) Stop

func (self *SElbListener) Stop() error

func (*SElbListener) XForwardedForEnabled

func (self *SElbListener) XForwardedForEnabled() bool

type SElbListenerPolicy

type SElbListenerPolicy struct {
	multicloud.SResourceBase
	multicloud.SLoadbalancerRedirectBase
	huawei.HuaweiTags

	RedirectPoolID     string  `json:"redirect_pool_id"`
	RedirectListenerID *string `json:"redirect_listener_id"`
	Description        string  `json:"description"`
	AdminStateUp       bool    `json:"admin_state_up"`
	Rules              []Rule  `json:"rules"`
	TenantID           string  `json:"tenant_id"`
	ProjectID          string  `json:"project_id"`
	ListenerID         string  `json:"listener_id"`
	RedirectURL        *string `json:"redirect_url"`
	ProvisioningStatus string  `json:"provisioning_status"`
	Action             string  `json:"action"`
	Position           int64   `json:"position"`
	ID                 string  `json:"id"`
	Name               string  `json:"name"`
	// contains filtered or unexported fields
}

func (*SElbListenerPolicy) Delete

func (self *SElbListenerPolicy) Delete(ctx context.Context) error

func (*SElbListenerPolicy) GetBackendGroupId

func (self *SElbListenerPolicy) GetBackendGroupId() string

func (*SElbListenerPolicy) GetCondition

func (self *SElbListenerPolicy) GetCondition() string

func (*SElbListenerPolicy) GetDomain

func (self *SElbListenerPolicy) GetDomain() string

func (*SElbListenerPolicy) GetGlobalId

func (self *SElbListenerPolicy) GetGlobalId() string

func (*SElbListenerPolicy) GetId

func (self *SElbListenerPolicy) GetId() string

func (*SElbListenerPolicy) GetName

func (self *SElbListenerPolicy) GetName() string

func (*SElbListenerPolicy) GetPath

func (self *SElbListenerPolicy) GetPath() string

func (*SElbListenerPolicy) GetProjectId

func (self *SElbListenerPolicy) GetProjectId() string

func (*SElbListenerPolicy) GetRules

func (self *SElbListenerPolicy) GetRules() ([]SElbListenerPolicyRule, error)

func (*SElbListenerPolicy) GetStatus

func (self *SElbListenerPolicy) GetStatus() string

负载均衡没有启用禁用操作

func (*SElbListenerPolicy) IsDefault

func (self *SElbListenerPolicy) IsDefault() bool

func (*SElbListenerPolicy) IsEmulated

func (self *SElbListenerPolicy) IsEmulated() bool

func (*SElbListenerPolicy) Refresh

func (self *SElbListenerPolicy) Refresh() error

type SElbListenerPolicyRule

type SElbListenerPolicyRule struct {
	CompareType        string      `json:"compare_type"`
	ProvisioningStatus string      `json:"provisioning_status"`
	AdminStateUp       bool        `json:"admin_state_up"`
	TenantID           string      `json:"tenant_id"`
	ProjectID          string      `json:"project_id"`
	Invert             bool        `json:"invert"`
	Value              string      `json:"value"`
	Key                interface{} `json:"key"`
	Type               string      `json:"type"`
	ID                 string      `json:"id"`
	// contains filtered or unexported fields
}

type SEnterpriseProject

type SEnterpriseProject struct {
	multicloud.SProjectBase
	huawei.HuaweiTags

	Id          string
	Name        string
	Description string
	Status      int
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

https://support.huaweicloud.com/api-em/zh-cn_topic_0121230880.html

func (*SEnterpriseProject) GetGlobalId

func (ep *SEnterpriseProject) GetGlobalId() string

func (*SEnterpriseProject) GetId

func (ep *SEnterpriseProject) GetId() string

func (*SEnterpriseProject) GetName

func (ep *SEnterpriseProject) GetName() string

func (*SEnterpriseProject) GetStatus

func (ep *SEnterpriseProject) GetStatus() string

type SEvent

type SEvent struct {
	TraceId      string
	Code         string
	TraceName    string
	ResourceType string
	ApiVersion   string
	SourceIp     string
	TraceType    string
	ServiceType  string
	EventType    string
	ProjectId    string
	Request      string
	Response     string
	TrackerName  string
	TraceStatus  string
	Time         int64
	ResourceId   string
	ResourceName string
	User         SUser
	RecordTime   int64
}

func (*SEvent) GetAccount

func (event *SEvent) GetAccount() string

func (*SEvent) GetAction

func (event *SEvent) GetAction() string

func (*SEvent) GetCreatedAt

func (event *SEvent) GetCreatedAt() time.Time

func (*SEvent) GetName

func (event *SEvent) GetName() string

func (*SEvent) GetRequest

func (event *SEvent) GetRequest() jsonutils.JSONObject

func (*SEvent) GetRequestId

func (event *SEvent) GetRequestId() string

func (*SEvent) GetResourceType

func (event *SEvent) GetResourceType() string

func (*SEvent) GetService

func (event *SEvent) GetService() string

func (*SEvent) IsSuccess

func (event *SEvent) IsSuccess() bool

type SFixedIP

type SFixedIP struct {
	IpAddress string
	SubnetID  string
	NetworkId string
}

func (*SFixedIP) GetGlobalId

func (fixip *SFixedIP) GetGlobalId() string

func (*SFixedIP) GetINetworkId

func (fixip *SFixedIP) GetINetworkId() string

func (*SFixedIP) GetIP

func (fixip *SFixedIP) GetIP() string

func (*SFixedIP) IsPrimary

func (fixip *SFixedIP) IsPrimary() bool

type SHa

type SHa struct {
	ReplicationMode string
}

type SHost

type SHost struct {
	multicloud.SHostBase

	// 华为私有云没有直接列出host的接口,所有账号下的host都是通过VM反向解析出来的
	// 当账号下没有虚拟机时,如果没有host,会导致调度找不到可用的HOST。
	// 因此,为了避免上述情况始终会在每个zone下返回一台虚拟的host
	IsFake bool

	Id   string
	Name string
	// contains filtered or unexported fields
}

func (*SHost) CreateVM

func (*SHost) GetAccessIp

func (self *SHost) GetAccessIp() string

func (*SHost) GetAccessMac

func (self *SHost) GetAccessMac() string

func (*SHost) GetCpuCount

func (self *SHost) GetCpuCount() int

func (*SHost) GetCpuDesc

func (self *SHost) GetCpuDesc() string

func (*SHost) GetCpuMhz

func (self *SHost) GetCpuMhz() int

func (*SHost) GetEnabled

func (self *SHost) GetEnabled() bool

func (*SHost) GetGlobalId

func (self *SHost) GetGlobalId() string

func (*SHost) GetHostStatus

func (self *SHost) GetHostStatus() string

func (*SHost) GetHostType

func (self *SHost) GetHostType() string

func (*SHost) GetIHostNics

func (host *SHost) GetIHostNics() ([]cloudprovider.ICloudHostNetInterface, error)

func (*SHost) GetIStorageById

func (self *SHost) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)

func (*SHost) GetIStorages

func (self *SHost) GetIStorages() ([]cloudprovider.ICloudStorage, error)

func (*SHost) GetIVMById

func (self *SHost) GetIVMById(id string) (cloudprovider.ICloudVM, error)

func (*SHost) GetIVMs

func (self *SHost) GetIVMs() ([]cloudprovider.ICloudVM, error)

func (*SHost) GetId

func (self *SHost) GetId() string

func (*SHost) GetInstanceById

func (self *SHost) GetInstanceById(instanceId string) (*SInstance, error)

func (*SHost) GetIsMaintenance

func (self *SHost) GetIsMaintenance() bool

func (*SHost) GetMemSizeMB

func (self *SHost) GetMemSizeMB() int

func (*SHost) GetName

func (self *SHost) GetName() string

func (*SHost) GetNodeCount

func (self *SHost) GetNodeCount() int8

func (*SHost) GetSN

func (self *SHost) GetSN() string

func (*SHost) GetStatus

func (self *SHost) GetStatus() string

func (*SHost) GetStorageSizeMB

func (self *SHost) GetStorageSizeMB() int64

func (*SHost) GetStorageType

func (self *SHost) GetStorageType() string

func (*SHost) GetSysInfo

func (self *SHost) GetSysInfo() jsonutils.JSONObject

func (*SHost) GetVersion

func (self *SHost) GetVersion() string

func (*SHost) IsEmulated

func (self *SHost) IsEmulated() bool

func (*SHost) Refresh

func (self *SHost) Refresh() error

type SHuaweiClient

type SHuaweiClient struct {
	*HuaweiClientConfig
	// contains filtered or unexported fields
}

func NewHuaweiClient

func NewHuaweiClient(cfg *HuaweiClientConfig) (*SHuaweiClient, error)

进行资源操作时参数account 对应数据库cloudprovider表中的account字段,由accessKey和projectID两部分组成,通过"/"分割。 初次导入Subaccount时,参数account对应cloudaccounts表中的account字段,即accesskey。此时projectID为空, 只能进行同步子账号、查询region列表等projectId无关的操作。

func (*SHuaweiClient) AddUserToGroup

func (self *SHuaweiClient) AddUserToGroup(groupId, userId string) error

func (*SHuaweiClient) AttachGroupCustomRole

func (self *SHuaweiClient) AttachGroupCustomRole(groupId, roleId string) error

func (*SHuaweiClient) AttachGroupRole

func (self *SHuaweiClient) AttachGroupRole(groupId, roleId string) error

func (*SHuaweiClient) CreateAKSK

func (self *SHuaweiClient) CreateAKSK(id, name string) (*cloudprovider.SAccessKey, error)

func (*SHuaweiClient) CreateClouduser

func (self *SHuaweiClient) CreateClouduser(name, password, desc string) (*SClouduser, error)

func (*SHuaweiClient) CreateExterpriseProject

func (self *SHuaweiClient) CreateExterpriseProject(name, desc string) (*SEnterpriseProject, error)

func (*SHuaweiClient) CreateGroup

func (self *SHuaweiClient) CreateGroup(name, desc string) (*SCloudgroup, error)

func (*SHuaweiClient) CreateICloudgroup

func (self *SHuaweiClient) CreateICloudgroup(name, desc string) (cloudprovider.ICloudgroup, error)

func (*SHuaweiClient) CreateICloudpolicy

func (*SHuaweiClient) CreateIClouduser

func (*SHuaweiClient) CreateIProject

func (self *SHuaweiClient) CreateIProject(name string) (cloudprovider.ICloudProject, error)

func (*SHuaweiClient) CreatePoolNetworks

func (self *SHuaweiClient) CreatePoolNetworks(cidr string) (jsonutils.JSONObject, error)

func (*SHuaweiClient) CreateSAMLProvider

func (self *SHuaweiClient) CreateSAMLProvider(opts *cloudprovider.SAMLProviderCreateOptions) (*SAMLProvider, error)

func (*SHuaweiClient) DeleteAKSK

func (self *SHuaweiClient) DeleteAKSK(accessKey string) error

func (*SHuaweiClient) DeleteClouduser

func (self *SHuaweiClient) DeleteClouduser(id string) error

func (*SHuaweiClient) DeleteGroup

func (self *SHuaweiClient) DeleteGroup(id string) error

func (*SHuaweiClient) DeleteSAMLProvider

func (self *SHuaweiClient) DeleteSAMLProvider(id string) error

func (*SHuaweiClient) DeleteSAMLProviderMapping

func (self *SHuaweiClient) DeleteSAMLProviderMapping(id string) error

func (*SHuaweiClient) DeleteSAMLProviderProtocol

func (self *SHuaweiClient) DeleteSAMLProviderProtocol(spId, id string) error

func (*SHuaweiClient) DetachGroupCustomRole

func (self *SHuaweiClient) DetachGroupCustomRole(groupId, roleId string) error

func (*SHuaweiClient) DetachGroupRole

func (self *SHuaweiClient) DetachGroupRole(groupId, roleId string) error

func (*SHuaweiClient) GetAKSK

func (self *SHuaweiClient) GetAKSK(id string) ([]cloudprovider.SAccessKey, error)

func (*SHuaweiClient) GetAccessEnv

func (self *SHuaweiClient) GetAccessEnv() string

func (*SHuaweiClient) GetAccountId

func (client *SHuaweiClient) GetAccountId() string

func (*SHuaweiClient) GetCapabilities

func (self *SHuaweiClient) GetCapabilities() []string

func (*SHuaweiClient) GetCloudRegionExternalIdPrefix

func (self *SHuaweiClient) GetCloudRegionExternalIdPrefix() string

func (*SHuaweiClient) GetCloudusers

func (self *SHuaweiClient) GetCloudusers(name string) ([]SClouduser, error)

func (*SHuaweiClient) GetCustomRole

func (self *SHuaweiClient) GetCustomRole(name string) (*SRole, error)

func (*SHuaweiClient) GetCustomRoles

func (self *SHuaweiClient) GetCustomRoles() ([]SRole, error)

func (*SHuaweiClient) GetDomains

func (self *SHuaweiClient) GetDomains() ([]SDomain, error)

func (*SHuaweiClient) GetEnterpriseProjects

func (self *SHuaweiClient) GetEnterpriseProjects() ([]SEnterpriseProject, error)

func (*SHuaweiClient) GetGroupRoles

func (self *SHuaweiClient) GetGroupRoles(groupId string) ([]SRole, error)

func (*SHuaweiClient) GetGroupUsers

func (self *SHuaweiClient) GetGroupUsers(groupId string) ([]SClouduser, error)

func (*SHuaweiClient) GetGroups

func (self *SHuaweiClient) GetGroups(domainId, name string) ([]SCloudgroup, error)

func (*SHuaweiClient) GetICloudSAMLProviders

func (self *SHuaweiClient) GetICloudSAMLProviders() ([]cloudprovider.ICloudSAMLProvider, error)

func (*SHuaweiClient) GetICloudgroupByName

func (self *SHuaweiClient) GetICloudgroupByName(name string) (cloudprovider.ICloudgroup, error)

func (*SHuaweiClient) GetICloudgroups

func (self *SHuaweiClient) GetICloudgroups() ([]cloudprovider.ICloudgroup, error)

func (*SHuaweiClient) GetIClouduserByName

func (self *SHuaweiClient) GetIClouduserByName(name string) (cloudprovider.IClouduser, error)

func (*SHuaweiClient) GetICloudusers

func (self *SHuaweiClient) GetICloudusers() ([]cloudprovider.IClouduser, error)

func (*SHuaweiClient) GetICustomCloudpolicies

func (self *SHuaweiClient) GetICustomCloudpolicies() ([]cloudprovider.ICloudpolicy, error)

func (*SHuaweiClient) GetIHostById

func (self *SHuaweiClient) GetIHostById(id string) (cloudprovider.ICloudHost, error)

func (*SHuaweiClient) GetIProjects

func (self *SHuaweiClient) GetIProjects() ([]cloudprovider.ICloudProject, error)

func (*SHuaweiClient) GetIRegionById

func (self *SHuaweiClient) GetIRegionById(id string) (cloudprovider.ICloudRegion, error)

func (*SHuaweiClient) GetIRegions

func (self *SHuaweiClient) GetIRegions() []cloudprovider.ICloudRegion

func (*SHuaweiClient) GetIStorageById

func (self *SHuaweiClient) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)

func (*SHuaweiClient) GetISystemCloudpolicies

func (self *SHuaweiClient) GetISystemCloudpolicies() ([]cloudprovider.ICloudpolicy, error)

func (*SHuaweiClient) GetIVpcById

func (self *SHuaweiClient) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)

func (*SHuaweiClient) GetIamLoginUrl

func (client *SHuaweiClient) GetIamLoginUrl() string

func (*SHuaweiClient) GetMetrics

func (*SHuaweiClient) GetMosProjectId

func (self *SHuaweiClient) GetMosProjectId() string

obs 权限必须赋予到mos project之上

func (*SHuaweiClient) GetMosRoles

func (self *SHuaweiClient) GetMosRoles(groupId string) ([]SRole, error)

func (*SHuaweiClient) GetOwnerId

func (self *SHuaweiClient) GetOwnerId() (string, error)

owner id == domain_id == account id

func (*SHuaweiClient) GetProjectById

func (self *SHuaweiClient) GetProjectById(projectId string) (SProject, error)

func (*SHuaweiClient) GetProjects

func (self *SHuaweiClient) GetProjects() ([]SProject, error)

func (*SHuaweiClient) GetRegion

func (self *SHuaweiClient) GetRegion(regionId string) *SRegion

func (*SHuaweiClient) GetRegions

func (self *SHuaweiClient) GetRegions() []SRegion

func (*SHuaweiClient) GetRole

func (self *SHuaweiClient) GetRole(name string) (*SRole, error)

func (*SHuaweiClient) GetRoles

func (self *SHuaweiClient) GetRoles(domainId, name string) ([]SRole, error)

func (*SHuaweiClient) GetSAMLProviderMetadata

func (self *SHuaweiClient) GetSAMLProviderMetadata(id string) (*SAMLProviderMetadata, error)

func (*SHuaweiClient) GetSAMLProviderProtocols

func (self *SHuaweiClient) GetSAMLProviderProtocols(id string) ([]SAMLProviderProtocol, error)

func (*SHuaweiClient) GetSamlEntityId

func (self *SHuaweiClient) GetSamlEntityId() string

func (*SHuaweiClient) GetSubAccounts

func (self *SHuaweiClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)

func (*SHuaweiClient) GetUserId

func (self *SHuaweiClient) GetUserId() (string, error)

func (*SHuaweiClient) GetVersion

func (self *SHuaweiClient) GetVersion() string

func (*SHuaweiClient) InitSAMLProviderMapping

func (self *SHuaweiClient) InitSAMLProviderMapping(spId string) error

func (*SHuaweiClient) ListSAMLProviderMappings

func (self *SHuaweiClient) ListSAMLProviderMappings() ([]SAMLProviderMapping, error)

func (*SHuaweiClient) ListSAMLProviders

func (self *SHuaweiClient) ListSAMLProviders() ([]SAMLProvider, error)

func (*SHuaweiClient) ListUserGroups

func (self *SHuaweiClient) ListUserGroups(userId string) ([]SCloudgroup, error)

func (*SHuaweiClient) RemoveUserFromGroup

func (self *SHuaweiClient) RemoveUserFromGroup(groupId, userId string) error

func (*SHuaweiClient) ResetClouduserPassword

func (self *SHuaweiClient) ResetClouduserPassword(id, password string) error

func (*SHuaweiClient) UpdateAccount

func (self *SHuaweiClient) UpdateAccount(accessKey, secret string) error

func (*SHuaweiClient) UpdateSAMLProviderMetadata

func (self *SHuaweiClient) UpdateSAMLProviderMetadata(id, metadata string) error

type SImage

type SImage struct {
	multicloud.SImageBase
	huawei.HuaweiTags

	Schema                 string    `json:"schema"`
	MinDiskGB              int64     `json:"min_disk"`
	CreatedAt              time.Time `json:"created_at"`
	ImageSourceType        string    `json:"__image_source_type"`
	ContainerFormat        string    `json:"container_format"`
	File                   string    `json:"file"`
	UpdatedAt              time.Time `json:"updated_at"`
	Protected              bool      `json:"protected"`
	Checksum               string    `json:"checksum"`
	ID                     string    `json:"id"`
	Isregistered           string    `json:"__isregistered"`
	MinRamMB               int       `json:"min_ram"`
	Lazyloading            string    `json:"__lazyloading"`
	Owner                  string    `json:"owner"`
	OSType                 string    `json:"__os_type"`
	Imagetype              string    `json:"__imagetype"`
	Visibility             string    `json:"visibility"`
	VirtualEnvType         string    `json:"virtual_env_type"`
	Platform               string    `json:"__platform"`
	SizeGB                 int       `json:"size"`
	ImageSize              int64     `json:"__image_size"`
	OSBit                  string    `json:"__os_bit"`
	OSVersion              string    `json:"__os_version"`
	Name                   string    `json:"name"`
	Self                   string    `json:"self"`
	DiskFormat             string    `json:"disk_format"`
	Status                 string    `json:"status"`
	SupportKVMFPGAType     string    `json:"__support_kvm_fpga_type"`
	SupportKVMNVMEHIGHIO   string    `json:"__support_nvme_highio"`
	SupportLargeMemory     string    `json:"__support_largememory"`
	SupportDiskIntensive   string    `json:"__support_diskintensive"`
	SupportHighPerformance string    `json:"__support_highperformance"`
	SupportXENGPUType      string    `json:"__support_xen_gpu_type"`
	SupportKVMGPUType      string    `json:"__support_kvm_gpu_type"`
	SupportGPUT4           string    `json:"__support_gpu_t4"`
	SupportKVMAscend310    string    `json:"__support_kvm_ascend_310"`
	SupportArm             string    `json:"__support_arm"`
	// contains filtered or unexported fields
}

https://support.huaweicloud.com/api-ims/zh-cn_topic_0020091565.html

func (*SImage) Delete

func (self *SImage) Delete(ctx context.Context) error

func (*SImage) GetBios

func (i *SImage) GetBios() cloudprovider.TBiosType

func (*SImage) GetCreatedAt

func (self *SImage) GetCreatedAt() time.Time

func (*SImage) GetFullOsName

func (self *SImage) GetFullOsName() string

func (*SImage) GetGlobalId

func (self *SImage) GetGlobalId() string

func (*SImage) GetIStoragecache

func (self *SImage) GetIStoragecache() cloudprovider.ICloudStoragecache

func (*SImage) GetId

func (self *SImage) GetId() string

func (*SImage) GetImageFormat

func (self *SImage) GetImageFormat() string

func (*SImage) GetImageStatus

func (self *SImage) GetImageStatus() string

func (*SImage) GetImageType

func (self *SImage) GetImageType() cloudprovider.TImageType

func (*SImage) GetMinOsDiskSizeGb

func (self *SImage) GetMinOsDiskSizeGb() int

func (*SImage) GetMinRamSizeMb

func (self *SImage) GetMinRamSizeMb() int

func (*SImage) GetName

func (self *SImage) GetName() string

func (*SImage) GetOsArch

func (self *SImage) GetOsArch() string

func (*SImage) GetOsDist

func (self *SImage) GetOsDist() string

func (*SImage) GetOsLang

func (self *SImage) GetOsLang() string

func (*SImage) GetOsType

func (self *SImage) GetOsType() cloudprovider.TOsType

func (*SImage) GetOsVersion

func (self *SImage) GetOsVersion() string

func (*SImage) GetSizeByte

func (self *SImage) GetSizeByte() int64

func (*SImage) GetStatus

func (self *SImage) GetStatus() string

func (*SImage) IsEmulated

func (self *SImage) IsEmulated() bool

func (*SImage) Refresh

func (self *SImage) Refresh() error

type SInstance

type SInstance struct {
	multicloud.SInstanceBase
	huawei.HuaweiTags

	ID          string                 `json:"id"`
	Name        string                 `json:"name"`
	Addresses   map[string][]IpAddress `json:"addresses"`
	Flavor      Flavor                 `json:"flavor"`
	AccessIPv4  string                 `json:"accessIPv4"`
	AccessIPv6  string                 `json:"accessIPv6"`
	Status      string                 `json:"status"`
	Progress    string                 `json:"progress"`
	HostID      string                 `json:"hostId"`
	Updated     string                 `json:"updated"`
	Created     time.Time              `json:"created"`
	Metadata    VMMetadata             `json:"metadata"`
	Description string                 `json:"description"`
	Locked      bool                   `json:"locked"`
	ConfigDrive string                 `json:"config_drive"`
	TenantID    string                 `json:"tenant_id"`
	UserID      string                 `json:"user_id"`
	KeyName     string                 `json:"key_name"`

	OSExtendedVolumesVolumesAttached []OSExtendedVolumesVolumesAttached `json:"os-extended-volumes:volumes_attached"`
	OSEXTSTSTaskState                string                             `json:"OS-EXT-STS:task_state"`
	OSEXTSTSPowerState               int64                              `json:"OS-EXT-STS:power_state"`
	OSEXTSTSVMState                  string                             `json:"OS-EXT-STS:vm_state"`
	OSEXTSRVATTRHost                 string                             `json:"OS-EXT-SRV-ATTR:host"`
	OSEXTSRVATTRInstanceName         string                             `json:"OS-EXT-SRV-ATTR:instance_name"`
	OSEXTSRVATTRHypervisorHostname   string                             `json:"OS-EXT-SRV-ATTR:hypervisor_hostname"`
	OSDCFDiskConfig                  string                             `json:"OS-DCF:diskConfig"`
	OSEXTAZAvailabilityZone          string                             `json:"OS-EXT-AZ:availability_zone"`
	OSSchedulerHints                 OSSchedulerHints                   `json:"os:scheduler_hints"`
	OSEXTSRVATTRRootDeviceName       string                             `json:"OS-EXT-SRV-ATTR:root_device_name"`
	OSEXTSRVATTRRamdiskID            string                             `json:"OS-EXT-SRV-ATTR:ramdisk_id"`
	EnterpriseProjectID              string                             `json:"enterprise_project_id"`
	OSEXTSRVATTRUserData             string                             `json:"OS-EXT-SRV-ATTR:user_data"`
	OSSRVUSGLaunchedAt               time.Time                          `json:"OS-SRV-USG:launched_at"`
	OSEXTSRVATTRKernelID             string                             `json:"OS-EXT-SRV-ATTR:kernel_id"`
	OSEXTSRVATTRLaunchIndex          int64                              `json:"OS-EXT-SRV-ATTR:launch_index"`
	HostStatus                       string                             `json:"host_status"`
	OSEXTSRVATTRReservationID        string                             `json:"OS-EXT-SRV-ATTR:reservation_id"`
	OSEXTSRVATTRHostname             string                             `json:"OS-EXT-SRV-ATTR:hostname"`
	OSSRVUSGTerminatedAt             time.Time                          `json:"OS-SRV-USG:terminated_at"`
	SysTags                          []SysTag                           `json:"sys_tags"`
	SecurityGroups                   []SecurityGroup                    `json:"security_groups"`
	EnterpriseProjectId              string
	// contains filtered or unexported fields
}

https://support.huaweicloud.com/api-ecs/zh-cn_topic_0094148849.html https://support.huaweicloud.com/api-bpconsole/zh-cn_topic_0100166287.html v1.1 支持创建包年/包月的弹性云服务器

func (*SInstance) AttachDisk

func (self *SInstance) AttachDisk(ctx context.Context, diskId string) error

func (*SInstance) ChangeConfig

func (self *SInstance) ChangeConfig(ctx context.Context, config *cloudprovider.SManagedVMChangeConfig) error

func (*SInstance) DeleteVM

func (self *SInstance) DeleteVM(ctx context.Context) error

func (*SInstance) DeployVM

func (*SInstance) DetachDisk

func (self *SInstance) DetachDisk(ctx context.Context, diskId string) error

func (*SInstance) GetBillingType

func (self *SInstance) GetBillingType() string

func (*SInstance) GetBios

func (i *SInstance) GetBios() cloudprovider.TBiosType

func (*SInstance) GetBootOrder

func (self *SInstance) GetBootOrder() string

func (*SInstance) GetCreatedAt

func (self *SInstance) GetCreatedAt() time.Time

func (*SInstance) GetDescription

func (self *SInstance) GetDescription() string

func (*SInstance) GetError

func (self *SInstance) GetError() error

func (*SInstance) GetExpiredAt

func (self *SInstance) GetExpiredAt() time.Time

charging_mode “0”:按需计费 “1”:按包年包月计费

func (*SInstance) GetFullOsName

func (self *SInstance) GetFullOsName() string

func (*SInstance) GetGlobalId

func (self *SInstance) GetGlobalId() string

func (*SInstance) GetHostname

func (self *SInstance) GetHostname() string

func (*SInstance) GetHypervisor

func (self *SInstance) GetHypervisor() string

func (*SInstance) GetIDisks

func (self *SInstance) GetIDisks() ([]cloudprovider.ICloudDisk, error)

func (*SInstance) GetIEIP

func (self *SInstance) GetIEIP() (cloudprovider.ICloudEIP, error)

func (*SInstance) GetIHost

func (self *SInstance) GetIHost() cloudprovider.ICloudHost

func (*SInstance) GetIHostId

func (self *SInstance) GetIHostId() string

func (*SInstance) GetINics

func (self *SInstance) GetINics() ([]cloudprovider.ICloudNic, error)

func (*SInstance) GetId

func (self *SInstance) GetId() string

func (*SInstance) GetInstanceType

func (self *SInstance) GetInstanceType() string

func (*SInstance) GetMachine

func (self *SInstance) GetMachine() string

func (*SInstance) GetName

func (self *SInstance) GetName() string

func (*SInstance) GetOsArch

func (self *SInstance) GetOsArch() string

func (*SInstance) GetOsDist

func (i *SInstance) GetOsDist() string

func (*SInstance) GetOsLang

func (i *SInstance) GetOsLang() string

func (*SInstance) GetOsType

func (self *SInstance) GetOsType() cloudprovider.TOsType

func (*SInstance) GetOsVersion

func (i *SInstance) GetOsVersion() string

func (*SInstance) GetPowerStates

func (ins *SInstance) GetPowerStates() string

func (*SInstance) GetProjectId

func (self *SInstance) GetProjectId() string

func (*SInstance) GetSecurityGroupIds

func (self *SInstance) GetSecurityGroupIds() ([]string, error)

func (*SInstance) GetStatus

func (self *SInstance) GetStatus() string

func (*SInstance) GetVNCInfo

todo:// 返回jsonobject感觉很诡异。不能直接知道内部细节

func (*SInstance) GetVcpuCount

func (self *SInstance) GetVcpuCount() int

func (*SInstance) GetVdi

func (self *SInstance) GetVdi() string

func (*SInstance) GetVga

func (self *SInstance) GetVga() string

func (*SInstance) GetVmemSizeMB

func (self *SInstance) GetVmemSizeMB() int

func (*SInstance) IsEmulated

func (self *SInstance) IsEmulated() bool

func (*SInstance) NextDeviceName

func (self *SInstance) NextDeviceName() (string, error)

func (*SInstance) RebuildRoot

https://support.huaweicloud.com/api-ecs/zh-cn_topic_0067876349.html 使用原镜像重装 https://support.huaweicloud.com/api-ecs/zh-cn_topic_0067876971.html 更换系统盘操作系统 不支持调整系统盘大小

func (*SInstance) Refresh

func (self *SInstance) Refresh() error

func (*SInstance) Renew

func (self *SInstance) Renew(bc billing.SBillingCycle) error

func (*SInstance) SaveImage

func (*SInstance) SetSecurityGroups

func (self *SInstance) SetSecurityGroups(secgroupIds []string) error

func (*SInstance) SetTags

func (self *SInstance) SetTags(tags map[string]string, replace bool) error

func (*SInstance) StartVM

func (self *SInstance) StartVM(ctx context.Context) error

func (*SInstance) StopVM

func (self *SInstance) StopVM(ctx context.Context, opts *cloudprovider.ServerStopOptions) error

func (*SInstance) UpdateUserData

func (self *SInstance) UpdateUserData(userData string) error

https://support.huaweicloud.com/usermanual-ecs/zh-cn_topic_0032380449.html 创建云服务器过程中注入用户数据。支持注入文本、文本文件或gzip文件。 注入内容,需要进行base64格式编码。注入内容(编码之前的内容)最大长度32KB。 对于Linux弹性云服务器,adminPass参数传入时,user_data参数不生效。

func (*SInstance) UpdateVM

type SInstanceNic

type SInstanceNic struct {
	cloudprovider.DummyICloudNic
	// contains filtered or unexported fields
}

func (*SInstanceNic) GetDriver

func (self *SInstanceNic) GetDriver() string

func (*SInstanceNic) GetINetworkId

func (self *SInstanceNic) GetINetworkId() string

func (*SInstanceNic) GetIP

func (self *SInstanceNic) GetIP() string

func (*SInstanceNic) GetId

func (self *SInstanceNic) GetId() string

func (*SInstanceNic) GetMAC

func (self *SInstanceNic) GetMAC() string

func (*SInstanceNic) InClassicNetwork

func (self *SInstanceNic) InClassicNetwork() bool

type SInstanceType

type SInstanceType struct {
	multicloud.SResourceBase
	ID                     string       `json:"id"`
	Name                   string       `json:"name"`
	Vcpus                  string       `json:"vcpus"`
	RamMB                  int          `json:"ram"` // 内存大小
	Disk                   string       `json:"disk"`
	Swap                   string       `json:"swap"`
	OSFLVEXTDATAEphemeral  int64        `json:"OS-FLV-EXT-DATA:ephemeral"`
	RxtxFactor             int64        `json:"rxtx_factor"`
	OSFLVDISABLEDDisabled  bool         `json:"OS-FLV-DISABLED:disabled"`
	OSFlavorAccessIsPublic bool         `json:"os-flavor-access:is_public"`
	OSExtraSpecs           OSExtraSpecs `json:"os_extra_specs"` // 扩展规格
}

https://support.huaweicloud.com/api-ecs/zh-cn_topic_0020212656.html

func (*SInstanceType) Delete

func (self *SInstanceType) Delete() error

func (*SInstanceType) GetAttachedDiskCount

func (self *SInstanceType) GetAttachedDiskCount() int

func (*SInstanceType) GetAttachedDiskSizeGB

func (self *SInstanceType) GetAttachedDiskSizeGB() int

func (*SInstanceType) GetAttachedDiskType

func (self *SInstanceType) GetAttachedDiskType() string

func (*SInstanceType) GetCpuCoreCount

func (self *SInstanceType) GetCpuCoreCount() int

func (*SInstanceType) GetDataDiskMaxCount

func (self *SInstanceType) GetDataDiskMaxCount() int

func (*SInstanceType) GetDataDiskTypes

func (self *SInstanceType) GetDataDiskTypes() string

func (*SInstanceType) GetGlobalId

func (self *SInstanceType) GetGlobalId() string

func (*SInstanceType) GetGpuAttachable

func (self *SInstanceType) GetGpuAttachable() bool

func (*SInstanceType) GetGpuCount

func (self *SInstanceType) GetGpuCount() string

func (*SInstanceType) GetGpuMaxCount

func (self *SInstanceType) GetGpuMaxCount() int

func (*SInstanceType) GetGpuSpec

func (self *SInstanceType) GetGpuSpec() string

func (*SInstanceType) GetId

func (self *SInstanceType) GetId() string

func (*SInstanceType) GetInstanceTypeCategory

func (self *SInstanceType) GetInstanceTypeCategory() string

func (*SInstanceType) GetInstanceTypeFamily

func (self *SInstanceType) GetInstanceTypeFamily() string

func (*SInstanceType) GetMemorySizeMB

func (self *SInstanceType) GetMemorySizeMB() int

func (*SInstanceType) GetName

func (self *SInstanceType) GetName() string

func (*SInstanceType) GetNicMaxCount

func (self *SInstanceType) GetNicMaxCount() int

func (*SInstanceType) GetNicType

func (self *SInstanceType) GetNicType() string

func (*SInstanceType) GetOsName

func (self *SInstanceType) GetOsName() string

func (*SInstanceType) GetPostpaidStatus

func (self *SInstanceType) GetPostpaidStatus() string

func (*SInstanceType) GetPrepaidStatus

func (self *SInstanceType) GetPrepaidStatus() string

func (*SInstanceType) GetStatus

func (self *SInstanceType) GetStatus() string

func (*SInstanceType) GetSysDiskMaxSizeGB

func (self *SInstanceType) GetSysDiskMaxSizeGB() int

func (*SInstanceType) GetSysDiskMinSizeGB

func (self *SInstanceType) GetSysDiskMinSizeGB() int

func (*SInstanceType) GetSysDiskResizable

func (self *SInstanceType) GetSysDiskResizable() bool

func (*SInstanceType) GetSysDiskType

func (self *SInstanceType) GetSysDiskType() string

func (*SInstanceType) GetSysTags

func (self *SInstanceType) GetSysTags() map[string]string

func (*SInstanceType) GetTags

func (self *SInstanceType) GetTags() (map[string]string, error)

func (*SInstanceType) IsEmulated

func (self *SInstanceType) IsEmulated() bool

func (*SInstanceType) Refresh

func (self *SInstanceType) Refresh() error

func (*SInstanceType) SetTags

func (self *SInstanceType) SetTags(tags map[string]string, replace bool) error

type SJob

type SJob struct {
	Status     string            `json:"status"`
	Entities   map[string]string `json:"entities"`
	JobID      string            `json:"job_id"`
	JobType    string            `json:"job_type"`
	BeginTime  string            `json:"begin_time"`
	EndTime    string            `json:"end_time"`
	ErrorCode  string            `json:"error_code"`
	FailReason string            `json:"fail_reason"`
}

type SKeypair

type SKeypair struct {
	Fingerprint string `json:"fingerprint"`
	Name        string `json:"name"`
	PublicKey   string `json:"public_key"`
}

https://support.huaweicloud.com/api-ecs/zh-cn_topic_0020212676.html

type SLink struct {
	Next     string
	Previous string
	Self     string
}

type SLoadbalancer

type SLoadbalancer struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

	Description        string     `json:"description"`
	ProvisioningStatus string     `json:"provisioning_status"`
	TenantID           string     `json:"tenant_id"`
	ProjectID          string     `json:"project_id"`
	AdminStateUp       bool       `json:"admin_state_up"`
	Provider           string     `json:"provider"`
	Pools              []Pool     `json:"pools"`
	Listeners          []Listener `json:"listeners"`
	VipPortID          string     `json:"vip_port_id"`
	OperatingStatus    string     `json:"operating_status"`
	VipAddress         string     `json:"vip_address"`
	VipSubnetID        string     `json:"vip_subnet_id"`
	ID                 string     `json:"id"`
	Name               string     `json:"name"`
	CreatedAt          time.Time  `json:"created_at"`
	UpdatedAt          time.Time  `json:"updated_at"`
	// contains filtered or unexported fields
}

func (*SLoadbalancer) GetAddress

func (self *SLoadbalancer) GetAddress() string

func (*SLoadbalancer) GetAddressType

func (self *SLoadbalancer) GetAddressType() string

todo: api.LB_ADDR_TYPE_INTERNET?

func (*SLoadbalancer) GetChargeType

func (self *SLoadbalancer) GetChargeType() string

func (*SLoadbalancer) GetEgressMbps

func (self *SLoadbalancer) GetEgressMbps() int

func (*SLoadbalancer) GetEip

func (self *SLoadbalancer) GetEip() *SEipAddress

func (*SLoadbalancer) GetGlobalId

func (self *SLoadbalancer) GetGlobalId() string

func (*SLoadbalancer) GetIEIP

func (self *SLoadbalancer) GetIEIP() (cloudprovider.ICloudEIP, error)

func (*SLoadbalancer) GetILoadBalancerBackendGroups

func (self *SLoadbalancer) GetILoadBalancerBackendGroups() ([]cloudprovider.ICloudLoadbalancerBackendGroup, error)

func (*SLoadbalancer) GetILoadBalancerListenerById

func (self *SLoadbalancer) GetILoadBalancerListenerById(listenerId string) (cloudprovider.ICloudLoadbalancerListener, error)

func (*SLoadbalancer) GetILoadBalancerListeners

func (self *SLoadbalancer) GetILoadBalancerListeners() ([]cloudprovider.ICloudLoadbalancerListener, error)

func (*SLoadbalancer) GetId

func (self *SLoadbalancer) GetId() string

func (*SLoadbalancer) GetLoadbalancerSpec

func (self *SLoadbalancer) GetLoadbalancerSpec() string

func (*SLoadbalancer) GetName

func (self *SLoadbalancer) GetName() string

func (*SLoadbalancer) GetNetwork

func (self *SLoadbalancer) GetNetwork() *SNetwork

func (*SLoadbalancer) GetNetworkIds

func (self *SLoadbalancer) GetNetworkIds() []string

func (*SLoadbalancer) GetNetworkType

func (self *SLoadbalancer) GetNetworkType() string

func (*SLoadbalancer) GetProjectId

func (self *SLoadbalancer) GetProjectId() string

func (*SLoadbalancer) GetStatus

func (self *SLoadbalancer) GetStatus() string

func (*SLoadbalancer) GetVpcId

func (self *SLoadbalancer) GetVpcId() string

func (*SLoadbalancer) GetZone1Id

func (self *SLoadbalancer) GetZone1Id() string

func (*SLoadbalancer) GetZoneId

func (self *SLoadbalancer) GetZoneId() string

func (*SLoadbalancer) IsEmulated

func (self *SLoadbalancer) IsEmulated() bool

func (*SLoadbalancer) Refresh

func (self *SLoadbalancer) Refresh() error

func (*SLoadbalancer) SetTags

func (self *SLoadbalancer) SetTags(tags map[string]string, replace bool) error

func (*SLoadbalancer) Start

func (self *SLoadbalancer) Start() error

func (*SLoadbalancer) Stop

func (self *SLoadbalancer) Stop() error

type SModelartsDataPoints

type SModelartsDataPoints struct {
	Timestamp  int64
	Unit       string
	Statistics []ModelartsStatistics
}

type SModelartsDimensions

type SModelartsDimensions struct {
	Name  string
	Value string
}

type SModelartsMetric

type SModelartsMetric struct {
	Metric     SModelartsMetricInfo   `json:"metric"`
	Datapoints []SModelartsDataPoints `json:"dataPoints"`
}

type SModelartsMetricInfo

type SModelartsMetricInfo struct {
	Dimensions []SModelartsDimensions `json:"dimensions"`
	MetricName string
	Namespace  string
}

type SModelartsMetrics

type SModelartsMetrics struct {
	Metrics []SModelartsMetric `json:"metrics"`
}

type SModelartsNetworkSpce

type SModelartsNetworkSpce struct {
	Cidr string `json:"cidr"`
}

type SModelartsNetworkStatus

type SModelartsNetworkStatus struct {
	Phase string `json:"phase"`
}

type SModelartsPool

type SModelartsPool struct {
	multicloud.SResourceBase

	Metadata     SModelartsPoolMetadata `json:"metadata"`
	Spec         SModelartsPoolSpec     `json:"spec"`
	Status       SModelartsPoolStatus   `json:"status"`
	InstanceType string
	WorkType     string
	// contains filtered or unexported fields
}

func (*SModelartsPool) ChangeConfig

func (*SModelartsPool) Delete

func (self *SModelartsPool) Delete() error

func (*SModelartsPool) GetBillingType

func (self *SModelartsPool) GetBillingType() string

func (*SModelartsPool) GetCreatedAt

func (self *SModelartsPool) GetCreatedAt() time.Time

func (*SModelartsPool) GetExpiredAt

func (self *SModelartsPool) GetExpiredAt() time.Time

func (*SModelartsPool) GetGlobalId

func (self *SModelartsPool) GetGlobalId() string

func (*SModelartsPool) GetId

func (self *SModelartsPool) GetId() string

func (*SModelartsPool) GetInstanceType

func (self *SModelartsPool) GetInstanceType() string

func (*SModelartsPool) GetName

func (self *SModelartsPool) GetName() string

func (*SModelartsPool) GetNodeCount

func (self *SModelartsPool) GetNodeCount() int

func (*SModelartsPool) GetProjectId

func (self *SModelartsPool) GetProjectId() string

获取资源归属项目Id

func (*SModelartsPool) GetStatus

func (self *SModelartsPool) GetStatus() string

func (*SModelartsPool) GetStatusMessage

func (self *SModelartsPool) GetStatusMessage() string

func (*SModelartsPool) GetSysTags

func (self *SModelartsPool) GetSysTags() map[string]string

func (*SModelartsPool) GetTags

func (self *SModelartsPool) GetTags() (map[string]string, error)

func (*SModelartsPool) GetWorkType

func (self *SModelartsPool) GetWorkType() string

func (*SModelartsPool) IsAutoRenew

func (self *SModelartsPool) IsAutoRenew() bool

func (*SModelartsPool) IsEmulated

func (self *SModelartsPool) IsEmulated() bool

func (*SModelartsPool) Refresh

func (self *SModelartsPool) Refresh() error

func (*SModelartsPool) RefreshForCreate

func (self *SModelartsPool) RefreshForCreate() error

func (*SModelartsPool) Renew

func (self *SModelartsPool) Renew(bc billing.SBillingCycle) error

func (*SModelartsPool) SetAutoRenew

func (self *SModelartsPool) SetAutoRenew(bc billing.SBillingCycle) error

func (*SModelartsPool) SetTags

func (self *SModelartsPool) SetTags(tags map[string]string, replace bool) error

type SModelartsPoolMeatadataLabel

type SModelartsPoolMeatadataLabel struct {
	WorkspaceId string `json:"os.modelarts/workspace.id"`
	Name        string `json:"os.modelarts/name"`
	ResourceId  string `json:"os.modelarts/resource.id"`
}

type SModelartsPoolMetadata

type SModelartsPoolMetadata struct {
	Name              string `json:"name"`
	CreationTimestamp string `json:"creationTimestamp"`
	Labels            SModelartsPoolMeatadataLabel
	Annotations       SModelartsPoolMetadataAnnotations `json:"annotations"`
}

type SModelartsPoolMetadataAnnotations

type SModelartsPoolMetadataAnnotations struct {
	Describe          string `json:"os.modelarts/description"`
	BillingType       string `json:"os.modelarts/billing.mode"`
	BillingCycle      string `json:"os.modelarts/period.num"`
	BillingPeriodType string `json:"os.modelarts/period.type"`
	BillingMod        string `json:"os.modelarts/charging.mode"`
	BillingRenew      string `json:"os.modelarts/auto.renew"`
	OrderId           string `json:"os.modelarts/order.id"`
}

type SModelartsPoolNetwork

type SModelartsPoolNetwork struct {
	Metadata SModelartsPoolNetworkMetadata `json:"metadata"`
	Spec     SModelartsNetworkSpce         `json:"spec"`
	Status   SModelartsNetworkStatus       `json:"status"`
}

type SModelartsPoolNetworkMetadata

type SModelartsPoolNetworkMetadata struct {
	Name              string `json:"name"`
	CreationTimestamp string `json:"creationTimestamp"`
}

type SModelartsPoolResource

type SModelartsPoolResource struct {
	Flavor string `json:"flavor"`
	Count  int    `json:"count"`
	cloudprovider.Azs
}

type SModelartsPoolSku

type SModelartsPoolSku struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

	Kind     string                            `json:"kind"`
	Spec     SModelartsResourceflavorsSpec     `json:"spec"`
	Status   SModelartsResourceflavorsStatus   `json:"status"`
	Metadata SModelartsResourceflavorsMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

func (*SModelartsPoolSku) GetCpuArch

func (self *SModelartsPoolSku) GetCpuArch() string

func (*SModelartsPoolSku) GetCpuCoreCount

func (self *SModelartsPoolSku) GetCpuCoreCount() int

func (*SModelartsPoolSku) GetCreatedAt

func (self *SModelartsPoolSku) GetCreatedAt() time.Time

func (*SModelartsPoolSku) GetGlobalId

func (self *SModelartsPoolSku) GetGlobalId() string

func (*SModelartsPoolSku) GetGpuSize

func (self *SModelartsPoolSku) GetGpuSize() int

func (*SModelartsPoolSku) GetGpuType

func (self *SModelartsPoolSku) GetGpuType() string

func (*SModelartsPoolSku) GetId

func (self *SModelartsPoolSku) GetId() string

func (*SModelartsPoolSku) GetMemorySizeMB

func (self *SModelartsPoolSku) GetMemorySizeMB() int

func (*SModelartsPoolSku) GetName

func (self *SModelartsPoolSku) GetName() string

func (*SModelartsPoolSku) GetNpuSize

func (self *SModelartsPoolSku) GetNpuSize() int

func (*SModelartsPoolSku) GetNpuType

func (self *SModelartsPoolSku) GetNpuType() string

func (*SModelartsPoolSku) GetPoolType

func (self *SModelartsPoolSku) GetPoolType() string

func (*SModelartsPoolSku) GetProcessorType

func (sku *SModelartsPoolSku) GetProcessorType() string

func (*SModelartsPoolSku) GetStatus

func (self *SModelartsPoolSku) GetStatus() string

type SModelartsPoolSpec

type SModelartsPoolSpec struct {
	Type     string                   `json:"type"`
	Scope    []string                 `json:"scope"`
	Resource []SModelartsPoolResource `json:"resources"`
}

type SModelartsPoolStatus

type SModelartsPoolStatus struct {
	Phase    string      `json:"phase"`
	Message  string      `json:"message"`
	Resource SNodeStatus `json:"resources"`
}

type SModelartsResourceflavorsGpuSpec

type SModelartsResourceflavorsGpuSpec struct {
	Size int    `json:"size"`
	Type string `json:"type"`
}

type SModelartsResourceflavorsMetadata

type SModelartsResourceflavorsMetadata struct {
	Name string `json:"name"`
}

type SModelartsResourceflavorsSpec

type SModelartsResourceflavorsSpec struct {
	BillingCode  string                           `json:"billingCode"`
	BillingModes []int                            `json:"billingMods"`
	Cpu          int                              `json:"cpu"`
	CpuArch      string                           `json:"cpuArch"`
	Gpu          SModelartsResourceflavorsGpuSpec `json:"gpu"`
	Npu          SModelartsResourceflavorsGpuSpec `json:"npu"`
	Memory       string                           `json:"memory"`
	Type         string                           `json:"type"`
}

type SModelartsResourceflavorsStatus

type SModelartsResourceflavorsStatus struct {
	Phase map[string]interface{} `json:"phase"`
}

type SNatDEntry

type SNatDEntry struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

	ID           string `json:"id"`
	NatGatewayID string `json:"nat_gateway_id"`
	Protocol     string `json:"protocol"`
	Status       string `json:"status"`
	ExternalIP   string `json:"floating_ip_address"`
	ExternalPort int    `json:"external_service_port"`
	InternalIP   string `json:"private_ip"`
	InternalPort int    `json:"internal_service_port"`
	PortID       string `json:"port_id"`
	AdminStateUp bool   `json:"admin_state_up"`
	// contains filtered or unexported fields
}

func (*SNatDEntry) Delete

func (nat *SNatDEntry) Delete() error

func (*SNatDEntry) GetExternalIp

func (nat *SNatDEntry) GetExternalIp() string

func (*SNatDEntry) GetExternalPort

func (nat *SNatDEntry) GetExternalPort() int

func (*SNatDEntry) GetGlobalId

func (nat *SNatDEntry) GetGlobalId() string

func (*SNatDEntry) GetId

func (nat *SNatDEntry) GetId() string

func (*SNatDEntry) GetInternalIp

func (nat *SNatDEntry) GetInternalIp() string

func (*SNatDEntry) GetInternalPort

func (nat *SNatDEntry) GetInternalPort() int

func (*SNatDEntry) GetIpProtocol

func (nat *SNatDEntry) GetIpProtocol() string

func (*SNatDEntry) GetName

func (nat *SNatDEntry) GetName() string

func (*SNatDEntry) GetStatus

func (nat *SNatDEntry) GetStatus() string

func (*SNatDEntry) Refresh

func (nat *SNatDEntry) Refresh() error

type SNatGateway

type SNatGateway struct {
	multicloud.SNatGatewayBase
	huawei.HuaweiTags

	ID                string
	Name              string
	Description       string
	Spec              string
	Status            string
	InternalNetworkId string
	CreatedTime       string `json:"created_at"`
	// contains filtered or unexported fields
}

func (*SNatGateway) CreateINatDEntry

func (gateway *SNatGateway) CreateINatDEntry(rule cloudprovider.SNatDRule) (cloudprovider.ICloudNatDEntry, error)

func (*SNatGateway) CreateINatSEntry

func (gateway *SNatGateway) CreateINatSEntry(rule cloudprovider.SNatSRule) (cloudprovider.ICloudNatSEntry, error)

func (*SNatGateway) Delete

func (self *SNatGateway) Delete() error

func (*SNatGateway) GetBillingType

func (gateway *SNatGateway) GetBillingType() string

func (*SNatGateway) GetCreatedAt

func (gateway *SNatGateway) GetCreatedAt() time.Time

func (*SNatGateway) GetDescription

func (gateway *SNatGateway) GetDescription() string

func (*SNatGateway) GetExpiredAt

func (gateway *SNatGateway) GetExpiredAt() time.Time

func (*SNatGateway) GetGlobalId

func (gateway *SNatGateway) GetGlobalId() string

func (*SNatGateway) GetIEips

func (gateway *SNatGateway) GetIEips() ([]cloudprovider.ICloudEIP, error)

func (*SNatGateway) GetINatDEntryByID

func (gateway *SNatGateway) GetINatDEntryByID(id string) (cloudprovider.ICloudNatDEntry, error)

func (*SNatGateway) GetINatDTable

func (gateway *SNatGateway) GetINatDTable() ([]cloudprovider.ICloudNatDEntry, error)

func (*SNatGateway) GetINatSEntryByID

func (gateway *SNatGateway) GetINatSEntryByID(id string) (cloudprovider.ICloudNatSEntry, error)

func (*SNatGateway) GetINatSTable

func (gateway *SNatGateway) GetINatSTable() ([]cloudprovider.ICloudNatSEntry, error)

func (*SNatGateway) GetINetworkId

func (self *SNatGateway) GetINetworkId() string

func (*SNatGateway) GetId

func (gateway *SNatGateway) GetId() string

func (*SNatGateway) GetName

func (gateway *SNatGateway) GetName() string

func (*SNatGateway) GetNatSpec

func (gateway *SNatGateway) GetNatSpec() string

func (*SNatGateway) GetStatus

func (gateway *SNatGateway) GetStatus() string

func (*SNatGateway) Refresh

func (self *SNatGateway) Refresh() error

type SNatSEntry

type SNatSEntry struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

	ID           string `json:"id"`
	NatGatewayID string `json:"nat_gateway_id"`
	NetworkID    string `json:"network_id"`
	SourceCIDR   string `json:"cidr"`
	Status       string `json:"status"`
	SNatIP       string `json:"floating_ip_address"`
	AdminStateUp bool   `json:"admin_state_up"`
	// contains filtered or unexported fields
}

func (*SNatSEntry) Delete

func (nat *SNatSEntry) Delete() error

func (*SNatSEntry) GetGlobalId

func (nat *SNatSEntry) GetGlobalId() string

func (*SNatSEntry) GetIP

func (nat *SNatSEntry) GetIP() string

func (*SNatSEntry) GetId

func (nat *SNatSEntry) GetId() string

func (*SNatSEntry) GetName

func (nat *SNatSEntry) GetName() string

func (*SNatSEntry) GetNetworkId

func (nat *SNatSEntry) GetNetworkId() string

func (*SNatSEntry) GetSourceCIDR

func (nat *SNatSEntry) GetSourceCIDR() string

func (*SNatSEntry) GetStatus

func (nat *SNatSEntry) GetStatus() string

func (*SNatSEntry) Refresh

func (nat *SNatSEntry) Refresh() error

type SNatSku

type SNatSku struct {
	// contains filtered or unexported fields
}

func (*SNatSku) GetConns

func (self *SNatSku) GetConns() int

func (*SNatSku) GetDesc

func (self *SNatSku) GetDesc() string

func (*SNatSku) GetGlobalId

func (self *SNatSku) GetGlobalId() string

func (*SNatSku) GetName

func (self *SNatSku) GetName() string

func (*SNatSku) GetPostpaidStatus

func (self *SNatSku) GetPostpaidStatus() string

func (*SNatSku) GetPps

func (self *SNatSku) GetPps() int

func (*SNatSku) GetPrepaidStatus

func (self *SNatSku) GetPrepaidStatus() string

func (*SNatSku) GetThroughput

func (self *SNatSku) GetThroughput() int

type SNetwork

type SNetwork struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

	AvailabilityZone string   `json:"availability_zone"`
	CIDR             string   `json:"cidr"`
	DHCPEnable       bool     `json:"dhcp_enable"`
	DNSList          []string `json:"dnsList"`
	GatewayIP        string   `json:"gateway_ip"`
	ID               string   `json:"id"`
	Ipv6Enable       bool     `json:"ipv6_enable"`
	Name             string   `json:"name"`
	NeutronNetworkID string   `json:"neutron_network_id"`
	NeutronSubnetID  string   `json:"neutron_subnet_id"`
	PrimaryDNS       string   `json:"primary_dns"`
	SecondaryDNS     string   `json:"secondary_dns"`
	Status           string   `json:"status"`
	VpcID            string   `json:"vpc_id"`
	// contains filtered or unexported fields
}

https://support.huaweicloud.com/api-vpc/zh-cn_topic_0020090590.html

func (*SNetwork) Delete

func (self *SNetwork) Delete() error

func (*SNetwork) GetAllocTimeoutSeconds

func (self *SNetwork) GetAllocTimeoutSeconds() int

func (*SNetwork) GetGateway

func (self *SNetwork) GetGateway() string

func (*SNetwork) GetGlobalId

func (self *SNetwork) GetGlobalId() string

func (*SNetwork) GetIWire

func (self *SNetwork) GetIWire() cloudprovider.ICloudWire

func (*SNetwork) GetId

func (self *SNetwork) GetId() string

func (*SNetwork) GetIpEnd

func (self *SNetwork) GetIpEnd() string

func (*SNetwork) GetIpMask

func (self *SNetwork) GetIpMask() int8

func (*SNetwork) GetIpStart

func (self *SNetwork) GetIpStart() string

func (*SNetwork) GetIsPublic

func (self *SNetwork) GetIsPublic() bool

func (*SNetwork) GetName

func (self *SNetwork) GetName() string

func (*SNetwork) GetProjectId

func (self *SNetwork) GetProjectId() string

func (*SNetwork) GetPublicScope

func (self *SNetwork) GetPublicScope() rbacscope.TRbacScope

func (*SNetwork) GetServerType

func (self *SNetwork) GetServerType() string

func (*SNetwork) IsEmulated

func (self *SNetwork) IsEmulated() bool

func (*SNetwork) Refresh

func (self *SNetwork) Refresh() error

type SNodeFlavor

type SNodeFlavor struct {
	Flavor string `json:"flavor"`
	Count  int    `json:"count"`
}

type SNodeStatus

type SNodeStatus struct {
	Creating  []SNodeFlavor `json:"creating"`
	Available []SNodeFlavor `json:"available"`
	Abnormal  []SNodeFlavor `json:"abnormal"`
	Deleting  []SNodeFlavor `json:"deleting"`
}

type SNonde

type SNonde struct {
	AvailabilityZone string
	Id               string
	Name             string
	Role             string
	Staus            string
}

type SObject

type SObject struct {
	cloudprovider.SBaseCloudObject
	// contains filtered or unexported fields
}

func (*SObject) GetAcl

func (o *SObject) GetAcl() cloudprovider.TBucketACLType

func (*SObject) GetIBucket

func (o *SObject) GetIBucket() cloudprovider.ICloudBucket

func (*SObject) GetMeta

func (o *SObject) GetMeta() http.Header

func (*SObject) SetAcl

func (o *SObject) SetAcl(aclStr cloudprovider.TBucketACLType) error

func (*SObject) SetMeta

func (o *SObject) SetMeta(ctx context.Context, meta http.Header) error

type SOrder

type SOrder struct {
	ErrorCode *string     `json:"error_code"` // 只有失败时才返回此参数
	ErrorMsg  *string     `json:"error_msg"`  //只有失败时才返回此参数
	TotalSize int         `json:"totalSize"`  // 只有成功时才返回此参数
	Resources []SResource `json:"resources"`
}

type SPageInfo

type SPageInfo struct {
	NextMarker string
}

type SProfile

type SProfile struct {
	UserID    string `json:"user_id"`
	ProductID string `json:"product_id"`
	RegionID  string `json:"region_id"`
	OrderID   string `json:"order_id"`
}

type SProject

type SProject struct {
	IsDomain    bool   `json:"is_domain"`
	Description string `json:"description"`
	Enabled     bool   `json:"enabled"`
	ID          string `json:"id"`
	ParentID    string `json:"parent_id"`
	DomainID    string `json:"domain_id"`
	Name        string `json:"name"`
	// contains filtered or unexported fields
}

https://support.huaweicloud.com/api-iam/zh-cn_topic_0057845625.html

func (*SProject) GetDescription

func (self *SProject) GetDescription() string

func (*SProject) GetHealthStatus

func (self *SProject) GetHealthStatus() string

func (*SProject) GetRegionID

func (self *SProject) GetRegionID() string

type SQuota

type SQuota struct {
	Min   int
	Quota int
	Type  string
	Used  int
}

func (*SQuota) GetCurrentQuotaUsedCount

func (q *SQuota) GetCurrentQuotaUsedCount() int

func (*SQuota) GetDesc

func (q *SQuota) GetDesc() string

func (*SQuota) GetGlobalId

func (q *SQuota) GetGlobalId() string

func (*SQuota) GetMaxQuotaCount

func (q *SQuota) GetMaxQuotaCount() int

func (*SQuota) GetName

func (q *SQuota) GetName() string

func (*SQuota) GetQuotaType

func (q *SQuota) GetQuotaType() string

type SRdsNetwork

type SRdsNetwork struct {
	SubnetId string
	IP       string
}

type SRegion

type SRegion struct {
	multicloud.SRegion

	Description    string  `json:"description"`
	ID             string  `json:"id"`
	Locales        Locales `json:"locales"`
	ParentRegionID string  `json:"parent_region_id"`
	Type           string  `json:"type"`
	// contains filtered or unexported fields
}

https://support.huaweicloud.com/api-iam/zh-cn_topic_0067148043.html

func (*SRegion) AcceptVpcPeering

func (self *SRegion) AcceptVpcPeering(vpcPeeringId string) error

func (*SRegion) AddLoadBalancerBackend

func (self *SRegion) AddLoadBalancerBackend(backendGroupId, subnetId, ipaddr string, port, weight int) (SElbBackend, error)

https://support.huaweicloud.com/api-elb/zh-cn_topic_0096561556.html

func (*SRegion) AllocateEIP

func (self *SRegion) AllocateEIP(name string, bwMbps int, chargeType TInternetChargeType, bgpType string, projectId string) (*SEipAddress, error)

https://support.huaweicloud.com/api-vpc/zh-cn_topic_0020090596.html

func (*SRegion) AssociateEip

func (self *SRegion) AssociateEip(eipId string, instanceId string) error

func (*SRegion) AssociateEipWithPortId

func (self *SRegion) AssociateEipWithPortId(eipId string, portId string) error

func (*SRegion) AttachDisk

func (self *SRegion) AttachDisk(instanceId string, diskId string, device string) error

https://support.huaweicloud.com/api-ecs/zh-cn_topic_0022472987.html XEN平台虚拟机device为必选参数。

func (*SRegion) ChangeDBInstanceConfig

func (region *SRegion) ChangeDBInstanceConfig(instanceId string, instanceType string, diskSizeGb int) error

func (*SRegion) ChangeRoot

func (self *SRegion) ChangeRoot(ctx context.Context, userId, instanceId, imageId, passwd, publicKeyName, userData string) (string, error)

https://support.huaweicloud.com/api-ecs/zh-cn_topic_0067876971.html 返回job id

func (*SRegion) ChangeVMConfig

func (self *SRegion) ChangeVMConfig(instanceId string, instanceType string) error

https://support.huaweicloud.com/api-ecs/zh-cn_topic_0020212653.html

func (*SRegion) CreateDBInstanceAccount

func (region *SRegion) CreateDBInstanceAccount(instanceId, account, password string) error

func (*SRegion) CreateDBInstanceBackup

func (region *SRegion) CreateDBInstanceBackup(instanceId string, name string, descrition string, databases []string) (string, error)

func (*SRegion) CreateDBInstanceDatabase

func (region *SRegion) CreateDBInstanceDatabase(instanceId, database, characterSet string) error

func (*SRegion) CreateDisk

func (self *SRegion) CreateDisk(zoneId string, category string, name string, sizeGb int, snapshotId string, desc string, projectId string) (string, error)

https://support.huaweicloud.com/api-evs/zh-cn_topic_0058762427.html

func (*SRegion) CreateEIP

func (self *SRegion) CreateEIP(eip *cloudprovider.SEip) (cloudprovider.ICloudEIP, error)

https://support.huaweicloud.com/api-vpc/zh-cn_topic_0020090596.html size: 1Mbit/s~2000Mbit/s bgpType: 5_telcom,5_union,5_bgp,5_sbgp. 东北-大连:5_telcom、5_union 华南-广州:5_sbgp 华东-上海二:5_sbgp 华北-北京一:5_bgp、5_sbgp 亚太-香港:5_bgp

func (*SRegion) CreateIBucket

func (region *SRegion) CreateIBucket(name string, storageClassStr string, aclStr string) error

func (*SRegion) CreateICloudAccessGroup

func (self *SRegion) CreateICloudAccessGroup(opts *cloudprovider.SAccessGroup) (cloudprovider.ICloudAccessGroup, error)

func (*SRegion) CreateICloudFileSystem

func (self *SRegion) CreateICloudFileSystem(opts *cloudprovider.FileSystemCraeteOptions) (cloudprovider.ICloudFileSystem, error)

func (*SRegion) CreateILoadBalancer

func (self *SRegion) CreateILoadBalancer(loadbalancer *cloudprovider.SLoadbalancerCreateOptions) (cloudprovider.ICloudLoadbalancer, error)

func (*SRegion) CreateIModelartsPool

func (self *SRegion) CreateIModelartsPool(args *cloudprovider.ModelartsPoolCreateOption, callback func(id string)) (cloudprovider.ICloudModelartsPool, error)

func (*SRegion) CreateISecurityGroup

func (*SRegion) CreateInstance

func (self *SRegion) CreateInstance(name string, imageId string, instanceType string, SubnetId string,
	securityGroupIds []string, vpcId string, zoneId string, desc string, disks []SDisk, ipAddr string,
	keypair string, publicKey string, passwd string, userData string, bc *billing.SBillingCycle, projectId string, tags map[string]string) (string, error)

包月机器退订规则: https://support.huaweicloud.com/usermanual-billing/zh-cn_topic_0083138805.html 5天无理由全额退订:新购资源(不包含续费资源)在开通的五天内且退订次数不超过10次(每账号每年10次)的符合5天无理由全额退订。 非5天无理由退订:不符合5天无理由全额退订条件的退订,都属于非5天无理由退订。非5天无理由退订,不限制退订次数,但需要收取退订手续费。

退订资源的方法: https://support.huaweicloud.com/usermanual-billing/zh-cn_topic_0072297197.html

func (*SRegion) CreateLoadBalancerAcl

func (self *SRegion) CreateLoadBalancerAcl(acl *cloudprovider.SLoadbalancerAccessControlList) (SElbACL, error)

func (*SRegion) CreateLoadBalancerHealthCheck

func (self *SRegion) CreateLoadBalancerHealthCheck(backendGroupID string, healthCheck *cloudprovider.SLoadbalancerHealthCheck) (SElbHealthCheck, error)

func (*SRegion) CreateLoadBalancerListener

func (self *SRegion) CreateLoadBalancerListener(lbId string, opts *cloudprovider.SLoadbalancerListenerCreateOptions) (*SElbListener, error)

func (*SRegion) CreateNatDEntry

func (region *SRegion) CreateNatDEntry(rule cloudprovider.SNatDRule, gatewayID string) (SNatDEntry, error)

func (*SRegion) CreateNatGateway

func (self *SRegion) CreateNatGateway(opts *cloudprovider.NatGatewayCreateOptions) (*SNatGateway, error)

func (*SRegion) CreateNatSEntry

func (region *SRegion) CreateNatSEntry(rule cloudprovider.SNatSRule, gatewayID string) (SNatSEntry, error)

func (*SRegion) CreatePeeringRoute

func (self *SRegion) CreatePeeringRoute(vpcId, destinationCidr, target string) error

func (*SRegion) CreateSecurityGroup

func (self *SRegion) CreateSecurityGroup(opts *cloudprovider.SecurityGroupCreateInput) (*SSecurityGroup, error)

func (*SRegion) CreateSecurityGroupRule

func (self *SRegion) CreateSecurityGroupRule(groupId string, opts *cloudprovider.SecurityGroupRuleCreateOptions) (*SecurityGroupRule, error)

func (*SRegion) CreateServerTags

func (self *SRegion) CreateServerTags(instanceId string, tags map[string]string) error

https://support.huaweicloud.com/api-ecs/ecs_02_1002.html key 相同时value不会替换

func (*SRegion) CreateSfsTurbo

func (self *SRegion) CreateSfsTurbo(opts *cloudprovider.FileSystemCraeteOptions) (*SfsTurbo, error)

func (*SRegion) CreateSnapshot

func (self *SRegion) CreateSnapshot(diskId, name, desc string) (string, error)

https://support.huaweicloud.com/api-evs/zh-cn_topic_0051408624.html 目前已设置force字段。云硬盘处于挂载状态时,能强制创建快照。

func (*SRegion) CreateVpc

func (self *SRegion) CreateVpc(name, cidr, desc string) (*SVpc, error)

func (*SRegion) CreateVpcPeering

func (self *SRegion) CreateVpcPeering(vpcId string, opts *cloudprovider.VpcPeeringConnectionCreateOptions) (*SVpcPeering, error)

func (*SRegion) DeallocateEIP

func (self *SRegion) DeallocateEIP(eipId string) error

func (*SRegion) DeleteDBInstance

func (region *SRegion) DeleteDBInstance(instanceId string) error

func (*SRegion) DeleteDBInstanceAccount

func (region *SRegion) DeleteDBInstanceAccount(instanceId string, account string) error

func (*SRegion) DeleteDBInstanceBackup

func (region *SRegion) DeleteDBInstanceBackup(backupId string) error

func (*SRegion) DeleteDBInstanceDatabase

func (region *SRegion) DeleteDBInstanceDatabase(instanceId, database string) error

func (*SRegion) DeleteDisk

func (self *SRegion) DeleteDisk(diskId string) error

https://support.huaweicloud.com/api-evs/zh-cn_topic_0058762428.html 默认删除云硬盘关联的所有快照

func (*SRegion) DeleteElbListener

func (self *SRegion) DeleteElbListener(id string) error

func (*SRegion) DeleteIBucket

func (region *SRegion) DeleteIBucket(name string) error

func (*SRegion) DeleteImage

func (self *SRegion) DeleteImage(imageId string) error

func (*SRegion) DeleteLoadBalancer

func (self *SRegion) DeleteLoadBalancer(elbId string) error

func (*SRegion) DeleteLoadBalancerBackendGroup

func (self *SRegion) DeleteLoadBalancerBackendGroup(backendGroupID string) error

https://support.huaweicloud.com/api-elb/zh-cn_topic_0096561551.html

func (*SRegion) DeleteLoadBalancerPolicy

func (self *SRegion) DeleteLoadBalancerPolicy(policyId string) error

func (*SRegion) DeleteLoadbalancerHealthCheck

func (self *SRegion) DeleteLoadbalancerHealthCheck(healthCheckID string) error

https://support.huaweicloud.com/api-elb/zh-cn_topic_0096561565.html

func (*SRegion) DeleteNatDEntry

func (region *SRegion) DeleteNatDEntry(entryID string) error

func (*SRegion) DeleteNatGateway

func (self *SRegion) DeleteNatGateway(id string) error

func (*SRegion) DeleteNatSEntry

func (region *SRegion) DeleteNatSEntry(entryID string) error

func (*SRegion) DeletePeeringRoute

func (self *SRegion) DeletePeeringRoute(routeId string) error

func (*SRegion) DeletePool

func (self *SRegion) DeletePool(poolName string) (jsonutils.JSONObject, error)

func (*SRegion) DeleteSecurityGroupRule

func (self *SRegion) DeleteSecurityGroupRule(id string) error

func (*SRegion) DeleteServerTags

func (self *SRegion) DeleteServerTags(instanceId string, tagsKey []string) error

https://support.huaweicloud.com/api-ecs/ecs_02_1003.html

func (*SRegion) DeleteSfsTurbo

func (self *SRegion) DeleteSfsTurbo(id string) error

func (*SRegion) DeleteSnapshot

func (self *SRegion) DeleteSnapshot(snapshotId string) error

不能删除以autobk_snapshot_为前缀的快照。 当快照状态为available、error状态时,才可以删除。

func (*SRegion) DeleteVM

func (self *SRegion) DeleteVM(instanceId string) error

https://support.huaweicloud.com/api-ecs/zh-cn_topic_0020212679.html 只删除主机。弹性IP和数据盘需要单独删除

func (*SRegion) DeleteVpc

func (self *SRegion) DeleteVpc(vpcId string) error

func (*SRegion) DeleteVpcPeering

func (self *SRegion) DeleteVpcPeering(vpcPeeringId string) error

func (*SRegion) DetachDisk

func (self *SRegion) DetachDisk(instanceId string, diskId string) error

https://support.huaweicloud.com/api-ecs/zh-cn_topic_0022472988.html 默认非强制卸载。delete_flag=0

func (*SRegion) DissociateEip

func (self *SRegion) DissociateEip(eipId string, instanceId string) error

func (*SRegion) GetAllSubTaskEntityIDs

func (self *SRegion) GetAllSubTaskEntityIDs(serviceType string, taskId string, entityKeyName string) ([]string, error)

https://support.huaweicloud.com/api-ecs/zh-cn_topic_0022225398.html 数据结构 entities -> []job

func (*SRegion) GetCapabilities

func (region *SRegion) GetCapabilities() []string

func (*SRegion) GetClient

func (self *SRegion) GetClient() *SHuaweiClient

func (*SRegion) GetCloudEnv

func (self *SRegion) GetCloudEnv() string

func (*SRegion) GetDBInstance

func (region *SRegion) GetDBInstance(instanceId string) (*SDBInstance, error)

func (*SRegion) GetDBInstanceAccounts

func (region *SRegion) GetDBInstanceAccounts(instanceId string) ([]SDBInstanceAccount, error)

func (*SRegion) GetDBInstanceBackups

func (region *SRegion) GetDBInstanceBackups(instanceId, backupId string) ([]SDBInstanceBackup, error)

func (*SRegion) GetDBInstanceDatabases

func (region *SRegion) GetDBInstanceDatabases(instanceId string) ([]SDBInstanceDatabase, error)

func (*SRegion) GetDBInstanceDatastores

func (region *SRegion) GetDBInstanceDatastores(engine string) ([]SDBInstanceDatastore, error)

func (*SRegion) GetDBInstanceFlavors

func (region *SRegion) GetDBInstanceFlavors(engine string, version string) ([]SDBInstanceFlavor, error)

func (*SRegion) GetDBInstanceParameters

func (region *SRegion) GetDBInstanceParameters(dbinstanceId string) ([]SDBInstanceParameter, error)

func (*SRegion) GetDBInstancePrivvileges

func (region *SRegion) GetDBInstancePrivvileges(instanceId string, username string) ([]SDatabasePrivilege, error)

func (*SRegion) GetDBInstanceSkus

func (self *SRegion) GetDBInstanceSkus() ([]SDBInstanceFlavor, error)

func (*SRegion) GetDBInstanceStorages

func (region *SRegion) GetDBInstanceStorages(engine, engineVersion string) ([]SDBInstanceStorage, error)

func (*SRegion) GetDBInstances

func (region *SRegion) GetDBInstances() ([]SDBInstance, error)

func (*SRegion) GetDisk

func (self *SRegion) GetDisk(diskId string) (*SDisk, error)

func (*SRegion) GetDiskTypes

func (self *SRegion) GetDiskTypes() ([]SDiskType, error)

func (*SRegion) GetEip

func (self *SRegion) GetEip(eipId string) (*SEipAddress, error)

func (*SRegion) GetEipBandwidth

func (self *SRegion) GetEipBandwidth(bandwidthId string) (Bandwidth, error)

func (*SRegion) GetEipById

func (self *SRegion) GetEipById(eipId string) (SEipAddress, error)

func (*SRegion) GetEips

func (self *SRegion) GetEips() ([]SEipAddress, error)

返回参数分别为eip 列表、列表长度、error。 https://support.huaweicloud.com/api-vpc/zh-cn_topic_0020090598.html

func (*SRegion) GetElasticCacheBackups

func (self *SRegion) GetElasticCacheBackups(instanceId, startTime, endTime string) ([]SElasticcacheBackup, error)

https://support.huaweicloud.com/api-dcs/dcs-zh-api-180423035.html

func (*SRegion) GetEndpoints

func (self *SRegion) GetEndpoints() ([]jsonutils.JSONObject, error)

func (*SRegion) GetEvents

func (self *SRegion) GetEvents(start time.Time, end time.Time) ([]SEvent, error)

func (*SRegion) GetGeographicInfo

func (self *SRegion) GetGeographicInfo() cloudprovider.SGeographicInfo

func (*SRegion) GetGlobalId

func (self *SRegion) GetGlobalId() string

func (*SRegion) GetI18n

func (self *SRegion) GetI18n() cloudprovider.SModelI18nTable

func (*SRegion) GetIBucketById

func (region *SRegion) GetIBucketById(name string) (cloudprovider.ICloudBucket, error)

func (*SRegion) GetIBucketByName

func (region *SRegion) GetIBucketByName(name string) (cloudprovider.ICloudBucket, error)

func (*SRegion) GetIBuckets

func (region *SRegion) GetIBuckets() ([]cloudprovider.ICloudBucket, error)

func (*SRegion) GetICloudAccessGroupById

func (self *SRegion) GetICloudAccessGroupById(id string) (cloudprovider.ICloudAccessGroup, error)

func (*SRegion) GetICloudAccessGroups

func (self *SRegion) GetICloudAccessGroups() ([]cloudprovider.ICloudAccessGroup, error)

func (*SRegion) GetICloudEvents

func (self *SRegion) GetICloudEvents(start time.Time, end time.Time, withReadEvent bool) ([]cloudprovider.ICloudEvent, error)

func (*SRegion) GetICloudFileSystemById

func (self *SRegion) GetICloudFileSystemById(id string) (cloudprovider.ICloudFileSystem, error)

func (*SRegion) GetICloudFileSystems

func (self *SRegion) GetICloudFileSystems() ([]cloudprovider.ICloudFileSystem, error)

func (*SRegion) GetICloudNatSkus

func (self *SRegion) GetICloudNatSkus() ([]cloudprovider.ICloudNatSku, error)

func (*SRegion) GetICloudQuotas

func (region *SRegion) GetICloudQuotas() ([]cloudprovider.ICloudQuota, error)

func (*SRegion) GetICloudSku

func (self *SRegion) GetICloudSku(skuId string) (cloudprovider.ICloudSku, error)

func (*SRegion) GetIDBInstanceBackupById

func (region *SRegion) GetIDBInstanceBackupById(backupId string) (cloudprovider.ICloudDBInstanceBackup, error)

func (*SRegion) GetIDBInstanceBackups

func (region *SRegion) GetIDBInstanceBackups() ([]cloudprovider.ICloudDBInstanceBackup, error)

func (*SRegion) GetIDBInstanceById

func (region *SRegion) GetIDBInstanceById(instanceId string) (cloudprovider.ICloudDBInstance, error)

func (*SRegion) GetIDBInstanceSkus

func (self *SRegion) GetIDBInstanceSkus() ([]cloudprovider.ICloudDBInstanceSku, error)

func (*SRegion) GetIDBInstances

func (region *SRegion) GetIDBInstances() ([]cloudprovider.ICloudDBInstance, error)

func (*SRegion) GetIDiskById

func (self *SRegion) GetIDiskById(id string) (cloudprovider.ICloudDisk, error)

func (*SRegion) GetIEipById

func (self *SRegion) GetIEipById(eipId string) (cloudprovider.ICloudEIP, error)

func (*SRegion) GetIEips

func (self *SRegion) GetIEips() ([]cloudprovider.ICloudEIP, error)

func (*SRegion) GetIElasticcacheById

func (self *SRegion) GetIElasticcacheById(id string) (cloudprovider.ICloudElasticcache, error)

func (*SRegion) GetIElasticcaches

func (self *SRegion) GetIElasticcaches() ([]cloudprovider.ICloudElasticcache, error)

func (*SRegion) GetIHostById

func (self *SRegion) GetIHostById(id string) (cloudprovider.ICloudHost, error)

func (*SRegion) GetIHosts

func (self *SRegion) GetIHosts() ([]cloudprovider.ICloudHost, error)

func (*SRegion) GetILoadBalancerAclById

func (self *SRegion) GetILoadBalancerAclById(aclId string) (cloudprovider.ICloudLoadbalancerAcl, error)

func (*SRegion) GetILoadBalancerAcls

func (self *SRegion) GetILoadBalancerAcls() ([]cloudprovider.ICloudLoadbalancerAcl, error)

func (*SRegion) GetILoadBalancerById

func (self *SRegion) GetILoadBalancerById(loadbalancerId string) (cloudprovider.ICloudLoadbalancer, error)

func (*SRegion) GetILoadBalancerCertificateById

func (self *SRegion) GetILoadBalancerCertificateById(certId string) (cloudprovider.ICloudLoadbalancerCertificate, error)

func (*SRegion) GetILoadBalancerCertificates

func (self *SRegion) GetILoadBalancerCertificates() ([]cloudprovider.ICloudLoadbalancerCertificate, error)

func (*SRegion) GetILoadBalancers

func (self *SRegion) GetILoadBalancers() ([]cloudprovider.ICloudLoadbalancer, error)

func (*SRegion) GetIModelartsPoolById

func (self *SRegion) GetIModelartsPoolById(poolId string) (cloudprovider.ICloudModelartsPool, error)

func (*SRegion) GetIModelartsPoolSku

func (self *SRegion) GetIModelartsPoolSku() ([]cloudprovider.ICloudModelartsPoolSku, error)

func (*SRegion) GetIModelartsPools

func (self *SRegion) GetIModelartsPools() ([]cloudprovider.ICloudModelartsPool, error)

func (*SRegion) GetIModelartsPoolsWithStatus

func (self *SRegion) GetIModelartsPoolsWithStatus(status string) ([]jsonutils.JSONObject, error)

func (*SRegion) GetINetworkInterfaces

func (region *SRegion) GetINetworkInterfaces() ([]cloudprovider.ICloudNetworkInterface, error)

func (*SRegion) GetISecurityGroupById

func (self *SRegion) GetISecurityGroupById(secgroupId string) (cloudprovider.ICloudSecurityGroup, error)

func (*SRegion) GetISkus

func (self *SRegion) GetISkus() ([]cloudprovider.ICloudSku, error)

func (*SRegion) GetISnapshotById

func (self *SRegion) GetISnapshotById(snapshotId string) (cloudprovider.ICloudSnapshot, error)

func (*SRegion) GetISnapshots

func (self *SRegion) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)

func (*SRegion) GetIStorageById

func (self *SRegion) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)

func (*SRegion) GetIStoragecacheById

func (self *SRegion) GetIStoragecacheById(idstr string) (cloudprovider.ICloudStoragecache, error)

func (*SRegion) GetIStoragecaches

func (self *SRegion) GetIStoragecaches() ([]cloudprovider.ICloudStoragecache, error)

func (*SRegion) GetIStorages

func (self *SRegion) GetIStorages() ([]cloudprovider.ICloudStorage, error)

func (*SRegion) GetIVMById

func (self *SRegion) GetIVMById(id string) (cloudprovider.ICloudVM, error)

func (*SRegion) GetIVMs

func (region *SRegion) GetIVMs() ([]cloudprovider.ICloudVM, error)

func (*SRegion) GetIVpcById

func (self *SRegion) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)

func (*SRegion) GetIVpcs

func (self *SRegion) GetIVpcs() ([]cloudprovider.ICloudVpc, error)

func (*SRegion) GetIZoneById

func (self *SRegion) GetIZoneById(id string) (cloudprovider.ICloudZone, error)

func (*SRegion) GetIZones

func (self *SRegion) GetIZones() ([]cloudprovider.ICloudZone, error)

func (*SRegion) GetImage

func (self *SRegion) GetImage(imageId string) (*SImage, error)

func (*SRegion) GetImageByName

func (self *SRegion) GetImageByName(name string) (*SImage, error)

func (*SRegion) GetImages

func (self *SRegion) GetImages(status string, imagetype TImageOwnerType, name string, envType string) ([]SImage, error)

https://support.huaweicloud.com/api-ims/zh-cn_topic_0060804959.html

func (*SRegion) GetInstanceByID

func (self *SRegion) GetInstanceByID(instanceId string) (SInstance, error)

func (*SRegion) GetInstanceByIds

func (self *SRegion) GetInstanceByIds(ids []string) ([]SInstance, int, error)

func (*SRegion) GetInstancePortId

func (self *SRegion) GetInstancePortId(instanceId string) (string, error)

func (*SRegion) GetInstanceSecrityGroupIds

func (self *SRegion) GetInstanceSecrityGroupIds(instanceId string) ([]string, error)

func (*SRegion) GetInstanceStatus

func (self *SRegion) GetInstanceStatus(instanceId string) (string, error)

func (*SRegion) GetLatitude

func (self *SRegion) GetLatitude() float32

func (*SRegion) GetLoadBalancerAclById

func (self *SRegion) GetLoadBalancerAclById(aclId string) (SElbACL, error)

func (*SRegion) GetLoadBalancerBackendGroup

func (self *SRegion) GetLoadBalancerBackendGroup(backendGroupId string) (SElbBackendGroup, error)

func (*SRegion) GetLoadBalancerBackends

func (self *SRegion) GetLoadBalancerBackends(backendGroupId string) ([]SElbBackend, error)

func (*SRegion) GetLoadBalancerById

func (self *SRegion) GetLoadBalancerById(loadbalancerId string) (SLoadbalancer, error)

func (*SRegion) GetLoadBalancerCertificateById

func (self *SRegion) GetLoadBalancerCertificateById(certId string) (SElbCert, error)

func (*SRegion) GetLoadBalancerCertificates

func (self *SRegion) GetLoadBalancerCertificates() ([]SElbCert, error)

func (*SRegion) GetLoadBalancerHealthCheck

func (self *SRegion) GetLoadBalancerHealthCheck(healthCheckId string) (SElbHealthCheck, error)

func (*SRegion) GetLoadBalancerListeners

func (self *SRegion) GetLoadBalancerListeners(lbId string) ([]SElbListener, error)

func (*SRegion) GetLoadbalancer

func (self *SRegion) GetLoadbalancer(lgId string) (SLoadbalancer, error)

func (*SRegion) GetLongitude

func (self *SRegion) GetLongitude() float32

func (*SRegion) GetMatchInstanceTypes

func (self *SRegion) GetMatchInstanceTypes(cpu int, memMB int, zoneId string) ([]SInstanceType, error)

func (*SRegion) GetMetrics

func (r *SRegion) GetMetrics() ([]modules.SMetricMeta, error)

func (*SRegion) GetMetricsData

func (r *SRegion) GetMetricsData(metrics []modules.SMetricMeta, since time.Time, until time.Time) ([]cloudprovider.MetricValues, error)

func (*SRegion) GetName

func (self *SRegion) GetName() string

func (*SRegion) GetNatDEntryByID

func (region *SRegion) GetNatDEntryByID(id string) (SNatDEntry, error)

func (*SRegion) GetNatDTable

func (region *SRegion) GetNatDTable(natGatewayID string) ([]SNatDEntry, error)

func (*SRegion) GetNatGateway

func (self *SRegion) GetNatGateway(id string) (*SNatGateway, error)

func (*SRegion) GetNatGateways

func (region *SRegion) GetNatGateways(vpcID, natGatewayID string) ([]SNatGateway, error)

func (*SRegion) GetNatSEntryByID

func (region *SRegion) GetNatSEntryByID(id string) (SNatSEntry, error)

func (*SRegion) GetNatSTable

func (region *SRegion) GetNatSTable(natGatewayID string) ([]SNatSEntry, error)

func (*SRegion) GetPort

func (self *SRegion) GetPort(portId string) (Port, error)

func (*SRegion) GetProvider

func (self *SRegion) GetProvider() string

func (*SRegion) GetQuotas

func (self *SRegion) GetQuotas() ([]SQuota, error)

func (*SRegion) GetRouteTables

func (self *SRegion) GetRouteTables(vpcId string) ([]SRouteTable, error)

GetRouteTables return []SRouteTable of vpc which id is vpcId if vpcId is no-nil, otherwise return []SRouteTable of all vpc in this SRegion

func (*SRegion) GetSecurityGroup

func (self *SRegion) GetSecurityGroup(id string) (*SSecurityGroup, error)

func (*SRegion) GetSecurityGroupRules

func (self *SRegion) GetSecurityGroupRules(groupId string) ([]SecurityGroupRule, error)

func (*SRegion) GetServices

func (self *SRegion) GetServices() ([]jsonutils.JSONObject, error)

func (*SRegion) GetSfsTurbo

func (self *SRegion) GetSfsTurbo(id string) (*SfsTurbo, error)

func (*SRegion) GetSfsTurbos

func (self *SRegion) GetSfsTurbos() ([]SfsTurbo, error)

func (*SRegion) GetSkus

func (self *SRegion) GetSkus(zoneId string) ([]cloudprovider.ICloudSku, error)

func (*SRegion) GetSnapshotById

func (self *SRegion) GetSnapshotById(snapshotId string) (SSnapshot, error)

func (*SRegion) GetSnapshots

func (self *SRegion) GetSnapshots(diskId string, snapshotName string) ([]SSnapshot, error)

https://support.huaweicloud.com/api-evs/zh-cn_topic_0051408627.html

func (*SRegion) GetStatus

func (self *SRegion) GetStatus() string

func (*SRegion) GetSysDefaultSecgroupId

func (self *SRegion) GetSysDefaultSecgroupId() (string, error)

func (*SRegion) GetTaskEntityID

func (self *SRegion) GetTaskEntityID(serviceType string, taskId string, entityKeyName string) (string, error)

数据结构 entities -> job

func (*SRegion) GetTaskStatus

func (self *SRegion) GetTaskStatus(serviceType string, taskId string) (string, error)

func (*SRegion) GetVpcPeering

func (self *SRegion) GetVpcPeering(vpcPeeringId string) (*SVpcPeering, error)

func (*SRegion) GetVpcPeerings

func (self *SRegion) GetVpcPeerings(vpcId string) ([]SVpcPeering, error)

func (*SRegion) GetZoneSupportedDiskTypes

func (self *SRegion) GetZoneSupportedDiskTypes(zoneId string) ([]string, error)

func (*SRegion) GrantDBInstancePrivilege

func (region *SRegion) GrantDBInstancePrivilege(instanceId string, account, database string, privilege string) error

func (*SRegion) HeadBucket

func (region *SRegion) HeadBucket(name string) (*obs.BaseModel, error)

func (*SRegion) IBucketExist

func (region *SRegion) IBucketExist(name string) (bool, error)

func (*SRegion) ImportImageJob

func (self *SRegion) ImportImageJob(name string, osDist string, osVersion string, osArch string, bucket string, key string, minDiskGB int64) (string, error)

https://support.huaweicloud.com/api-ims/zh-cn_topic_0020092109.html

os version 取值范围: https://support.huaweicloud.com/api-ims/zh-cn_topic_0031617666.html
用于创建私有镜像的源云服务器系统盘大小大于等于40GB且不超过1024GB。
目前支持vhd,zvhd、raw,qcow2
todo: 考虑使用镜像快速导入。 https://support.huaweicloud.com/api-ims/zh-cn_topic_0133188204.html
使用OBS文件创建镜像

* openstack原生接口支持的格式:https://support.huaweicloud.com/api-ims/zh-cn_topic_0031615566.html

func (*SRegion) ImportKeypair

func (self *SRegion) ImportKeypair(name, publicKey string) (*SKeypair, error)

https://support.huaweicloud.com/api-ecs/zh-cn_topic_0020212678.html

func (*SRegion) IsEmulated

func (self *SRegion) IsEmulated() bool

func (*SRegion) MonitorPool

func (self *SRegion) MonitorPool(poolId string) (*SModelartsMetrics, error)

func (*SRegion) PublicConnectionAction

func (region *SRegion) PublicConnectionAction(instanceId string, action string) error

func (*SRegion) RebootDBInstance

func (region *SRegion) RebootDBInstance(instanceId string) error

func (*SRegion) RebuildRoot

func (self *SRegion) RebuildRoot(ctx context.Context, userId, instanceId, passwd, publicKeyName, userData string) (string, error)

https://support.huaweicloud.com/api-ecs/zh-cn_topic_0067876349.html 返回job id

func (*SRegion) RecoveryDBInstanceFromBackup

func (region *SRegion) RecoveryDBInstanceFromBackup(target, origin string, backupId string, databases map[string]string) error

func (*SRegion) Refresh

func (self *SRegion) Refresh() error

func (*SRegion) RemoveLoadBalancerBackend

func (self *SRegion) RemoveLoadBalancerBackend(lbbgId string, backendId string) error

func (*SRegion) ResetDBInstanceAccountPassword

func (region *SRegion) ResetDBInstanceAccountPassword(instanceId, account, password string) error

func (*SRegion) RevokeDBInstancePrivilege

func (region *SRegion) RevokeDBInstancePrivilege(instanceId string, account, database string) error

func (*SRegion) SaveImage

func (self *SRegion) SaveImage(instanceId string, opts *cloudprovider.SaveImageOptions) (*SImage, error)

func (*SRegion) StopVM

func (self *SRegion) StopVM(instanceId string, isForce bool) error

https://support.huaweicloud.com/api-ecs/zh-cn_topic_0020212651.html

func (*SRegion) UpdateEipBandwidth

func (self *SRegion) UpdateEipBandwidth(bandwidthId string, bw int) error

func (*SRegion) UpdateLoadBalancerListener

func (self *SRegion) UpdateLoadBalancerListener(listenerId string, listener *cloudprovider.SLoadbalancerListenerCreateOptions) error

func (*SRegion) UpdateVM

func (self *SRegion) UpdateVM(instanceId string, input cloudprovider.SInstanceUpdateOptions) error

type SRelatedInstance

type SRelatedInstance struct {
	Id   string
	Type string
}

type SResource

type SResource struct {
	ResourceID       string `json:"resourceId"`
	CloudServiceType string `json:"cloudServiceType"`
	RegionCode       string `json:"regionCode"`
	ResourceType     string `json:"resourceType"`
	ResourceSpecCode string `json:"resourceSpecCode"`
	Status           int64  `json:"status"`
}

type SResourceDetail

type SResourceDetail struct {
	ID                   string    `json:"id"`
	Status               int64     `json:"status"`
	ResourceID           string    `json:"resource_id"`
	ResourceName         string    `json:"resource_name"`
	RegionCode           string    `json:"region_code"`
	CloudServiceTypeCode string    `json:"cloud_service_type_code"`
	ResourceTypeCode     string    `json:"resource_type_code"`
	ResourceSpecCode     string    `json:"resource_spec_code"`
	ProjectCode          string    `json:"project_code"`
	ProductID            string    `json:"product_id"`
	MainResourceID       string    `json:"main_resource_id"`
	IsMainResource       int64     `json:"is_main_resource"`
	ValidTime            time.Time `json:"valid_time"`
	ExpireTime           time.Time `json:"expire_time"`
	NextOperationPolicy  string    `json:"next_operation_policy"`
}

type SRole

type SRole struct {
	DomainId      string
	Flag          string
	DescriptionCn string
	Catelog       string
	Description   string
	Id            string
	DisplayName   string
	Type          string
	UpdatedTime   string
	CreatedTime   string
	Links         SLink
	Policy        jsonutils.JSONDict
	// contains filtered or unexported fields
}

func (*SRole) Delete

func (role *SRole) Delete() error

func (*SRole) GetDescription

func (role *SRole) GetDescription() string

func (*SRole) GetDocument

func (role *SRole) GetDocument() (*jsonutils.JSONDict, error)

func (*SRole) GetGlobalId

func (role *SRole) GetGlobalId() string

func (*SRole) GetName

func (role *SRole) GetName() string

func (*SRole) GetPolicyType

func (role *SRole) GetPolicyType() string

func (*SRole) UpdateDocument

func (role *SRole) UpdateDocument(document *jsonutils.JSONDict) error

type SRouteEntry

type SRouteEntry struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

	ID          string // route ID
	Type        string // route type
	Destination string // route destination
	NextHop     string // route next hop (ip or id)
	// contains filtered or unexported fields
}

func (*SRouteEntry) GetCidr

func (route *SRouteEntry) GetCidr() string

func (*SRouteEntry) GetGlobalId

func (route *SRouteEntry) GetGlobalId() string

func (*SRouteEntry) GetId

func (route *SRouteEntry) GetId() string

func (*SRouteEntry) GetName

func (route *SRouteEntry) GetName() string

func (*SRouteEntry) GetNextHop

func (route *SRouteEntry) GetNextHop() string

func (*SRouteEntry) GetNextHopType

func (route *SRouteEntry) GetNextHopType() string

func (*SRouteEntry) GetStatus

func (route *SRouteEntry) GetStatus() string

func (*SRouteEntry) GetType

func (route *SRouteEntry) GetType() string

func (*SRouteEntry) IsEmulated

func (route *SRouteEntry) IsEmulated() bool

func (*SRouteEntry) Refresh

func (route *SRouteEntry) Refresh() error

type SRouteTable

type SRouteTable struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

	VpcId       string
	Description string
	Type        string
	Routes      []*SRouteEntry
	// contains filtered or unexported fields
}

SRouteTable has no ID and Name because there is no id or name of route table in huawei cloud. And some method such as GetId and GetName of ICloudRouteTable has no practical meaning

func NewSRouteTable

func NewSRouteTable(vpc *SVpc, Type string) SRouteTable

func (*SRouteTable) CreateRoute

func (self *SRouteTable) CreateRoute(route cloudprovider.RouteSet) error

func (*SRouteTable) GetAssociations

func (self *SRouteTable) GetAssociations() []cloudprovider.RouteTableAssociation

func (*SRouteTable) GetDescription

func (self *SRouteTable) GetDescription() string

func (*SRouteTable) GetGlobalId

func (self *SRouteTable) GetGlobalId() string

func (*SRouteTable) GetIRoutes

func (self *SRouteTable) GetIRoutes() ([]cloudprovider.ICloudRoute, error)

func (*SRouteTable) GetId

func (self *SRouteTable) GetId() string

func (*SRouteTable) GetName

func (self *SRouteTable) GetName() string

func (*SRouteTable) GetRegionId

func (self *SRouteTable) GetRegionId() string

func (*SRouteTable) GetStatus

func (self *SRouteTable) GetStatus() string

func (*SRouteTable) GetType

func (self *SRouteTable) GetType() cloudprovider.RouteTableType

func (*SRouteTable) GetVpcId

func (self *SRouteTable) GetVpcId() string

func (*SRouteTable) IsEmulated

func (self *SRouteTable) IsEmulated() bool

func (*SRouteTable) Refresh

func (self *SRouteTable) Refresh() error

func (*SRouteTable) RemoveRoute

func (self *SRouteTable) RemoveRoute(route cloudprovider.RouteSet) error

func (*SRouteTable) UpdateRoute

func (self *SRouteTable) UpdateRoute(route cloudprovider.RouteSet) error

type SSecurityGroup

type SSecurityGroup struct {
	multicloud.SSecurityGroup
	huawei.HuaweiTags

	ID                  string              `json:"id"`
	Name                string              `json:"name"`
	Description         string              `json:"description"`
	EnterpriseProjectID string              `json:"enterprise_project_id "`
	SecurityGroupRules  []SecurityGroupRule `json:"security_group_rules"`
	// contains filtered or unexported fields
}

https://support.huaweicloud.com/api-vpc/zh-cn_topic_0020090615.html

func (*SSecurityGroup) Delete

func (self *SSecurityGroup) Delete() error

func (*SSecurityGroup) GetDescription

func (self *SSecurityGroup) GetDescription() string

func (*SSecurityGroup) GetGlobalId

func (self *SSecurityGroup) GetGlobalId() string

func (*SSecurityGroup) GetId

func (self *SSecurityGroup) GetId() string

func (*SSecurityGroup) GetName

func (self *SSecurityGroup) GetName() string

func (*SSecurityGroup) GetProjectId

func (self *SSecurityGroup) GetProjectId() string

func (*SSecurityGroup) GetRules

func (self *SSecurityGroup) GetRules() ([]cloudprovider.ISecurityGroupRule, error)

func (*SSecurityGroup) GetStatus

func (self *SSecurityGroup) GetStatus() string

func (*SSecurityGroup) GetTags

func (self *SSecurityGroup) GetTags() (map[string]string, error)

func (*SSecurityGroup) GetVpcId

func (self *SSecurityGroup) GetVpcId() string

func (*SSecurityGroup) IsEmulated

func (self *SSecurityGroup) IsEmulated() bool

func (*SSecurityGroup) Refresh

func (self *SSecurityGroup) Refresh() error

type SServerCreate

type SServerCreate struct {
	AvailabilityZone string            `json:"availability_zone"`
	Name             string            `json:"name"`
	ImageRef         string            `json:"imageRef"`
	RootVolume       RootVolume        `json:"root_volume"`
	DataVolumes      []DataVolume      `json:"data_volumes"`
	FlavorRef        string            `json:"flavorRef"`
	UserData         string            `json:"user_data"`
	Vpcid            string            `json:"vpcid"`
	SecurityGroups   []SecGroup        `json:"security_groups"`
	Nics             []NIC             `json:"nics"`
	KeyName          string            `json:"key_name"`
	AdminPass        string            `json:"adminPass"`
	Count            int64             `json:"count"`
	Extendparam      ServerExtendparam `json:"extendparam"`
	ServerTags       []ServerTag       `json:"server_tags"`
	Description      string            `json:"description"`
}

系统盘大小取值范围:1-1024 GB,且必须不小于镜像min_disk.

type SSnapshot

type SSnapshot struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

	Metadata                              Metadata `json:"metadata"`
	CreatedAt                             string   `json:"created_at"`
	Description                           string   `json:"description"`
	ID                                    string   `json:"id"`
	Name                                  string   `json:"name"`
	OSExtendedSnapshotAttributesProgress  string   `json:"os-extended-snapshot-attributes:progress"`
	OSExtendedSnapshotAttributesProjectID string   `json:"os-extended-snapshot-attributes:project_id"`
	Size                                  int32    `json:"size"` // GB
	Status                                string   `json:"status"`
	UpdatedAt                             string   `json:"updated_at"`
	VolumeID                              string   `json:"volume_id"`
	// contains filtered or unexported fields
}

https://support.huaweicloud.com/api-evs/zh-cn_topic_0051408624.html

func (*SSnapshot) Delete

func (self *SSnapshot) Delete() error

func (*SSnapshot) GetDiskId

func (self *SSnapshot) GetDiskId() string

func (*SSnapshot) GetDiskType

func (self *SSnapshot) GetDiskType() string

func (*SSnapshot) GetGlobalId

func (self *SSnapshot) GetGlobalId() string

func (*SSnapshot) GetId

func (self *SSnapshot) GetId() string

func (*SSnapshot) GetName

func (self *SSnapshot) GetName() string

func (*SSnapshot) GetProjectId

func (self *SSnapshot) GetProjectId() string

func (*SSnapshot) GetSizeMb

func (self *SSnapshot) GetSizeMb() int32

func (*SSnapshot) GetStatus

func (self *SSnapshot) GetStatus() string

func (*SSnapshot) IsEmulated

func (self *SSnapshot) IsEmulated() bool

func (*SSnapshot) Refresh

func (self *SSnapshot) Refresh() error

type SStorage

type SStorage struct {
	multicloud.SStorageBase
	huawei.HuaweiTags
	// contains filtered or unexported fields
}

func (*SStorage) CreateIDisk

func (*SStorage) GetCapacityMB

func (self *SStorage) GetCapacityMB() int64

func (*SStorage) GetCapacityUsedMB

func (self *SStorage) GetCapacityUsedMB() int64

func (*SStorage) GetEnabled

func (self *SStorage) GetEnabled() bool

func (*SStorage) GetGlobalId

func (self *SStorage) GetGlobalId() string

func (*SStorage) GetIDiskById

func (self *SStorage) GetIDiskById(idStr string) (cloudprovider.ICloudDisk, error)

func (*SStorage) GetIDisks

func (self *SStorage) GetIDisks() ([]cloudprovider.ICloudDisk, error)

func (*SStorage) GetIStoragecache

func (self *SStorage) GetIStoragecache() cloudprovider.ICloudStoragecache

func (*SStorage) GetIZone

func (self *SStorage) GetIZone() cloudprovider.ICloudZone

func (*SStorage) GetId

func (self *SStorage) GetId() string

func (*SStorage) GetMediumType

func (self *SStorage) GetMediumType() string

func (*SStorage) GetMountPoint

func (self *SStorage) GetMountPoint() string

func (*SStorage) GetName

func (self *SStorage) GetName() string

func (*SStorage) GetStatus

func (self *SStorage) GetStatus() string

func (*SStorage) GetStorageConf

func (self *SStorage) GetStorageConf() jsonutils.JSONObject

func (*SStorage) GetStorageType

func (self *SStorage) GetStorageType() string

func (*SStorage) IsEmulated

func (self *SStorage) IsEmulated() bool

func (*SStorage) IsSysDiskStore

func (self *SStorage) IsSysDiskStore() bool

func (*SStorage) Refresh

func (self *SStorage) Refresh() error

type SStoragecache

type SStoragecache struct {
	multicloud.SResourceBase
	huawei.HuaweiTags
	// contains filtered or unexported fields
}

func (*SStoragecache) GetGlobalId

func (self *SStoragecache) GetGlobalId() string

func (*SStoragecache) GetICloudImages

func (self *SStoragecache) GetICloudImages() ([]cloudprovider.ICloudImage, error)

func (*SStoragecache) GetICustomizedCloudImages

func (self *SStoragecache) GetICustomizedCloudImages() ([]cloudprovider.ICloudImage, error)

func (*SStoragecache) GetIImageById

func (self *SStoragecache) GetIImageById(extId string) (cloudprovider.ICloudImage, error)

func (*SStoragecache) GetId

func (self *SStoragecache) GetId() string

func (*SStoragecache) GetName

func (self *SStoragecache) GetName() string

func (*SStoragecache) GetPath

func (self *SStoragecache) GetPath() string

func (*SStoragecache) GetStatus

func (self *SStoragecache) GetStatus() string

func (*SStoragecache) IsEmulated

func (self *SStoragecache) IsEmulated() bool

func (*SStoragecache) Refresh

func (self *SStoragecache) Refresh() error

func (*SStoragecache) UploadImage

func (self *SStoragecache) UploadImage(ctx context.Context, image *cloudprovider.SImageCreateOption, callback func(progress float32)) (string, error)

type SUser

type SUser struct {
	Domain map[string]string
	Name   string
	Id     string
}

type SVolume

type SVolume struct {
	Size int
	Type string
}

type SVpc

type SVpc struct {
	multicloud.SVpc
	huawei.HuaweiTags

	ID                  string `json:"id"`
	Name                string `json:"name"`
	CIDR                string `json:"cidr"`
	Status              string `json:"status"`
	EnterpriseProjectID string `json:"enterprise_project_id"`
	// contains filtered or unexported fields
}

https://support.huaweicloud.com/api-vpc/zh-cn_topic_0020090625.html

func (*SVpc) AcceptICloudVpcPeeringConnection

func (self *SVpc) AcceptICloudVpcPeeringConnection(id string) error

func (*SVpc) CreateINatGateway

func (*SVpc) Delete

func (self *SVpc) Delete() error

func (*SVpc) GetAuthorityOwnerId

func (self *SVpc) GetAuthorityOwnerId() string

func (*SVpc) GetCidrBlock

func (self *SVpc) GetCidrBlock() string

func (*SVpc) GetGlobalId

func (self *SVpc) GetGlobalId() string

func (*SVpc) GetICloudAccepterVpcPeeringConnections

func (self *SVpc) GetICloudAccepterVpcPeeringConnections() ([]cloudprovider.ICloudVpcPeeringConnection, error)

func (*SVpc) GetICloudVpcPeeringConnectionById

func (self *SVpc) GetICloudVpcPeeringConnectionById(id string) (cloudprovider.ICloudVpcPeeringConnection, error)

func (*SVpc) GetICloudVpcPeeringConnections

func (self *SVpc) GetICloudVpcPeeringConnections() ([]cloudprovider.ICloudVpcPeeringConnection, error)

func (*SVpc) GetINatGateways

func (self *SVpc) GetINatGateways() ([]cloudprovider.ICloudNatGateway, error)

func (*SVpc) GetIRouteTableById

func (self *SVpc) GetIRouteTableById(routeTableId string) (cloudprovider.ICloudRouteTable, error)

华为云 路由表资源方法 api 暂未支持,只能直接对vpc对象增加,删除 路由

func (*SVpc) GetIRouteTables

func (self *SVpc) GetIRouteTables() ([]cloudprovider.ICloudRouteTable, error)

func (*SVpc) GetISecurityGroups

func (self *SVpc) GetISecurityGroups() ([]cloudprovider.ICloudSecurityGroup, error)

func (*SVpc) GetIWireById

func (self *SVpc) GetIWireById(wireId string) (cloudprovider.ICloudWire, error)

func (*SVpc) GetIWires

func (self *SVpc) GetIWires() ([]cloudprovider.ICloudWire, error)

func (*SVpc) GetId

func (self *SVpc) GetId() string

func (*SVpc) GetIsDefault

func (self *SVpc) GetIsDefault() bool

func (*SVpc) GetName

func (self *SVpc) GetName() string

func (*SVpc) GetRegion

func (self *SVpc) GetRegion() cloudprovider.ICloudRegion

func (*SVpc) GetStatus

func (self *SVpc) GetStatus() string

func (*SVpc) IsEmulated

func (self *SVpc) IsEmulated() bool

func (*SVpc) Refresh

func (self *SVpc) Refresh() error

type SVpcPeering

type SVpcPeering struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

	RequestVpcInfo RequestVpcInfo `json:"request_vpc_info"`
	AcceptVpcInfo  AcceptVpcInfo  `json:"accept_vpc_info"`
	Name           string         `json:"name"`
	ID             string         `json:"id"`
	Status         string         `json:"status"`
	// contains filtered or unexported fields
}

func (*SVpcPeering) Delete

func (self *SVpcPeering) Delete() error

func (*SVpcPeering) GetEnabled

func (self *SVpcPeering) GetEnabled() bool

func (*SVpcPeering) GetGlobalId

func (self *SVpcPeering) GetGlobalId() string

func (*SVpcPeering) GetId

func (self *SVpcPeering) GetId() string

func (*SVpcPeering) GetName

func (self *SVpcPeering) GetName() string

func (*SVpcPeering) GetPeerAccountId

func (self *SVpcPeering) GetPeerAccountId() string

func (*SVpcPeering) GetPeerVpcId

func (self *SVpcPeering) GetPeerVpcId() string

func (*SVpcPeering) GetStatus

func (self *SVpcPeering) GetStatus() string

func (*SVpcPeering) GetVpcId

func (self *SVpcPeering) GetVpcId() string

func (*SVpcPeering) Refresh

func (self *SVpcPeering) Refresh() error

type SWire

type SWire struct {
	multicloud.SResourceBase
	huawei.HuaweiTags
	// contains filtered or unexported fields
}

华为云的子网有点特殊。子网在整个region可用。

func (*SWire) CreateINetwork

华为云子网可用区,类似一个zone标签。即使指定了zone子网在整个region依然是可用。 通过华为web控制台创建子网需要指定可用区。这里是不指定的。

func (*SWire) GetBandwidth

func (self *SWire) GetBandwidth() int

func (*SWire) GetGlobalId

func (self *SWire) GetGlobalId() string

func (*SWire) GetINetworkById

func (self *SWire) GetINetworkById(netid string) (cloudprovider.ICloudNetwork, error)

func (*SWire) GetINetworks

func (self *SWire) GetINetworks() ([]cloudprovider.ICloudNetwork, error)

func (*SWire) GetIVpc

func (self *SWire) GetIVpc() cloudprovider.ICloudVpc

func (*SWire) GetIZone

func (self *SWire) GetIZone() cloudprovider.ICloudZone

func (*SWire) GetId

func (self *SWire) GetId() string

func (*SWire) GetName

func (self *SWire) GetName() string

func (*SWire) GetStatus

func (self *SWire) GetStatus() string

func (*SWire) IsEmulated

func (self *SWire) IsEmulated() bool

func (*SWire) Refresh

func (self *SWire) Refresh() error

type SZone

type SZone struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

	ZoneState ZoneState `json:"zoneState"`
	ZoneName  string    `json:"zoneName"`
	// contains filtered or unexported fields
}

https://support.huaweicloud.com/api-ecs/zh-cn_topic_0065817728.html

func (*SZone) GetGlobalId

func (self *SZone) GetGlobalId() string

func (*SZone) GetI18n

func (self *SZone) GetI18n() cloudprovider.SModelI18nTable

func (*SZone) GetIHostById

func (self *SZone) GetIHostById(id string) (cloudprovider.ICloudHost, error)

func (*SZone) GetIHosts

func (self *SZone) GetIHosts() ([]cloudprovider.ICloudHost, error)

func (*SZone) GetIRegion

func (self *SZone) GetIRegion() cloudprovider.ICloudRegion

func (*SZone) GetIStorageById

func (self *SZone) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)

func (*SZone) GetIStorages

func (self *SZone) GetIStorages() ([]cloudprovider.ICloudStorage, error)

func (*SZone) GetIWires

func (self *SZone) GetIWires() ([]cloudprovider.ICloudWire, error)

func (*SZone) GetId

func (self *SZone) GetId() string

func (*SZone) GetName

func (self *SZone) GetName() string

func (*SZone) GetStatus

func (self *SZone) GetStatus() string

func (*SZone) IsEmulated

func (self *SZone) IsEmulated() bool

func (*SZone) Refresh

func (self *SZone) Refresh() error

type SecGroup

type SecGroup struct {
	ID string `json:"id"`
}

type SecurityGroup

type SecurityGroup struct {
	Name string `json:"name"`
}

type SecurityGroupRule

type SecurityGroupRule struct {
	Direction       string
	Ethertype       string
	Id              string
	Description     string
	PortRangeMax    int64
	PortRangeMin    int64
	Protocol        string
	RemoteGroupId   string
	RemoteIPPrefix  string
	SecurityGroupId string
	TenantId        string
	// contains filtered or unexported fields
}

func (*SecurityGroupRule) Delete

func (self *SecurityGroupRule) Delete() error

func (*SecurityGroupRule) GetAction

func (*SecurityGroupRule) GetCIDRs

func (self *SecurityGroupRule) GetCIDRs() []string

func (*SecurityGroupRule) GetDescription

func (self *SecurityGroupRule) GetDescription() string

func (*SecurityGroupRule) GetDirection

func (self *SecurityGroupRule) GetDirection() secrules.TSecurityRuleDirection

func (*SecurityGroupRule) GetGlobalId

func (self *SecurityGroupRule) GetGlobalId() string

func (*SecurityGroupRule) GetPorts

func (self *SecurityGroupRule) GetPorts() string

func (*SecurityGroupRule) GetPriority

func (self *SecurityGroupRule) GetPriority() int

func (*SecurityGroupRule) GetProtocol

func (self *SecurityGroupRule) GetProtocol() string

func (*SecurityGroupRule) Update

type ServerExtendparam

type ServerExtendparam struct {
	ChargingMode        string `json:"chargingMode"` // 计费模式 prePaid|postPaid
	PeriodType          string `json:"periodType"`   // 周期类型:month|year
	PeriodNum           string `json:"periodNum"`    // 订购周期数:periodType=month(周期类型为月)时,取值为[1,9]。periodType=year(周期类型为年)时,取值为1。
	IsAutoRenew         string `json:"isAutoRenew"`  // 是否自动续订  true|false
	IsAutoPay           string `json:"isAutoPay"`    // 是否自动从客户的账户中支付 true|false
	RegionID            string `json:"regionID"`
	EnterpriseProjectId string `json:"enterprise_project_id,omitempty"`
}

type ServerTag

type ServerTag struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type SfsTurbo

type SfsTurbo struct {
	multicloud.SNasBase
	huawei.HuaweiTags

	EnterpriseProjectId string
	Actions             []string
	AvailCapacity       float64
	AvailabilityZone    string
	AzName              string
	CreatedAt           time.Time
	CryptKeyId          string
	ExpandType          string
	ExportLocation      string
	Id                  string
	Name                string
	PayModel            string
	Region              string
	SecurityGroupId     string
	ShareProto          string
	ShareType           string
	Size                float64
	Status              string
	SubStatus           string
	SubnetId            string
	VpcId               string
	Description         string
	// contains filtered or unexported fields
}

func (*SfsTurbo) CreateMountTarget

func (*SfsTurbo) Delete

func (self *SfsTurbo) Delete() error

func (*SfsTurbo) GetBillingType

func (self *SfsTurbo) GetBillingType() string

func (*SfsTurbo) GetCapacityGb

func (self *SfsTurbo) GetCapacityGb() int64

func (*SfsTurbo) GetCreatedAt

func (self *SfsTurbo) GetCreatedAt() time.Time

func (*SfsTurbo) GetFileSystemType

func (self *SfsTurbo) GetFileSystemType() string

func (*SfsTurbo) GetGlobalId

func (self *SfsTurbo) GetGlobalId() string

func (*SfsTurbo) GetId

func (self *SfsTurbo) GetId() string

func (*SfsTurbo) GetMountTargetCountLimit

func (self *SfsTurbo) GetMountTargetCountLimit() int

func (*SfsTurbo) GetMountTargets

func (self *SfsTurbo) GetMountTargets() ([]cloudprovider.ICloudMountTarget, error)

func (*SfsTurbo) GetName

func (self *SfsTurbo) GetName() string

func (*SfsTurbo) GetProtocol

func (self *SfsTurbo) GetProtocol() string

func (*SfsTurbo) GetStatus

func (self *SfsTurbo) GetStatus() string

func (*SfsTurbo) GetStorageType

func (self *SfsTurbo) GetStorageType() string

func (*SfsTurbo) GetUsedCapacityGb

func (self *SfsTurbo) GetUsedCapacityGb() int64

func (*SfsTurbo) GetZoneId

func (self *SfsTurbo) GetZoneId() string

func (*SfsTurbo) Refresh

func (self *SfsTurbo) Refresh() error

type SnapshotStatusType

type SnapshotStatusType string
const (
	SnapshotStatusCreating      SnapshotStatusType = "creating"
	SnapshotStatusAvailable     SnapshotStatusType = "available"      // 云硬盘快照创建成功,可以使用。
	SnapshotStatusError         SnapshotStatusType = "error"          // 云硬盘快照在创建过程中出现错误。
	SnapshotStatusDeleting      SnapshotStatusType = "deleting"       //   云硬盘快照处于正在删除的过程中。
	SnapshotStatusErrorDeleting SnapshotStatusType = "error_deleting" //    云硬盘快照在删除过程中出现错误
	SnapshotStatusRollbacking   SnapshotStatusType = "rollbacking"    // 云硬盘快照处于正在回滚数据的过程中。
	SnapshotStatusBackingUp     SnapshotStatusType = "backing-up"     //  通过快照创建备份,快照状态就会变为backing-up
)

type StickySession

type StickySession struct {
	Type               string `json:"type"`
	CookieName         string `json:"cookie_name"`
	PersistenceTimeout int    `json:"persistence_timeout"`
}

type SysTag

type SysTag struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type TImageOwnerType

type TImageOwnerType string
const (
	ImageOwnerPublic TImageOwnerType = "gold"    // 公共镜像:gold
	ImageOwnerSelf   TImageOwnerType = "private" // 私有镜像:private
	ImageOwnerShared TImageOwnerType = "shared"  // 共享镜像:shared

	EnvFusionCompute = "FusionCompute"
	EnvIronic        = "Ironic"
)

type TInternetChargeType

type TInternetChargeType string

type VMMetadata

type VMMetadata struct {
	MeteringImageID           string `json:"metering.image_id"`
	MeteringImagetype         string `json:"metering.imagetype"`
	MeteringResourcespeccode  string `json:"metering.resourcespeccode"`
	ImageName                 string `json:"image_name"`
	OSBit                     string `json:"os_bit"`
	VpcID                     string `json:"vpc_id"`
	MeteringResourcetype      string `json:"metering.resourcetype"`
	CascadedInstanceExtrainfo string `json:"cascaded.instance_extrainfo"`
	OSType                    string `json:"os_type"`
	ChargingMode              string `json:"charging_mode"`
}

type VolumeImageMetadata

type VolumeImageMetadata struct {
	QuickStart             string `json:"__quick_start"`
	ContainerFormat        string `json:"container_format"`
	MinRAM                 string `json:"min_ram"`
	ImageName              string `json:"image_name"`
	ImageID                string `json:"image_id"`
	OSType                 string `json:"__os_type"`
	OSFeatureList          string `json:"__os_feature_list"`
	MinDisk                string `json:"min_disk"`
	SupportKVM             string `json:"__support_kvm"`
	VirtualEnvType         string `json:"virtual_env_type"`
	SizeGB                 string `json:"size"`
	OSVersion              string `json:"__os_version"`
	OSBit                  string `json:"__os_bit"`
	SupportKVMHi1822Hiovs  string `json:"__support_kvm_hi1822_hiovs"`
	SupportXen             string `json:"__support_xen"`
	Description            string `json:"__description"`
	Imagetype              string `json:"__imagetype"`
	DiskFormat             string `json:"disk_format"`
	ImageSourceType        string `json:"__image_source_type"`
	Checksum               string `json:"checksum"`
	Isregistered           string `json:"__isregistered"`
	HwVifMultiqueueEnabled string `json:"hw_vif_multiqueue_enabled"`
	Platform               string `json:"__platform"`
}

type ZoneState

type ZoneState struct {
	Available bool `json:"available"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL