huawei

package
v0.3.10-0-alpha...-9b162f2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 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_HUAWEI
	CLOUD_PROVIDER_HUAWEI_CN = "华为云"
	CLOUD_PROVIDER_HUAWEI_EN = "Huawei"

	HUAWEI_INTERNATIONAL_CLOUDENV = "InternationalCloud"
	HUAWEI_CHINA_CLOUDENV         = "ChinaCloud"

	HUAWEI_DEFAULT_REGION      = "cn-north-1"
	HUAWEI_CERT_DEFAULT_REGION = "cn-north-4"
	HUAWEI_API_VERSION         = "2018-12-25"

	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 DATETIME_FORMAT = "2006-01-02T15:04:05.999999999"

华为云返回的时间格式

Variables

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":      api.RegionShanghai,
	"cn-east-3":      api.RegionShanghai,
	"cn-north-1":     api.RegionBeijing,
	"cn-north-4":     api.RegionBeijing,
	"cn-south-1":     api.RegionGuangzhou,
	"cn-south-2":     api.RegionGuangzhou,
	"ap-southeast-1": api.RegionHongkong,
	"ap-southeast-2": api.RegionBangkok,
	"ap-southeast-3": api.RegionSingapore,
	"eu-west-0":      api.RegionParis,
	"cn-northeast-1": api.RegionDalian,
	"cn-southwest-2": api.RegionGuiyang,
	"af-south-1":     api.RegionJohannesburg,
	"sa-brazil-1":    api.RegionSaoPaulo,
	"na-mexico-1":    api.RegionMexico,
	"la-south-2":     api.RegionSantiago,
	"cn-north-9":     api.RegionNeimenggu,
	"cn-north-219":   api.RegionBeijing,
}

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(cloudEnv, accessKey, accessSecret, projectId string) *HuaweiClientConfig

func (*HuaweiClientConfig) CloudproviderConfig

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

func (*HuaweiClientConfig) Debug

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

type HuaweiDiskTags

type HuaweiDiskTags struct {
	Tags map[string]string
}

func (*HuaweiDiskTags) GetSysTags

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

func (*HuaweiDiskTags) GetTags

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

func (*HuaweiDiskTags) SetTags

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

type HuaweiTags

type HuaweiTags struct {
	Tags []string
}

func (*HuaweiTags) GetSysTags

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

func (*HuaweiTags) GetTags

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

func (*HuaweiTags) SetTags

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

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"`
}

type OSSchedulerHints

type OSSchedulerHints struct {
}

type Pool

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

type Port

type Port struct {
	multicloud.SNetworkInterfaceBase
	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
	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
	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) DeletePolicy

func (b *SBucket) DeletePolicy(id []string) ([]cloudprovider.SBucketPolicyStatement, 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) GetPolicy

func (b *SBucket) GetPolicy() ([]cloudprovider.SBucketPolicyStatement, 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

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) SetPolicy

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 SBucketPolicyStatement

type SBucketPolicyStatement struct {
	Version   string                          `json:"version"`
	Statement []SBucketPolicyStatementDetails `json:"Statement"`
}

type SBucketPolicyStatementDetails

type SBucketPolicyStatementDetails struct {
	Id        string                            `json:"id"`
	Sid       string                            `json:"Sid"`
	Effect    string                            `json:"Effect"`
	Principal map[string][]string               `json:"Principal"`
	Action    []string                          `json:"Action"`
	Resource  []string                          `json:"Resource"`
	Condition map[string]map[string]interface{} `json:"Condition"`
}

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
	HuaweiTags

	BackupStrategy      SBackupStrategy
	Created             string //time.Time
	Datastore           SDatastore
	DbUserName          string
	DIskEncryptionId    string
	FlavorRef           string
	Ha                  SHa
	Id                  string
	MaintenanceWindow   string
	MaxIops             int
	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) GetIops

func (rds *SDBInstance) GetIops() int

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

func (*SDBInstance) SetTags

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

func (*SDBInstance) Update

type SDBInstanceAccount

