ucloud

package
v1.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	EIP_CHARGE_TYPE_BY_TRAFFIC   = "traffic"
	EIP_CHARGE_TYPE_BY_BANDWIDTH = "bandwidth"
)
View Source
const (
	CLOUD_PROVIDER_UCLOUD    = api.CLOUD_PROVIDER_UCLOUD
	CLOUD_PROVIDER_UCLOUD_CN = "UCloud"

	UCLOUD_DEFAULT_REGION = "cn-bj2"

	UCLOUD_API_VERSION = "2019-02-28"
)
View Source
const UCLOUD_API_HOST = "https://api.ucloud.cn"

Variables

View Source
var LatitudeAndLongitude = map[string]cloudprovider.SGeographicInfo{
	"cn-bj1":       {Latitude: 39.9041999, Longitude: 116.4073963, City: api.CITY_BEI_JING, CountryCode: api.COUNTRY_CODE_CN},
	"cn-bj2":       {Latitude: 39.9041999, Longitude: 116.4073963, City: api.CITY_BEI_JING, CountryCode: api.COUNTRY_CODE_CN},
	"cn-sh":        {Latitude: 31.2303904, Longitude: 121.4737021, City: api.CITY_SHANG_HAI, CountryCode: api.COUNTRY_CODE_CN},
	"cn-sh2":       {Latitude: 31.2303904, Longitude: 121.4737021, City: api.CITY_SHANG_HAI, CountryCode: api.COUNTRY_CODE_CN},
	"cn-gd":        {Latitude: 23.12911, Longitude: 113.264385, City: api.CITY_GUANG_ZHOU, CountryCode: api.COUNTRY_CODE_CN},
	"hk":           {Latitude: 22.396428, Longitude: 114.109497, City: api.CITY_HONG_KONG, CountryCode: api.COUNTRY_CODE_CN},
	"us-ca":        {Latitude: 34.0522342, Longitude: -118.2436849, City: api.CITY_LOS_ANGELES, CountryCode: api.COUNTRY_CODE_US},
	"us-ws":        {Latitude: 38.9071923, Longitude: -77.0368707, City: api.CITY_WASHINGTON, CountryCode: api.COUNTRY_CODE_US},
	"ge-fra":       {Latitude: 50.1109221, Longitude: 8.6821267, City: api.CITY_FRANKFURT, CountryCode: api.COUNTRY_CODE_DE},
	"th-bkk":       {Latitude: 13.7563309, Longitude: 100.5017651, City: api.CITY_BANGKOK, CountryCode: api.COUNTRY_CODE_TH},
	"kr-seoul":     {Latitude: 37.566535, Longitude: 126.9779692, City: api.CITY_SEOUL, CountryCode: api.COUNTRY_CODE_KR},
	"sg":           {Latitude: 1.352083, Longitude: 103.819836, City: api.CITY_SINGAPORE, CountryCode: api.COUNTRY_CODE_SG},
	"tw-tp":        {Latitude: 25.0329694, Longitude: 121.5654177, City: api.CITY_TAIPEI, CountryCode: api.COUNTRY_CODE_CN},
	"tw-kh":        {Latitude: 22.6272784, Longitude: 120.3014353, City: api.CITY_KAOHSIUNG, CountryCode: api.COUNTRY_CODE_CN},
	"jpn-tky":      {Latitude: 35.7090259, Longitude: 139.7319925, City: api.CITY_TOKYO, CountryCode: api.COUNTRY_CODE_JP},
	"rus-mosc":     {Latitude: 55.755826, Longitude: 37.6172999, City: api.CITY_MOSCOW, CountryCode: api.COUNTRY_CODE_RU},
	"uae-dubai":    {Latitude: 25.2048493, Longitude: 55.2707828, City: api.CITY_DUBAI, CountryCode: api.COUNTRY_CODE_AE},
	"idn-jakarta":  {Latitude: -6.2087634, Longitude: 106.845599, City: api.CITY_JAKARTA, CountryCode: api.COUNTRY_CODE_ID},
	"ind-mumbai":   {Latitude: 19.0759837, Longitude: 72.8776559, City: api.CITY_MUMBAI, CountryCode: api.COUNTRY_CODE_IN},
	"bra-saopaulo": {Latitude: -23.5505199, Longitude: -46.6333094, City: api.CITY_SAO_PAULO, CountryCode: api.COUNTRY_CODE_BR},
	"uk-london":    {Latitude: 51.5073509, Longitude: -0.1277583, City: api.CITY_LONDON, CountryCode: api.COUNTRY_CODE_GB},
	"afr-nigeria":  {Latitude: 6.5243793, Longitude: 3.3792057, City: api.CITY_LAGOS, CountryCode: api.COUNTRY_CODE_NG},
	"vn-sng":       {Latitude: 10.8230989, Longitude: 106.6296638, City: api.CITY_HO_CHI_MINH, CountryCode: api.COUNTRY_CODE_VN},
	"cn-qz":        {Latitude: 24.9037185, Longitude: 118.5134676, City: api.CITY_QUAN_ZHOU, CountryCode: api.COUNTRY_CODE_CN},
}

https://docs.ucloud.cn/api/summary/regionlist

https://docs.ucloud.cn/api/udisk-api/create_udisk UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),默认值(DataDisk)

View Source
var UCLOUD_API_RESULT_KEYS = map[string]string{
	"AllocateEIP":            "EIPSet",
	"GetProjectList":         "ProjectSet",
	"GetRegion":              "Regions",
	"DescribeVPC":            "DataSet",
	"DescribeImage":          "ImageSet",
	"DescribeIsolationGroup": "IsolationGroupSet",
	"DescribeUHostInstance":  "UHostSet",
	"DescribeUHostTags":      "TagSet",
	"DescribeUDSet":          "UDSet",
	"DescribeUDisk":          "DataSet",
	"DescribeUDiskSnapshot":  "DataSet",
	"DescribeEIP":            "EIPSet",
	"DescribeFirewall":       "DataSet",
	"DescribeSubnet":         "DataSet",
	"DescribeBucket":         "DataSet",
	"CreateUDisk":            "UDiskId",
	"CreateVPC":              "VPCId",
	"CreateUDiskSnapshot":    "SnapshotId",
	"DescribeVIP":            "VIPSet",
}

API返回结果对应的字段名

View Source
var UCLOUD_REGION_NAMES = map[string]string{
	"cn-bj1":       "北京一",
	"cn-bj2":       "北京二",
	"cn-sh":        "上海金融云",
	"cn-sh2":       "上海二",
	"cn-gd":        "广州",
	"hk":           "香港",
	"us-ca":        "洛杉矶",
	"us-ws":        "华盛顿",
	"ge-fra":       "法兰克福",
	"th-bkk":       "曼谷",
	"kr-seoul":     "首尔",
	"sg":           "新加坡",
	"tw-tp":        "台北",
	"tw-kh":        "高雄",
	"jpn-tky":      "东京",
	"rus-mosc":     "莫斯科",
	"uae-dubai":    "迪拜",
	"idn-jakarta":  "雅加达",
	"ind-mumbai":   "孟买",
	"bra-saopaulo": "圣保罗",
	"uk-london":    "伦敦",
	"afr-nigeria":  "拉各斯",
	"vn-sng":       "胡志明市",
}

