hcs

package
v0.3.10-0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InternetChargeByTraffic   = TInternetChargeType("traffic")
	InternetChargeByBandwidth = TInternetChargeType("bandwidth")
)
View Source
const (
	VERSION_SPEC = "x-version"

	CLOUD_PROVIDER_HCS    = api.CLOUD_PROVIDER_HCS
	CLOUD_PROVIDER_HCS_CN = "华为云Stack"
	CLOUD_PROVIDER_HCS_EN = "HCS"

	HCS_API_VERSION = ""
)
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 (
	TASK_SUCCESS = "SUCCESS"
	TASK_FAIL    = "FAIL"
)
View Source
const (
	HUAWEI_NAT_SKU_SMALL  = "Small"
	HUAWEI_NAT_SKU_MIDDLE = "Middle"
	HUAWEI_NAT_SKU_LARGE  = "Large"
	HUAWEI_NAT_SKU_XLARGE = "XLarge"
)
View Source
const (
	BasicDateFormat     = "20060102T150405Z"
	Algorithm           = "SDK-HMAC-SHA256"
	HeaderXDate         = "X-Sdk-Date"
	HeaderHost          = "host"
	HeaderAuthorization = "Authorization"
	HeaderContentSha256 = "X-Sdk-Content-Sha256"
)

Variables

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_PROTOCOL_MAP = map[string]string{
	api.LB_LISTENER_TYPE_HTTP:  "HTTP",
	api.LB_LISTENER_TYPE_HTTPS: "TERMINATED_HTTPS",
	api.LB_LISTENER_TYPE_UDP:   "UDP",
	api.LB_LISTENER_TYPE_TCP:   "TCP",
}
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",
}

Functions

func AuthHeaderValue

func AuthHeaderValue(signature, accessKey string, signedHeaders []string) string

Get the finalized value for the "Authorization" header. The signature parameter is the output from SignStringToSign

func CanonicalHeaders

func CanonicalHeaders(r *http.Request, signerHeaders []string) string

CanonicalHeaders

func CanonicalQueryString

func CanonicalQueryString(r *http.Request) string

CanonicalQueryString

func CanonicalRequest

func CanonicalRequest(r *http.Request, signedHeaders []string) (string, error)

Build a CanonicalRequest from a regular request string

CanonicalRequest =

HTTPRequestMethod + '\n' +
CanonicalURI + '\n' +
CanonicalQueryString + '\n' +
CanonicalHeaders + '\n' +
SignedHeaders + '\n' +
HexEncode(Hash(RequestPayload))

func CanonicalURI

func CanonicalURI(r *http.Request) string

CanonicalURI returns request uri

func GetBucketName

func GetBucketName(regionId string, imageId string) string

func HexEncodeSHA256Hash

func HexEncodeSHA256Hash(body []byte) (string, error)

HexEncodeSHA256Hash returns hexcode of sha256

func NatResouceStatusTransfer

func NatResouceStatusTransfer(status string) string

func RequestPayload

func RequestPayload(r *http.Request) ([]byte, error)

RequestPayload

func SignStringToSign

func SignStringToSign(stringToSign string, signingKey []byte) (string, error)

Create the HWS Signature.

func SignedHeaders

func SignedHeaders(r *http.Request) []string

SignedHeaders

func StringToSign

func StringToSign(canonicalRequest string, t time.Time) (string, error)

Create a "String to Sign".

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 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"`
	HwAvailabilityZone string `json:"HW:availability-zone"`
}

type FixedIP

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

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 HcsConfig

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

func NewHcsConfig

func NewHcsConfig(accessKey, accessSecret, projectId, url string) *HcsConfig

func (*HcsConfig) CloudproviderConfig

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

func (*HcsConfig) Debug

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

type HcsTags

type HcsTags struct {
	Tags []string
}

func (*HcsTags) GetSysTags

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

func (*HcsTags) GetTags

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

func (*HcsTags) SetTags

func (self *HcsTags) 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 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 OSExtendedVolumesVolumesAttached

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

type OSExtraSpecs

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

type OSSchedulerHints

type OSSchedulerHints struct {
}

type Pool

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

type Port