type SDBInstanceAccount struct {
	multicloud.SDBInstanceAccountBase
	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
	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
	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 SDBInstanceFlavor

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

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 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
	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
	HuaweiTags

	Alias               string
	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

func (*SEipAddress) SetTags

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

type SElasticcache

type SElasticcache struct {
	multicloud.SElasticcacheBase
	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
	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
	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
	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
	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
	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
	HuaweiTags

	LBAlgorithm        string         `json:"lb_algorithm"`
	Protocol           string         `json:"protocol"`
	Description        string         `json:"description"`
	AdminStateUp       bool           `json:"admin_state_up"`
	Loadbalancers      []Loadbalancer `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) 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
	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
	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 (self *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
	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
	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
	// 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() int

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无关的操作。 todo: 通过accessurl支持国际站。目前暂时未支持国际站

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) 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) 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) GetISSLCertificate

func (self *SHuaweiClient) GetISSLCertificate(certId string) (cloudprovider.ICloudSSLCertificate, error)

func (*SHuaweiClient) GetISSLCertificates

func (self *SHuaweiClient) GetISSLCertificates() ([]cloudprovider.ICloudSSLCertificate, error)

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) GetOwnerId

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

owner id == domain_id == account id

func (*SHuaweiClient) GetPoolNetworks

func (self *SHuaweiClient) GetPoolNetworks(poolName string) (jsonutils.JSONObject, error)

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) GetSSLCertificate

func (r *SHuaweiClient) GetSSLCertificate(certId string) (*SSSLCertificate, error)

func (*SHuaweiClient) GetSSLCertificates

func (r *SHuaweiClient) GetSSLCertificates(size, offset int) ([]SSSLCertificate, int, error)

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) QueryAccountBalance

func (self *SHuaweiClient) QueryAccountBalance() (*SAccountBalance, 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
	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 (self *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
	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"`
	Image       Image                  `json:"image"`
	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 (self *SInstance) DeployVM(ctx context.Context, name string, username string, password string, publicKey string, deleteKeypair bool, description string) error

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 (self *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) 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 (self *SInstance) GetOsDist() string

func (*SInstance) GetOsLang

func (self *SInstance) GetOsLang() string

func (*SInstance) GetOsType

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

func (*SInstance) GetOsVersion

func (self *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 {
	ID           string       `json:"id"`
	Name         string       `json:"name"`
	Vcpus        string       `json:"vcpus"`
	RamMB        int          `json:"ram"`            // 内存大小
	OSExtraSpecs OSExtraSpecs `json:"os_extra_specs"` // 扩展规格
}

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

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
	HuaweiTags

	Description         string     `json:"description"`
	ProvisioningStatus  string     `json:"provisioning_status"`
	TenantId            string     `json:"tenant_id"`
	ProjectId           string     `json:"project_id"`
	EnterpriseProjectId string     `json:"enterprise_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) 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
	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
	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
	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
	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 SNetwork

type SNetwork struct {
	multicloud.SResourceBase
	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) 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(opts *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) CreateLoadBalancerBackendGroup

func (self *SRegion) CreateLoadBalancerBackendGroup(lbId string, opts *cloudprovider.SLoadbalancerBackendGroup) (*SElbBackendGroup, error)

func (*SRegion) CreateLoadBalancerHealthCheck

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

func (*SRegion) CreateLoadBalancerListener

func (self *SRegion) CreateLoadBalancerListener(listener *cloudprovider.SLoadbalancerListenerCreateOptions, lbId string) (*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) CreateRdsTags

func (self *SRegion) CreateRdsTags(instanceId string, tags map[string]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) 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) DeletePool

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

func (*SRegion) DeleteRdsTags

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

func (*SRegion) DeleteSecurityGroup

func (self *SRegion) DeleteSecurityGroup(id string) 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) DeployVM

func (self *SRegion) DeployVM(instanceId string, name string, password string, keypairName string, deleteKeypair bool, description string) error

https://support.huaweicloud.com/api-ecs/zh-cn_topic_0020212692.html https://support.huaweicloud.com/api-ecs/zh-cn_topic_0110109377.html 一键式重置密码 需要安装安装一键式重置密码插件 https://support.huaweicloud.com/usermanual-ecs/zh-cn_topic_0068095385.html 目前不支持直接重置密钥

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) error

func (*SRegion) GetAllResByOrderId

func (self *SRegion) GetAllResByOrderId(orderId string) ([]SResource, 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) 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) 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(id string) (*Bandwidth, error)

func (*SRegion) GetEips

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

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) GetElbBackend

func (self *SRegion) GetElbBackend(pool, id string) (*SElbBackend, 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) GetICloudQuotas

func (region *SRegion) GetICloudQuotas() ([]cloudprovider.ICloudQuota, 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) 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(id 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) GetINetworkInterfaces

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

func (*SRegion) GetISecurityGroupById

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

func (*SRegion) GetISecurityGroups

func (self *SRegion) GetISecurityGroups() ([]cloudprovider.ICloudSecurityGroup, 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) GetLoadBalancerAcl

func (self *SRegion) GetLoadBalancerAcl(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) GetLoadBalancerCertificate

func (self *SRegion) GetLoadBalancerCertificate(id 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) GetLoadBalancers

func (self *SRegion) GetLoadBalancers() ([]SLoadbalancer, error)

func (*SRegion) GetLoadbalancer

func (self *SRegion) GetLoadbalancer(id 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) ([]modules.SMetricData, 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) GetOrder

func (self *SRegion) GetOrder(orderId string) (SOrder, error)

获取订单信息 https://support.huaweicloud.com/api-oce/api_order_00001.html

func (*SRegion) GetOrderResourceDetail

func (self *SRegion) GetOrderResourceDetail(resourceId string) (SResourceDetail, error)

获取资源详情 https://support.huaweicloud.com/api-oce/zh-cn_topic_0084961226.html

func (*SRegion) GetOrderResources

func (self *SRegion) GetOrderResources(orderId string, resource_ids []string, only_main_resource bool) ([]SResourceDetail, error)

获取订单资源详情列表 https://support.huaweicloud.com/api-oce/zh-cn_topic_0084961226.html

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) GetRouteTable

func (self *SRegion) GetRouteTable(id string) (*SRouteTable, error)

func (*SRegion) GetRouteTables

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

func (*SRegion) GetSecurityGroup

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

func (*SRegion) GetSecurityGroupRules

func (self *SRegion) GetSecurityGroupRules(groupId string) ([]SecurityGroupRule, 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) ModifyDBInstanceDesc

func (region *SRegion) ModifyDBInstanceDesc(instanceId string, desc string) error

func (*SRegion) ModifyDBInstanceName

func (region *SRegion) ModifyDBInstanceName(instanceId string, name string) error

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) RenewInstance

func (self *SRegion) RenewInstance(instanceId string, bc billing.SBillingCycle) error

// https://support.huaweicloud.com/api-bpconsole/zh-cn_topic_0082522029.html 只支持传入主资源ID, 根据“查询客户包周期资源列表”接口响应参数中的“is_main_resource”来标识。 expire_mode 0:进入宽限期 1:转按需 2:自动退订 3:自动续订(当前只支持ECS、EVS和VPC)

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) Update

func (region *SRegion) Update(instanceId string, input cloudprovider.SDBInstanceUpdateOptions) error

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
}

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 SRoute

type SRoute struct {
	multicloud.SResourceBase
	HuaweiTags

	Type        string `json:"type"`
	Destination string `json:"destination"`
	Nexthop     string `json:"nexthop"`
	Description string `json:"description,omitempty"`
}

func (*SRoute) GetCidr

func (self *SRoute) GetCidr() string

func (*SRoute) GetGlobalId

func (self *SRoute) GetGlobalId() string

func (*SRoute) GetId

func (self *SRoute) GetId() string

func (*SRoute) GetName

func (self *SRoute) GetName() string

func (*SRoute) GetNextHop

func (self *SRoute) GetNextHop() string

func (*SRoute) GetNextHopType

func (self *SRoute) GetNextHopType() string

func (*SRoute) GetStatus

func (route *SRoute) GetStatus() string

func (*SRoute) GetType

func (route *SRoute) GetType() string

type SRouteTable

type SRouteTable struct {
	multicloud.SResourceBase
	HuaweiTags

	Id       string   `json:"id"`
	Name     string   `json:"name"`
	Routes   []SRoute `json:"routes"`
	Subnets  []Subnet `json:"subnets"`
	VpcId    string   `json:"vpc_id"`
	Default  bool     `json:"default"`
	TenantId string   `json:"tenant_id"`
	// contains filtered or unexported fields
}

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) 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 SSSLCertificate

type SSSLCertificate struct {
	multicloud.SVirtualResourceBase
	HuaweiTags

	Id                 string // 证书ID
	Name               string // 证书名称
	Domain             string // 证书绑定的域名
	Sans               string // 证书的SAN(Subject Alternative Name)扩展属性,表示证书关联的其他域名、IP地址等
	SignatureAlgorithm string // 证书签名算法
	DeploySupport      bool   // 是否支持部署
	Type               string // 证书类型 取值如下: DV_SSL_CERT、DV_SSL_CERT_BASIC、EV_SSL_CERT、EV_SSL_CERT_PRO、OV_SSL_CERT、OV_SSL_CERT_PRO
	Brand              string // 证书品牌 取值如下:GLOBALSIGN、SYMANTEC、GEOTRUST、CFCA
	//ExpireTime          time.Time // 证书过期时间
	ExpireTime          string // 证书过期时间
	DomainType          string // 域名类型。取值如下: SINGLE_DOMAIN:单域名 WILDCARD:通配符 MULTI_DOMAIN:多域名
	ValidityPeriod      int    // 证书有效期,单位为月
	Status              string // 证书状态。取值如下: PAID:证书已支付;待申请证书 ISSUED:证书已签发 CHECKING:证书申请审核中 CANCELCHECKING:取消证书申请审核中 UNPASSED:证书申请未通过 EXPIRED:证书已过期 REVOKING:证书吊销申请审核中 CANCLEREVOKING:证书取消吊销申请审核中 REVOKED:证书已吊销 UPLOAD:证书托管中 SUPPLEMENTCHECKING:多域名证书新增附加域名审核中 CANCELSUPPLEMENTING:取消新增附加域名审核中
	DomainCount         int    // 证书绑定的域名数量
	WildcardCount       int    // 证书绑定的通配符域名数量
	Description         string // 证书描述
	EnterpriseProjectId string // 企业项目ID 默认为“0”

	Certificate string `json:"certificate"` // 证书内容
	PrivateKey  string `json:"private_key"` // 证书私钥
	// contains filtered or unexported fields
}

func (*SSSLCertificate) GetCert

func (s *SSSLCertificate) GetCert() string

func (*SSSLCertificate) GetCity

func (s *SSSLCertificate) GetCity() string

func (*SSSLCertificate) GetCommon

func (s *SSSLCertificate) GetCommon() string

func (*SSSLCertificate) GetCountry

func (s *SSSLCertificate) GetCountry() string

func (*SSSLCertificate) GetDetails

func (s *SSSLCertificate) GetDetails() (*SSSLCertificate, error)

func (*SSSLCertificate) GetEndDate

func (s *SSSLCertificate) GetEndDate() time.Time

func (*SSSLCertificate) GetExpired

func (s *SSSLCertificate) GetExpired() bool

func (*SSSLCertificate) GetFingerprint

func (s *SSSLCertificate) GetFingerprint() string

func (*SSSLCertificate) GetGlobalId

func (s *SSSLCertificate) GetGlobalId() string

func (*SSSLCertificate) GetId

func (s *SSSLCertificate) GetId() string

func (*SSSLCertificate) GetIsUpload

func (s *SSSLCertificate) GetIsUpload() bool

func (*SSSLCertificate) GetIssuer

func (s *SSSLCertificate) GetIssuer() string

func (*SSSLCertificate) GetKey

func (s *SSSLCertificate) GetKey() string

func (*SSSLCertificate) GetName

func (s *SSSLCertificate) GetName() string

func (*SSSLCertificate) GetOrgName

func (s *SSSLCertificate) GetOrgName() string

func (*SSSLCertificate) GetProvince

func (s *SSSLCertificate) GetProvince() string

func (*SSSLCertificate) GetSans

func (s *SSSLCertificate) GetSans() string

func (*SSSLCertificate) GetStartDate

func (s *SSSLCertificate) GetStartDate() time.Time

func (*SSSLCertificate) GetStatus

func (s *SSSLCertificate) GetStatus() string

type SSecurityGroup

type SSecurityGroup struct {
	multicloud.SSecurityGroup
	HuaweiTags

	Id                  string              `json:"id"`
	Name                string              `json:"name"`
	Description         string              `json:"description"`
	VpcId               string              `json:"vpc_id"`
	EnterpriseProjectId string              `json:"enterprise_project_id "`
	SecurityGroupRules  []SecurityGroupRule `json:"security_group_rules"`
	// contains filtered or unexported fields
}

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) 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"`
	Metadata         map[string]string `json:"metadata"`
}

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

type SSnapshot

type SSnapshot struct {
	multicloud.SResourceBase
	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
	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
	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
	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)

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
	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
	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
	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
	Priority        int
	// 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
	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 Subnet

type Subnet struct {
	Id string `json:"id"`
}

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"`
	MeteringOrderId           string `json:"metering.order_id"`
	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