https://docs.ucloud.cn/api/summary/regionlist

View Source
var UCLOUD_REGION_NAMES_EN = map[string]string{
	"cn-bj1":       "Beijing 1",
	"cn-bj2":       "Beijing 2",
	"cn-sh":        "Shanghai 1",
	"cn-sh2":       "Shanghai 2",
	"cn-gd":        "Guangzhou",
	"hk":           "Hongkong",
	"us-ca":        "Los Angeles",
	"us-ws":        "Washington",
	"ge-fra":       "Frankfurt",
	"th-bkk":       "Bangkok",
	"kr-seoul":     "Seoul",
	"sg":           "Singapore",
	"tw-tp":        "TaiPei",
	"tw-kh":        "Gaoxiong",
	"jpn-tky":      "Tokyo",
	"rus-mosc":     "Moscow",
	"uae-dubai":    "Dubai",
	"idn-jakarta":  "Jakarta",
	"ind-mumbai":   "Mumbai",
	"bra-saopaulo": "Sao Paulo",
	"uk-london":    "London",
	"afr-nigeria":  "Lagos",
	"vn-sng":       "Ho Chi Min City",
}
View Source
var UCLOUD_ZONE_NAMES = map[string]string{
	"cn-bj1-01":       "北京一可用区A",
	"cn-bj2-02":       "北京二可用区B",
	"cn-bj2-03":       "北京二可用区C",
	"cn-bj2-04":       "北京二可用区D",
	"cn-bj2-05":       "北京二可用区E",
	"cn-sh-01":        "上海一可用区A",
	"cn-sh2-01":       "上海二可用区A",
	"cn-sh2-02":       "上海二可用区B",
	"cn-gd-02":        "广州可用区B",
	"hk-01":           "香港可用区A",
	"hk-02":           "香港可用区B",
	"us-ca-01":        "洛杉矶可用区A",
	"us-ws-01":        "华盛顿可用区A",
	"ge-fra-01":       "法兰克福可用区A",
	"th-bkk-01":       "曼谷可用区A",
	"kr-seoul-01":     "首尔可用区A",
	"sg-01":           "新加坡可用区A",
	"tw-kh-01":        "高雄可用区A",
	"tw-tp-01":        "台北可用区A",
	"jpn-tky-01":      "东京可用区A",
	"rus-mosc-01":     "莫斯科可用区A",
	"uae-dubai-01":    "迪拜可用区A",
	"idn-jakarta-01":  "雅加达可用区A",
	"ind-mumbai-01":   "孟买可用区A",
	"bra-saopaulo-01": "圣保罗可用区A",
	"uk-london-01":    "伦敦可用区A",
	"afr-nigeria-01":  "拉各斯可用区A",
	"vn-sng-01":       "胡志明市可用区A",
}
View Source
var UCLOUD_ZONE_NAMES_EN = map[string]string{
	"cn-bj1-01":       "Beijing 1 Zone A",
	"cn-bj2-02":       "Beijing 2 Zone B",
	"cn-bj2-03":       "Beijing 2 Zone C",
	"cn-bj2-04":       "Beijing 2 Zone D",
	"cn-bj2-05":       "Beijing 2 Zone E",
	"cn-sh-01":        "Shanghai 1 Zone A",
	"cn-sh2-01":       "Shanghai 2 Zone A",
	"cn-sh2-02":       "Shanghai 2 Zone B",
	"cn-gd-02":        "Guangzhou Zone B",
	"hk-01":           "Hongkong Zone A",
	"hk-02":           "Hongkong Zone B",
	"us-ca-01":        "Los Angeles Zone A",
	"us-ws-01":        "Washington Zone A",
	"ge-fra-01":       "Frankfurt Zone A",
	"th-bkk-01":       "Bangkok Zone A",
	"kr-seoul-01":     "Seoul Zone A",
	"sg-01":           "Singapore Zone A",
	"tw-kh-01":        "Gaoxiong Zone A",
	"tw-tp-01":        "TaiPei Zone A",
	"jpn-tky-01":      "Tokyo Zone A",
	"rus-mosc-01":     "Moscow Zone A",
	"uae-dubai-01":    "Dubai Zone A",
	"idn-jakarta-01":  "Jakarta Zone A",
	"ind-mumbai-01":   "Mumbai Zone A",
	"bra-saopaulo-01": "Sao Paulo Zone A",
	"uk-london-01":    "London Zone A",
	"afr-nigeria-01":  "Lagos Zone A",
	"vn-sng-01":       "Ho Chi Min City Zone A",
}

Functions

func DoAction

func DoAction(client *SUcloudClient, action string, params SParams, resultKey string, result interface{}) error

执行操作

func DoListAll

func DoListAll(client *SUcloudClient, action string, params SParams, resultKey string, result interface{}) error

遍历所有结果

func GetBucketName

func GetBucketName(regionId string, imageId string) string

func GetSignature

func GetSignature(params SParams, privateKey string) string

Types

type DiskSet

type DiskSet struct {
	DiskID    string `json:"DiskId"`
	DiskType  string `json:"DiskType"`
	Drive     string `json:"Drive"`
	IsBoot    bool   `json:"IsBoot"`
	Size      int    `json:"Size"`
	Encrypted string `json:"Encrypted"`
	Type      string `json:"Type"`
}

type Domain

type Domain struct {
	Src       []string      `json:"Src"`
	CDN       []string      `json:"Cdn"`
	CustomCDN []interface{} `json:"CustomCdn"`
	CustomSrc []interface{} `json:"CustomSrc"`
}

type EIPAddr

type EIPAddr struct {
	IP           string `json:"IP"`
	OperatorName string `json:"OperatorName"`
}

type IPSet

type IPSet struct {
	Type     string `json:"Type"`
	IP       string `json:"IP"`
	IPId     string `json:"IPId"` // IP资源ID (内网IP无对应的资源ID)
	MAC      string `json:"Mac"`
	VPCID    string `json:"VPCId"`
	SubnetID string `json:"SubnetId"`
}

type NetworkInfo

type NetworkInfo struct {
	Network     string `json:"Network"`
	SubnetCount int    `json:"SubnetCount"`
}

type Resource

type Resource struct {
	ResourceID   string `json:"ResourceID"`
	ResourceName string `json:"ResourceName"`
	ResourceType string `json:"ResourceType"`
	Zone         string `json:"Zone"`
}

type SBucket