type Port struct {
	multicloud.SNetworkInterfaceBase
	huawei.HuaweiTags

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

func (*Port) GetAssociateId

func (port *Port) GetAssociateId() string

func (*Port) GetGlobalId

func (port *Port) GetGlobalId() string

func (*Port) GetICloudInterfaceAddresses

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

func (*Port) GetId

func (port *Port) GetId() string

func (*Port) GetMacAddress

func (port *Port) GetMacAddress() string

func (*Port) GetName

func (port *Port) GetName() string

func (*Port) GetStatus

func (port *Port) GetStatus() string

type PublicipInfo

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

type RequestVpcInfo

type RequestVpcInfo struct {
	VpcId    string `json:"vpc_id"`
	TenantId string `json:"tenant_id"`
}

type Rule

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

type SBackupStrategy

type SBackupStrategy struct {
	KeepDays  int
	StartTime string
}

type SBucket

type SBucket struct {
	multicloud.SBaseBucket
	huawei.HuaweiTags

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

func (*SBucket) AbortMultipartUpload

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

func (*SBucket) CompleteMultipartUpload

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

func (*SBucket) CopyObject

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

func (*SBucket) CopyPart

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

func (*SBucket) DeleteCORS

func (b *SBucket) DeleteCORS() error

func (*SBucket) DeleteObject

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

func (*SBucket) DeleteWebSiteConf

func (b *SBucket) DeleteWebSiteConf() error

func (*SBucket) GetAccessUrls

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

func (*SBucket) GetAcl

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

func (*SBucket) GetCORSRules

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

func (*SBucket) GetCreateAt

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

func (*SBucket) GetGlobalId

func (b *SBucket) GetGlobalId() string

func (*SBucket) GetIRegion

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

func (*SBucket) GetLimit

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

func (*SBucket) GetLocation

func (b *SBucket) GetLocation() string

func (*SBucket) GetName

func (b *SBucket) GetName() string

func (*SBucket) GetObject

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

func (*SBucket) GetProjectId

func (b *SBucket) GetProjectId() string

func (*SBucket) GetStats

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

func (*SBucket) GetStorageClass

func (b *SBucket) GetStorageClass() string

func (*SBucket) GetTags

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

func (*SBucket) GetTempUrl

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

func (*SBucket) GetWebsiteConf

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

func (*SBucket) LimitSupport

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

func (*SBucket) ListMultipartUploads

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

func (*SBucket) ListObjects

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

func (*SBucket) NewMultipartUpload

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

func (*SBucket) PutObject

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

func (*SBucket) SetAcl

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

func (*SBucket) SetCORS

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

func (*SBucket) SetLimit

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

func (*SBucket) SetTags

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

func (*SBucket) SetWebsite

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

func (*SBucket) UploadPart

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

type SDBInstance

type SDBInstance struct {
	multicloud.SDBInstanceBase
	huawei.HuaweiTags

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

func (*SDBInstance) ChangeConfig

func (*SDBInstance) ClosePublicConnection

func (rds *SDBInstance) ClosePublicConnection() error

func (*SDBInstance) CreateAccount

func (*SDBInstance) CreateDatabase

func (*SDBInstance) CreateIBackup

func (*SDBInstance) Delete

func (rds *SDBInstance) Delete() error

func (*SDBInstance) GetBillingType

func (rds *SDBInstance) GetBillingType() string

func (*SDBInstance) GetCategory

func (rds *SDBInstance) GetCategory() string

func (*SDBInstance) GetConnectionStr

func (rds *SDBInstance) GetConnectionStr() string

func (*SDBInstance) GetCreatedAt

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

func (*SDBInstance) GetDBNetworks

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

func (*SDBInstance) GetDiskSizeGB

func (rds *SDBInstance) GetDiskSizeGB() int

func (*SDBInstance) GetEngine

func (rds *SDBInstance) GetEngine() string

func (*SDBInstance) GetEngineVersion

func (rds *SDBInstance) GetEngineVersion() string

func (*SDBInstance) GetExpiredAt

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

func (*SDBInstance) GetGlobalId

func (rds *SDBInstance) GetGlobalId() string

func (*SDBInstance) GetIDBInstanceAccounts

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

func (*SDBInstance) GetIDBInstanceBackups

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

func (*SDBInstance) GetIDBInstanceDatabases

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

func (*SDBInstance) GetIDBInstanceParameters

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

func (*SDBInstance) GetIVpcId

func (rds *SDBInstance) GetIVpcId() string

func (*SDBInstance) GetId

func (rds *SDBInstance) GetId() string

func (*SDBInstance) GetInstanceType

func (rds *SDBInstance) GetInstanceType() string

func (*SDBInstance) GetInternalConnectionStr

func (rds *SDBInstance) GetInternalConnectionStr() string

func (*SDBInstance) GetMaintainTime

func (rds *SDBInstance) GetMaintainTime() string

func (*SDBInstance) GetName

func (rds *SDBInstance) GetName() string

func (*SDBInstance) GetPort

func (rds *SDBInstance) GetPort() int

func (*SDBInstance) GetProjectId

func (rds *SDBInstance) GetProjectId() string

func (*SDBInstance) GetSecurityGroupIds

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

func (*SDBInstance) GetStatus

func (rds *SDBInstance) GetStatus() string

func (*SDBInstance) GetStorageType

func (rds *SDBInstance) GetStorageType() string

func (*SDBInstance) GetVcpuCount

func (rds *SDBInstance) GetVcpuCount() int

func (*SDBInstance) GetVmemSizeMB

func (rds *SDBInstance) GetVmemSizeMB() int

func (*SDBInstance) GetZone1Id

func (rds *SDBInstance) GetZone1Id() string

func (*SDBInstance) GetZone2Id

func (rds *SDBInstance) GetZone2Id() string

func (*SDBInstance) GetZone3Id

func (rds *SDBInstance) GetZone3Id() string

func (*SDBInstance) GetZoneIdByRole

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

func (*SDBInstance) OpenPublicConnection

func (rds *SDBInstance) OpenPublicConnection() error

func (*SDBInstance) Reboot

func (rds *SDBInstance) Reboot() error

func (*SDBInstance) RecoveryFromBackup

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

func (*SDBInstance) Refresh

func (rds *SDBInstance) Refresh() error

func (*SDBInstance) Renew

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

type SDBInstanceAccount

type SDBInstanceAccount struct {
	multicloud.SDBInstanceAccountBase
	huawei.HuaweiTags

	Name string
	// contains filtered or unexported fields
}

func (*SDBInstanceAccount) Delete

func (account *SDBInstanceAccount) Delete() error

func (*SDBInstanceAccount) GetIDBInstanceAccountPrivileges

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

func (*SDBInstanceAccount) GetName

func (account *SDBInstanceAccount) GetName() string

func (*SDBInstanceAccount) GrantPrivilege

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

func (*SDBInstanceAccount) ResetPassword

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

func (*SDBInstanceAccount) RevokePrivilege

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

type SDBInstanceBackup

type SDBInstanceBackup struct {
	multicloud.SDBInstanceBackupBase
	huawei.HuaweiTags

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

func (*SDBInstanceBackup) CreateICloudDBInstance

func (*SDBInstanceBackup) Delete

func (backup *SDBInstanceBackup) Delete() error

func (*SDBInstanceBackup) GetBackupMode

func (backup *SDBInstanceBackup) GetBackupMode() string

func (*SDBInstanceBackup) GetBackupSizeMb

func (backup *SDBInstanceBackup) GetBackupSizeMb() int

func (*SDBInstanceBackup) GetDBInstanceId

func (backup *SDBInstanceBackup) GetDBInstanceId() string

func (*SDBInstanceBackup) GetDBNames

func (backup *SDBInstanceBackup) GetDBNames() string

func (*SDBInstanceBackup) GetEndTime

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

func (*SDBInstanceBackup) GetEngine

func (backup *SDBInstanceBackup) GetEngine() string

func (*SDBInstanceBackup) GetEngineVersion

func (backup *SDBInstanceBackup) GetEngineVersion() string

func (*SDBInstanceBackup) GetGlobalId

func (backup *SDBInstanceBackup) GetGlobalId() string

func (*SDBInstanceBackup) GetId

func (backup *SDBInstanceBackup) GetId() string

func (*SDBInstanceBackup) GetName

func (backup *SDBInstanceBackup) GetName() string

func (*SDBInstanceBackup) GetStartTime

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

func (*SDBInstanceBackup) GetStatus

func (backup *SDBInstanceBackup) GetStatus() string

func (*SDBInstanceBackup) Refresh

func (backup *SDBInstanceBackup) Refresh() error

type SDBInstanceDatabase

type SDBInstanceDatabase struct {
	multicloud.SDBInstanceDatabaseBase
	huawei.HuaweiTags

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

func (*SDBInstanceDatabase) Delete

func (database *SDBInstanceDatabase) Delete() error

func (*SDBInstanceDatabase) GetCharacterSet

func (database *SDBInstanceDatabase) GetCharacterSet() string

func (*SDBInstanceDatabase) GetGlobalId

func (database *SDBInstanceDatabase) GetGlobalId() string

func (*SDBInstanceDatabase) GetId

func (database *SDBInstanceDatabase) GetId() string

func (*SDBInstanceDatabase) GetName

func (database *SDBInstanceDatabase) GetName() string

func (*SDBInstanceDatabase) GetStatus

func (database *SDBInstanceDatabase) GetStatus() string

type SDBInstanceDatastore

type SDBInstanceDatastore struct {
	Id   string
	Name string
}

type SDBInstanceFlavor

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

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

func (*SDBInstanceFlavor) GetISkus

type SDBInstanceParameter

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

func (*SDBInstanceParameter) GetDescription

func (param *SDBInstanceParameter) GetDescription() string

func (*SDBInstanceParameter) GetGlobalId

func (param *SDBInstanceParameter) GetGlobalId() string

func (*SDBInstanceParameter) GetKey

func (param *SDBInstanceParameter) GetKey() string

func (*SDBInstanceParameter) GetValue

func (param *SDBInstanceParameter) GetValue() string

type SDBInstanceSku

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

	StorageType   string
	Az1           string
	Az2           string
	Engine        string
	EngineVersion string
}

func (*SDBInstanceSku) GetCategory

func (self *SDBInstanceSku) GetCategory() string

func (*SDBInstanceSku) GetDiskSizeStep

func (self *SDBInstanceSku) GetDiskSizeStep() int

func (*SDBInstanceSku) GetEngine

func (sku *SDBInstanceSku) GetEngine() string

func (*SDBInstanceSku) GetEngineVersion

func (sku *SDBInstanceSku) GetEngineVersion() string

func (*SDBInstanceSku) GetGlobalId

func (self *SDBInstanceSku) GetGlobalId() string

func (*SDBInstanceSku) GetIOPS

func (self *SDBInstanceSku) GetIOPS() int

func (*SDBInstanceSku) GetMaxConnections

func (self *SDBInstanceSku) GetMaxConnections() int

func (*SDBInstanceSku) GetMaxDiskSizeGb

func (self *SDBInstanceSku) GetMaxDiskSizeGb() int

func (*SDBInstanceSku) GetMinDiskSizeGb

func (self *SDBInstanceSku) GetMinDiskSizeGb() int

func (*SDBInstanceSku) GetName

func (self *SDBInstanceSku) GetName() string

func (*SDBInstanceSku) GetQPS

func (sku *SDBInstanceSku) GetQPS() int

func (*SDBInstanceSku) GetStatus

func (self *SDBInstanceSku) GetStatus() string

func (*SDBInstanceSku) GetStorageType

func (self *SDBInstanceSku) GetStorageType() string

func (*SDBInstanceSku) GetTPS

func (self *SDBInstanceSku) GetTPS() int

func (*SDBInstanceSku) GetVcpuCount

func (self *SDBInstanceSku) GetVcpuCount() int

func (*SDBInstanceSku) GetVmemSizeMb

func (self *SDBInstanceSku) GetVmemSizeMb() int

func (*SDBInstanceSku) GetZone1Id

func (self *SDBInstanceSku) GetZone1Id() string

func (*SDBInstanceSku) GetZone2Id

func (self *SDBInstanceSku) GetZone2Id() string

func (*SDBInstanceSku) GetZone3Id

func (self *SDBInstanceSku) GetZone3Id() string

func (*SDBInstanceSku) GetZoneId

func (self *SDBInstanceSku) GetZoneId() string

type SDBInstanceStorage

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

type SDatabasePrivilege

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

func (*SDatabasePrivilege) GetDBName

func (privilege *SDatabasePrivilege) GetDBName() string

func (*SDatabasePrivilege) GetGlobalId

func (privilege *SDatabasePrivilege) GetGlobalId() string

func (*SDatabasePrivilege) GetPrivilege

func (privilege *SDatabasePrivilege) GetPrivilege() string

type SDatastore

type SDatastore struct {
	Type    string
	Version string
}

type SDisk

type SDisk struct {
	multicloud.SDisk
	huawei.HuaweiDiskTags

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

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

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

func (*SDisk) Attach

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

func (*SDisk) CreateISnapshot

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

func (*SDisk) Delete

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

func (*SDisk) Detach

func (self *SDisk) Detach() error

func (*SDisk) GetAccessPath

func (self *SDisk) GetAccessPath() string

func (*SDisk) GetBillingType

func (self *SDisk) GetBillingType() string

func (*SDisk) GetCacheMode

func (self *SDisk) GetCacheMode() string

func (*SDisk) GetCreatedAt

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

func (*SDisk) GetDiskFormat

func (self *SDisk) GetDiskFormat() string

func (*SDisk) GetDiskSizeMB

func (self *SDisk) GetDiskSizeMB() int

func (*SDisk) GetDiskType

func (self *SDisk) GetDiskType() string

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

func (*SDisk) GetDriver

func (self *SDisk) GetDriver() string

func (*SDisk) GetFsFormat

func (self *SDisk) GetFsFormat() string

func (*SDisk) GetGlobalId

func (self *SDisk) GetGlobalId() string

func (*SDisk) GetISnapshot

func (self *SDisk) GetISnapshot(id 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) 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, sizeMB 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 SEip

type SEip struct {
	multicloud.SEipBase
	HcsTags

	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"`
	// contains filtered or unexported fields
}

func (*SEip) Associate

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

func (*SEip) ChangeBandwidth

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

func (*SEip) Delete

func (self *SEip) Delete() error

func (*SEip) Dissociate

func (self *SEip) Dissociate() error

func (*SEip) GetAssociationExternalId

func (self *SEip) GetAssociationExternalId() string

func (*SEip) GetAssociationType

func (self *SEip) GetAssociationType() string

func (*SEip) GetBandwidth

func (self *SEip) GetBandwidth() int

func (*SEip) GetBillingType

func (self *SEip) GetBillingType() string

func (*SEip) GetCreatedAt

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

func (*SEip) GetExpiredAt

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

func (*SEip) GetGlobalId

func (self *SEip) GetGlobalId() string

func (*SEip) GetINetworkId

func (self *SEip) GetINetworkId() string

func (*SEip) GetId

func (self *SEip) GetId() string

func (*SEip) GetInternetChargeType

func (self *SEip) GetInternetChargeType() string

func (*SEip) GetIpAddr

func (self *SEip) GetIpAddr() string

func (*SEip) GetMode

func (self *SEip) GetMode() string

func (*SEip) GetName

func (self *SEip) GetName() string

func (*SEip) GetPort

func (self *SEip) GetPort() *Port

func (*SEip) GetProjectId

func (self *SEip) GetProjectId() string

func (*SEip) GetStatus

func (self *SEip) GetStatus() string

func (*SEip) IsEmulated

func (self *SEip) IsEmulated() bool

func (*SEip) Refresh

func (self *SEip) Refresh() error

type SEipType

type SEipType struct {
	Id    string
	Type  string
	Name  string
	Group string
}

type SElasticcache

type SElasticcache struct {
	multicloud.SElasticcacheBase
	HcsTags

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

func (self *SElasticcache) ChangeInstanceSpec(spec string) error

func (*SElasticcache) CreateAcl

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

func (*SElasticcache) Delete

func (self *SElasticcache) Delete() 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) 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) Restart

func (self *SElasticcache) Restart() error

func (*SElasticcache) SetAutoRenew

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

func (*SElasticcache) SetMaintainTime

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

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

func (*SElasticcache) SetTags

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

func (*SElasticcache) UpdateAuthMode

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

SElasticcacheAccount => ResetPassword

func (*SElasticcache) UpdateSecurityGroups

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

type SElasticcacheAccount

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

func (*SElasticcacheAccount) Delete

func (self *SElasticcacheAccount) Delete() error

func (*SElasticcacheAccount) GetAccountPrivilege

func (self *SElasticcacheAccount) GetAccountPrivilege() string

func (*SElasticcacheAccount) GetAccountType

func (self *SElasticcacheAccount) GetAccountType() string

func (*SElasticcacheAccount) GetGlobalId

func (self *SElasticcacheAccount) GetGlobalId() string

func (*SElasticcacheAccount) GetId

func (self *SElasticcacheAccount) GetId() string

func (*SElasticcacheAccount) GetName

func (self *SElasticcacheAccount) GetName() string

func (*SElasticcacheAccount) GetStatus

func (self *SElasticcacheAccount) GetStatus() string

func (*SElasticcacheAccount) UpdateAccount

type SElasticcacheBackup

type SElasticcacheBackup struct {
	multicloud.SElasticcacheBackupBase
	huawei.HuaweiTags

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

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

func (*SElasticcacheBackup) Delete

func (self *SElasticcacheBackup) Delete() error

func (*SElasticcacheBackup) GetBackupMode

func (self *SElasticcacheBackup) GetBackupMode() string

func (*SElasticcacheBackup) GetBackupSizeMb

func (self *SElasticcacheBackup) GetBackupSizeMb() int

func (*SElasticcacheBackup) GetBackupType

func (self *SElasticcacheBackup) GetBackupType() string

func (*SElasticcacheBackup) GetDownloadURL

func (self *SElasticcacheBackup) GetDownloadURL() string

func (*SElasticcacheBackup) GetEndTime

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

func (*SElasticcacheBackup) GetGlobalId

func (self *SElasticcacheBackup) GetGlobalId() string

func (*SElasticcacheBackup) GetId

func (self *SElasticcacheBackup) GetId() string

func (*SElasticcacheBackup) GetName

func (self *SElasticcacheBackup) GetName() string

func (*SElasticcacheBackup) GetStartTime

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

func (*SElasticcacheBackup) GetStatus

func (self *SElasticcacheBackup) GetStatus() string

func (*SElasticcacheBackup) Refresh

func (self *SElasticcacheBackup) Refresh() error

func (*SElasticcacheBackup) RestoreInstance

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

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

type SElasticcacheParameter

type SElasticcacheParameter struct {
	multicloud.SElasticcacheParameterBase
	huawei.HuaweiTags

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

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

func (*SElasticcacheParameter) GetDescription

func (self *SElasticcacheParameter) GetDescription() string

func (*SElasticcacheParameter) GetForceRestart

func (self *SElasticcacheParameter) GetForceRestart() bool

func (*SElasticcacheParameter) GetGlobalId

func (self *SElasticcacheParameter) GetGlobalId() string

func (*SElasticcacheParameter) GetId

func (self *SElasticcacheParameter) GetId() string

func (*SElasticcacheParameter) GetModifiable

func (self *SElasticcacheParameter) GetModifiable() bool

func (*SElasticcacheParameter) GetName

func (self *SElasticcacheParameter) GetName() string

func (*SElasticcacheParameter) GetParameterKey

func (self *SElasticcacheParameter) GetParameterKey() string

func (*SElasticcacheParameter) GetParameterValue

func (self *SElasticcacheParameter) GetParameterValue() string

func (*SElasticcacheParameter) GetParameterValueRange

func (self *SElasticcacheParameter) GetParameterValueRange() string

func (*SElasticcacheParameter) GetStatus

func (self *SElasticcacheParameter) GetStatus() string

type SElbACL

type SElbACL struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

	Id              string `json:"id"`
	ListenerId      string `json:"listener_id"`
	TenantId        string `json:"tenant_id"`
	EnableWhitelist bool   `json:"enable_whitelist"`
	Whitelist       string `json:"whitelist"`
	// contains filtered or unexported fields
}

func (*SElbACL) Delete

func (self *SElbACL) Delete() error

func (*SElbACL) GetAclEntries

func (*SElbACL) GetAclListenerID

func (self *SElbACL) GetAclListenerID() string

func (*SElbACL) GetGlobalId

func (self *SElbACL) GetGlobalId() string

func (*SElbACL) GetId

func (self *SElbACL) GetId() string

func (*SElbACL) GetName

func (self *SElbACL) GetName() string

func (*SElbACL) GetProjectId

func (self *SElbACL) GetProjectId() string

func (*SElbACL) GetStatus

func (self *SElbACL) GetStatus() string

func (*SElbACL) IsEmulated

func (self *SElbACL) IsEmulated() bool

func (*SElbACL) Refresh

func (self *SElbACL) Refresh() error

func (*SElbACL) Sync

type SElbBackend

type SElbBackend struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

	Name            string `json:"name"`
	Weight          int    `json:"weight"`
	AdminStateUp    bool   `json:"admin_state_up"`
	SubnetId        string `json:"subnet_id"`
	TenantId        string `json:"tenant_id"`
	ProjectId       string `json:"project_id"`
	Address         string `json:"address"`
	ProtocolPort    int    `json:"protocol_port"`
	OperatingStatus string `json:"operating_status"`
	Id              string `json:"id"`
	// contains filtered or unexported fields
}

func (*SElbBackend) GetBackendId

func (self *SElbBackend) GetBackendId() string

func (*SElbBackend) GetBackendRole

func (self *SElbBackend) GetBackendRole() string

func (*SElbBackend) GetBackendType

func (self *SElbBackend) GetBackendType() string

func (*SElbBackend) GetGlobalId

func (self *SElbBackend) GetGlobalId() string

func (*SElbBackend) GetId

func (self *SElbBackend) GetId() string

func (*SElbBackend) GetIpAddress

func (self *SElbBackend) GetIpAddress() string

func (*SElbBackend) GetName

func (self *SElbBackend) GetName() string

func (*SElbBackend) GetPort

func (self *SElbBackend) GetPort() int

func (*SElbBackend) GetProjectId

func (self *SElbBackend) GetProjectId() string

func (*SElbBackend) GetStatus

func (self *SElbBackend) GetStatus() string

func (*SElbBackend) GetWeight

func (self *SElbBackend) GetWeight() int

func (*SElbBackend) IsEmulated

func (self *SElbBackend) IsEmulated() bool

func (*SElbBackend) Refresh

func (self *SElbBackend) Refresh() error

func (*SElbBackend) SyncConf

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

type SElbBackendGroup

type SElbBackendGroup struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

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

func (*SElbBackendGroup) AddBackendServer

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

func (*SElbBackendGroup) Delete

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

func (*SElbBackendGroup) GetGlobalId

func (self *SElbBackendGroup) GetGlobalId() string

func (*SElbBackendGroup) GetHealthCheck

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

func (*SElbBackendGroup) GetILoadbalancer

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

func (*SElbBackendGroup) GetILoadbalancerBackendById

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

func (*SElbBackendGroup) GetILoadbalancerBackends

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

func (*SElbBackendGroup) GetId

func (self *SElbBackendGroup) GetId() string

func (*SElbBackendGroup) GetLoadbalancerId

func (self *SElbBackendGroup) GetLoadbalancerId() string

func (*SElbBackendGroup) GetName

func (self *SElbBackendGroup) GetName() string

func (*SElbBackendGroup) GetProjectId

func (self *SElbBackendGroup) GetProjectId() string

func (*SElbBackendGroup) GetProtocolType

func (self *SElbBackendGroup) GetProtocolType() string

func (*SElbBackendGroup) GetScheduler

func (self *SElbBackendGroup) GetScheduler() string

func (*SElbBackendGroup) GetStatus

func (self *SElbBackendGroup) GetStatus() string

func (*SElbBackendGroup) GetStickySession

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

func (*SElbBackendGroup) GetType

func (self *SElbBackendGroup) GetType() string

func (*SElbBackendGroup) IsDefault

func (self *SElbBackendGroup) IsDefault() bool

func (*SElbBackendGroup) IsEmulated

func (self *SElbBackendGroup) IsEmulated() bool

func (*SElbBackendGroup) Refresh

func (self *SElbBackendGroup) Refresh() error

func (*SElbBackendGroup) RemoveBackendServer

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

func (*SElbBackendGroup) Sync

type SElbCert

type SElbCert struct {
	multicloud.SResourceBase
	HcsTags

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

func (*SElbCert) Delete

func (self *SElbCert) Delete() error

func (*SElbCert) GetCommonName

func (self *SElbCert) GetCommonName() string

func (*SElbCert) GetExpireTime

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

func (*SElbCert) GetFingerprint

func (self *SElbCert) GetFingerprint() string

func (*SElbCert) GetGlobalId

func (self *SElbCert) GetGlobalId() string

func (*SElbCert) GetId

func (self *SElbCert) GetId() string

func (*SElbCert) GetName

func (self *SElbCert) GetName() string

func (*SElbCert) GetPrivateKey

func (self *SElbCert) GetPrivateKey() string

func (*SElbCert) GetProjectId

func (self *SElbCert) GetProjectId() string

func (*SElbCert) GetPublickKey

func (self *SElbCert) GetPublickKey() string

func (*SElbCert) GetStatus

func (self *SElbCert) GetStatus() string

func (*SElbCert) GetSubjectAlternativeNames

func (self *SElbCert) GetSubjectAlternativeNames() string

func (*SElbCert) IsEmulated

func (self *SElbCert) IsEmulated() bool

func (*SElbCert) Refresh

func (self *SElbCert) Refresh() error

func (*SElbCert) Sync

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

type SElbHealthCheck

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

type SElbListener

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

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

func (*SElbListener) 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) Start

func (self *SElbListener) Start() error

func (*SElbListener) Stop

func (self *SElbListener) Stop() error

func (*SElbListener) Sync

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

default_pool_id有如下限制: 不能更新为其他监听器的default_pool。 不能更新为其他监听器的关联的转发策略所使用的pool。 default_pool_id对应的后端云服务器组的protocol和监听器的protocol有如下关系: 监听器的protocol为TCP时,后端云服务器组的protocol必须为TCP。 监听器的protocol为UDP时,后端云服务器组的protocol必须为UDP。 监听器的protocol为HTTP或TERMINATED_HTTPS时,后端云服务器组的protocol必须为HTTP。

func (*SElbListener) XForwardedForEnabled

func (self *SElbListener) XForwardedForEnabled() bool

type SElbListenerPolicy

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

	RedirectPoolId     string  `json:"redirect_pool_id"`
	RedirectListenerId *string `json:"redirect_listener_id"`
	Description        string  `json:"description"`
	AdminStateUp       bool    `json:"admin_state_up"`
	Rules              []Rule  `json:"rules"`
	TenantId           string  `json:"tenant_id"`
	ProjectId          string  `json:"project_id"`
	ListenerId         string  `json:"listener_id"`
	RedirectURL        *string `json:"redirect_url"`
	ProvisioningStatus string  `json:"provisioning_status"`
	Action             string  `json:"action"`
	Position           int64   `json:"position"`
	Id                 string  `json:"id"`
	Name               string  `json:"name"`
	// contains filtered or unexported fields
}

func (*SElbListenerPolicy) Delete

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

func (*SElbListenerPolicy) GetBackendGroupId

func (self *SElbListenerPolicy) GetBackendGroupId() string

func (*SElbListenerPolicy) GetCondition

func (self *SElbListenerPolicy) GetCondition() string

func (*SElbListenerPolicy) GetDomain

func (self *SElbListenerPolicy) GetDomain() string

func (*SElbListenerPolicy) GetGlobalId

func (self *SElbListenerPolicy) GetGlobalId() string

func (*SElbListenerPolicy) GetId

func (self *SElbListenerPolicy) GetId() string

func (*SElbListenerPolicy) GetName

func (self *SElbListenerPolicy) GetName() string

func (*SElbListenerPolicy) GetPath

func (self *SElbListenerPolicy) GetPath() string

func (*SElbListenerPolicy) GetProjectId

func (self *SElbListenerPolicy) GetProjectId() string

func (*SElbListenerPolicy) GetRules

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

func (*SElbListenerPolicy) GetStatus

func (self *SElbListenerPolicy) GetStatus() string

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

func (*SElbListenerPolicy) IsDefault

func (self *SElbListenerPolicy) IsDefault() bool

func (*SElbListenerPolicy) IsEmulated

func (self *SElbListenerPolicy) IsEmulated() bool

func (*SElbListenerPolicy) Refresh

func (self *SElbListenerPolicy) Refresh() error

type SElbListenerPolicyRule

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

type 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 SHcsClient

type SHcsClient struct {
	*HcsConfig
	// contains filtered or unexported fields
}

func NewHcsClient

func NewHcsClient(cfg *HcsConfig) (*SHcsClient, error)

func (*SHcsClient) GetAccountId

func (self *SHcsClient) GetAccountId() string

func (*SHcsClient) GetBuckets

func (self *SHcsClient) GetBuckets() ([]SBucket, error)

func (*SHcsClient) GetCapabilities

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

func (*SHcsClient) GetCloudRegionExternalIdPrefix

func (self *SHcsClient) GetCloudRegionExternalIdPrefix() string

func (*SHcsClient) GetIRegions

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

func (*SHcsClient) GetJob

func (self *SHcsClient) GetJob(service, regionId string, jobId string) (*SJob, error)

func (*SHcsClient) GetMetrics

func (*SHcsClient) GetProjectById

func (self *SHcsClient) GetProjectById(id string) (*SProject, error)

func (*SHcsClient) GetProjects

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

func (*SHcsClient) GetRegion

func (self *SHcsClient) GetRegion(id string) (*SRegion, error)

func (*SHcsClient) GetRegions

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

func (*SHcsClient) GetSubAccounts

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

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 (self *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) GetIWires

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

func (*SHost) GetId

func (self *SHost) GetId() string

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

type SImage

type SImage struct {
	multicloud.SImageBase
	huawei.HuaweiTags

	Schema                 string    `json:"schema"`
	MinDiskGB              int64     `json:"min_disk"`
	CreatedAt              time.Time `json:"created_at"`
	ImageSourceType        string    `json:"__image_source_type"`
	ContainerFormat        string    `json:"container_format"`
	File                   string    `json:"file"`
	UpdatedAt              time.Time `json:"updated_at"`
	Protected              bool      `json:"protected"`
	Checksum               string    `json:"checksum"`
	Id                     string    `json:"id"`
	Isregistered           string    `json:"__isregistered"`
	MinRamMB               int       `json:"min_ram"`
	Lazyloading            string    `json:"__lazyloading"`
	Owner                  string    `json:"owner"`
	OSType                 string    `json:"__os_type"`
	Imagetype              string    `json:"__imagetype"`
	Visibility             string    `json:"visibility"`
	VirtualEnvType         string    `json:"virtual_env_type"`
	Platform               string    `json:"__platform"`
	SizeGB                 int       `json:"size"`
	ImageSize              int64     `json:"__image_size"`
	OSBit                  string    `json:"__os_bit"`
	OSVersion              string    `json:"__os_version"`
	Architecture           string
	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

func (*SImage) UEFI

func (self *SImage) UEFI() bool

type SInstance

type SInstance struct {
	multicloud.SInstanceBase
	huawei.HuaweiTags

	Id          string                 `json:"id"`
	Name        string                 `json:"name"`
	Addresses   map[string][]IpAddress `json:"addresses"`
	Flavor      Flavor                 `json:"flavor"`
	AccessIPv4  string                 `json:"accessIPv4"`
	AccessIPv6  string                 `json:"accessIPv6"`
	Status      string                 `json:"status"`
	Progress    string                 `json:"progress"`
	HostId      string                 `json:"hostId"`
	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"`
	// 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) AssignSecurityGroup

func (self *SInstance) AssignSecurityGroup(secgroupId string) error

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

func (self *SInstance) GetOSName() string

func (*SInstance) GetOsArch

func (self *SInstance) GetOsArch() string

func (*SInstance) GetOsDist

func (i *SInstance) GetOsDist() string

func (*SInstance) GetOsLang

func (i *SInstance) GetOsLang() string

func (*SInstance) GetOsType

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

func (*SInstance) GetOsVersion

func (i *SInstance) GetOsVersion() string

func (*SInstance) 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) 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) 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

func (self *SInstance) UpdateVM(ctx context.Context, name string) error

type SInstanceInterface

type SInstanceInterface struct {
	NetId     string
	PortId    string
	MacAddr   string
	PortState string
	FixedIps  []struct {
		SubnetId  string
		IpAddress string
	}
}

type SInstanceNic

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

func (*SInstanceNic) GetDriver

func (self *SInstanceNic) GetDriver() string

func (*SInstanceNic) GetINetworkId

func (self *SInstanceNic) GetINetworkId() string

func (*SInstanceNic) GetIP

func (self *SInstanceNic) GetIP() string

func (*SInstanceNic) GetId

func (self *SInstanceNic) GetId() string

func (*SInstanceNic) GetMAC

func (self *SInstanceNic) GetMAC() string

func (*SInstanceNic) InClassicNetwork

func (self *SInstanceNic) InClassicNetwork() bool

type SInstanceType

type SInstanceType struct {
	multicloud.SResourceBase
	HcsTags

	Id           string       `json:"id"`
	Name         string       `json:"name"`
	Vcpus        int          `json:"vcpus"`
	RamMB        int          `json:"ram"`            // 内存大小
	OSExtraSpecs OSExtraSpecs `json:"os_extra_specs"` // 扩展规格
}

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

func (*SInstanceType) Delete

func (self *SInstanceType) Delete() error

func (*SInstanceType) GetAttachedDiskCount

func (self *SInstanceType) GetAttachedDiskCount() int

func (*SInstanceType) GetAttachedDiskSizeGB

func (self *SInstanceType) GetAttachedDiskSizeGB() int

func (*SInstanceType) GetAttachedDiskType

func (self *SInstanceType) GetAttachedDiskType() string

func (*SInstanceType) GetCpuArch

func (self *SInstanceType) GetCpuArch() string

func (*SInstanceType) GetCpuCoreCount

func (self *SInstanceType) GetCpuCoreCount() int

func (*SInstanceType) GetDataDiskMaxCount

func (self *SInstanceType) GetDataDiskMaxCount() int

func (*SInstanceType) GetDataDiskTypes

func (self *SInstanceType) GetDataDiskTypes() string

func (*SInstanceType) GetGlobalId

func (self *SInstanceType) GetGlobalId() string

func (*SInstanceType) GetGpuAttachable

func (self *SInstanceType) GetGpuAttachable() bool

func (*SInstanceType) GetGpuCount

func (self *SInstanceType) GetGpuCount() int

func (*SInstanceType) GetGpuMaxCount

func (self *SInstanceType) GetGpuMaxCount() int

func (*SInstanceType) GetGpuSpec

func (self *SInstanceType) GetGpuSpec() string

func (*SInstanceType) GetId

func (self *SInstanceType) GetId() string

func (*SInstanceType) GetInstanceTypeCategory

func (self *SInstanceType) GetInstanceTypeCategory() string

func (*SInstanceType) GetInstanceTypeFamily

func (self *SInstanceType) GetInstanceTypeFamily() string

func (*SInstanceType) GetMemorySizeMB

func (self *SInstanceType) GetMemorySizeMB() int

func (*SInstanceType) GetName

func (self *SInstanceType) GetName() string

func (*SInstanceType) GetNicMaxCount

func (self *SInstanceType) GetNicMaxCount() int

func (*SInstanceType) GetNicType

func (self *SInstanceType) GetNicType() string

func (*SInstanceType) GetOsName

func (self *SInstanceType) GetOsName() string

func (*SInstanceType) GetPostpaidStatus

func (self *SInstanceType) GetPostpaidStatus() string

func (*SInstanceType) GetPrepaidStatus

func (self *SInstanceType) GetPrepaidStatus() string

func (*SInstanceType) GetStatus

func (self *SInstanceType) GetStatus() string

func (*SInstanceType) GetSysDiskMaxSizeGB

func (self *SInstanceType) GetSysDiskMaxSizeGB() int

func (*SInstanceType) GetSysDiskMinSizeGB

func (self *SInstanceType) GetSysDiskMinSizeGB() int

func (*SInstanceType) GetSysDiskResizable

func (self *SInstanceType) GetSysDiskResizable() bool

func (*SInstanceType) GetSysDiskType

func (self *SInstanceType) GetSysDiskType() string

type SJob

type SJob struct {
	Status   string `json:"status"`
	Entities struct {
		SubJobsJotal int
		ImageId      string
		ServerId     string
		SubJobs      []SJob
	} `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"`
}

func (*SJob) GetIds

func (self *SJob) GetIds() []string

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 SLoadbalancer

type SLoadbalancer struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

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

func (*SLoadbalancer) CreateILoadBalancerListener

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() *SEip

func (*SLoadbalancer) GetGlobalId

func (self *SLoadbalancer) GetGlobalId() string

func (*SLoadbalancer) GetIEIP

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

func (*SLoadbalancer) GetILoadBalancerBackendGroups

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

func (*SLoadbalancer) GetILoadBalancerListenerById

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

func (*SLoadbalancer) GetILoadBalancerListeners

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

func (*SLoadbalancer) GetId

func (self *SLoadbalancer) GetId() string

func (*SLoadbalancer) GetLoadbalancerSpec

func (self *SLoadbalancer) GetLoadbalancerSpec() string

func (*SLoadbalancer) GetName

func (self *SLoadbalancer) GetName() string

func (*SLoadbalancer) GetNetwork

func (self *SLoadbalancer) GetNetwork() *SNetwork

func (*SLoadbalancer) GetNetworkIds

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

func (*SLoadbalancer) GetNetworkType

func (self *SLoadbalancer) GetNetworkType() string

func (*SLoadbalancer) GetProjectId

func (self *SLoadbalancer) GetProjectId() string

func (*SLoadbalancer) GetStatus

func (self *SLoadbalancer) GetStatus() string

func (*SLoadbalancer) GetVpcId

func (self *SLoadbalancer) GetVpcId() string

func (*SLoadbalancer) GetZone1Id

func (self *SLoadbalancer) GetZone1Id() string

func (*SLoadbalancer) GetZoneId

func (self *SLoadbalancer) GetZoneId() string

func (*SLoadbalancer) IsEmulated

func (self *SLoadbalancer) IsEmulated() bool

func (*SLoadbalancer) Refresh

func (self *SLoadbalancer) Refresh() error

func (*SLoadbalancer) SetTags

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

func (*SLoadbalancer) Start

func (self *SLoadbalancer) Start() error

func (*SLoadbalancer) Stop

func (self *SLoadbalancer) Stop() error

type SNatDEntry

type SNatDEntry struct {
	multicloud.SResourceBase
	HcsTags

	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
	HcsTags

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

func (*SNatGateway) CreateINatDEntry

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

func (*SNatGateway) CreateINatSEntry

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

func (*SNatGateway) Delete

func (self *SNatGateway) Delete() error

func (*SNatGateway) GetBillingType

func (gateway *SNatGateway) GetBillingType() string

func (*SNatGateway) GetCreatedAt

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

func (*SNatGateway) GetDescription

func (gateway *SNatGateway) GetDescription() string

func (*SNatGateway) GetExpiredAt

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

func (*SNatGateway) GetGlobalId

func (gateway *SNatGateway) GetGlobalId() string

func (*SNatGateway) GetIEips

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

func (*SNatGateway) GetINatDEntryByID

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

func (*SNatGateway) GetINatDTable

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

func (*SNatGateway) GetINatSEntryByID

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

func (*SNatGateway) GetINatSTable

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

func (*SNatGateway) GetINetworkId

func (self *SNatGateway) GetINetworkId() string

func (*SNatGateway) GetId

func (gateway *SNatGateway) GetId() string

func (*SNatGateway) GetName

func (gateway *SNatGateway) GetName() string

func (*SNatGateway) GetNatSpec

func (gateway *SNatGateway) GetNatSpec() string

func (*SNatGateway) GetStatus

func (gateway *SNatGateway) GetStatus() string

func (*SNatGateway) Refresh

func (self *SNatGateway) Refresh() error

type SNatSEntry

type SNatSEntry struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

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

func (*SNatSEntry) Delete

func (nat *SNatSEntry) Delete() error

func (*SNatSEntry) GetGlobalId

func (nat *SNatSEntry) GetGlobalId() string

func (*SNatSEntry) GetIP

func (nat *SNatSEntry) GetIP() string

func (*SNatSEntry) GetId

func (nat *SNatSEntry) GetId() string

func (*SNatSEntry) GetName

func (nat *SNatSEntry) GetName() string

func (*SNatSEntry) GetNetworkId

func (nat *SNatSEntry) GetNetworkId() string

func (*SNatSEntry) GetSourceCIDR

func (nat *SNatSEntry) GetSourceCIDR() string

func (*SNatSEntry) GetStatus

func (nat *SNatSEntry) GetStatus() string

func (*SNatSEntry) Refresh

func (nat *SNatSEntry) Refresh() error

type SNatSku

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

func (*SNatSku) GetConns

func (self *SNatSku) GetConns() int

func (*SNatSku) GetDesc

func (self *SNatSku) GetDesc() string

func (*SNatSku) GetGlobalId

func (self *SNatSku) GetGlobalId() string

func (*SNatSku) GetName

func (self *SNatSku) GetName() string

func (*SNatSku) GetPostpaidStatus

func (self *SNatSku) GetPostpaidStatus() string

func (*SNatSku) GetPps

func (self *SNatSku) GetPps() int

func (*SNatSku) GetPrepaidStatus

func (self *SNatSku) GetPrepaidStatus() string

func (*SNatSku) GetThroughput

func (self *SNatSku) GetThroughput() int

type SNetwork

type SNetwork struct {
	multicloud.SResourceBase
	HcsTags

	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() rbacutils.TRbacScope

func (*SNetwork) GetServerType

func (self *SNetwork) GetServerType() string

func (*SNetwork) Refresh

func (self *SNetwork) Refresh() error

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 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 {
	Id          string
	Name        string
	DomainId    string
	Description bool
	Enabled     bool
	ParentId    string
	IsDomain    bool
}

func (*SProject) GetHealthStatus

func (self *SProject) GetHealthStatus() string

type SRdsNetwork

type SRdsNetwork struct {
	SubnetId string
	IP       string
}

type SRedisFlavor

type SRedisFlavor struct {
	Capacity       int
	Unit           string
	AvailableZones []string
	AzCodes        []string
}

type SRedisInstanceType

type SRedisInstanceType struct {
	multicloud.SResourceBase
	ProductId             string
	SpecCode              string
	CacheMode             string
	ProductType           string
	CpuType               string
	StorageType           string
	Details               SRedisSkuDetails
	Engine                string
	EngineVersions        string
	SpecDetails           string
	SpecDetails2          string
	CharingType           string
	Price                 float32
	ProdType              string
	CloudServiceTypeCode  string
	CloudResourceTypeCode string
	Flavors               []SRedisFlavor
}

type SRedisSku

type SRedisSku struct {
	SRedisSkuDetails
	SRedisFlavor
	ProductId     string
	SpecCode      string
	CacheMode     string
	ProductType   string
	CpuType       string
	StorageType   string
	Engine        string
	EngineVersion string
	ProdType      string
}

func (*SRedisSku) GetCpuArch

func (self *SRedisSku) GetCpuArch() string

func (*SRedisSku) GetDiskSizeGb

func (self *SRedisSku) GetDiskSizeGb() int

func (*SRedisSku) GetEngine

func (self *SRedisSku) GetEngine() string

func (*SRedisSku) GetEngineArch

func (self *SRedisSku) GetEngineArch() string

func (*SRedisSku) GetEngineVersion

func (self *SRedisSku) GetEngineVersion() string

func (*SRedisSku) GetGlobalId

func (self *SRedisSku) GetGlobalId() string

func (*SRedisSku) GetLocalCategory

func (self *SRedisSku) GetLocalCategory() string

func (*SRedisSku) GetMaxClients

func (self *SRedisSku) GetMaxClients() int

func (*SRedisSku) GetMaxConnections

func (self *SRedisSku) GetMaxConnections() int

func (*SRedisSku) GetMaxInBandwidthMb

func (self *SRedisSku) GetMaxInBandwidthMb() int

func (*SRedisSku) GetMaxMemoryMb

func (self *SRedisSku) GetMaxMemoryMb() int

func (*SRedisSku) GetMaxReplicasNum

func (self *SRedisSku) GetMaxReplicasNum() int

func (*SRedisSku) GetMaxShardNum

func (self *SRedisSku) GetMaxShardNum() int

func (*SRedisSku) GetMemorySizeMb

func (self *SRedisSku) GetMemorySizeMb() int

func (*SRedisSku) GetName

func (self *SRedisSku) GetName() string

func (*SRedisSku) GetNodeType

func (self *SRedisSku) GetNodeType() string

func (*SRedisSku) GetPerformanceType

func (self *SRedisSku) GetPerformanceType() string

func (*SRedisSku) GetPostpaidStatus

func (self *SRedisSku) GetPostpaidStatus() string

func (*SRedisSku) GetPrepaidStatus

func (self *SRedisSku) GetPrepaidStatus() string

func (*SRedisSku) GetQps

func (self *SRedisSku) GetQps() int

func (*SRedisSku) GetReplicasNum

func (self *SRedisSku) GetReplicasNum() int

func (*SRedisSku) GetShardNum

func (self *SRedisSku) GetShardNum() int

func (*SRedisSku) GetSlaveZoneId

func (self *SRedisSku) GetSlaveZoneId() string

func (*SRedisSku) GetStorageType

func (self *SRedisSku) GetStorageType() string

func (*SRedisSku) GetZoneId

func (self *SRedisSku) GetZoneId() string

type SRedisSkuDetails

type SRedisSkuDetails struct {
	Capacity       int
	MaxMemory      float32
	MaxConnections int
	MaxClients     int
	MaxBandwidth   int
	MaxInBandwidth int
	TenantIpCount  int
	ShardingNum    int
	ProxyNum       int
	DBNumber       int
}

type SRegion

type SRegion struct {
	HcsTags
	multicloud.SRegion
	multicloud.SRegionEipBase
	multicloud.SRegionOssBase
	multicloud.SRegionLbBase
	multicloud.SRegionVpcBase
	multicloud.SRegionZoneBase
	multicloud.SRegionSecurityGroupBase

	Id          string
	CloudInfras []string
	Description string
	Locales     struct {
		EnUS string `json:"en-us"`
		ZhCN string `json:"zh-cn"`
	}
	ParentRegionId string
	// contains filtered or unexported fields
}

func (*SRegion) AcceptVpcPeering

func (self *SRegion) AcceptVpcPeering(id 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) AddSecurityGroupRule

func (self *SRegion) AddSecurityGroupRule(secGrpId, direction, portStart, portEnd, protocol, ipNet string) error

func (*SRegion) AllocateEIP

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

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

func (*SRegion) AssignSecurityGroups

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

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

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

func (self *SRegion) CreateBucket(name string, storageClassStr string, aclStr string) error

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) (*SDisk, error)

func (*SRegion) CreateEIP

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

func (*SRegion) CreateElasticcache

func (self *SRegion) CreateElasticcache(opts *cloudprovider.SCloudElasticCacheInput) (*SElasticcache, error)

func (*SRegion) CreateIBucket

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

func (*SRegion) CreateILoadBalancer

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

func (*SRegion) CreateISecurityGroup

func (*SRegion) CreateInstance

func (self *SRegion) CreateInstance(name string, imageId string, instanceType string, subnetId string,
	securityGroupId string, vpcId string, zoneId string, desc string, sysDisk cloudprovider.SDiskInfo, dataDisks []cloudprovider.SDiskInfo, ipAddr string,
	keypair string, passwd string, userData string, bc *billing.SBillingCycle, projectId string, tags map[string]string) (*SInstance, error)

func (*SRegion) CreateLoadBalancerAcl

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

func (*SRegion) CreateLoadBalancerHealthCheck

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

func (*SRegion) CreateLoadBalancerListener

func (self *SRegion) CreateLoadBalancerListener(listener *cloudprovider.SLoadbalancerListener) (SElbListener, error)

func (*SRegion) CreateNatDEntry

func (self *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 (self *SRegion) CreateNatSEntry(rule cloudprovider.SNatSRule, gatewayId string) (*SNatSEntry, error)

func (*SRegion) CreateNetwork

func (self *SRegion) CreateNetwork(vpcId string, name string, cidr string, desc string) (*SNetwork, error)

https://support.huaweicloud.com/api-vpc/zh-cn_topic_0020090590.html cidr 掩码长度不能大于28

func (*SRegion) CreateSecurityGroup

func (self *SRegion) CreateSecurityGroup(vpcId string, name string, desc string) (*SSecurityGroup, error)

func (*SRegion) CreateSecurityGroupRule

func (self *SRegion) CreateSecurityGroupRule(secGrpId string, rule cloudprovider.SecurityRule) 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) CreateSnapshot

func (self *SRegion) CreateSnapshot(diskId, name, desc string) (*SSnapshot, 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) 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(id string) error

func (*SRegion) DeleteElasticcache

func (self *SRegion) DeleteElasticcache(id 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 (self *SRegion) DeleteNatDEntry(entryId string) error

func (*SRegion) DeleteNatGateway

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

func (*SRegion) DeleteNatSEntry

func (self *SRegion) DeleteNatSEntry(entryId string) error

func (*SRegion) DeleteNetwork

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

func (*SRegion) DeleteSecurityGroup

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

func (*SRegion) DeleteSecurityGroupRule

func (self *SRegion) DeleteSecurityGroupRule(ruleId 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) DeleteSnapshot

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

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

func (*SRegion) DeleteVM

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

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

func (*SRegion) DeleteVpc

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

func (*SRegion) DeleteVpcPeering

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

func (*SRegion) DissociateEip

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

func (*SRegion) GetBuckets

func (self *SRegion) GetBuckets() ([]SBucket, error)

func (*SRegion) GetCapabilities

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

func (*SRegion) GetClient

func (self *SRegion) GetClient() *SHcsClient

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)

rds查询数据库列表

func (*SRegion) GetDBInstanceDatastores

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

rds数据库引擎版本信息

func (*SRegion) GetDBInstanceFlavors

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

rds规格信息

func (*SRegion) GetDBInstanceParameters

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

func (*SRegion) GetDBInstancePrivileges

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

func (*SRegion) GetDBInstanceSkus

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

func (*SRegion) GetDBInstanceStorages

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

rds数据库磁盘类型

func (*SRegion) GetDBInstances

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

func (*SRegion) GetDisk

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

func (*SRegion) GetDiskTypes

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

func (*SRegion) GetEip

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

func (*SRegion) GetEipBandwidth

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

func (*SRegion) GetEipTypes

func (self *SRegion) GetEipTypes() ([]SEipType, error)

func (*SRegion) GetEips

func (self *SRegion) GetEips(portId string, addrs []string) ([]SEip, 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) 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) GetIBuckets

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

func (*SRegion) GetICloudNatSkus

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

func (*SRegion) GetICloudSku

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

func (*SRegion) GetIDBInstanceBackupById

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

func (*SRegion) GetIDBInstanceBackups

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

func (*SRegion) GetIDBInstanceById

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

func (*SRegion) GetIDBInstanceSkus

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

func (*SRegion) GetIDBInstances

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

func (*SRegion) GetIEipById

func (self *SRegion) GetIEipById(id 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) GetIElasticcacheSkus

func (self *SRegion) GetIElasticcacheSkus() ([]cloudprovider.ICloudElasticcacheSku, 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) GetILoadBalancerAclById

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

func (*SRegion) GetILoadBalancerBackendGroups

func (self *SRegion) GetILoadBalancerBackendGroups() ([]cloudprovider.ICloudLoadbalancerBackendGroup, 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) GetINetworkInterfaces

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

func (*SRegion) GetISecurityGroupById

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

func (*SRegion) GetISecurityGroupByName

func (*SRegion) GetISkus

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

func (*SRegion) GetISnapshotById

func (self *SRegion) GetISnapshotById(id 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) 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) GetId

func (self *SRegion) GetId() string

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

func (self *SRegion) GetInstance(id string) (*SInstance, error)

func (*SRegion) GetInstanceInterfaces

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

func (*SRegion) GetInstancePortId

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

func (*SRegion) GetJob

func (self *SRegion) GetJob(service string, jobId string) (*SJob, error)

func (*SRegion) GetLoadBalancerAcl

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

func (*SRegion) GetLoadBalancerBackendGroupId

func (self *SRegion) GetLoadBalancerBackendGroupId(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) GetMatchInstanceTypes

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

func (*SRegion) GetName

func (self *SRegion) GetName() string

func (*SRegion) GetNatDEntry

func (self *SRegion) GetNatDEntry(id string) (*SNatDEntry, error)

func (*SRegion) GetNatDTable

func (self *SRegion) GetNatDTable(natGatewayId string) ([]SNatDEntry, error)

func (*SRegion) GetNatGateway

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

func (*SRegion) GetNatGateways

func (self *SRegion) GetNatGateways(vpcId string) ([]SNatGateway, error)

func (*SRegion) GetNatSEntry

func (self *SRegion) GetNatSEntry(id string) (*SNatSEntry, error)

func (*SRegion) GetNatSTable

func (self *SRegion) GetNatSTable(natGatewayId string) ([]SNatSEntry, error)

func (*SRegion) GetNetwork

func (self *SRegion) GetNetwork(id string) (*SNetwork, error)

func (*SRegion) GetPort

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

func (*SRegion) GetProvider

func (self *SRegion) GetProvider() string

func (*SRegion) GetRedisInstnaceTypes

func (self *SRegion) GetRedisInstnaceTypes() ([]SRedisSku, 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) GetSecurityGroupDetails

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

func (*SRegion) GetSnapshot

func (self *SRegion) GetSnapshot(id string) (*SSnapshot, error)

func (*SRegion) GetStatus

func (self *SRegion) GetStatus() string

func (*SRegion) GetVpc

func (self *SRegion) GetVpc(id string) (*SVpc, error)

func (*SRegion) GetVpcPeering

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

func (*SRegion) GetVpcPeerings

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

func (*SRegion) GetVpcs

func (self *SRegion) GetVpcs() ([]SVpc, error)

func (*SRegion) GetZoneById

func (self *SRegion) GetZoneById(id string) (*SZone, error)

func (*SRegion) GetZoneSupportedDiskTypes

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

func (*SRegion) GetZones

func (self *SRegion) GetZones() ([]SZone, error)

func (*SRegion) GetchInstanceType

func (self *SRegion) GetchInstanceType(id string) (*SInstanceType, error)

func (*SRegion) GetchInstanceTypes

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

func (*SRegion) GrantDBInstancePrivilege

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

func (*SRegion) HeadBucket

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

func (*SRegion) ImportImageJob

func (self *SRegion) ImportImageJob(name string, osDist string, osVersion string, osArch string, bucket string, key string, minDiskGB int64) 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) 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) 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) RemoveLoadBalancerBackend

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

