Documentation ¶
Index ¶
- Constants
- Variables
- func AppendFilter(filters []*ec2.Filter, name string, values []string) []*ec2.Filter
- func AppendSingleValueFilter(filters []*ec2.Filter, name string, value string) []*ec2.Filter
- func AwsIpPermissionToYunion(direction secrules.TSecurityRuleDirection, p ec2.IpPermission) ([]secrules.SecurityRule, error)
- func ConvertedList(list []string) []*string
- func ConvertedPointList(list []*string) []string
- func FetchTags(client *ec2.EC2, resourceId string) (*jsonutils.JSONDict, error)
- func FillZero(i interface{}) error
- func IntVal(s *int64) int64
- func NextDeviceName(curDeviceNames []string) (string, error)
- func StrVal(s *string) string
- func YunionSecRuleToAws(rule secrules.SecurityRule) ([]*ec2.IpPermission, error)
- type Cpu
- type CpuCredits
- type ImageExportTask
- type ImageImportTask
- type ImageOwnerType
- type ImageStatusType
- type InstanceChargeType
- type ProcessorFeatures
- type RootDevice
- type SAccountBalance
- type SAwsClient
- func (self *SAwsClient) GetIHostById(id string) (cloudprovider.ICloudHost, error)
- func (self *SAwsClient) GetIRegionById(id string) (cloudprovider.ICloudRegion, error)
- func (self *SAwsClient) GetIRegions() []cloudprovider.ICloudRegion
- func (self *SAwsClient) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
- func (self *SAwsClient) GetIStoragecacheById(id string) (cloudprovider.ICloudStoragecache, error)
- func (self *SAwsClient) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)
- func (self *SAwsClient) GetRegion(regionId string) *SRegion
- func (self *SAwsClient) GetRegions() []SRegion
- func (self *SAwsClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
- func (self *SAwsClient) QueryAccountBalance() (*SAccountBalance, error)
- func (self *SAwsClient) UpdateAccount(accessKey, secret string) error
- type SDisk
- func (self *SDisk) CreateISnapshot(name string, desc string) (cloudprovider.ICloudSnapshot, error)
- func (self *SDisk) Delete() error
- func (self *SDisk) GetBillingType() string
- func (self *SDisk) GetCacheMode() string
- func (self *SDisk) GetDiskFormat() string
- func (self *SDisk) GetDiskSizeMB() int
- func (self *SDisk) GetDiskType() string
- func (self *SDisk) GetDriver() string
- func (self *SDisk) GetExpiredAt() time.Time
- func (self *SDisk) GetFsFormat() string
- func (self *SDisk) GetGlobalId() string
- func (self *SDisk) GetISnapshot(snapshotId string) (cloudprovider.ICloudSnapshot, error)
- func (self *SDisk) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)
- func (self *SDisk) GetIStorge() cloudprovider.ICloudStorage
- func (self *SDisk) GetId() string
- func (self *SDisk) GetIsAutoDelete() bool
- func (self *SDisk) GetIsNonPersistent() bool
- func (self *SDisk) GetMetadata() *jsonutils.JSONDict
- func (self *SDisk) GetMountpoint() string
- func (self *SDisk) GetName() string
- func (self *SDisk) GetStatus() string
- func (self *SDisk) GetTemplateId() string
- func (self *SDisk) IsEmulated() bool
- func (self *SDisk) Refresh() error
- func (self *SDisk) Reset(snapshotId string) error
- func (self *SDisk) Resize(newSize int64) error
- type SEipAddress
- func (self *SEipAddress) Associate(instanceId string) error
- func (self *SEipAddress) ChangeBandwidth(bw int) error
- func (self *SEipAddress) Delete() error
- func (self *SEipAddress) Dissociate() error
- func (self *SEipAddress) GetAssociationExternalId() string
- func (self *SEipAddress) GetAssociationType() string
- func (self *SEipAddress) GetBandwidth() int
- func (self *SEipAddress) GetGlobalId() string
- func (self *SEipAddress) GetId() string
- func (self *SEipAddress) GetInternetChargeType() string
- func (self *SEipAddress) GetIpAddr() string
- func (self *SEipAddress) GetManagerId() string
- func (self *SEipAddress) GetMetadata() *jsonutils.JSONDict
- func (self *SEipAddress) GetMode() string
- func (self *SEipAddress) GetName() string
- func (self *SEipAddress) GetStatus() string
- func (self *SEipAddress) IsEmulated() bool
- func (self *SEipAddress) Refresh() error
- type SHost
- func (self *SHost) CreateVM(name, imgId string, sysDiskSize, cpu, memMB int, ...) (cloudprovider.ICloudVM, error)
- func (self *SHost) GetAccessIp() string
- func (self *SHost) GetAccessMac() string
- func (self *SHost) GetCpuCount() int8
- func (self *SHost) GetCpuDesc() string
- func (self *SHost) GetCpuMhz() int
- func (self *SHost) GetEnabled() bool
- func (self *SHost) GetGlobalId() string
- func (self *SHost) GetHostStatus() string
- func (self *SHost) GetHostType() string
- func (self *SHost) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
- func (self *SHost) GetIStorages() ([]cloudprovider.ICloudStorage, error)
- func (self *SHost) GetIVMById(gid string) (cloudprovider.ICloudVM, error)
- func (self *SHost) GetIVMs() ([]cloudprovider.ICloudVM, error)
- func (self *SHost) GetIWires() ([]cloudprovider.ICloudWire, error)
- func (self *SHost) GetId() string
- func (self *SHost) GetInstanceById(instanceId string) (*SInstance, error)
- func (self *SHost) GetManagerId() string
- func (self *SHost) GetMemSizeMB() int
- func (self *SHost) GetMetadata() *jsonutils.JSONDict
- func (self *SHost) GetName() string
- func (self *SHost) GetNodeCount() int8
- func (self *SHost) GetSN() string
- func (self *SHost) GetStatus() string
- func (self *SHost) GetStorageSizeMB() int
- func (self *SHost) GetStorageType() string
- func (self *SHost) GetSysInfo() jsonutils.JSONObject
- func (self *SHost) IsEmulated() bool
- func (self *SHost) Refresh() error
- type SImage
- func (self *SImage) Delete() error
- func (self *SImage) GetGlobalId() string
- func (self *SImage) GetIStoragecache() cloudprovider.ICloudStoragecache
- func (self *SImage) GetId() string
- func (self *SImage) GetMetadata() *jsonutils.JSONDict
- func (self *SImage) GetName() string
- func (self *SImage) GetStatus() string
- func (self *SImage) IsEmulated() bool
- func (self *SImage) Refresh() error
- type SInstance
- func (self *SInstance) AttachDisk(diskId string) error
- func (self *SInstance) ChangeConfig(instanceId string, ncpu int, vmem int) error
- func (self *SInstance) DeleteVM() error
- func (self *SInstance) DeployVM(name string, password string, publicKey string, deleteKeypair bool, ...) error
- func (self *SInstance) DetachDisk(diskId string) error
- func (self *SInstance) GetBillingType() string
- func (self *SInstance) GetBios() string
- func (self *SInstance) GetBootOrder() string
- func (self *SInstance) GetCreateTime() time.Time
- func (self *SInstance) GetExpiredAt() time.Time
- func (self *SInstance) GetGlobalId() string
- func (self *SInstance) GetHypervisor() string
- func (self *SInstance) GetIDisks() ([]cloudprovider.ICloudDisk, error)
- func (self *SInstance) GetIEIP() (cloudprovider.ICloudEIP, error)
- func (self *SInstance) GetIHost() cloudprovider.ICloudHost
- func (self *SInstance) GetINics() ([]cloudprovider.ICloudNic, error)
- func (self *SInstance) GetId() string
- func (self *SInstance) GetMachine() string
- func (self *SInstance) GetMetadata() *jsonutils.JSONDict
- func (self *SInstance) GetName() string
- func (self *SInstance) GetOSName() string
- func (self *SInstance) GetOSType() string
- func (self *SInstance) GetStatus() string
- func (self *SInstance) GetVNCInfo() (jsonutils.JSONObject, error)
- func (self *SInstance) GetVcpuCount() int8
- func (self *SInstance) GetVdi() string
- func (self *SInstance) GetVga() string
- func (self *SInstance) GetVmemSizeMB() int
- func (self *SInstance) IsEmulated() bool
- func (self *SInstance) RebuildRoot(imageId string, passwd string, publicKey string, sysSizeGB int) (string, error)
- func (self *SInstance) Refresh() error
- func (self *SInstance) StartVM() error
- func (self *SInstance) StopVM(isForce bool) error
- func (self *SInstance) SyncSecurityGroup(secgroupId string, name string, rules []secrules.SecurityRule) error
- func (self *SInstance) UpdateUserData(userData string) error
- func (self *SInstance) UpdateVM(name string) error
- type SInstanceNic
- type SInstanceType
- type SIpAddress
- type SKeypair
- type SMountInstances
- type SNetwork
- func (self *SNetwork) Delete() error
- func (self *SNetwork) GetAllocTimeoutSeconds() int
- func (self *SNetwork) GetGateway() string
- func (self *SNetwork) GetGlobalId() string
- func (self *SNetwork) GetIWire() cloudprovider.ICloudWire
- func (self *SNetwork) GetId() string
- func (self *SNetwork) GetIpEnd() string
- func (self *SNetwork) GetIpMask() int8
- func (self *SNetwork) GetIpStart() string
- func (self *SNetwork) GetIsPublic() bool
- func (self *SNetwork) GetMetadata() *jsonutils.JSONDict
- func (self *SNetwork) GetName() string
- func (self *SNetwork) GetServerType() string
- func (self *SNetwork) GetStatus() string
- func (self *SNetwork) IsEmulated() bool
- func (self *SNetwork) Refresh() error
- type SNetworkInterface
- type SNetworkInterfaces
- type SRegion
- func (self *SRegion) AllocateEIP(domainType string) (*SEipAddress, error)
- func (self *SRegion) AssociateEip(eipId string, instanceId string) error
- func (self *SRegion) AttachDisk(instanceId string, diskId string, deviceName string) error
- func (self *SRegion) AttachKeypair(instanceId string, keypairName string) error
- func (self *SRegion) ChangeVMConfig(zoneId string, instanceId string, ncpu int, vmem int, disks []*SDisk) error
- func (self *SRegion) CheckBucket(bucketName string) error
- func (self *SRegion) CreateDisk(zoneId string, category string, name string, sizeGb int, snapshotId string, ...) (string, error)
- func (self *SRegion) CreateEIP(name string, bwMbps int, chargeType string) (cloudprovider.ICloudEIP, error)
- func (self *SRegion) CreateIVpc(name string, desc string, cidr string) (cloudprovider.ICloudVpc, error)
- func (self *SRegion) CreateInstance(name string, imageId string, instanceType string, SubnetId string, ...) (string, error)
- func (self *SRegion) CreateInstanceSimple(name string, imgId string, cpu int, memGB int, storageType string, ...) (*SInstance, error)
- func (self *SRegion) CreateSnapshot(diskId, name, desc string) (string, error)
- func (self *SRegion) DeallocateEIP(eipId string) error
- func (self *SRegion) DeleteDisk(diskId string) error
- func (self *SRegion) DeleteImage(imageId string) error
- func (self *SRegion) DeleteSnapshot(snapshotId string) error
- func (self *SRegion) DeleteVM(instanceId string) error
- func (self *SRegion) DeleteVpc(vpcId string) error
- func (self *SRegion) DeployVM(instanceId string, name string, password string, keypairName string, ...) error
- func (self *SRegion) DetachDisk(instanceId string, diskId string) error
- func (self *SRegion) DetachKeyPair(instanceId string, keypairName string) error
- func (self *SRegion) DissociateEip(eipId string, instanceId string) error
- func (self *SRegion) ExportImage(instanceId string, imageId string) (*ImageExportTask, error)
- func (self *SRegion) GetARNPartition() string
- func (self *SRegion) GetClient() *SAwsClient
- func (self *SRegion) GetDisk(diskId string) (*SDisk, error)
- func (self *SRegion) GetDisks(instanceId string, zoneId string, storageType string, diskIds []string, ...) ([]SDisk, int, error)
- func (self *SRegion) GetEip(eipId string) (*SEipAddress, error)
- func (self *SRegion) GetEips(eipId string, offset int, limit int) ([]SEipAddress, int, error)
- func (self *SRegion) GetGlobalId() string
- func (self *SRegion) GetIEipById(eipId string) (cloudprovider.ICloudEIP, error)
- func (self *SRegion) GetIEips() ([]cloudprovider.ICloudEIP, error)
- func (self *SRegion) GetIHostById(id string) (cloudprovider.ICloudHost, error)
- func (self *SRegion) GetISnapshotById(snapshotId string) (cloudprovider.ICloudSnapshot, error)
- func (self *SRegion) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)
- func (self *SRegion) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
- func (self *SRegion) GetIStoragecacheById(id string) (cloudprovider.ICloudStoragecache, error)
- func (self *SRegion) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)
- func (self *SRegion) GetIVpcs() ([]cloudprovider.ICloudVpc, error)
- func (self *SRegion) GetIZoneById(id string) (cloudprovider.ICloudZone, error)
- func (self *SRegion) GetIZones() ([]cloudprovider.ICloudZone, error)
- func (self *SRegion) GetId() string
- func (self *SRegion) GetImage(imageId string) (*SImage, error)
- func (self *SRegion) GetImageByName(name string) (*SImage, error)
- func (self *SRegion) GetImageStatus(imageId string) (ImageStatusType, error)
- func (self *SRegion) GetImages(status ImageStatusType, owner ImageOwnerType, imageId []string, name string, ...) ([]SImage, int, error)
- func (self *SRegion) GetInstance(instanceId string) (*SInstance, error)
- func (self *SRegion) GetInstanceIdByImageId(imageId string) (string, error)
- func (self *SRegion) GetInstanceStatus(instanceId string) (string, error)
- func (self *SRegion) GetInstanceType(instanceTypeId string) (*SInstanceType, error)
- func (self *SRegion) GetInstanceTypes() ([]SInstanceType, error)
- func (self *SRegion) GetInstances(zoneId string, ids []string, offset int, limit int) ([]SInstance, int, error)
- func (self *SRegion) GetKeypairs(finger string, name string, offset int, limit int) ([]SKeypair, int, error)
- func (self *SRegion) GetLatitude() float32
- func (self *SRegion) GetLongitude() float32
- func (self *SRegion) GetMatchInstanceTypes(cpu int, memMB int, gpu int, zoneId string) ([]SInstanceType, error)
- func (self *SRegion) GetMetadata() *jsonutils.JSONDict
- func (self *SRegion) GetName() string
- func (self *SRegion) GetNetwroks(ids []string, vpcId string, limit int, offset int) ([]SNetwork, int, error)
- func (self *SRegion) GetProvider() string
- func (self *SRegion) GetSecurityGroupDetails(secGroupId string) (*SSecurityGroup, error)
- func (self *SRegion) GetSecurityGroups(vpcId string, secgroupIdTag string, offset int, limit int) ([]SSecurityGroup, int, error)
- func (self *SRegion) GetSnapshots(instanceId string, diskId string, snapshotName string, snapshotIds []string, ...) ([]SSnapshot, int, error)
- func (self *SRegion) GetStatus() string
- func (self *SRegion) GetVpcs(vpcId []string, offset int, limit int) ([]SVpc, int, error)
- func (self *SRegion) ImportImage(name string, osArch string, osType string, osDist string, diskFormat string, ...) (*ImageImportTask, error)
- func (self *SRegion) ImportKeypair(name string, pubKey string) (*SKeypair, error)
- func (self *SRegion) IsBucketExist(bucketName string) (bool, error)
- func (self *SRegion) IsEmulated() bool
- func (self *SRegion) Refresh() error
- func (self *SRegion) ReplaceSystemDisk(instanceId string, imageId string, sysDiskSizeGB int) (string, error)
- func (self *SRegion) StartVM(instanceId string) error
- func (self *SRegion) StopVM(instanceId string, isForce bool) error
- func (self *SRegion) UpdateEipBandwidth(eipId string, bw int) error
- func (self *SRegion) UpdateVM(instanceId string, hostname string) error
- type SSecurityGroup
- func (self *SSecurityGroup) GetDescription() string
- func (self *SSecurityGroup) GetGlobalId() string
- func (self *SSecurityGroup) GetId() string
- func (self *SSecurityGroup) GetMetadata() *jsonutils.JSONDict
- func (self *SSecurityGroup) GetName() string
- func (self *SSecurityGroup) GetRules() ([]secrules.SecurityRule, error)
- func (self *SSecurityGroup) GetStatus() string
- func (self *SSecurityGroup) IsEmulated() bool
- func (self *SSecurityGroup) Refresh() error
- type SSecurityGroupIds
- type SSnapshot
- func (self *SSnapshot) Delete() error
- func (self *SSnapshot) GetDiskId() string
- func (self *SSnapshot) GetDiskType() string
- func (self *SSnapshot) GetGlobalId() string
- func (self *SSnapshot) GetId() string
- func (self *SSnapshot) GetManagerId() string
- func (self *SSnapshot) GetMetadata() *jsonutils.JSONDict
- func (self *SSnapshot) GetName() string
- func (self *SSnapshot) GetRegionId() string
- func (self *SSnapshot) GetSize() int32
- func (self *SSnapshot) GetStatus() string
- func (self *SSnapshot) IsEmulated() bool
- func (self *SSnapshot) Refresh() error
- type SStorage
- func (self *SStorage) CreateIDisk(name string, sizeGb int, desc string) (cloudprovider.ICloudDisk, error)
- func (self *SStorage) GetCapacityMB() int
- func (self *SStorage) GetEnabled() bool
- func (self *SStorage) GetGlobalId() string
- func (self *SStorage) GetIDisk(idStr string) (cloudprovider.ICloudDisk, error)
- func (self *SStorage) GetIDisks() ([]cloudprovider.ICloudDisk, error)
- func (self *SStorage) GetIStoragecache() cloudprovider.ICloudStoragecache
- func (self *SStorage) GetIZone() cloudprovider.ICloudZone
- func (self *SStorage) GetId() string
- func (self *SStorage) GetManagerId() string
- func (self *SStorage) GetMediumType() string
- func (self *SStorage) GetMetadata() *jsonutils.JSONDict
- func (self *SStorage) GetName() string
- func (self *SStorage) GetStatus() string
- func (self *SStorage) GetStorageConf() jsonutils.JSONObject
- func (self *SStorage) GetStorageType() string
- func (self *SStorage) IsEmulated() bool
- func (self *SStorage) Refresh() error
- type SStoragecache
- func (self *SStoragecache) CreateIImage(snapshotId, imageName, osType, imageDesc string) (cloudprovider.ICloudImage, error)
- func (self *SStoragecache) DownloadImage(userCred mcclient.TokenCredential, imageId string, extId string, path string) (jsonutils.JSONObject, error)
- func (self *SStoragecache) GetGlobalId() string
- func (self *SStoragecache) GetIImages() ([]cloudprovider.ICloudImage, error)
- func (self *SStoragecache) GetId() string
- func (self *SStoragecache) GetManagerId() string
- func (self *SStoragecache) GetMetadata() *jsonutils.JSONDict
- func (self *SStoragecache) GetName() string
- func (self *SStoragecache) GetStatus() string
- func (self *SStoragecache) IsEmulated() bool
- func (self *SStoragecache) Refresh() error
- func (self *SStoragecache) UploadImage(userCred mcclient.TokenCredential, imageId string, ...) (string, error)
- type STags
- type SUserCIDRs
- type SVpc
- func (self *SVpc) Delete() error
- func (self *SVpc) GetCidrBlock() string
- func (self *SVpc) GetGlobalId() string
- func (self *SVpc) GetISecurityGroups() ([]cloudprovider.ICloudSecurityGroup, error)
- func (self *SVpc) GetIWireById(wireId string) (cloudprovider.ICloudWire, error)
- func (self *SVpc) GetIWires() ([]cloudprovider.ICloudWire, error)
- func (self *SVpc) GetId() string
- func (self *SVpc) GetIsDefault() bool
- func (self *SVpc) GetManagerId() string
- func (self *SVpc) GetMetadata() *jsonutils.JSONDict
- func (self *SVpc) GetName() string
- func (self *SVpc) GetRegion() cloudprovider.ICloudRegion
- func (self *SVpc) GetStatus() string
- func (self *SVpc) IsEmulated() bool
- func (self *SVpc) Refresh() error
- func (self *SVpc) SyncSecurityGroup(secgroupId string, name string, rules []secrules.SecurityRule) (string, error)
- type SVpcAttributes
- type SWire
- func (self *SWire) CreateINetwork(name string, cidr string, desc string) (cloudprovider.ICloudNetwork, error)
- func (self *SWire) GetBandwidth() int
- func (self *SWire) GetGlobalId() string
- func (self *SWire) GetINetworkById(netid string) (cloudprovider.ICloudNetwork, error)
- func (self *SWire) GetINetworks() ([]cloudprovider.ICloudNetwork, error)
- func (self *SWire) GetIVpc() cloudprovider.ICloudVpc
- func (self *SWire) GetIZone() cloudprovider.ICloudZone
- func (self *SWire) GetId() string
- func (self *SWire) GetMetadata() *jsonutils.JSONDict
- func (self *SWire) GetName() string
- func (self *SWire) GetStatus() string
- func (self *SWire) IsEmulated() bool
- func (self *SWire) Refresh() error
- type SZone
- func (self *SZone) GetGlobalId() string
- func (self *SZone) GetIHostById(id string) (cloudprovider.ICloudHost, error)
- func (self *SZone) GetIHosts() ([]cloudprovider.ICloudHost, error)
- func (self *SZone) GetIRegion() cloudprovider.ICloudRegion
- func (self *SZone) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
- func (self *SZone) GetIStorages() ([]cloudprovider.ICloudStorage, error)
- func (self *SZone) GetIWires() ([]cloudprovider.ICloudWire, error)
- func (self *SZone) GetId() string
- func (self *SZone) GetMetadata() *jsonutils.JSONDict
- func (self *SZone) GetName() string
- func (self *SZone) GetStatus() string
- func (self *SZone) IsEmulated() bool
- func (self *SZone) Refresh() error
- type SnapshotStatusType
- type Tag
- type TagSpec
- func (self *TagSpec) GetDescTag() string
- func (self *TagSpec) GetNameTag() string
- func (self *TagSpec) GetTag(k string) (string, error)
- func (self *TagSpec) GetTagSpecifications() (*ec2.TagSpecification, error)
- func (self *TagSpec) GetTagWithDefault(k, Default string) string
- func (self *TagSpec) LoadingEc2Tags(tags []*ec2.Tag)
- func (self *TagSpec) SetDescTag(v string)
- func (self *TagSpec) SetNameTag(v string)
- func (self *TagSpec) SetTag(k, v string)
- type Tags
Constants ¶
View Source
const ( CLOUD_PROVIDER_AWS = models.CLOUD_PROVIDER_AWS CLOUD_PROVIDER_AWS_CN = "AWS" AWS_INTERNATIONAL_DEFAULT_REGION = "us-west-1" AWS_CHINA_DEFAULT_REGION = "cn-north-1" AWS_API_VERSION = "2018-10-10" )
View Source
const ( EIP_STATUS_INUSE = "InUse" EIP_STATUS_AVAILABLE = "Available" )
View Source
const ( InstanceStatusPending = "pending" InstanceStatusRunning = "running" InstanceStatusShutting = "shutting-down" InstanceStatusTerminated = "terminated" InstanceStatusStopping = "stopping" InstanceStatusStopped = "stopped" )
Variables ¶
View Source
var StorageTypes = []string{ models.STORAGE_GP2_SSD, models.STORAGE_IO1_SSD, models.STORAGE_ST1_HDD, models.STORAGE_SC1_SSD, models.STORAGE_STANDARD_SSD, }
Functions ¶
func AppendFilter ¶
func AppendSingleValueFilter ¶
func AwsIpPermissionToYunion ¶
func AwsIpPermissionToYunion(direction secrules.TSecurityRuleDirection, p ec2.IpPermission) ([]secrules.SecurityRule, error)
Security Rule Transform
func ConvertedList ¶
func ConvertedPointList ¶
func NextDeviceName ¶
func YunionSecRuleToAws ¶
func YunionSecRuleToAws(rule secrules.SecurityRule) ([]*ec2.IpPermission, error)
Types ¶
type CpuCredits ¶
type CpuCredits struct {
OptimizationSupported bool `json:"optimizationSupported"`
}
type ImageExportTask ¶
type ImageImportTask ¶
type ImageOwnerType ¶
type ImageOwnerType string
const ( ImageOwnerSystem ImageOwnerType = "amazon" ImageOwnerSelf ImageOwnerType = "self" ImageOwnerOthers ImageOwnerType = "microsoft" ImageOwnerMarketplace ImageOwnerType = "aws-marketplace" )
type ImageStatusType ¶
type ImageStatusType string
const ( ImageStatusCreating ImageStatusType = "pending" ImageStatusAvailable ImageStatusType = "available" ImageStatusCreateFailed ImageStatusType = "failed" )
type InstanceChargeType ¶
type InstanceChargeType string
type ProcessorFeatures ¶
type RootDevice ¶
type SAccountBalance ¶
type SAwsClient ¶
type SAwsClient struct {
// contains filtered or unexported fields
}
func NewAwsClient ¶
func (*SAwsClient) GetIHostById ¶
func (self *SAwsClient) GetIHostById(id string) (cloudprovider.ICloudHost, error)
func (*SAwsClient) GetIRegionById ¶
func (self *SAwsClient) GetIRegionById(id string) (cloudprovider.ICloudRegion, error)
func (*SAwsClient) GetIRegions ¶
func (self *SAwsClient) GetIRegions() []cloudprovider.ICloudRegion
func (*SAwsClient) GetIStorageById ¶
func (self *SAwsClient) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
func (*SAwsClient) GetIStoragecacheById ¶
func (self *SAwsClient) GetIStoragecacheById(id string) (cloudprovider.ICloudStoragecache, error)
func (*SAwsClient) GetIVpcById ¶
func (self *SAwsClient) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)
func (*SAwsClient) GetRegion ¶
func (self *SAwsClient) GetRegion(regionId string) *SRegion
func (*SAwsClient) GetRegions ¶
func (self *SAwsClient) GetRegions() []SRegion
只是使用fetchRegions初始化好的self.iregions. 本身并不从云服务器厂商拉取region信息
func (*SAwsClient) GetSubAccounts ¶
func (self *SAwsClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
func (*SAwsClient) QueryAccountBalance ¶
func (self *SAwsClient) QueryAccountBalance() (*SAccountBalance, error)
func (*SAwsClient) UpdateAccount ¶
func (self *SAwsClient) UpdateAccount(accessKey, secret string) error
type SDisk ¶
type SDisk struct { RegionId string ZoneId string // AvailabilityZone DiskId string // VolumeId DiskName string // Tag Name Size int // Size Category string // VolumeType Type string // system | data Status string // State AttachmentStatus string // attachment.status Device string // Device InstanceId string // InstanceId Encrypted bool // Encrypted SourceSnapshotId string // SnapshotId Iops int // Iops Tags TagSpec CreationTime time.Time // CreateTime AttachedTime time.Time // AttachTime DetachedTime time.Time DeleteWithInstance bool // DeleteOnTermination EnableAutoSnapshot bool EnableAutomatedSnapshotPolicy bool /*下面这些字段也许不需要*/ AutoSnapshotPolicyId string DeleteAutoSnapshot bool Description string DiskChargeType InstanceChargeType ExpiredTime time.Time ImageId string MountInstances SMountInstances Portable bool ProductCode string ResourceGroupId string // contains filtered or unexported fields }
func (*SDisk) CreateISnapshot ¶
func (self *SDisk) CreateISnapshot(name string, desc string) (cloudprovider.ICloudSnapshot, error)
func (*SDisk) GetBillingType ¶
func (*SDisk) GetCacheMode ¶
func (*SDisk) GetDiskFormat ¶
func (*SDisk) GetDiskSizeMB ¶
func (*SDisk) GetDiskType ¶
func (*SDisk) GetExpiredAt ¶
func (*SDisk) GetFsFormat ¶
func (*SDisk) GetGlobalId ¶
func (*SDisk) GetISnapshot ¶
func (self *SDisk) GetISnapshot(snapshotId string) (cloudprovider.ICloudSnapshot, error)
func (*SDisk) GetISnapshots ¶
func (self *SDisk) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)
func (*SDisk) GetIStorge ¶
func (self *SDisk) GetIStorge() cloudprovider.ICloudStorage
func (*SDisk) GetIsAutoDelete ¶
func (*SDisk) GetIsNonPersistent ¶
func (*SDisk) GetMetadata ¶
func (*SDisk) GetMountpoint ¶
func (*SDisk) GetTemplateId ¶
func (*SDisk) IsEmulated ¶
type SEipAddress ¶
type SEipAddress struct { AllocationId string Bandwidth int Tags TagSpec Status string InstanceId string AssociationId string Domain string NetworkInterfaceId string NetworkInterfaceOwnerId string PrivateIpAddress string IpAddress string // contains filtered or unexported fields }
func (*SEipAddress) Associate ¶
func (self *SEipAddress) Associate(instanceId string) error
func (*SEipAddress) ChangeBandwidth ¶
func (self *SEipAddress) ChangeBandwidth(bw int) error
func (*SEipAddress) Delete ¶
func (self *SEipAddress) Delete() error
func (*SEipAddress) Dissociate ¶
func (self *SEipAddress) Dissociate() error
func (*SEipAddress) GetAssociationExternalId ¶
func (self *SEipAddress) GetAssociationExternalId() string
func (*SEipAddress) GetAssociationType ¶
func (self *SEipAddress) GetAssociationType() string
func (*SEipAddress) GetBandwidth ¶
func (self *SEipAddress) GetBandwidth() int
func (*SEipAddress) GetGlobalId ¶
func (self *SEipAddress) GetGlobalId() string
func (*SEipAddress) GetId ¶
func (self *SEipAddress) GetId() string
func (*SEipAddress) GetInternetChargeType ¶
func (self *SEipAddress) GetInternetChargeType() string
func (*SEipAddress) GetIpAddr ¶
func (self *SEipAddress) GetIpAddr() string
func (*SEipAddress) GetManagerId ¶
func (self *SEipAddress) GetManagerId() string
func (*SEipAddress) GetMetadata ¶
func (self *SEipAddress) GetMetadata() *jsonutils.JSONDict
func (*SEipAddress) GetMode ¶
func (self *SEipAddress) GetMode() string
func (*SEipAddress) GetName ¶
func (self *SEipAddress) GetName() string
func (*SEipAddress) GetStatus ¶
func (self *SEipAddress) GetStatus() string
func (*SEipAddress) IsEmulated ¶
func (self *SEipAddress) IsEmulated() bool
func (*SEipAddress) Refresh ¶
func (self *SEipAddress) Refresh() error
type SHost ¶
type SHost struct {
// contains filtered or unexported fields
}
func (*SHost) GetAccessIp ¶
func (*SHost) GetAccessMac ¶
func (*SHost) GetCpuCount ¶
func (*SHost) GetCpuDesc ¶
func (*SHost) GetEnabled ¶
func (*SHost) GetGlobalId ¶
func (*SHost) GetHostStatus ¶
func (*SHost) GetHostType ¶
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(gid string) (cloudprovider.ICloudVM, error)
func (*SHost) GetIWires ¶
func (self *SHost) GetIWires() ([]cloudprovider.ICloudWire, error)
func (*SHost) GetInstanceById ¶
func (*SHost) GetManagerId ¶
func (*SHost) GetMemSizeMB ¶
func (*SHost) GetMetadata ¶
func (*SHost) GetNodeCount ¶
func (*SHost) GetStorageSizeMB ¶
func (*SHost) GetStorageType ¶
func (*SHost) GetSysInfo ¶
func (self *SHost) GetSysInfo() jsonutils.JSONObject
func (*SHost) IsEmulated ¶
type SImage ¶
type SImage struct { Architecture string CreationTime string Description string ImageId string ImageName string OSName string OSType string ImageType string IsSupportCloudinit bool IsSupportIoOptimized bool Platform string Size int Status ImageStatusType Usage string RootDevice RootDevice // contains filtered or unexported fields }
func (*SImage) GetGlobalId ¶
func (*SImage) GetIStoragecache ¶
func (self *SImage) GetIStoragecache() cloudprovider.ICloudStoragecache
func (*SImage) GetMetadata ¶
func (*SImage) IsEmulated ¶
type SInstance ¶
type SInstance struct { RegionId string ZoneId string InstanceId string ImageId string HostName string InstanceName string InstanceType string Cpu int8 Memory int IoOptimized bool KeyPairName string CreationTime time.Time // LaunchTime ExpiredTime time.Time ProductCodes []string PublicDNSName string InnerIpAddress SIpAddress PublicIpAddress SIpAddress RootDeviceName string Status string // state VlanId string // subnet ID ? VpcAttributes SVpcAttributes SecurityGroupIds SSecurityGroupIds NetworkInterfaces SNetworkInterfaces EipAddress SEipAddress Disks []string DeviceNames []string OSName string OSType string Description string // contains filtered or unexported fields }
func (*SInstance) AttachDisk ¶
func (*SInstance) ChangeConfig ¶
func (*SInstance) DetachDisk ¶
func (*SInstance) GetBillingType ¶
func (*SInstance) GetBootOrder ¶
func (*SInstance) GetCreateTime ¶
func (*SInstance) GetExpiredAt ¶
func (*SInstance) GetGlobalId ¶
func (*SInstance) GetHypervisor ¶
func (*SInstance) GetIDisks ¶
func (self *SInstance) GetIDisks() ([]cloudprovider.ICloudDisk, error)
func (*SInstance) GetIHost ¶
func (self *SInstance) GetIHost() cloudprovider.ICloudHost
func (*SInstance) GetMachine ¶
func (*SInstance) GetMetadata ¶
func (*SInstance) GetVNCInfo ¶
func (self *SInstance) GetVNCInfo() (jsonutils.JSONObject, error)
func (*SInstance) GetVcpuCount ¶
func (*SInstance) GetVmemSizeMB ¶
func (*SInstance) IsEmulated ¶
func (*SInstance) RebuildRoot ¶
func (*SInstance) SyncSecurityGroup ¶
func (*SInstance) UpdateUserData ¶
type SInstanceNic ¶
type SInstanceNic struct {
// contains filtered or unexported fields
}
func (*SInstanceNic) GetDriver ¶
func (self *SInstanceNic) GetDriver() string
func (*SInstanceNic) GetINetwork ¶
func (self *SInstanceNic) GetINetwork() cloudprovider.ICloudNetwork
func (*SInstanceNic) GetIP ¶
func (self *SInstanceNic) GetIP() string
func (*SInstanceNic) GetMAC ¶
func (self *SInstanceNic) GetMAC() string
type SInstanceType ¶
type SInstanceType struct { Architectures []string `json:"architectures"` Cpu Cpu `json:"cpu"` CpuCredits CpuCredits `json:"cpuCredits"` Description string `json:"description"` EbsEncryptionSupported bool `json:"ebsEncryptionSupported"` EbsOnly bool `json:"ebsOnly"` Family string `json:"family"` FreeTierEligible bool `json:"freeTierEligible"` Ipv6Support bool `json:"ipv6Support"` Memory float32 `json:"memory"` NetworkPerformance string `json:"networkPerformance"` PhysicalProcessor string `json:"physicalProcessor"` ProcessorFeatures ProcessorFeatures `json:"processorFeatures"` ProcessorSpeed float32 `json:"processorSpeed"` SpotSupported bool `json:"spotSupported"` InstanceTypeId string `json:"typeName"` VirtualizationTypes []string `json:"virtualizationTypes"` Vpc bool `json:"vpc"` VpcOnly bool `json:"vpcOnly"` Windows bool `json:"windows"` }
type SIpAddress ¶
type SIpAddress struct {
IpAddress []string
}
type SMountInstances ¶
type SMountInstances struct {
MountInstance []string
}
type SNetwork ¶
type SNetwork struct { AvailableIpAddressCount int CidrBlock string CreationTime time.Time Description string IsDefault bool Status string NetworkId string NetworkName string VpcId string ZoneId string // contains filtered or unexported fields }
func (*SNetwork) GetAllocTimeoutSeconds ¶
func (*SNetwork) GetGateway ¶
func (*SNetwork) GetGlobalId ¶
func (*SNetwork) GetIWire ¶
func (self *SNetwork) GetIWire() cloudprovider.ICloudWire
func (*SNetwork) GetIpStart ¶
func (*SNetwork) GetIsPublic ¶
func (*SNetwork) GetMetadata ¶
func (*SNetwork) GetServerType ¶
func (*SNetwork) IsEmulated ¶
type SNetworkInterface ¶
type SNetworkInterfaces ¶
type SNetworkInterfaces struct {
NetworkInterface []SNetworkInterface
}
type SRegion ¶
type SRegion struct { RegionEndpoint string RegionId string // 这里为保持一致沿用阿里云RegionId的叫法, 与AWS RegionName字段对应 // contains filtered or unexported fields }
func (*SRegion) AllocateEIP ¶
func (self *SRegion) AllocateEIP(domainType string) (*SEipAddress, error)
func (*SRegion) AssociateEip ¶
func (*SRegion) AttachDisk ¶
func (*SRegion) AttachKeypair ¶
func (*SRegion) ChangeVMConfig ¶
func (*SRegion) CheckBucket ¶
func (*SRegion) CreateDisk ¶
func (*SRegion) CreateIVpc ¶
func (*SRegion) CreateInstance ¶
func (*SRegion) CreateInstanceSimple ¶
func (*SRegion) CreateSnapshot ¶
func (*SRegion) DeallocateEIP ¶
func (*SRegion) DeleteDisk ¶
func (*SRegion) DeleteImage ¶
func (*SRegion) DeleteSnapshot ¶
func (*SRegion) DetachDisk ¶
func (*SRegion) DetachKeyPair ¶
func (*SRegion) DissociateEip ¶
func (*SRegion) ExportImage ¶
func (self *SRegion) ExportImage(instanceId string, imageId string) (*ImageExportTask, error)
func (*SRegion) GetARNPartition ¶
func (*SRegion) GetClient ¶
func (self *SRegion) GetClient() *SAwsClient
///////////////////////////////////////////////////////////////////////////
请不要使用这个client(AWS_DEFAULT_REGION)跨region查信息.有可能导致查询返回的信息为空。比如DescribeAvailabilityZones
func (*SRegion) GetGlobalId ¶
func (*SRegion) GetIEipById ¶
func (self *SRegion) GetIEipById(eipId string) (cloudprovider.ICloudEIP, error)
func (*SRegion) GetIHostById ¶
func (self *SRegion) GetIHostById(id string) (cloudprovider.ICloudHost, error)
func (*SRegion) GetISnapshotById ¶
func (self *SRegion) GetISnapshotById(snapshotId string) (cloudprovider.ICloudSnapshot, error)
func (*SRegion) GetISnapshots ¶
func (self *SRegion) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)
func (*SRegion) GetIStorageById ¶
func (self *SRegion) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
func (*SRegion) GetIStoragecacheById ¶
func (self *SRegion) GetIStoragecacheById(id string) (cloudprovider.ICloudStoragecache, error)
func (*SRegion) GetIVpcById ¶
func (self *SRegion) GetIVpcById(id string) (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) GetImageStatus ¶
func (self *SRegion) GetImageStatus(imageId string) (ImageStatusType, error)
func (*SRegion) GetImages ¶
func (self *SRegion) GetImages(status ImageStatusType, owner ImageOwnerType, imageId []string, name string, offset int, limit int) ([]SImage, int, error)
func (*SRegion) GetInstance ¶
func (*SRegion) GetInstanceIdByImageId ¶
func (*SRegion) GetInstanceStatus ¶
func (*SRegion) GetInstanceType ¶
func (self *SRegion) GetInstanceType(instanceTypeId string) (*SInstanceType, error)
func (*SRegion) GetInstanceTypes ¶
func (self *SRegion) GetInstanceTypes() ([]SInstanceType, error)
func (*SRegion) GetInstances ¶
func (*SRegion) GetKeypairs ¶
func (*SRegion) GetLatitude ¶
func (*SRegion) GetLongitude ¶
func (*SRegion) GetMatchInstanceTypes ¶
func (*SRegion) GetMetadata ¶
func (*SRegion) GetNetwroks ¶
func (*SRegion) GetProvider ¶
func (*SRegion) GetSecurityGroupDetails ¶
func (self *SRegion) GetSecurityGroupDetails(secGroupId string) (*SSecurityGroup, error)
func (*SRegion) GetSecurityGroups ¶
func (*SRegion) GetSnapshots ¶
func (*SRegion) ImportImage ¶
func (*SRegion) ImportKeypair ¶
func (*SRegion) IsEmulated ¶
func (*SRegion) ReplaceSystemDisk ¶
func (*SRegion) UpdateEipBandwidth ¶
type SSecurityGroup ¶
type SSecurityGroup struct { RegionId string VpcId string SecurityGroupId string Description string SecurityGroupName string Permissions []secrules.SecurityRule Tags Tags // contains filtered or unexported fields }
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) GetMetadata ¶
func (self *SSecurityGroup) GetMetadata() *jsonutils.JSONDict
func (*SSecurityGroup) GetName ¶
func (self *SSecurityGroup) GetName() string
func (*SSecurityGroup) GetRules ¶
func (self *SSecurityGroup) GetRules() ([]secrules.SecurityRule, error)
func (*SSecurityGroup) GetStatus ¶
func (self *SSecurityGroup) GetStatus() string
func (*SSecurityGroup) IsEmulated ¶
func (self *SSecurityGroup) IsEmulated() bool
func (*SSecurityGroup) Refresh ¶
func (self *SSecurityGroup) Refresh() error
type SSecurityGroupIds ¶
type SSecurityGroupIds struct {
SecurityGroupId []string
}
type SSnapshot ¶
type SSnapshot struct { Progress string SnapshotId string SnapshotName string SourceDiskId string SourceDiskSize int32 SourceDiskType string Status SnapshotStatusType Usage string // contains filtered or unexported fields }
func (*SSnapshot) GetDiskType ¶
func (*SSnapshot) GetGlobalId ¶
func (*SSnapshot) GetManagerId ¶
func (*SSnapshot) GetMetadata ¶
func (*SSnapshot) GetRegionId ¶
func (*SSnapshot) IsEmulated ¶
type SStorage ¶
type SStorage struct {
// contains filtered or unexported fields
}
func (*SStorage) CreateIDisk ¶
func (self *SStorage) CreateIDisk(name string, sizeGb int, desc string) (cloudprovider.ICloudDisk, error)
func (*SStorage) GetCapacityMB ¶
func (*SStorage) GetEnabled ¶
func (*SStorage) GetGlobalId ¶
func (*SStorage) GetIDisk ¶
func (self *SStorage) GetIDisk(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) GetManagerId ¶
func (*SStorage) GetMediumType ¶
func (*SStorage) GetMetadata ¶
func (*SStorage) GetStorageConf ¶
func (self *SStorage) GetStorageConf() jsonutils.JSONObject
func (*SStorage) GetStorageType ¶
func (*SStorage) IsEmulated ¶
type SStoragecache ¶
type SStoragecache struct {
// contains filtered or unexported fields
}
func (*SStoragecache) CreateIImage ¶
func (self *SStoragecache) CreateIImage(snapshotId, imageName, osType, imageDesc string) (cloudprovider.ICloudImage, error)
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) GetIImages ¶
func (self *SStoragecache) GetIImages() ([]cloudprovider.ICloudImage, error)
func (*SStoragecache) GetId ¶
func (self *SStoragecache) GetId() string
func (*SStoragecache) GetManagerId ¶
func (self *SStoragecache) GetManagerId() string
func (*SStoragecache) GetMetadata ¶
func (self *SStoragecache) GetMetadata() *jsonutils.JSONDict
func (*SStoragecache) GetName ¶
func (self *SStoragecache) GetName() 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(userCred mcclient.TokenCredential, imageId string, osArch, osType, osDist string, extId string, isForce bool) (string, error)
type SUserCIDRs ¶
type SUserCIDRs struct {
UserCidr []string
}
type SVpc ¶
type SVpc struct { RegionId string VpcId string VpcName string CidrBlock string IsDefault bool Status string Tags map[string]string // 名称、描述等 // contains filtered or unexported fields }
func (*SVpc) GetCidrBlock ¶
func (*SVpc) GetGlobalId ¶
func (*SVpc) GetISecurityGroups ¶
func (self *SVpc) GetISecurityGroups() ([]cloudprovider.ICloudSecurityGroup, error)
func (*SVpc) GetIWireById ¶
func (self *SVpc) GetIWireById(wireId string) (cloudprovider.ICloudWire, error)
func (*SVpc) GetIWires ¶
func (self *SVpc) GetIWires() ([]cloudprovider.ICloudWire, error)
func (*SVpc) GetIsDefault ¶
func (*SVpc) GetManagerId ¶
func (*SVpc) GetMetadata ¶
func (*SVpc) GetRegion ¶
func (self *SVpc) GetRegion() cloudprovider.ICloudRegion
func (*SVpc) IsEmulated ¶
func (*SVpc) SyncSecurityGroup ¶
type SVpcAttributes ¶
type SVpcAttributes struct { PrivateIpAddress SIpAddress NetworkId string // subnet id VpcId string }
type SWire ¶
type SWire struct {
// contains filtered or unexported fields
}
func (*SWire) CreateINetwork ¶
func (self *SWire) CreateINetwork(name string, cidr string, desc string) (cloudprovider.ICloudNetwork, error)
func (*SWire) GetBandwidth ¶
func (*SWire) GetGlobalId ¶
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) GetMetadata ¶
func (*SWire) IsEmulated ¶
type SZone ¶
type SZone struct { ZoneId string // 沿用阿里云ZoneId,对应Aws ZoneName LocalName string State string // contains filtered or unexported fields }
func (*SZone) GetGlobalId ¶
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) GetMetadata ¶
func (*SZone) IsEmulated ¶
type SnapshotStatusType ¶
type SnapshotStatusType string
const ( SnapshotStatusAccomplished SnapshotStatusType = "accomplished" SnapshotStatusProgress SnapshotStatusType = "progressing" SnapshotStatusFailed SnapshotStatusType = "failed" )
type TagSpec ¶
type TagSpec struct { ResourceType string // "customer-gateway"|"dedicated-host"|"dhcp-options"|"image"|"instance"|"internet-gateway"|"network-acl"|"network-interface"|"reserved-instances"|"route-table"|"snapshot"|"spot-instances-request"|"subnet"|"security-group"|"volume"|"vpc"|"vpn-connection"|"vpn-gateway" Tags map[string]string }
func (*TagSpec) GetDescTag ¶
func (*TagSpec) GetNameTag ¶
func (*TagSpec) GetTagSpecifications ¶
func (self *TagSpec) GetTagSpecifications() (*ec2.TagSpecification, error)
func (*TagSpec) GetTagWithDefault ¶
找不到的情况下返回传入的默认值
func (*TagSpec) LoadingEc2Tags ¶
func (*TagSpec) SetDescTag ¶
func (*TagSpec) SetNameTag ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.