type SBucket struct {
	multicloud.SBaseBucket
	UcloudTags

	Domain        Domain   `json:"Domain"`
	BucketID      string   `json:"BucketId"`
	Region        string   `json:"Region"`
	CreateTime    int64    `json:"CreateTime"`
	Biz           string   `json:"Biz"`
	BucketName    string   `json:"BucketName"`
	ModifyTime    int64    `json:"ModifyTime"`
	Type          string   `json:"Type"`
	Tag           string   `json:"Tag"`
	HasUserDomain int64    `json:"HasUserDomain"`
	CDNDomainID   []string `json:"CdnDomainId"`
	// 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, srcBucketName string, srcKey string, srcOffset int64, srcLength int64) (string, error)

func (*SBucket) DeleteObject

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

func (*SBucket) GetAccessUrls

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

func (*SBucket) GetAcl

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

func (*SBucket) GetCreatedAt

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

func (*SBucket) GetGlobalId

func (b *SBucket) GetGlobalId() string

func (*SBucket) GetIRegion

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

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

func (b *SBucket) GetTempUrl(method string, key string, expire time.Duration) (string, 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, input io.Reader, sizeBytes int64, cannedAcl cloudprovider.TBucketACLType, storageClassStr string, meta http.Header) error

func (*SBucket) SetAcl

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

func (*SBucket) UploadPart

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

type SDisk

type SDisk struct {
	multicloud.SDisk
	UcloudTags

	Status        string `json:"Status"`
	DeviceName    string `json:"DeviceName"`
	UHostID       string `json:"UHostId"`
	Tag           string `json:"Tag"`
	Version       string `json:"Version"`
	Name          string `json:"Name"`
	Zone          string `json:"Zone"`
	UHostIP       string `json:"UHostIP"`
	DiskType      string `json:"DiskType"`
	UDataArkMode  string `json:"UDataArkMode"`
	SnapshotLimit int    `json:"SnapshotLimit"`
	ExpiredTime   int64  `json:"ExpiredTime"`
	SnapshotCount int    `json:"SnapshotCount"`
	IsExpire      string `json:"IsExpire"`
	UDiskID       string `json:"UDiskId"`
	ChargeType    string `json:"ChargeType"`
	UHostName     string `json:"UHostName"`
	CreateTime    int64  `json:"CreateTime"`
	SizeGB        int    `json:"Size"`
	// contains filtered or unexported fields
}

https://docs.ucloud.cn/api/udisk-api/describe_udisk

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

func (self *SDisk) GetAccessPath() string

func (*SDisk) GetBillingType

func (self *SDisk) GetBillingType() string

Year,Month,Dynamic,Trial

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

func (*SDisk) GetDriver

func (self *SDisk) GetDriver() string

func (*SDisk) GetExpiredAt

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

func (*SDisk) GetFsFormat

func (self *SDisk) GetFsFormat() string

func (*SDisk) GetGlobalId

func (self *SDisk) GetGlobalId() string

func (*SDisk) GetISnapshot

func (self *SDisk) GetISnapshot(idStr 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) 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) GetStorageType

func (self *SDisk) GetStorageType() string

func (*SDisk) GetSysTags

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

func (*SDisk) GetTemplateId

func (self *SDisk) GetTemplateId() string

func (*SDisk) IsEmulated

func (self *SDisk) IsEmulated() bool

func (*SDisk) Rebuild

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

func (*SDisk) Refresh

func (self *SDisk) Refresh() error

func (*SDisk) Reset

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

func (*SDisk) Resize

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

type SEip

type SEip struct {
	multicloud.SEipBase
	UcloudTags

	BandwidthMb       int               `json:"Bandwidth"`
	BandwidthType     int               `json:"BandwidthType"`
	ChargeType        string            `json:"ChargeType"`
	CreateTime        int64             `json:"CreateTime"`
	EIPAddr           []EIPAddr         `json:"EIPAddr"`
	EIPID             string            `json:"EIPId"`
	Expire            bool              `json:"Expire"`
	ExpireTime        int64             `json:"ExpireTime"`
	Name              string            `json:"Name"`
	PayMode           string            `json:"PayMode"`
	Remark            string            `json:"Remark"`
	Resource          Resource          `json:"Resource"`
	ShareBandwidthSet ShareBandwidthSet `json:"ShareBandwidthSet"`
	Status            string            `json:"Status"`
	Tag               string            `json:"Tag"`
	Weight            int               `json:"Weight"`
	// contains filtered or unexported fields
}

https://docs.ucloud.cn/api/unet-api/describe_eip

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

已绑定的资源类型, 枚举值为: uhost, 云主机;natgw:NAT网关;ulb:负载均衡器;upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;vpngw:IPSec VPN;ucdr:云灾备;dbaudit:数据库审计。

func (*SEip) GetAssociationType

func (self *SEip) GetAssociationType() string

func (*SEip) GetBandwidth

func (self *SEip) GetBandwidth() int

func (*SEip) GetBillingType

func (self *SEip) GetBillingType() string

付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按小时付费; Trial, 试用. 按小时付费和试用这两种付费模式需要开通权限.

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

弹性IP的计费模式, 枚举值为: "Bandwidth", 带宽计费; "Traffic", 流量计费; "ShareBandwidth",共享带宽模式. 默认为 "Bandwidth".

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

func (self *SEip) GetProjectId() string

func (*SEip) GetStatus

func (self *SEip) GetStatus() string

弹性IP的资源绑定状态, 枚举值为: used: 已绑定, free: 未绑定, freeze: 已冻结

func (*SEip) IsEmulated

func (self *SEip) IsEmulated() bool

func (*SEip) Refresh

func (self *SEip) Refresh() error

type SFile

type SFile struct {
	BucketName   string `json:"BucketName"`
	FileName     string `json:"FileName"`
	Size         int64  `json:"Size"`
	Hash         string `json:"Hash"`
	MimeType     string `json:"MimeType"`
	CreateTime   int64  `json:"CreateTime"`
	ModifyTime   int64  `json:"ModifyTime"`
	StorageClass string `json:"StorageClass"`
	// contains filtered or unexported fields
}

func (*SFile) Delete

func (self *SFile) Delete() error

func (*SFile) GetAcl

func (self *SFile) GetAcl() cloudprovider.TBucketACLType

func (*SFile) GetContentType

func (self *SFile) GetContentType() string

func (*SFile) GetETag

func (self *SFile) GetETag() string

func (*SFile) GetHost

func (self *SFile) GetHost() string

func (*SFile) GetIBucket

func (self *SFile) GetIBucket() cloudprovider.ICloudBucket

func (*SFile) GetKey

func (self *SFile) GetKey() string

func (*SFile) GetLastModified

func (self *SFile) GetLastModified() time.Time

func (*SFile) GetMeta

func (self *SFile) GetMeta() http.Header

func (*SFile) GetSizeBytes

func (self *SFile) GetSizeBytes() int64

func (*SFile) GetStorageClass

func (self *SFile) GetStorageClass() string

func (*SFile) GetUrl

func (self *SFile) GetUrl() string

func (*SFile) SetAcl

func (self *SFile) SetAcl(cloudprovider.TBucketACLType) error