func (*SRegion) ResetDBInstanceAccountPassword

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

func (*SRegion) ResetDisk

func (self *SRegion) ResetDisk(diskId, snapshotId string) error

func (*SRegion) ResizeDisk

func (self *SRegion) ResizeDisk(id string, sizeGb int64) 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) UnassignSecurityGroups

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

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

func (*SRegion) UpdateEipBandwidth

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

func (*SRegion) UpdateLoadBalancerListener

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

func (*SRegion) UpdateVM

func (self *SRegion) UpdateVM(instanceId, name string) error

type SRelatedInstance

type SRelatedInstance struct {
	Id   string
	Type string
}

type SRoute

type SRoute struct {
	multicloud.SResourceBase
	huawei.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
	huawei.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 SSecurityGroup

type SSecurityGroup struct {
	multicloud.SSecurityGroup
	HcsTags

	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.SecurityRule, error)

todo: 这里需要优化查询太多了

func (*SSecurityGroup) GetSecurityRule

func (self *SSecurityGroup) GetSecurityRule(ruleId string) (cloudprovider.SecurityRule, error)

func (*SSecurityGroup) GetStatus

func (self *SSecurityGroup) GetStatus() string

func (*SSecurityGroup) GetVpcId

func (self *SSecurityGroup) GetVpcId() string

func (*SSecurityGroup) IsEmulated

func (self *SSecurityGroup) IsEmulated() bool

func (*SSecurityGroup) Refresh

func (self *SSecurityGroup) Refresh() error

func (*SSecurityGroup) SyncRules

func (self *SSecurityGroup) SyncRules(common, inAdds, outAdds, inDels, outDels []cloudprovider.SecurityRule) error

type SSnapshot

type SSnapshot struct {
	multicloud.SResourceBase
	HcsTags

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

func (self *SSnapshot) Refresh() error

type SStorage

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

func (*SStorage) CreateIDisk

func (*SStorage) GetCapacityMB

func (self *SStorage) GetCapacityMB() int64

func (*SStorage) GetCapacityUsedMB

func (self *SStorage) GetCapacityUsedMB() int64

func (*SStorage) GetEnabled

func (self *SStorage) GetEnabled() bool

func (*SStorage) GetGlobalId

func (self *SStorage) GetGlobalId() string

func (*SStorage) GetIDiskById

func (self *SStorage) GetIDiskById(id 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) IsSysDiskStore

func (self *SStorage) IsSysDiskStore() bool

type SStoragecache

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

func (*SStoragecache) CreateIImage

func (self *SStoragecache) CreateIImage(snapshotId, imageName, osType, imageDesc string) (cloudprovider.ICloudImage, error)

目前支持使用vhd、zvhd、vmdk、qcow2、raw、zvhd2、vhdx、qcow、vdi或qed格式镜像文件创建私有镜像。 快速通道功能可快速完成镜像制作,但镜像文件需转换为raw或zvhd2格式并完成镜像优化。 https://support.huaweicloud.com/api-ims/zh-cn_topic_0083905788.html

func (*SStoragecache) DownloadImage

func (self *SStoragecache) DownloadImage(userCred mcclient.TokenCredential, imageId string, extId string, path string) (jsonutils.JSONObject, error)

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

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

type SVolume

type SVolume struct {
	Size int
	Type string
}

type SVpc

type SVpc struct {
	multicloud.SVpc
	HcsTags

	Id                  string
	Name                string
	CIDR                string
	Status              string
	EnterpriseProjectId string
	// contains filtered or unexported fields
}

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(id 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) Refresh

func (self *SVpc) Refresh() error

type SVpcPeering

type SVpcPeering struct {
	multicloud.SResourceBase
	huawei.HuaweiTags

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

func (*SVpcPeering) Delete

func (self *SVpcPeering) Delete() error

func (*SVpcPeering) GetEnabled

func (self *SVpcPeering) GetEnabled() bool

func (*SVpcPeering) GetGlobalId

func (self *SVpcPeering) GetGlobalId() string

func (*SVpcPeering) GetId

func (self *SVpcPeering) GetId() string

func (*SVpcPeering) GetName

func (self *SVpcPeering) GetName() string

func (*SVpcPeering) GetPeerAccountId

func (self *SVpcPeering) GetPeerAccountId() string

func (*SVpcPeering) GetPeerVpcId

func (self *SVpcPeering) GetPeerVpcId() string

func (*SVpcPeering) GetStatus

func (self *SVpcPeering) GetStatus() string

func (*SVpcPeering) GetVpcId

func (self *SVpcPeering) GetVpcId() string

func (*SVpcPeering) Refresh

func (self *SVpcPeering) Refresh() error

type SWire

type SWire struct {
	multicloud.SResourceBase
	HcsTags
	// 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(id 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

type SZone

type SZone struct {
	multicloud.SResourceBase
	HcsTags

	ZoneName  string
	ZoneState struct {
		Available bool
	}
	// contains filtered or unexported fields
}

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

type SecurityGroup

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

type SecurityGroupRule

type SecurityGroupRule struct {
	Direction       string `json:"direction"`
	Ethertype       string `json:"ethertype"`
	Id              string `json:"id"`
	Description     string `json:"description"`
	SecurityGroupId string `json:"security_group_id"`
	RemoteGroupId   string `json:"remote_group_id"`
}

type SecurityGroupRuleDetail

type SecurityGroupRuleDetail struct {
	Direction       string `json:"direction"`
	Ethertype       string `json:"ethertype"`
	Id              string `json:"id"`
	Description     string `json:"description"`
	PortRangeMax    int64  `json:"port_range_max"`
	PortRangeMin    int64  `json:"port_range_min"`
	Protocol        string `json:"protocol"`
	RemoteGroupId   string `json:"remote_group_id"`
	RemoteIPPrefix  string `json:"remote_ip_prefix"`
	SecurityGroupId string `json:"security_group_id"`
	TenantId        string `json:"tenant_id"`
}

type Signer

type Signer struct {
	Key    string
	Secret string
}

Signature HWS meta

func (*Signer) Sign

func (s *Signer) Sign(r *http.Request) error

SignRequest set Authorization header

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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