func (*SFile) SetMeta

func (self *SFile) SetMeta(ctx context.Context, meta http.Header) error

func (*SFile) Upload

func (self *SFile) Upload() error

type SHost

type SHost struct {
	multicloud.SHostBase
	// contains filtered or unexported fields
}

func (*SHost) CreateVM

不支持user data 不支持指定keypair

func (*SHost) GetAccessIp

func (self *SHost) GetAccessIp() string

func (*SHost) GetAccessMac

func (self *SHost) GetAccessMac() string

func (*SHost) GetCpuCount

func (self *SHost) GetCpuCount() int

func (*SHost) GetCpuDesc

func (self *SHost) GetCpuDesc() string

func (*SHost) GetCpuMhz

func (self *SHost) GetCpuMhz() int

func (*SHost) GetEnabled

func (self *SHost) GetEnabled() bool

func (*SHost) GetGlobalId

func (self *SHost) GetGlobalId() string

func (*SHost) GetHostStatus

func (self *SHost) GetHostStatus() string

func (*SHost) GetHostType

func (self *SHost) GetHostType() string

func (*SHost) GetIHostNics

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

func (*SHost) GetIStorageById

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

func (*SHost) GetIStorages

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

func (*SHost) GetIVMById

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

func (*SHost) GetIVMs

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

func (*SHost) GetId

func (self *SHost) GetId() string

func (*SHost) GetIsMaintenance

func (self *SHost) GetIsMaintenance() bool

func (*SHost) GetMemSizeMB

func (self *SHost) GetMemSizeMB() int

func (*SHost) GetName

func (self *SHost) GetName() string

func (*SHost) GetNodeCount

func (self *SHost) GetNodeCount() int8

func (*SHost) GetSN

func (self *SHost) GetSN() string

func (*SHost) GetStatus

func (self *SHost) GetStatus() string

func (*SHost) GetStorageSizeMB

func (self *SHost) GetStorageSizeMB() int64

func (*SHost) GetStorageType

func (self *SHost) GetStorageType() string

func (*SHost) GetSysInfo

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

func (*SHost) GetVersion

func (self *SHost) GetVersion() string

func (*SHost) IsEmulated

func (self *SHost) IsEmulated() bool

func (*SHost) Refresh

func (self *SHost) Refresh() error

type SImage

type SImage struct {
	multicloud.SImageBase
	UcloudTags

	Zone             string `json:"Zone"`
	ImageDescription string `json:"ImageDescription"`
	OSName           string `json:"OsName"`
	ImageID          string `json:"ImageId"`
	State            string `json:"State"`
	ImageName        string `json:"ImageName"`
	OSType           string `json:"OsType"`
	CreateTime       int64  `json:"CreateTime"`
	ImageType        string `json:"ImageType"`
	ImageSizeGB      int64  `json:"ImageSize"`
	// contains filtered or unexported fields
}

func (*SImage) Delete

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

func (*SImage) GetBios

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

func (*SImage) GetCreatedAt

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

func (*SImage) GetFullOsName

func (img *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

镜像类型。标准镜像:Base,镜像市场:Business, 自定义镜像:Custom,默认返回所有类型

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 (img *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

镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable

func (*SImage) IsEmulated

func (self *SImage) IsEmulated() bool

func (*SImage) Refresh

func (self *SImage) Refresh() error

type SInstance

type SInstance struct {
	multicloud.SInstanceBase
	UcloudTags

	UHostID            string    `json:"UHostId"`
	Zone               string    `json:"Zone"`
	LifeCycle          string    `json:"LifeCycle"`
	OSName             string    `json:"OsName"`
	ImageID            string    `json:"ImageId"`
	BasicImageID       string    `json:"BasicImageId"`
	BasicImageName     string    `json:"BasicImageName"`
	Tag                string    `json:"Tag"`
	Name               string    `json:"Name"`
	Remark             string    `json:"Remark"`
	State              string    `json:"State"`
	NetworkState       string    `json:"NetworkState"`
	HostType           string    `json:"HostType"`
	StorageType        string    `json:"StorageType"`
	TotalDiskSpace     int       `json:"TotalDiskSpace"`
	DiskSet            []DiskSet `json:"DiskSet"`
	NetCapability      string    `json:"NetCapability"`
	IPSet              []IPSet   `json:"IPSet"`
	SubnetType         string    `json:"SubnetType"`
	ChargeType         string    `json:"ChargeType"`
	ExpireTime         int64     `json:"ExpireTime"`
	AutoRenew          string    `json:"AutoRenew"`
	IsExpire           string    `json:"IsExpire"`
	UHostType          string    `json:"UHostType"`
	OSType             string    `json:"OsType"`
	CreateTime         int64     `json:"CreateTime"`
	CPU                int       `json:"CPU"`
	GPU                int       `json:"GPU"`
	MemoryMB           int       `json:"Memory"`
	TimemachineFeature string    `json:"TimemachineFeature"`
	HotplugFeature     bool      `json:"HotplugFeature"`
	NetCapFeature      bool      `json:"NetCapFeature"`
	BootDiskState      string    `json:"BootDiskState"`
	// contains filtered or unexported fields
}

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

func (self *SInstance) ChangeConfig2(ctx context.Context, instanceType string) error

func (*SInstance) DeleteVM

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

func (*SInstance) DeployVM

func (*SInstance) DetachDisk

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

func (*SInstance) GetBillingType

func (self *SInstance) GetBillingType() string

计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限);

func (*SInstance) GetBios

func (ins *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

func (*SInstance) GetFullOsName

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

国际: Internation,BGP: BGP,内网: Private

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

func (self *SInstance) GetLocalDisk(diskId, storageType string, sizeGB int, isBoot bool) SDisk

func (*SInstance) GetMachine

func (self *SInstance) GetMachine() string

func (*SInstance) GetName

func (self *SInstance) GetName() string

func (*SInstance) GetOsArch

func (ins *SInstance) GetOsArch() string

func (*SInstance) GetOsDist

func (ins *SInstance) GetOsDist() string

func (*SInstance) GetOsLang

func (ins *SInstance) GetOsLang() string

func (*SInstance) GetOsType

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

func (*SInstance) GetOsVersion

func (ins *SInstance) GetOsVersion() string

func (*SInstance) GetProjectId

func (self *SInstance) GetProjectId() string

func (*SInstance) GetSecurityGroupIds

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

func (*SInstance) GetSecurityGroups

func (self *SInstance) GetSecurityGroups() ([]SSecurityGroup, error)

func (*SInstance) GetStatus

func (self *SInstance) GetStatus() string

实例状态,枚举值: >初始化: Initializing; >启动中: Starting; > 运行中: Running; > 关机中: Stopping; >关机: Stopped >安装失败: Install Fail; >重启中: Rebooting

func (*SInstance) GetSysTags

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

func (*SInstance) GetVNCInfo

func (*SInstance) GetVcpuCount

func (self *SInstance) GetVcpuCount() int

func (*SInstance) GetVdi

func (self *SInstance) GetVdi() string

func (*SInstance) GetVga

func (self *SInstance) GetVga() string

func (*SInstance) GetVmemSizeMB

func (self *SInstance) GetVmemSizeMB() int

func (*SInstance) IsEmulated

func (self *SInstance) IsEmulated() bool

func (*SInstance) RebuildRoot

https://docs.ucloud.cn/api/uhost-api/reinstall_uhost_instance 1.请确认在重新安装之前,该实例已被关闭; 2.请确认该实例未挂载UDisk; todo:// 3.将原系统重装为不同类型的系统时(Linux->Windows),不可选择保留数据盘; 4.重装不同版本的系统时(CentOS6->CentOS7),若选择保留数据盘,请注意数据盘的文件系统格式; 5.若主机CPU低于2核,不可重装为Windows系统。

func (*SInstance) Refresh

func (self *SInstance) Refresh() error

func (*SInstance) Renew

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

func (*SInstance) SetSecurityGroups

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

https://docs.ucloud.cn/api/unet-api/grant_firewall

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

func (*SInstance) UpdateVM

type SInstanceNic

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

func (*SInstanceNic) GetDriver

func (self *SInstanceNic) GetDriver() string

func (*SInstanceNic) GetINetworkId

func (self *SInstanceNic) GetINetworkId() string

func (*SInstanceNic) GetIP

func (self *SInstanceNic) GetIP() string

func (*SInstanceNic) GetId

func (self *SInstanceNic) GetId() string

func (*SInstanceNic) GetMAC

func (self *SInstanceNic) GetMAC() string

func (*SInstanceNic) InClassicNetwork

func (self *SInstanceNic) InClassicNetwork() bool

type SInstanceType

type SInstanceType struct {
	UHostType string
	CPU       int
	MemoryMB  int
	GPU       int
}

func ParseInstanceType

func ParseInstanceType(instanceType string) (SInstanceType, error)

type SNetwork

type SNetwork struct {
	multicloud.SResourceBase
	UcloudTags

	CreateTime   int64  `json:"CreateTime"`
	Gateway      string `json:"Gateway"`
	HasNATGW     bool   `json:"HasNATGW"`
	Name         string `json:"Name"`
	Netmask      string `json:"Netmask"`
	Remark       string `json:"Remark"`
	RouteTableID string `json:"RouteTableId"`
	Subnet       string `json:"Subnet"`
	SubnetID     string `json:"SubnetId"`
	SubnetName   string `json:"SubnetName"`
	SubnetType   int    `json:"SubnetType"`
	Tag          string `json:"Tag"`
	VPCID        string `json:"VPCId"`
	VPCName      string `json:"VPCName"`
	VRouterID    string `json:"VRouterId"`
	Zone         string `json:"Zone"`
	// contains filtered or unexported fields
}

https://docs.ucloud.cn/api/vpc2.0-api/describe_subnet

func (*SNetwork) Delete

func (self *SNetwork) Delete() error

func (*SNetwork) GetAllocTimeoutSeconds

func (self *SNetwork) GetAllocTimeoutSeconds() int

func (*SNetwork) GetGateway

func (self *SNetwork) GetGateway() string

func (*SNetwork) GetGlobalId

func (self *SNetwork) GetGlobalId() string

func (*SNetwork) GetIWire

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

func (*SNetwork) GetId

func (self *SNetwork) GetId() string

func (*SNetwork) GetIpEnd

func (self *SNetwork) GetIpEnd() string

func (*SNetwork) GetIpMask

func (self *SNetwork) GetIpMask() int8

func (*SNetwork) GetIpStart

func (self *SNetwork) GetIpStart() string

func (*SNetwork) GetIsPublic

func (self *SNetwork) GetIsPublic() bool

func (*SNetwork) GetName

func (self *SNetwork) GetName() string

func (*SNetwork) GetProjectId

func (self *SNetwork) GetProjectId() string

func (*SNetwork) GetPublicScope

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

func (*SNetwork) GetServerType

func (self *SNetwork) GetServerType() string

func (*SNetwork) GetStatus

func (self *SNetwork) GetStatus() string

func (*SNetwork) IsEmulated

func (self *SNetwork) IsEmulated() bool

func (*SNetwork) Refresh

func (self *SNetwork) Refresh() error

type SParams

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

func NewUcloudParams

func NewUcloudParams() SParams

func (*SParams) GetParams

func (self *SParams) GetParams() jsonutils.JSONDict

func (*SParams) PrettyString

func (self *SParams) PrettyString() string

func (*SParams) Set

func (self *SParams) Set(key string, value interface{})

func (*SParams) SetAction

func (self *SParams) SetAction(action string)

func (*SParams) SetPagination

func (self *SParams) SetPagination(limit, offset int)

func (*SParams) String

func (self *SParams) String() string

type SProject

type SProject struct {
	multicloud.SProjectBase
	UcloudTags
	ProjectID     string `json:"ProjectId"`
	ProjectName   string `json:"ProjectName"`
	ParentID      string `json:"ParentId"`
	ParentName    string `json:"ParentName"`
	CreateTime    int64  `json:"CreateTime"`
	IsDefault     bool   `json:"IsDefault"`
	MemberCount   int64  `json:"MemberCount"`
	ResourceCount int64  `json:"ResourceCount"`
}

https://docs.ucloud.cn/api/summary/get_project_list

func (*SProject) GetGlobalId

func (self *SProject) GetGlobalId() string

func (*SProject) GetId

func (self *SProject) GetId() string

func (*SProject) GetName

func (self *SProject) GetName() string

func (*SProject) GetStatus

func (self *SProject) GetStatus() string

func (*SProject) IsEmulated

func (self *SProject) IsEmulated() bool

func (*SProject) Refresh

func (self *SProject) Refresh() error

type SRegion

type SRegion struct {
	multicloud.SRegion
	multicloud.SNoLbRegion

	RegionID string
	// contains filtered or unexported fields
}

func (*SRegion) AssociateEip

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

https://docs.ucloud.cn/api/unet-api/bind_eip

func (*SRegion) AttachDisk

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

https://docs.ucloud.cn/api/udisk-api/attach_udisk

func (*SRegion) CreateBucket

func (self *SRegion) CreateBucket(name, bucketType string) error

https://docs.ucloud.cn/api/ufile-api/create_bucket

func (*SRegion) CreateDisk

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

https://docs.ucloud.cn/api/udisk-api/create_udisk

func (*SRegion) CreateEIP

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

https://docs.ucloud.cn/api/unet-api/allocate_eip 增加共享带宽模式ShareBandwidth

func (*SRegion) CreateIBucket

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

func (*SRegion) CreateISecurityGroup

func (*SRegion) CreateIVpc

func (*SRegion) CreateInstance

func (self *SRegion) CreateInstance(name, imageId, hostType, password, vpcId, SubnetId string, securityGroupId []string,
	zoneId, desc, ipAddr string, cpu, memMB, gpu int, disks []SDisk, bc *billing.SBillingCycle) (string, error)

https://docs.ucloud.cn/api/uhost-api/create_uhost_instance https://docs.ucloud.cn/api/uhost-api/specification 支持8-30位字符, 不能包含[A-Z],[a-z],[0-9]和[()`~!@#$%^&*-+=_|{}[]:;'<>,.?/]之外的非法字符

func (*SRegion) CreateNetwork

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

https://docs.ucloud.cn/api/vpc2.0-api/create_subnet

func (*SRegion) CreateSecurityGroup

func (self *SRegion) CreateSecurityGroup(name, description string) (string, error)

https://docs.ucloud.cn/api/unet-api/create_firewall

func (*SRegion) CreateSnapshot

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

https://docs.ucloud.cn/api/udisk-api/create_udisk_snapshot

func (*SRegion) DeallocateEIP

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

https://docs.ucloud.cn/api/unet-api/release_eip

func (*SRegion) DeleteBucket

func (self *SRegion) DeleteBucket(name string) error

https://docs.ucloud.cn/api/ufile-api/delete_bucket

func (*SRegion) DeleteDisk

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

https://docs.ucloud.cn/api/udisk-api/delete_udisk

func (*SRegion) DeleteIBucket

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

func (*SRegion) DeleteNetwork

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

https://docs.ucloud.cn/api/vpc2.0-api/delete_subnet

func (*SRegion) DeleteSecurityGroup

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

https://docs.ucloud.cn/api/unet-api/delete_firewall

func (*SRegion) DeleteSnapshot

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

https://docs.ucloud.cn/api/udisk-api/delete_udisk_snapshot

func (*SRegion) DeleteVpc

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

https://docs.ucloud.cn/api/vpc2.0-api/delete_vpc

func (*SRegion) DetachDisk

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

https://docs.ucloud.cn/api/udisk-api/detach_udisk

func (*SRegion) DissociateEip

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

https://docs.ucloud.cn/api/unet-api/unbind_eip

func (*SRegion) DoAction

func (self *SRegion) DoAction(action string, params SParams, result interface{}) error

func (*SRegion) DoListAll

func (self *SRegion) DoListAll(action string, params SParams, result interface{}) error

func (*SRegion) DoListPart

func (self *SRegion) DoListPart(action string, limit int, offset int, params SParams, result interface{}) (int, int, error)

return total,lenght,error

func (*SRegion) GetCapabilities

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

func (*SRegion) GetClient

func (self *SRegion) GetClient() *SUcloudClient

func (*SRegion) GetCloudEnv

func (self *SRegion) GetCloudEnv() string

func (*SRegion) GetDisk

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

func (*SRegion) GetDisks

func (self *SRegion) GetDisks(zoneId string, diskType string, diskIds []string) ([]SDisk, error)

https://docs.ucloud.cn/api/udisk-api/describe_udisk diskType DataDisk|SystemDisk (DataDisk表示数据盘,SystemDisk表示系统盘)

func (*SRegion) GetEipById

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

func (*SRegion) GetGeographicInfo

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

func (*SRegion) GetGlobalId

func (self *SRegion) GetGlobalId() string

func (*SRegion) GetI18n

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

func (*SRegion) GetIBucketById

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

func (*SRegion) GetIBucketByName

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

func (*SRegion) GetIBuckets

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

func (*SRegion) GetIDiskById

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

func (*SRegion) GetIEipById

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

func (*SRegion) GetIHostById

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

func (*SRegion) GetIHosts

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

func (*SRegion) GetINetworkInterfaces

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

func (*SRegion) GetISecurityGroupById

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

func (*SRegion) GetISecurityGroups

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

func (*SRegion) GetISnapshotById

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

func (*SRegion) GetIStorageById

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

func (*SRegion) GetIStoragecacheById

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

func (*SRegion) GetIStoragecaches

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

func (*SRegion) GetIStorages

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

func (*SRegion) GetIVMById

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

func (*SRegion) GetIVMs

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

func (*SRegion) GetIVpcById

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

func (*SRegion) GetIVpcs

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

func (*SRegion) GetIZoneById

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

func (*SRegion) GetIZones

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

func (*SRegion) GetId

func (self *SRegion) GetId() string

func (*SRegion) GetImage

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

https://docs.ucloud.cn/api/uhost-api/describe_image

func (*SRegion) GetImageByName

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

func (*SRegion) GetImages

func (self *SRegion) GetImages(imageType string, imageId string) ([]SImage, error)

https://docs.ucloud.cn/api/uhost-api/describe_image ImageType 标准镜像:Base,镜像市场:Business, 自定义镜像:Custom,默认返回所有类型

func (*SRegion) GetInstances

func (self *SRegion) GetInstances(zoneId string, instanceId string) ([]SInstance, error)

https://docs.ucloud.cn/api/uhost-api/describe_uhost_instance

func (*SRegion) GetName

func (self *SRegion) GetName() string

func (*SRegion) GetNetworks

func (self *SRegion) GetNetworks(vpcId string) ([]SNetwork, error)

func (*SRegion) GetProvider

func (self *SRegion) GetProvider() string

func (*SRegion) GetSecurityGroup

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

func (*SRegion) GetSecurityGroups

func (self *SRegion) GetSecurityGroups(secGroupId string, resourceId string, name string) ([]SSecurityGroup, error)

func (*SRegion) GetSkus

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

func (*SRegion) GetSnapshotById

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

func (*SRegion) GetSnapshots

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

func (*SRegion) GetStatus

func (self *SRegion) GetStatus() string

func (*SRegion) GetVips

func (self *SRegion) GetVips() ([]SVip, error)

func (*SRegion) IBucketExist

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

func (*SRegion) ImportImage

func (self *SRegion) ImportImage(name string, ufileUrl string, osType string, osVersion string, diskFormat string) (string, error)

https://docs.ucloud.cn/api/uhost-api/import_custom_image

func (*SRegion) IsEmulated

func (self *SRegion) IsEmulated() bool

func (*SRegion) RebuildRoot

func (self *SRegion) RebuildRoot(instanceId, imageId, password string) error

https://docs.ucloud.cn/api/uhost-api/reinstall_uhost_instance (密码格式使用BASE64编码;LoginMode不可变更)

func (*SRegion) Refresh

func (self *SRegion) Refresh() error

func (*SRegion) RenewInstance

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

ChargeType : Dynamic(按需)/Month(按月)/Year(按年)

func (*SRegion) ResetVMPasswd

func (self *SRegion) ResetVMPasswd(instanceId, password string) error

https://docs.ucloud.cn/api/uhost-api/reset_uhost_instance_password 该操作需要UHost实例处于关闭状态。

func (*SRegion) ResizeVM

func (self *SRegion) ResizeVM(instanceId string, cpu, memoryMB int) error

https://docs.ucloud.cn/api/uhost-api/resize_uhost_instance

func (*SRegion) StartVM

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

https://docs.ucloud.cn/api/uhost-api/start_uhost_instance

func (*SRegion) StopVM

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

https://docs.ucloud.cn/api/uhost-api/stop_uhost_instance

func (*SRegion) UpdateEipBandwidth

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

https://docs.ucloud.cn/api/unet-api/modify_eip_bandwidth

func (*SRegion) UpdateVM

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

https://docs.ucloud.cn/api/uhost-api/modify_uhost_instance_name

type SSecurityGroup

type SSecurityGroup struct {
	multicloud.SSecurityGroup
	UcloudTags

	CreateTime    int64               `json:"CreateTime"`
	FWID          string              `json:"FWId"`
	GroupID       string              `json:"GroupId"`
	Name          string              `json:"Name"`
	Remark        string              `json:"Remark"`
	ResourceCount int                 `json:"ResourceCount"`
	Rule          []SecurityGroupRule `json:"Rule"`
	Tag           string              `json:"Tag"`
	Type          string              `json:"Type"`
	// contains filtered or unexported fields
}

https://docs.ucloud.cn/api/unet-api/describe_firewall

func (*SSecurityGroup) Delete

func (self *SSecurityGroup) Delete() error

func (*SSecurityGroup) GetDescription

func (self *SSecurityGroup) GetDescription() string

func (*SSecurityGroup) GetGlobalId

func (self *SSecurityGroup) GetGlobalId() string

func (*SSecurityGroup) GetId

func (self *SSecurityGroup) GetId() string

func (*SSecurityGroup) GetName

func (self *SSecurityGroup) GetName() string

func (*SSecurityGroup) GetProjectId

func (self *SSecurityGroup) GetProjectId() string

func (*SSecurityGroup) GetRules

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

func (*SSecurityGroup) GetStatus

func (self *SSecurityGroup) GetStatus() string

func (*SSecurityGroup) GetVpcId

func (self *SSecurityGroup) GetVpcId() string

func (*SSecurityGroup) Refresh

func (self *SSecurityGroup) Refresh() error

type SSnapshot

type SSnapshot struct {
	multicloud.SResourceBase
	UcloudTags

	Comment          string `json:"Comment"`
	ChargeType       string `json:"ChargeType"`
	Name             string `json:"Name"`
	UDiskName        string `json:"UDiskName"`
	ExpiredTime      int64  `json:"ExpiredTime"`
	UDiskID          string `json:"UDiskId"`
	SnapshotID       string `json:"SnapshotId"`
	CreateTime       int64  `json:"CreateTime"`
	SizeGB           int32  `json:"Size"`
	Status           string `json:"Status"`
	IsUDiskAvailable bool   `json:"IsUDiskAvailable"`
	Version          string `json:"Version"`
	DiskType         int    `json:"DiskType"`
	UHostID          string `json:"UHostId"`
	// contains filtered or unexported fields
}

https://docs.ucloud.cn/api/udisk-api/describe_udisk_snapshot

func (*SSnapshot) GetDiskId

func (self *SSnapshot) GetDiskId() string

func (*SSnapshot) GetDiskType

func (self *SSnapshot) GetDiskType() string

磁盘类型,0:数据盘,1:系统盘

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

快照状态,Normal:正常,Failed:失败,Creating:制作中

func (*SSnapshot) IsEmulated

func (self *SSnapshot) IsEmulated() bool

func (*SSnapshot) Refresh

func (self *SSnapshot) Refresh() error

type SStorage

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

func (*SStorage) CreateIDisk

func (*SStorage) GetCapacityMB

func (self *SStorage) GetCapacityMB() int64

func (*SStorage) GetCapacityUsedMB

func (self *SStorage) GetCapacityUsedMB() int64

func (*SStorage) GetEnabled

func (self *SStorage) GetEnabled() bool

func (*SStorage) GetGlobalId

func (self *SStorage) GetGlobalId() string

func (*SStorage) GetIDiskById

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

func (*SStorage) GetIDisks

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

func (*SStorage) GetIStoragecache

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

func (*SStorage) GetIZone

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

func (*SStorage) GetId

func (self *SStorage) GetId() string

func (*SStorage) GetMediumType

func (self *SStorage) GetMediumType() string

func (*SStorage) GetMountPoint

func (self *SStorage) GetMountPoint() string

func (*SStorage) GetName

func (self *SStorage) GetName() string

func (*SStorage) GetStatus

func (self *SStorage) GetStatus() string

func (*SStorage) GetStorageConf

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

func (*SStorage) GetStorageType

func (self *SStorage) GetStorageType() string

func (*SStorage) IsEmulated

func (self *SStorage) IsEmulated() bool

func (*SStorage) IsSysDiskStore

func (self *SStorage) IsSysDiskStore() bool

func (*SStorage) Refresh

func (self *SStorage) Refresh() error

type SStoragecache

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

func (*SStoragecache) GetGlobalId

func (self *SStoragecache) GetGlobalId() string

func (*SStoragecache) GetICloudImages

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

func (*SStoragecache) GetICustomizedCloudImages

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

func (*SStoragecache) GetIImageById

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

func (*SStoragecache) GetId

func (self *SStoragecache) GetId() string

func (*SStoragecache) GetName

func (self *SStoragecache) GetName() string

func (*SStoragecache) GetPath

func (self *SStoragecache) GetPath() string

func (*SStoragecache) GetStatus

func (self *SStoragecache) GetStatus() string

func (*SStoragecache) IsEmulated

func (self *SStoragecache) IsEmulated() bool

func (*SStoragecache) Refresh

func (self *SStoragecache) Refresh() error

func (*SStoragecache) UploadImage

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

https://docs.ucloud.cn/api/uhost-api/import_custom_image

type SUcloudClient

type SUcloudClient struct {
	*UcloudClientConfig
	// contains filtered or unexported fields
}

func NewUcloudClient

func NewUcloudClient(cfg *UcloudClientConfig) (*SUcloudClient, error)

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

func (*SUcloudClient) DoAction

func (self *SUcloudClient) DoAction(action string, params SParams, result interface{}) error

func (*SUcloudClient) DoListAll

func (self *SUcloudClient) DoListAll(action string, params SParams, result interface{}) error

func (*SUcloudClient) DoListPart

func (self *SUcloudClient) DoListPart(action string, limit int, offset int, params SParams, result interface{}) (int, int, error)

func (*SUcloudClient) FetchProjects

func (self *SUcloudClient) FetchProjects() ([]SProject, error)

func (*SUcloudClient) GetAccountId

func (self *SUcloudClient) GetAccountId() string

func (*SUcloudClient) GetCapabilities

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

func (*SUcloudClient) GetIHostById

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

func (*SUcloudClient) GetIRegionById

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

func (*SUcloudClient) GetIRegions

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

func (*SUcloudClient) GetIStorageById

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

func (*SUcloudClient) GetIVpcById

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

func (*SUcloudClient) GetRegion

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

func (*SUcloudClient) GetRegions

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

func (*SUcloudClient) GetSubAccounts

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

func (*SUcloudClient) UpdateAccount

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

type SUcloudError

type SUcloudError struct {
	Action  string `json:"Action"`
	Message string `json:"Message"`
	RetCode int64  `json:"RetCode"`
}

func (*SUcloudError) Error

func (self *SUcloudError) Error() string

type SVPC

type SVPC struct {
	multicloud.SVpc
	UcloudTags

	CreateTime  int64         `json:"CreateTime"`
	Name        string        `json:"Name"`
	Network     []string      `json:"Network"`
	NetworkInfo []NetworkInfo `json:"NetworkInfo"`
	SubnetCount int           `json:"SubnetCount"`
	Tag         string        `json:"Tag"`
	UpdateTime  int64         `json:"UpdateTime"`
	VPCID       string        `json:"VPCId"`
	// contains filtered or unexported fields
}

func (*SVPC) Delete

func (self *SVPC) Delete() error

func (*SVPC) GetCidrBlock

func (self *SVPC) GetCidrBlock() string

func (*SVPC) GetGlobalId

func (self *SVPC) GetGlobalId() string

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)

由于Ucloud 安全组和vpc没有直接关联,这里是返回同一个项目下的防火墙列表,会导致重复同步的问题。 https://docs.ucloud.cn/api/unet-api/grant_firewall

func (*SVPC) GetIWireById

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

func (*SVPC) GetIWires

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

func (*SVPC) GetId

func (self *SVPC) GetId() string

func (*SVPC) GetIsDefault

func (self *SVPC) GetIsDefault() bool

func (*SVPC) GetName

func (self *SVPC) GetName() string

func (*SVPC) GetRegion

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

func (*SVPC) GetStatus

func (self *SVPC) GetStatus() string

func (*SVPC) IsEmulated

func (self *SVPC) IsEmulated() bool

func (*SVPC) Refresh

func (self *SVPC) Refresh() error

type SVip

type SVip struct {
	multicloud.SNetworkInterfaceBase
	UcloudTags

	CreateTime int64
	Name       string
	RealIp     string
	Remark     string
	SubnetId   string
	Tag        string
	VIP        string
	VIPId      string
	VPCId      string
	Zone       string
	// contains filtered or unexported fields
}

func (*SVip) GetAssociateId

func (vip *SVip) GetAssociateId() string

func (*SVip) GetAssociateType

func (vip *SVip) GetAssociateType() string

func (*SVip) GetGlobalId

func (vip *SVip) GetGlobalId() string

func (*SVip) GetICloudInterfaceAddresses

func (vip *SVip) GetICloudInterfaceAddresses() ([]cloudprovider.ICloudInterfaceAddress, error)

func (*SVip) GetId

func (vip *SVip) GetId() string

func (*SVip) GetMacAddress

func (vip *SVip) GetMacAddress() string

func (*SVip) GetName

func (vip *SVip) GetName() string

func (*SVip) GetStatus

func (vip *SVip) GetStatus() string

type SVipAddr

type SVipAddr struct {
	VIP      string
	SubnetId string
}

func (*SVipAddr) GetGlobalId

func (ip *SVipAddr) GetGlobalId() string

func (*SVipAddr) GetINetworkId

func (ip *SVipAddr) GetINetworkId() string

func (*SVipAddr) GetIP

func (ip *SVipAddr) GetIP() string

func (*SVipAddr) IsPrimary

func (ip *SVipAddr) IsPrimary() bool

type SVncInfo

type SVncInfo struct {
	VNCIP       string `json:"VncIP"`
	VNCPassword string `json:"VncPassword"`
	UHostID     string `json:"UHostId"`
	Action      string `json:"Action"`
	VNCPort     int64  `json:"VncPort"`
}

type SWire

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

子网在整个region可用

func (*SWire) GetBandwidth

func (self *SWire) GetBandwidth() int

func (*SWire) GetGlobalId

func (self *SWire) GetGlobalId() string

func (*SWire) GetINetworkById

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

func (*SWire) GetINetworks

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

func (*SWire) GetIVpc

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

func (*SWire) GetIZone

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

func (*SWire) GetId

func (self *SWire) GetId() string

func (*SWire) GetName

func (self *SWire) GetName() string

func (*SWire) GetStatus

func (self *SWire) GetStatus() string

func (*SWire) IsEmulated

func (self *SWire) IsEmulated() bool

func (*SWire) Refresh

func (self *SWire) Refresh() error

type SZone

type SZone struct {
	multicloud.SResourceBase
	UcloudTags

	RegionId string
	ZoneId   string
	// 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

func (*SZone) IsEmulated

func (self *SZone) IsEmulated() bool

func (*SZone) Refresh

func (self *SZone) Refresh() error

type SecurityGroupRule

type SecurityGroupRule struct {
	DstPort      string `json:"DstPort"`
	Priority     string `json:"Priority"`
	ProtocolType string `json:"ProtocolType"`
	RuleAction   string `json:"RuleAction"`
	SrcIP        string `json:"SrcIP"`
	Remark       string
	// contains filtered or unexported fields
}

func (*SecurityGroupRule) Delete

func (self *SecurityGroupRule) Delete() error

func (*SecurityGroupRule) GetAction

func (*SecurityGroupRule) GetCIDRs

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

func (*SecurityGroupRule) GetDescription

func (self *SecurityGroupRule) GetDescription() string

func (*SecurityGroupRule) GetDirection

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

func (*SecurityGroupRule) GetGlobalId

func (self *SecurityGroupRule) GetGlobalId() string

func (*SecurityGroupRule) GetPorts

func (self *SecurityGroupRule) GetPorts() string

func (*SecurityGroupRule) GetPriority

func (self *SecurityGroupRule) GetPriority() int

func (*SecurityGroupRule) GetProtocol

func (self *SecurityGroupRule) GetProtocol() string

func (SecurityGroupRule) String

func (self SecurityGroupRule) String() string

func (*SecurityGroupRule) Update

type ShareBandwidthSet

type ShareBandwidthSet struct {
	ShareBandwidth     int    `json:"ShareBandwidth"`
	ShareBandwidthID   string `json:"ShareBandwidthId"`
	ShareBandwidthName string `json:"ShareBandwidthName"`
}

type UcloudClientConfig

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

func NewUcloudClientConfig

func NewUcloudClientConfig(accessKeyId, accessKeySecret string) *UcloudClientConfig

func (*UcloudClientConfig) CloudproviderConfig

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

func (*UcloudClientConfig) Debug

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

func (*UcloudClientConfig) ProjectId

func (cfg *UcloudClientConfig) ProjectId(projectId string) *UcloudClientConfig

type UcloudTags

type UcloudTags struct {
}

func (*UcloudTags) GetSysTags

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

func (*UcloudTags) GetTags

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

func (*UcloudTags) SetTags

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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