Documentation
¶
Overview ¶
Package egoscale is a mapping for with the CloudStack API (http://cloudstack.apache.org/api.html) from Go. It has been designed against the Exoscale (https://www.exoscale.com/) infrastructure but should fit other CloudStack services.
Requests and Responses ¶
To build a request, construct the adequate struct. This library expects a pointer for efficiency reasons only. The response is a struct corresponding to the data at stake. E.g. DeployVirtualMachine gives a VirtualMachine, as a pointer as well to avoid big copies.
Then everything within the struct is not a pointer. Find below some examples of how egoscale may be used to interact with a CloudStack endpoint, especially Exoscale itself. If anything feels odd or unclear, please let us know: https://github.com/exoscale/egoscale/issues
req := &egoscale.DeployVirtualMachine{ Size: 10, ServiceOfferingID: "...", TemplateID: "...", ZoneID: "...", } fmt.Println("Deployment started") resp, err := cs.Request(req) if err != nil { panic(err) } vm := resp.(*egoscale.VirtualMachine) fmt.Printf("Virtual Machine ID: %s\n", vm.ID)
This example deploys a virtual machine while controlling the job status as it goes. It enables a finer control over errors, e.g. HTTP timeout, and eventually a way to kill it of (from the client side).
req := &egoscale.DeployVirtualMachine{ Size: 10, ServiceOfferingID: "...", TemplateID: "...", ZoneID: "...", } vm := &egoscale.VirtualMachine{} fmt.Println("Deployment started") cs.AsyncRequest(req, func(jobResult *egoscale.AsyncJobResult, err error) bool { if err != nil { // any kind of error panic(err) } // Keep waiting if jobResult.JobStatus == egoscale.Pending { fmt.Println("wait...") return true } // Unmarshal the response into the response struct if err := jobResult.Response(vm); err != nil { // JSON unmarshaling error panic(err) } // Stop waiting return false }) fmt.Printf("Virtual Machine ID: %s\n", vm.ID)
Debugging and traces ¶
As this library is mostly an HTTP client, you can reuse all the existing tools around it.
cs := egoscale.NewClient("https://api.exoscale.ch/compute", "EXO...", "...") // sets a logger on stderr cs.Logger = log.Newos.Stderr, "prefix", log.LstdFlags) // activates the HTTP traces cs.TraceOn()
Nota bene: when running the tests or the egoscale library via another tool, e.g. the exo cli (or the cs cli), the environment variable EXOSCALE_TRACE=prefix does the above configuration for you. As a developer using egoscale as a library, you'll find it more convenient to plug your favorite io.Writer as it's Logger.
APIs ¶
All the available APIs on the server and provided by the API Discovery plugin
cs := egoscale.NewClient("https://api.exoscale.ch/compute", "EXO...", "...") resp, err := cs.Request(&egoscale.ListAPIs{}) if err != nil { panic(err) } for _, api := range resp.(*egoscale.ListAPIsResponse).API { fmt.Printf("%s %s\n", api.Name, api.Description) } // Output: // listNetworks Lists all available networks // ...
Security Groups ¶
Security Groups provide a way to isolate traffic to VMs. Rules are added via the two Authorization commands.
resp, err := cs.Request(&egoscale.CreateSecurityGroup{ Name: "Load balancer", Description: "Opens HTTP/HTTPS ports from the outside world", }) securityGroup := resp.(*egoscale.SecurityGroup) resp, err = cs.Request(&egoscale.AuthorizeSecurityGroupIngress{ Description: "SSH traffic", SecurityGroupID: securityGroup.ID, CidrList: []string{"0.0.0.0/0"}, Protocol: "tcp", StartPort: 22, EndPort: 22, }) // The modified SecurityGroup is returned securityGroup := resp.(*egoscale.SecurityGroup) // ... err = client.BooleanRequest(&egoscale.DeleteSecurityGroup{ ID: securityGroup.ID, }) // ...
Security Group also implement the generic List, Get and Delete interfaces (Listable, Gettable and Deletable).
// List all Security Groups sgs, err := cs.List(new(egoscale.SecurityGroup)) for _, s := range sgs { sg := s.(egoscale.SecurityGroup) // ... } // Get a Security Group sg := &egoscale.SecurityGroup{Name: "Load balancer"} if err := cs.Get(sg); err != nil { ... } // The SecurityGroup struct has been loaded with the SecurityGroup informations if err := cs.Delete(sg); err != nil { ... } // The SecurityGroup has been deleted
Zones ¶
A Zone corresponds to a Data Center. You may list them. Zone implements the Listable interface, which let you perform a list in two different ways. The first exposes the underlying CloudStack request while the second one hide them and you only manipulate the structs of your interest.
// Using ListZones request req := &egoscale.ListZones{} resp, err := client.Request(req) if err != nil { panic(err) } for _, zone := range resp.(*egoscale.ListZonesResponse) { ... } // Using client.List zone := &egoscale.Zone{} zones, err := client.List(zone) if err != nil { panic(err) } for _, z := range zones { zone := z.(egoscale.Zone) ... }
Elastic IPs ¶
An Elastic IP is a way to attach an IP address to many Virtual Machines. The API side of the story configures the external environment, like the routing. Some work is required within the machine to properly configure the interfaces.
Index ¶
- Constants
- func Copy(to, from interface{}) error
- func ExtractJSONTag(defaultName, jsonTag string) (string, bool)
- func FibonacciRetryStrategy(iteration int64) time.Duration
- type API
- type APIField
- type APILimit
- type APIParam
- type Account
- type AccountType
- type ActivateIP6
- type AddIPToNic
- type AddNicToVirtualMachine
- type AffinityGroup
- type AffinityGroupType
- type AssociateIPAddress
- type AsyncCommand
- type AsyncJobResult
- type AuthorizeSecurityGroupEgress
- type AuthorizeSecurityGroupIngress
- type CIDR
- type CSErrorCode
- type ChangeServiceForVirtualMachine
- type Client
- func (client *Client) APIDescription(command Command) string
- func (client *Client) APIName(command Command) string
- func (client *Client) AsyncListWithContext(ctx context.Context, g Listable) (<-chan interface{}, <-chan error)
- func (client *Client) AsyncRequest(asyncCommand AsyncCommand, callback WaitAsyncJobResultFunc)
- func (client *Client) AsyncRequestWithContext(ctx context.Context, asyncCommand AsyncCommand, ...)
- func (client *Client) BooleanRequest(command Command) error
- func (client *Client) BooleanRequestWithContext(ctx context.Context, command Command) error
- func (client *Client) CreateDomain(name string) (*DNSDomain, error)
- func (client *Client) CreateRecord(name string, rec DNSRecord) (*DNSRecord, error)
- func (client *Client) Delete(g Deletable) error
- func (client *Client) DeleteDomain(name string) error
- func (client *Client) DeleteRecord(name string, recordID int64) error
- func (client *Client) DeleteWithContext(ctx context.Context, g Deletable) error
- func (client *Client) Get(g Gettable) error
- func (client *Client) GetDomain(name string) (*DNSDomain, error)
- func (client *Client) GetDomains() ([]DNSDomain, error)
- func (client *Client) GetRecord(domain string, recordID int64) (*DNSRecord, error)
- func (client *Client) GetRecords(domain string) ([]DNSRecord, error)
- func (client *Client) GetRecordsWithFilters(domain, name, recordType string) ([]DNSRecord, error)
- func (client *Client) GetWithContext(ctx context.Context, g Gettable) error
- func (client *Client) List(g Listable) ([]interface{}, error)
- func (client *Client) ListWithContext(ctx context.Context, g Listable) ([]interface{}, error)
- func (client *Client) Paginate(req ListCommand, callback IterateItemFunc)
- func (client *Client) PaginateWithContext(ctx context.Context, req ListCommand, callback IterateItemFunc)
- func (client *Client) Payload(command Command) (url.Values, error)
- func (client *Client) Request(command Command) (interface{}, error)
- func (client *Client) RequestWithContext(ctx context.Context, command Command) (interface{}, error)
- func (client *Client) Response(command Command) interface{}
- func (client *Client) Sign(params url.Values) (string, error)
- func (client *Client) SyncRequest(command Command) (interface{}, error)
- func (client *Client) SyncRequestWithContext(ctx context.Context, command Command) (interface{}, error)
- func (client *Client) TraceOff()
- func (client *Client) TraceOn()
- func (client *Client) UpdateRecord(name string, rec UpdateDNSRecord) (*DNSRecord, error)
- type Command
- type CommandInfo
- type CopyTemplate
- type CreateAffinityGroup
- type CreateInstanceGroup
- type CreateNetwork
- type CreateSSHKeyPair
- type CreateSecurityGroup
- type CreateSnapshot
- type CreateTags
- type CreateTemplate
- type CreateUser
- type DNSDomain
- type DNSDomainResponse
- type DNSErrorResponse
- type DNSRecord
- type DNSRecordResponse
- type Deletable
- type DeleteAffinityGroup
- type DeleteInstanceGroup
- type DeleteNetwork
- type DeleteReverseDNSFromPublicIPAddress
- type DeleteReverseDNSFromVirtualMachine
- type DeleteSSHKeyPair
- type DeleteSecurityGroup
- type DeleteSnapshot
- type DeleteTags
- type DeleteTemplate
- type DeleteUser
- type DeployVirtualMachine
- type DestroyVirtualMachine
- type DisableAccount
- type DisassociateIPAddress
- type EgressRule
- type EnableAccount
- type ErrorCode
- type ErrorResponse
- type Event
- type EventType
- type ExpungeVirtualMachine
- type GetAPILimit
- type GetAPILimitResponse
- type GetVMPassword
- type GetVirtualMachineUserData
- type Gettable
- type Host
- type IPAddress
- type IPToNetwork
- type IngressRule
- type InstanceGroup
- type IterateItemFunc
- type JobStatusType
- type ListAPIs
- type ListAPIsResponse
- type ListAccounts
- type ListAccountsResponse
- type ListAffinityGroupTypes
- type ListAffinityGroupTypesResponse
- type ListAffinityGroups
- type ListAffinityGroupsResponse
- type ListAsyncJobs
- type ListAsyncJobsResponse
- type ListCommand
- type ListEventTypes
- type ListEventTypesResponse
- type ListEvents
- type ListEventsResponse
- type ListHosts
- type ListHostsResponse
- type ListInstanceGroups
- type ListInstanceGroupsResponse
- type ListNetworkOfferings
- type ListNetworkOfferingsResponse
- type ListNetworks
- type ListNetworksResponse
- type ListNics
- type ListNicsResponse
- type ListOSCategories
- type ListOSCategoriesResponse
- type ListPublicIPAddresses
- type ListPublicIPAddressesResponse
- type ListResourceDetails
- type ListResourceDetailsResponse
- type ListResourceLimits
- type ListResourceLimitsResponse
- type ListSSHKeyPairs
- type ListSSHKeyPairsResponse
- type ListSecurityGroups
- type ListSecurityGroupsResponse
- type ListServiceOfferings
- type ListServiceOfferingsResponse
- type ListSnapshots
- type ListSnapshotsResponse
- type ListTags
- type ListTagsResponse
- type ListTemplates
- type ListTemplatesResponse
- type ListUsers
- type ListUsersResponse
- type ListVirtualMachines
- type ListVirtualMachinesResponse
- type ListVolumes
- type ListVolumesResponse
- type ListZones
- type ListZonesResponse
- type Listable
- type MACAddress
- type MigrateVirtualMachine
- type Network
- type NetworkOffering
- type Nic
- type NicSecondaryIP
- type OSCategory
- type PCIDevice
- type Password
- type PrepareTemplate
- type QueryAsyncJobResult
- type QueryReverseDNSForPublicIPAddress
- type QueryReverseDNSForVirtualMachine
- type RebootVirtualMachine
- type Record
- type RecoverVirtualMachine
- type RegisterSSHKeyPair
- type RegisterTemplate
- type RegisterUserKeys
- type RemoveIPFromNic
- type RemoveNicFromVirtualMachine
- type ResetPasswordForVirtualMachine
- type ResetSSHKeyForVirtualMachine
- type ResizeVolume
- type ResourceLimit
- type ResourceTag
- type ResourceType
- type ResourceTypeName
- type RestartNetwork
- type RestoreVirtualMachine
- type RetryStrategyFunc
- type ReverseDNS
- type RevertSnapshot
- type RevokeSecurityGroupEgress
- type RevokeSecurityGroupIngress
- type SSHKeyPair
- type ScaleVirtualMachine
- type SecurityGroup
- type Service
- type ServiceCapability
- type ServiceOffering
- type ServiceProvider
- type Snapshot
- type SnapshotState
- type StartVirtualMachine
- type StopVirtualMachine
- type Taggable
- type Template
- type UUID
- type UUIDItem
- type UpdateDNSRecord
- type UpdateDNSRecordResponse
- type UpdateDefaultNicForVirtualMachine
- type UpdateHost
- type UpdateIPAddress
- type UpdateInstanceGroup
- type UpdateNetwork
- type UpdateNetworkOffering
- type UpdateResourceLimit
- type UpdateResourceLimitResponse
- type UpdateReverseDNSForPublicIPAddress
- type UpdateReverseDNSForVirtualMachine
- type UpdateTemplate
- type UpdateUser
- type UpdateVMAffinityGroup
- type UpdateVMNicIP
- type UpdateVirtualMachine
- type User
- type UserSecurityGroup
- type VirtualMachine
- func (vm VirtualMachine) DefaultNic() *Nic
- func (vm VirtualMachine) Delete(ctx context.Context, client *Client) error
- func (vm VirtualMachine) IP() *net.IP
- func (vm VirtualMachine) ListRequest() (ListCommand, error)
- func (vm VirtualMachine) NicByID(nicID UUID) *Nic
- func (vm VirtualMachine) NicByNetworkID(networkID UUID) *Nic
- func (vm VirtualMachine) NicsByType(nicType string) []Nic
- func (VirtualMachine) ResourceType() string
- type VirtualMachineState
- type VirtualMachineUserData
- type Volume
- type WaitAsyncJobResultFunc
- type Zone
Constants ¶
const Version = "0.12.1"
Version of the library
Variables ¶
This section is empty.
Functions ¶
func Copy ¶ added in v0.10.4
func Copy(to, from interface{}) error
Copy copies the value from from into to. The type of "from" must be convertible into the type of "to".
func ExtractJSONTag ¶ added in v0.10.0
ExtractJSONTag returns the variable name or defaultName as well as if the field is required (!omitempty)
func FibonacciRetryStrategy ¶ added in v0.9.11
FibonacciRetryStrategy waits for an increasing amount of time following the Fibonacci sequence
Types ¶
type API ¶ added in v0.9.0
type API struct { Description string `json:"description,omitempty" doc:"description of the api"` IsAsync bool `json:"isasync,omitempty" doc:"true if api is asynchronous"` Name string `json:"name,omitempty" doc:"the name of the api command"` Related string `json:"related,omitempty" doc:"comma separated related apis"` Since string `json:"since,omitempty" doc:"version of CloudStack the api was introduced in"` Type string `json:"type,omitempty" doc:"response field type"` Params []APIParam `json:"params,omitempty" doc:"the list params the api accepts"` Response []APIField `json:"response,omitempty" doc:"api response fields"` }
API represents an API service
type APIField ¶ added in v0.11.0
type APIField struct { Description string `json:"description"` Name string `json:"name"` Response []APIField `json:"response,omitempty"` Type string `json:"type"` }
APIField represents an API response field
type APILimit ¶ added in v0.9.24
type APILimit struct { Account string `json:"account,omitempty" doc:"the account name of the api remaining count"` Accountid string `json:"accountid,omitempty" doc:"the account uuid of the api remaining count"` APIAllowed int `json:"apiAllowed,omitempty" doc:"currently allowed number of apis"` APIIssued int `json:"apiIssued,omitempty" doc:"number of api already issued"` ExpireAfter int64 `json:"expireAfter,omitempty" doc:"seconds left to reset counters"` }
APILimit represents the limit count
type APIParam ¶ added in v0.9.0
type APIParam struct { Description string `json:"description"` Length int64 `json:"length"` Name string `json:"name"` Required bool `json:"required"` Since string `json:"since,omitempty"` Type string `json:"type"` }
APIParam represents an API parameter field
type Account ¶ added in v0.9.7
type Account struct { AccountDetails map[string]string `json:"accountdetails,omitempty" doc:"details for the account"` AccountType AccountType `json:"accounttype,omitempty" doc:"account type (admin, domain-admin, user)"` CPUAvailable string `json:"cpuavailable,omitempty" doc:"the total number of cpu cores available to be created for this account"` CPULimit string `json:"cpulimit,omitempty" doc:"the total number of cpu cores the account can own"` CPUTotal int64 `json:"cputotal,omitempty" doc:"the total number of cpu cores owned by account"` DefaultZoneID *UUID `json:"defaultzoneid,omitempty" doc:"the default zone of the account"` Domain string `json:"domain,omitempty" doc:"name of the Domain the account belongs too"` DomainID *UUID `json:"domainid,omitempty" doc:"id of the Domain the account belongs too"` EipLimit string `json:"eiplimit,omitempty" doc:"the total number of public elastic ip addresses this account can acquire"` Groups []string `json:"groups,omitempty" doc:"the list of acl groups that account belongs to"` ID *UUID `json:"id,omitempty" doc:"the id of the account"` IPAvailable string `json:"ipavailable,omitempty" doc:"the total number of public ip addresses available for this account to acquire"` IPLimit string `json:"iplimit,omitempty" doc:"the total number of public ip addresses this account can acquire"` IPTotal int64 `json:"iptotal,omitempty" doc:"the total number of public ip addresses allocated for this account"` IsCleanupRequired bool `json:"iscleanuprequired,omitempty" doc:"true if the account requires cleanup"` IsDefault bool `json:"isdefault,omitempty" doc:"true if account is default, false otherwise"` MemoryAvailable string `json:"memoryavailable,omitempty" doc:"the total memory (in MB) available to be created for this account"` MemoryLimit string `json:"memorylimit,omitempty" doc:"the total memory (in MB) the account can own"` MemoryTotal int64 `json:"memorytotal,omitempty" doc:"the total memory (in MB) owned by account"` Name string `json:"name,omitempty" doc:"the name of the account"` NetworkAvailable string `json:"networkavailable,omitempty" doc:"the total number of networks available to be created for this account"` NetworkDomain string `json:"networkdomain,omitempty" doc:"the network domain"` NetworkLimit string `json:"networklimit,omitempty" doc:"the total number of networks the account can own"` NetworkTotal int64 `json:"networktotal,omitempty" doc:"the total number of networks owned by account"` PrimaryStorageAvailable string `json:"primarystorageavailable,omitempty" doc:"the total primary storage space (in GiB) available to be used for this account"` PrimaryStorageLimit string `json:"primarystoragelimit,omitempty" doc:"the total primary storage space (in GiB) the account can own"` PrimaryStorageTotal int64 `json:"primarystoragetotal,omitempty" doc:"the total primary storage space (in GiB) owned by account"` ProjectAvailable string `json:"projectavailable,omitempty" doc:"the total number of projects available for administration by this account"` ProjectLimit string `json:"projectlimit,omitempty" doc:"the total number of projects the account can own"` ProjectTotal int64 `json:"projecttotal,omitempty" doc:"the total number of projects being administrated by this account"` SecondaryStorageAvailable string `` /* 129-byte string literal not displayed */ SecondaryStorageLimit string `json:"secondarystoragelimit,omitempty" doc:"the total secondary storage space (in GiB) the account can own"` SecondaryStorageTotal int64 `json:"secondarystoragetotal,omitempty" doc:"the total secondary storage space (in GiB) owned by account"` SMTP bool `json:"smtp,omitempty" doc:"if SMTP outbound is allowed"` SnapshotAvailable string `json:"snapshotavailable,omitempty" doc:"the total number of snapshots available for this account"` SnapshotLimit string `json:"snapshotlimit,omitempty" doc:"the total number of snapshots which can be stored by this account"` SnapshotTotal int64 `json:"snapshottotal,omitempty" doc:"the total number of snapshots stored by this account"` State string `json:"state,omitempty" doc:"the state of the account"` TemplateAvailable string `json:"templateavailable,omitempty" doc:"the total number of templates available to be created by this account"` TemplateLimit string `json:"templatelimit,omitempty" doc:"the total number of templates which can be created by this account"` TemplateTotal int64 `json:"templatetotal,omitempty" doc:"the total number of templates which have been created by this account"` User []User `json:"user,omitempty" doc:"the list of users associated with account"` VMAvailable string `json:"vmavailable,omitempty" doc:"the total number of virtual machines available for this account to acquire"` VMLimit string `json:"vmlimit,omitempty" doc:"the total number of virtual machines that can be deployed by this account"` VMRunning int `json:"vmrunning,omitempty" doc:"the total number of virtual machines running for this account"` VMStopped int `json:"vmstopped,omitempty" doc:"the total number of virtual machines stopped for this account"` VMTotal int64 `json:"vmtotal,omitempty" doc:"the total number of virtual machines deployed by this account"` VolumeAvailable string `json:"volumeavailable,omitempty" doc:"the total volume available for this account"` VolumeLimit string `json:"volumelimit,omitempty" doc:"the total volume which can be used by this account"` VolumeTotal int64 `json:"volumetotal,omitempty" doc:"the total volume being used by this account"` }
Account provides the detailed account information
func (Account) ListRequest ¶ added in v0.10.3
func (a Account) ListRequest() (ListCommand, error)
ListRequest builds the ListAccountsGroups request
type AccountType ¶ added in v0.9.7
type AccountType int16
AccountType represents the type of an Account
const ( // UserAccount represents a User UserAccount AccountType = 0 // AdminAccount represents an Admin AdminAccount AccountType = 1 // DomainAdminAccount represents a Domain Admin DomainAdminAccount AccountType = 2 )
func (AccountType) String ¶ added in v0.9.22
func (i AccountType) String() string
type ActivateIP6 ¶ added in v0.9.13
type ActivateIP6 struct { NicID *UUID `json:"nicid" doc:"the ID of the nic to which you want to assign the IPv6"` // contains filtered or unexported fields }
ActivateIP6 (Async) activates the IP6 on the given NIC
Exoscale specific API: https://community.exoscale.ch/api/compute/#activateip6_GET
type AddIPToNic ¶ added in v0.9.0
type AddIPToNic struct { NicID *UUID `json:"nicid" doc:"the ID of the nic to which you want to assign private IP"` IPAddress net.IP `json:"ipaddress,omitempty" doc:"Secondary IP Address"` // contains filtered or unexported fields }
AddIPToNic (Async) represents the assignation of a secondary IP
type AddNicToVirtualMachine ¶ added in v0.9.0
type AddNicToVirtualMachine struct { NetworkID *UUID `json:"networkid" doc:"Network ID"` VirtualMachineID *UUID `json:"virtualmachineid" doc:"Virtual Machine ID"` IPAddress net.IP `json:"ipaddress,omitempty" doc:"IP Address for the new network"` // contains filtered or unexported fields }
AddNicToVirtualMachine (Async) adds a NIC to a VM
type AffinityGroup ¶
type AffinityGroup struct { Account string `json:"account,omitempty" doc:"the account owning the affinity group"` Description string `json:"description,omitempty" doc:"the description of the affinity group"` Domain string `json:"domain,omitempty" doc:"the domain name of the affinity group"` DomainID *UUID `json:"domainid,omitempty" doc:"the domain ID of the affinity group"` ID *UUID `json:"id,omitempty" doc:"the ID of the affinity group"` Name string `json:"name,omitempty" doc:"the name of the affinity group"` Type string `json:"type,omitempty" doc:"the type of the affinity group"` VirtualMachineIDs []string `json:"virtualmachineIds,omitempty" doc:"virtual machine Ids associated with this affinity group"` }
AffinityGroup represents an (anti-)affinity group
Affinity and Anti-Affinity groups provide a way to influence where VMs should run. See: http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/stable/virtual_machines.html#affinity-groups
func (AffinityGroup) Delete ¶ added in v0.9.12
func (ag AffinityGroup) Delete(ctx context.Context, client *Client) error
Delete removes the given Affinity Group
func (AffinityGroup) ListRequest ¶ added in v0.10.0
func (ag AffinityGroup) ListRequest() (ListCommand, error)
ListRequest builds the ListAffinityGroups request
type AffinityGroupType ¶ added in v0.9.0
type AffinityGroupType struct {
Type string `json:"type,omitempty" doc:"the type of the affinity group"`
}
AffinityGroupType represent an affinity group type
type AssociateIPAddress ¶ added in v0.9.0
type AssociateIPAddress struct { Account string `json:"account,omitempty" doc:"the account to associate with this IP address"` DomainID *UUID `json:"domainid,omitempty" doc:"the ID of the domain to associate with this IP address"` ForDisplay *bool `json:"fordisplay,omitempty" doc:"an optional field, whether to the display the ip to the end user or not"` IsPortable *bool `` /* 148-byte string literal not displayed */ NetworkdID *UUID `json:"networkid,omitempty" doc:"The network this ip address should be associated to."` RegionID int `json:"regionid,omitempty" doc:"region ID from where portable ip is to be associated."` ZoneID *UUID `json:"zoneid,omitempty" doc:"the ID of the availability zone you want to acquire an public IP address from"` // contains filtered or unexported fields }
AssociateIPAddress (Async) represents the IP creation
type AsyncCommand ¶ added in v0.9.0
type AsyncCommand interface { Command // contains filtered or unexported methods }
AsyncCommand represents a async CloudStack request
type AsyncJobResult ¶ added in v0.9.0
type AsyncJobResult struct { AccountID *UUID `json:"accountid,omitempty" doc:"the account that executed the async command"` Cmd string `json:"cmd,omitempty" doc:"the async command executed"` Created string `json:"created,omitempty" doc:"the created date of the job"` JobID *UUID `json:"jobid,omitempty" doc:"extra field for the initial async call"` JobInstanceID *UUID `json:"jobinstanceid,omitempty" doc:"the unique ID of the instance/entity object related to the job"` JobInstanceType string `json:"jobinstancetype,omitempty" doc:"the instance/entity object related to the job"` JobProcStatus int `json:"jobprocstatus,omitempty" doc:"the progress information of the PENDING job"` JobResult *json.RawMessage `json:"jobresult,omitempty" doc:"the result reason"` JobResultCode int `json:"jobresultcode,omitempty" doc:"the result code for the job"` JobResultType string `json:"jobresulttype,omitempty" doc:"the result type"` JobStatus JobStatusType `json:"jobstatus,omitempty" doc:"the current job status-should be 0 for PENDING"` UserID *UUID `json:"userid,omitempty" doc:"the user that executed the async command"` }
AsyncJobResult represents an asynchronous job result
func (AsyncJobResult) Error ¶ added in v0.9.22
func (a AsyncJobResult) Error() error
func (AsyncJobResult) Result ¶ added in v0.10.1
func (a AsyncJobResult) Result(i interface{}) error
Result unmarshals the result of an AsyncJobResult into the given interface
type AuthorizeSecurityGroupEgress ¶ added in v0.9.0
type AuthorizeSecurityGroupEgress AuthorizeSecurityGroupIngress
AuthorizeSecurityGroupEgress (Async) represents the egress rule creation
type AuthorizeSecurityGroupIngress ¶ added in v0.9.0
type AuthorizeSecurityGroupIngress struct { Account string `json:"account,omitempty" doc:"an optional account for the security group. Must be used with domainid."` CIDRList []CIDR `json:"cidrlist,omitempty" doc:"the cidr list associated"` Description string `json:"description,omitempty" doc:"the description of the ingress/egress rule"` DomainID *UUID `` /* 138-byte string literal not displayed */ EndPort uint16 `json:"endport,omitempty" doc:"end port for this ingress rule"` IcmpCode uint8 `json:"icmpcode,omitempty" doc:"error code for this icmp message"` IcmpType uint8 `json:"icmptype,omitempty" doc:"type of the icmp message being sent"` Protocol string `json:"protocol,omitempty" doc:"TCP is default. UDP, ICMP, ICMPv6, AH, ESP, GRE are the other supported protocols"` SecurityGroupID *UUID `json:"securitygroupid,omitempty" doc:"The ID of the security group. Mutually exclusive with securitygroupname parameter"` SecurityGroupName string `json:"securitygroupname,omitempty" doc:"The name of the security group. Mutually exclusive with securitygroupid parameter"` StartPort uint16 `json:"startport,omitempty" doc:"start port for this ingress rule"` UserSecurityGroupList []UserSecurityGroup `json:"usersecuritygrouplist,omitempty" doc:"user to security group mapping"` // contains filtered or unexported fields }
AuthorizeSecurityGroupIngress (Async) represents the ingress rule creation
type CIDR ¶ added in v0.10.4
CIDR represents a nicely JSON serializable net.IPNet
func MustParseCIDR ¶ added in v0.11.0
MustParseCIDR forces parseCIDR or panics
func (CIDR) MarshalJSON ¶ added in v0.10.4
MarshalJSON converts the CIDR to a string representation
func (*CIDR) UnmarshalJSON ¶ added in v0.10.4
UnmarshalJSON unmarshals the raw JSON into the MAC address
type CSErrorCode ¶ added in v0.9.24
type CSErrorCode int
CSErrorCode represents the CloudStack CSExceptionErrorCode enum
const ( // CloudRuntimeException ... (TODO) CloudRuntimeException CSErrorCode = 4250 // ExecutionException ... (TODO) ExecutionException CSErrorCode = 4260 // HypervisorVersionChangedException ... (TODO) HypervisorVersionChangedException CSErrorCode = 4265 // CloudException ... (TODO) CloudException CSErrorCode = 4275 // AccountLimitException ... (TODO) AccountLimitException CSErrorCode = 4280 AgentUnavailableException CSErrorCode = 4285 // CloudAuthenticationException ... (TODO) CloudAuthenticationException CSErrorCode = 4290 // ConcurrentOperationException ... (TODO) ConcurrentOperationException CSErrorCode = 4300 // ConflictingNetworksException ... (TODO) ConflictingNetworkSettingsException CSErrorCode = 4305 // DiscoveredWithErrorException ... (TODO) DiscoveredWithErrorException CSErrorCode = 4310 // HAStateException ... (TODO) HAStateException CSErrorCode = 4315 // InsufficientAddressCapacityException ... (TODO) InsufficientAddressCapacityException CSErrorCode = 4320 // InsufficientCapacityException ... (TODO) InsufficientCapacityException CSErrorCode = 4325 // InsufficientNetworkCapacityException ... (TODO) InsufficientNetworkCapacityException CSErrorCode = 4330 // InsufficientServerCapaticyException ... (TODO) InsufficientServerCapacityException CSErrorCode = 4335 // InsufficientStorageCapacityException ... (TODO) InsufficientStorageCapacityException CSErrorCode = 4340 // InternalErrorException ... (TODO) InternalErrorException CSErrorCode = 4345 // InvalidParameterValueException ... (TODO) InvalidParameterValueException CSErrorCode = 4350 // ManagementServerException ... (TODO) ManagementServerException CSErrorCode = 4355 // NetworkRuleConflictException ... (TODO) NetworkRuleConflictException CSErrorCode = 4360 // PermissionDeniedException ... (TODO) PermissionDeniedException CSErrorCode = 4365 // ResourceAllocationException ... (TODO) ResourceAllocationException CSErrorCode = 4370 // ResourceInUseException ... (TODO) ResourceInUseException CSErrorCode = 4375 ResourceUnavailableException CSErrorCode = 4380 StorageUnavailableException CSErrorCode = 4385 // UnsupportedServiceException ... (TODO) UnsupportedServiceException CSErrorCode = 4390 // VirtualMachineMigrationException ... (TODO) VirtualMachineMigrationException CSErrorCode = 4395 // AsyncCommandQueued ... (TODO) AsyncCommandQueued CSErrorCode = 4540 // RequestLimitException ... (TODO) RequestLimitException CSErrorCode = 4545 // ServerAPIException ... (TODO) ServerAPIException CSErrorCode = 9999 )
func (CSErrorCode) String ¶ added in v0.9.24
func (i CSErrorCode) String() string
type ChangeServiceForVirtualMachine ¶ added in v0.9.0
type ChangeServiceForVirtualMachine struct { ID *UUID `json:"id" doc:"The ID of the virtual machine"` ServiceOfferingID *UUID `json:"serviceofferingid" doc:"the service offering ID to apply to the virtual machine"` Details map[string]string `` /* 129-byte string literal not displayed */ // contains filtered or unexported fields }
ChangeServiceForVirtualMachine changes the service offering for a virtual machine. The virtual machine must be in a "Stopped" state for this command to take effect.
type Client ¶
type Client struct { // HTTPClient holds the HTTP client HTTPClient *http.Client // Endpoints is CloudStack API Endpoint string // APIKey is the API identifier APIKey string // PageSize represents the default size for a paginated result PageSize int // Timeout represents the default timeout for the async requests Timeout time.Duration // Expiration representation how long a signed payload may be used Expiration time.Duration // RetryStrategy represents the waiting strategy for polling the async requests RetryStrategy RetryStrategyFunc // Logger contains any log, plug your own Logger *log.Logger // contains filtered or unexported fields }
Client represents the CloudStack API client
func NewClient ¶
NewClient creates a CloudStack API client with default timeout (60)
Timeout is set to both the HTTP client and the client itself.
func (*Client) APIDescription ¶ added in v0.10.0
APIDescription returns the description of the given CloudStack command
func (*Client) AsyncListWithContext ¶ added in v0.9.16
func (client *Client) AsyncListWithContext(ctx context.Context, g Listable) (<-chan interface{}, <-chan error)
AsyncListWithContext lists the given resources (and paginate till the end)
// NB: goroutine may leak if not read until the end. Create a proper context! ctx, cancel := context.WithCancel(context.Background()) defer cancel() outChan, errChan := client.AsyncListWithContext(ctx, new(egoscale.VirtualMachine)) for { select { case i, ok := <- outChan: if ok { vm := i.(egoscale.VirtualMachine) // ... } else { outChan = nil } case err, ok := <- errChan: if ok { // do something } // Once an error has been received, you can expect the channels to be closed. errChan = nil } if errChan == nil && outChan == nil { break } }
func (*Client) AsyncRequest ¶ added in v0.9.0
func (client *Client) AsyncRequest(asyncCommand AsyncCommand, callback WaitAsyncJobResultFunc)
AsyncRequest performs the given command
func (*Client) AsyncRequestWithContext ¶ added in v0.9.22
func (client *Client) AsyncRequestWithContext(ctx context.Context, asyncCommand AsyncCommand, callback WaitAsyncJobResultFunc)
AsyncRequestWithContext preforms a request with a context
func (*Client) BooleanRequest ¶ added in v0.9.0
BooleanRequest performs the given boolean command
func (*Client) BooleanRequestWithContext ¶ added in v0.9.12
BooleanRequestWithContext performs the given boolean command
func (*Client) CreateDomain ¶
CreateDomain creates a DNS domain
func (*Client) CreateRecord ¶
CreateRecord creates a DNS record
func (*Client) DeleteDomain ¶
DeleteDomain delets a DNS domain
func (*Client) DeleteRecord ¶
DeleteRecord deletes a record
func (*Client) DeleteWithContext ¶ added in v0.9.12
DeleteWithContext removes the given resource of fails
func (*Client) GetDomains ¶ added in v0.9.28
GetDomains gets DNS domains
func (*Client) GetRecords ¶
GetRecords returns the DNS records
func (*Client) GetRecordsWithFilters ¶ added in v0.11.0
GetRecordsWithFilters returns the DNS records (filters can be empty)
func (*Client) GetWithContext ¶ added in v0.9.12
GetWithContext populates the given resource or fails
func (*Client) ListWithContext ¶ added in v0.9.16
ListWithContext lists the given resources (and paginate till the end)
func (*Client) Paginate ¶ added in v0.9.18
func (client *Client) Paginate(req ListCommand, callback IterateItemFunc)
Paginate runs the ListCommand and paginates
func (*Client) PaginateWithContext ¶ added in v0.9.18
func (client *Client) PaginateWithContext(ctx context.Context, req ListCommand, callback IterateItemFunc)
PaginateWithContext runs the ListCommand as long as the ctx is valid
func (*Client) Payload ¶ added in v0.9.21
Payload builds the HTTP request params from the given command
func (*Client) RequestWithContext ¶ added in v0.9.11
RequestWithContext preforms a command with a context
func (*Client) Response ¶ added in v0.9.22
Response returns the response structure of the given command
func (*Client) Sign ¶ added in v0.9.22
Sign signs the HTTP request and returns the signature as as base64 encoding
func (*Client) SyncRequest ¶ added in v0.10.1
SyncRequest performs the command as is
func (*Client) SyncRequestWithContext ¶ added in v0.10.1
func (client *Client) SyncRequestWithContext(ctx context.Context, command Command) (interface{}, error)
SyncRequestWithContext performs a sync request with a context
func (*Client) TraceOff ¶ added in v0.10.5
func (client *Client) TraceOff()
TraceOff deactivates the HTTP tracer
func (*Client) TraceOn ¶ added in v0.10.5
func (client *Client) TraceOn()
TraceOn activates the HTTP tracer
func (*Client) UpdateRecord ¶
func (client *Client) UpdateRecord(name string, rec UpdateDNSRecord) (*DNSRecord, error)
UpdateRecord updates a DNS record
type Command ¶ added in v0.9.0
type Command interface {
// contains filtered or unexported methods
}
Command represents a CloudStack request
type CommandInfo ¶ added in v0.10.0
CommandInfo represents the meta data related to a Command
type CopyTemplate ¶ added in v0.9.24
type CopyTemplate struct { DestZoneID *UUID `json:"destzoneid" doc:"ID of the zone the template is being copied to."` ID *UUID `json:"id" doc:"Template ID."` SourceZoneID *UUID `` /* 192-byte string literal not displayed */ // contains filtered or unexported fields }
CopyTemplate (Async) represents a template copy
type CreateAffinityGroup ¶ added in v0.9.0
type CreateAffinityGroup struct { Account string `json:"account,omitempty" doc:"an account for the affinity group. Must be used with domainid."` Description string `json:"description,omitempty" doc:"optional description of the affinity group"` DomainID *UUID `json:"domainid,omitempty" doc:"domainid of the account owning the affinity group"` Name string `json:"name" doc:"name of the affinity group"` Type string `json:"type" doc:"Type of the affinity group from the available affinity/anti-affinity group types"` // contains filtered or unexported fields }
CreateAffinityGroup (Async) represents a new (anti-)affinity group
type CreateInstanceGroup ¶ added in v0.9.7
type CreateInstanceGroup struct { Name string `json:"name" doc:"the name of the instance group"` Account string `` /* 129-byte string literal not displayed */ DomainID *UUID `json:"domainid,omitempty" doc:"the domain ID of account owning the instance group"` // contains filtered or unexported fields }
CreateInstanceGroup creates a VM group
type CreateNetwork ¶ added in v0.9.0
type CreateNetwork struct { Account string `json:"account,omitempty" doc:"account who will own the network"` DisplayNetwork *bool `json:"displaynetwork,omitempty" doc:"an optional field, whether to the display the network to the end user or not."` DisplayText string `json:"displaytext,omitempty" doc:"the display text of the network"` // This field is required but might be empty DomainID *UUID `json:"domainid,omitempty" doc:"domain ID of the account owning a network"` EndIP net.IP `json:"endip,omitempty" doc:"the ending IP address in the network IP range. Required for managed networks."` EndIpv6 net.IP `json:"endipv6,omitempty" doc:"the ending IPv6 address in the IPv6 network range"` Gateway net.IP `` /* 132-byte string literal not displayed */ IP6CIDR *CIDR `json:"ip6cidr,omitempty" doc:"the CIDR of IPv6 network, must be at least /64"` IP6Gateway net.IP `` /* 140-byte string literal not displayed */ IsolatedPVlan string `json:"isolatedpvlan,omitempty" doc:"the isolated private vlan for this network"` Name string `json:"name,omitempty" doc:"the name of the network"` // This field is required but might be empty Netmask net.IP `json:"netmask,omitempty" doc:"the netmask of the network. Required for managed networks."` NetworkDomain string `json:"networkdomain,omitempty" doc:"network domain"` NetworkOfferingID *UUID `json:"networkofferingid" doc:"the network offering id"` PhysicalNetworkID *UUID `json:"physicalnetworkid,omitempty" doc:"the Physical Network ID the network belongs to"` StartIP net.IP `json:"startip,omitempty" doc:"the beginning IP address in the network IP range. Required for managed networks."` StartIpv6 net.IP `json:"startipv6,omitempty" doc:"the beginning IPv6 address in the IPv6 network range"` SubdomainAccess *bool `` /* 238-byte string literal not displayed */ Vlan string `json:"vlan,omitempty" doc:"the ID or VID of the network"` ZoneID *UUID `json:"zoneid" doc:"the Zone ID for the network"` // contains filtered or unexported fields }
CreateNetwork creates a network
type CreateSSHKeyPair ¶ added in v0.9.0
type CreateSSHKeyPair struct { Name string `json:"name" doc:"Name of the keypair"` Account string `json:"account,omitempty" doc:"an optional account for the ssh key. Must be used with domainid."` DomainID *UUID `` /* 131-byte string literal not displayed */ // contains filtered or unexported fields }
CreateSSHKeyPair represents a new keypair to be created
type CreateSecurityGroup ¶ added in v0.9.0
type CreateSecurityGroup struct { Name string `json:"name" doc:"name of the security group"` Account string `json:"account,omitempty" doc:"an optional account for the security group. Must be used with domainid."` Description string `json:"description,omitempty" doc:"the description of the security group"` DomainID *UUID `` /* 138-byte string literal not displayed */ // contains filtered or unexported fields }
CreateSecurityGroup represents a security group creation
type CreateSnapshot ¶ added in v0.9.0
type CreateSnapshot struct { VolumeID *UUID `json:"volumeid" doc:"The ID of the disk volume"` Account string `json:"account,omitempty" doc:"The account of the snapshot. The account parameter must be used with the domainid parameter."` DomainID *UUID `` /* 166-byte string literal not displayed */ QuiesceVM *bool `json:"quiescevm,omitempty" doc:"quiesce vm if true"` // contains filtered or unexported fields }
CreateSnapshot (Async) creates an instant snapshot of a volume
type CreateTags ¶ added in v0.9.0
type CreateTags struct { ResourceIDs []UUID `json:"resourceids" doc:"list of resources to create the tags for"` ResourceType string `json:"resourcetype" doc:"type of the resource"` Tags []ResourceTag `json:"tags" doc:"Map of tags (key/value pairs)"` Customer string `` /* 143-byte string literal not displayed */ // contains filtered or unexported fields }
CreateTags (Async) creates resource tag(s)
type CreateTemplate ¶ added in v0.9.24
type CreateTemplate struct { Bits int `json:"bits,omitempty" doc:"32 or 64 bit"` Details map[string]string `json:"details,omitempty" doc:"Template details in key/value pairs."` DisplayText string `json:"displaytext" doc:"the display text of the template. This is usually used for display purposes."` IsDynamicallyScalable *bool `` /* 138-byte string literal not displayed */ IsFeatured *bool `json:"isfeatured,omitempty" doc:"true if this template is a featured template, false otherwise"` IsPublic *bool `json:"ispublic,omitempty" doc:"true if this template is a public template, false otherwise"` Name string `json:"name" doc:"the name of the template"` OsTypeID *UUID `json:"ostypeid" doc:"the ID of the OS Type that best represents the OS of this template."` PasswordEnabled *bool `json:"passwordenabled,omitempty" doc:"true if the template supports the password reset feature; default is false"` RequiresHVM *bool `json:"requireshvm,omitempty" doc:"true if the template requres HVM, false otherwise"` SnapshotID *UUID `` /* 147-byte string literal not displayed */ TemplateTag string `json:"templatetag,omitempty" doc:"the tag for this template."` URL string `json:"url,omitempty" doc:"Optional, only for baremetal hypervisor. The directory name where template stored on CIFS server"` VirtualMachineID *UUID `` /* 198-byte string literal not displayed */ VolumeID *UUID `` /* 150-byte string literal not displayed */ // contains filtered or unexported fields }
CreateTemplate (Async) represents a template creation
type CreateUser ¶ added in v0.9.22
type CreateUser struct { Account string `` /* 141-byte string literal not displayed */ Email string `json:"email" doc:"email"` FirstName string `json:"firstname" doc:"firstname"` LastName string `json:"lastname" doc:"lastname"` Password string `` /* 195-byte string literal not displayed */ UserName string `json:"username" doc:"Unique username."` DomainID *UUID `json:"domainid,omitempty" doc:"Creates the user under the specified domain. Has to be accompanied with the account parameter"` Timezone string `` /* 140-byte string literal not displayed */ UserID *UUID `json:"userid,omitempty" doc:"User UUID, required for adding account from external provisioning system"` // contains filtered or unexported fields }
CreateUser represents the creation of a User
type DNSDomain ¶
type DNSDomain struct { ID int64 `json:"id"` AccountID int64 `json:"account_id,omitempty"` UserID int64 `json:"user_id,omitempty"` RegistrantID int64 `json:"registrant_id,omitempty"` Name string `json:"name"` UnicodeName string `json:"unicode_name"` Token string `json:"token"` State string `json:"state"` Language string `json:"language,omitempty"` Lockable bool `json:"lockable"` AutoRenew bool `json:"auto_renew"` WhoisProtected bool `json:"whois_protected"` RecordCount int64 `json:"record_count"` ServiceCount int64 `json:"service_count"` ExpiresOn string `json:"expires_on,omitempty"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` }
DNSDomain represents a domain
type DNSDomainResponse ¶ added in v0.9.0
type DNSDomainResponse struct {
Domain *DNSDomain `json:"domain"`
}
DNSDomainResponse represents a domain creation response
type DNSErrorResponse ¶ added in v0.9.0
type DNSErrorResponse struct { Message string `json:"message,omitempty"` Errors map[string][]string `json:"errors"` }
DNSErrorResponse represents an error in the API
func (*DNSErrorResponse) Error ¶ added in v0.9.0
func (req *DNSErrorResponse) Error() string
Error formats the DNSerror into a string
type DNSRecord ¶
type DNSRecord struct { ID int64 `json:"id,omitempty"` DomainID int64 `json:"domain_id,omitempty"` Name string `json:"name"` TTL int `json:"ttl,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` Content string `json:"content"` RecordType string `json:"record_type"` Prio int `json:"prio,omitempty"` }
DNSRecord represents a DNS record
type DNSRecordResponse ¶
type DNSRecordResponse struct {
Record DNSRecord `json:"record"`
}
DNSRecordResponse represents the creation of a DNS record
type Deletable ¶ added in v0.9.12
type Deletable interface { // Delete removes the given resource(s) or throws Delete(context context.Context, client *Client) error }
Deletable represents an Interface that can be "Delete" by the client
type DeleteAffinityGroup ¶ added in v0.9.0
type DeleteAffinityGroup struct { Account string `json:"account,omitempty" doc:"the account of the affinity group. Must be specified with domain ID"` DomainID *UUID `json:"domainid,omitempty" doc:"the domain ID of account owning the affinity group"` ID *UUID `json:"id,omitempty" doc:"The ID of the affinity group. Mutually exclusive with name parameter"` Name string `json:"name,omitempty" doc:"The name of the affinity group. Mutually exclusive with ID parameter"` // contains filtered or unexported fields }
DeleteAffinityGroup (Async) represents an (anti-)affinity group to be deleted
type DeleteInstanceGroup ¶ added in v0.9.7
type DeleteInstanceGroup struct { ID *UUID `json:"id" doc:"the ID of the instance group"` // contains filtered or unexported fields }
DeleteInstanceGroup deletes a VM group
type DeleteNetwork ¶ added in v0.9.0
type DeleteNetwork struct { ID *UUID `json:"id" doc:"the ID of the network"` Forced *bool `` /* 154-byte string literal not displayed */ // contains filtered or unexported fields }
DeleteNetwork deletes a network
type DeleteReverseDNSFromPublicIPAddress ¶ added in v0.10.1
type DeleteReverseDNSFromPublicIPAddress struct { ID *UUID `json:"id,omitempty" doc:"the ID of the public IP address"` // contains filtered or unexported fields }
DeleteReverseDNSFromPublicIPAddress is a command to create/delete the PTR record of a public IP address
type DeleteReverseDNSFromVirtualMachine ¶ added in v0.10.1
type DeleteReverseDNSFromVirtualMachine struct { ID *UUID `json:"id,omitempty" doc:"the ID of the virtual machine"` // contains filtered or unexported fields }
DeleteReverseDNSFromVirtualMachine is a command to create/delete the PTR record(s) of a virtual machine
type DeleteSSHKeyPair ¶ added in v0.9.0
type DeleteSSHKeyPair struct { Name string `json:"name" doc:"Name of the keypair"` Account string `json:"account,omitempty" doc:"the account associated with the keypair. Must be used with the domainid parameter."` DomainID *UUID `json:"domainid,omitempty" doc:"the domain ID associated with the keypair"` // contains filtered or unexported fields }
DeleteSSHKeyPair represents a new keypair to be created
type DeleteSecurityGroup ¶ added in v0.9.0
type DeleteSecurityGroup struct { Account string `json:"account,omitempty" doc:"the account of the security group. Must be specified with domain ID"` DomainID *UUID `json:"domainid,omitempty" doc:"the domain ID of account owning the security group"` ID *UUID `json:"id,omitempty" doc:"The ID of the security group. Mutually exclusive with name parameter"` Name string `json:"name,omitempty" doc:"The ID of the security group. Mutually exclusive with id parameter"` // contains filtered or unexported fields }
DeleteSecurityGroup represents a security group deletion
type DeleteSnapshot ¶ added in v0.9.0
type DeleteSnapshot struct { ID *UUID `json:"id" doc:"The ID of the snapshot"` // contains filtered or unexported fields }
DeleteSnapshot (Async) deletes a snapshot of a disk volume
type DeleteTags ¶ added in v0.9.0
type DeleteTags struct { ResourceIDs []UUID `json:"resourceids" doc:"Delete tags for resource id(s)"` ResourceType string `json:"resourcetype" doc:"Delete tag by resource type"` Tags []ResourceTag `json:"tags,omitempty" doc:"Delete tags matching key/value pairs"` // contains filtered or unexported fields }
DeleteTags (Async) deletes the resource tag(s)
type DeleteTemplate ¶ added in v0.9.24
type DeleteTemplate struct { ID *UUID `json:"id" doc:"the ID of the template"` ZoneID *UUID `json:"zoneid,omitempty" doc:"the ID of zone of the template"` // contains filtered or unexported fields }
DeleteTemplate (Async) represents the deletion of a template
type DeleteUser ¶ added in v0.10.0
type DeleteUser struct { ID *UUID `json:"id" doc:"id of the user to be deleted"` // contains filtered or unexported fields }
DeleteUser deletes a user for an account
type DeployVirtualMachine ¶ added in v0.9.0
type DeployVirtualMachine struct { Account string `json:"account,omitempty" doc:"an optional account for the virtual machine. Must be used with domainid."` AffinityGroupIDs []UUID `` /* 188-byte string literal not displayed */ AffinityGroupNames []string `` /* 190-byte string literal not displayed */ CustomID *UUID `` /* 131-byte string literal not displayed */ DeploymentPlanner string `json:"deploymentplanner,omitempty" doc:"Deployment planner to use for vm allocation. Available to ROOT admin only"` Details map[string]string `json:"details,omitempty" doc:"used to specify the custom parameters."` DiskOfferingID *UUID `` /* 490-byte string literal not displayed */ DisplayName string `json:"displayname,omitempty" doc:"an optional user generated name for the virtual machine"` DisplayVM *bool `json:"displayvm,omitempty" doc:"an optional field, whether to the display the vm to the end user or not."` DomainID *UUID `` /* 139-byte string literal not displayed */ Group string `json:"group,omitempty" doc:"an optional group for the virtual machine"` HostID *UUID `json:"hostid,omitempty" doc:"destination Host ID to deploy the VM to - parameter available for root admin only"` Hypervisor string `json:"hypervisor,omitempty" doc:"the hypervisor on which to deploy the virtual machine"` IP4 *bool `json:"ip4,omitempty" doc:"True to set an IPv4 to the default interface"` IP6 *bool `json:"ip6,omitempty" doc:"True to set an IPv6 to the default interface"` IP6Address net.IP `json:"ip6address,omitempty" doc:"the ipv6 address for default vm's network"` IPAddress net.IP `json:"ipaddress,omitempty" doc:"the ip address for default vm's network"` IPToNetworkList []IPToNetwork `` /* 281-byte string literal not displayed */ Keyboard string `` /* 172-byte string literal not displayed */ KeyPair string `json:"keypair,omitempty" doc:"name of the ssh key pair used to login to the virtual machine"` Name string `json:"name,omitempty" doc:"host name for the virtual machine"` NetworkIDs []UUID `` /* 128-byte string literal not displayed */ RootDiskSize int64 `` /* 243-byte string literal not displayed */ SecurityGroupIDs []UUID `` /* 265-byte string literal not displayed */ SecurityGroupNames []string `` /* 268-byte string literal not displayed */ ServiceOfferingID *UUID `json:"serviceofferingid" doc:"the ID of the service offering for the virtual machine"` Size int64 `json:"size,omitempty" doc:"the arbitrary size for the DATADISK volume. Mutually exclusive with diskofferingid"` StartVM *bool `json:"startvm,omitempty" doc:"true if start vm after creating. Default value is true"` TemplateID *UUID `json:"templateid" doc:"the ID of the template for the virtual machine"` UserData string `` /* 372-byte string literal not displayed */ ZoneID *UUID `json:"zoneid" doc:"availability zone for the virtual machine"` // contains filtered or unexported fields }
DeployVirtualMachine (Async) represents the machine creation
Regarding the UserData field, the client is responsible to base64 (and probably gzip) it. Doing it within this library would make the integration with other tools, e.g. Terraform harder.
type DestroyVirtualMachine ¶ added in v0.9.0
type DestroyVirtualMachine struct { ID *UUID `json:"id" doc:"The ID of the virtual machine"` Expunge *bool `json:"expunge,omitempty" doc:"If true is passed, the vm is expunged immediately. False by default."` // contains filtered or unexported fields }
DestroyVirtualMachine (Async) represents the destruction of the virtual machine
type DisableAccount ¶ added in v0.9.22
type DisableAccount struct { Lock *bool `json:"lock" doc:"If true, only lock the account; else disable the account"` Account string `json:"account,omitempty" doc:"Disables specified account."` DomainID *UUID `json:"domainid,omitempty" doc:"Disables specified account in this domain."` ID *UUID `json:"id,omitempty" doc:"Account id"` // contains filtered or unexported fields }
DisableAccount (Async) represents the deactivation of an account
type DisassociateIPAddress ¶ added in v0.9.0
type DisassociateIPAddress struct { ID *UUID `json:"id" doc:"the id of the public ip address to disassociate"` // contains filtered or unexported fields }
DisassociateIPAddress (Async) represents the IP deletion
type EgressRule ¶ added in v0.9.0
type EgressRule IngressRule
EgressRule represents the ingress rule
type EnableAccount ¶ added in v0.9.22
type EnableAccount struct { Account string `json:"account,omitempty" doc:"Enables specified account."` DomainID *UUID `json:"domainid,omitempty" doc:"Enables specified account in this domain."` ID *UUID `json:"id,omitempty" doc:"Account id"` // contains filtered or unexported fields }
EnableAccount represents the activation of an account
type ErrorCode ¶ added in v0.9.2
type ErrorCode int
ErrorCode represents the CloudStack ApiErrorCode enum
See: https://github.com/apache/cloudstack/blob/master/api/src/org/apache/cloudstack/api/ApiErrorCode.java
const ( ErrorCode = 401 // MethodNotAllowed represents ... (TODO) MethodNotAllowed ErrorCode = 405 // UnsupportedActionError represents ... (TODO) UnsupportedActionError ErrorCode = 422 // APILimitExceeded represents ... (TODO) APILimitExceeded ErrorCode = 429 // MalformedParameterError represents ... (TODO) MalformedParameterError ErrorCode = 430 // ParamError represents ... (TODO) ParamError ErrorCode = 431 // InternalError represents a server error InternalError ErrorCode = 530 // AccountError represents ... (TODO) AccountError ErrorCode = 531 // AccountResourceLimitError represents ... (TODO) AccountResourceLimitError ErrorCode = 532 // InsufficientCapacityError represents ... (TODO) InsufficientCapacityError ErrorCode = 533 ResourceUnavailableError ErrorCode = 534 // ResourceAllocationError represents ... (TODO) ResourceAllocationError ErrorCode = 535 // ResourceInUseError represents ... (TODO) ResourceInUseError ErrorCode = 536 // NetworkRuleConflictError represents ... (TODO) NetworkRuleConflictError ErrorCode = 537 )Unauthorized
type ErrorResponse ¶ added in v0.9.0
type ErrorResponse struct { CSErrorCode CSErrorCode `json:"cserrorcode"` ErrorCode ErrorCode `json:"errorcode"` ErrorText string `json:"errortext"` UUIDList []UUIDItem `json:"uuidList,omitempty"` // uuid*L*ist is not a typo }
ErrorResponse represents the standard error response from CloudStack
func (ErrorResponse) Error ¶ added in v0.9.0
func (e ErrorResponse) Error() string
Error formats a CloudStack error into a standard error
type Event ¶ added in v0.9.0
type Event struct { Account string `` /* 183-byte string literal not displayed */ Created string `json:"created,omitempty" doc:"the date the event was created"` Description string `json:"description,omitempty" doc:"a brief description of the event"` Domain string `json:"domain,omitempty" doc:"the name of the account's domain"` DomainID *UUID `json:"domainid,omitempty" doc:"the id of the account's domain"` ID *UUID `json:"id,omitempty" doc:"the ID of the event"` Level string `json:"level,omitempty" doc:"the event level (INFO, WARN, ERROR)"` ParentID *UUID `json:"parentid,omitempty" doc:"whether the event is parented"` State string `json:"state,omitempty" doc:"the state of the event"` Type string `json:"type,omitempty" doc:"the type of the event (see event types)"` UserName string `` /* 209-byte string literal not displayed */ }
Event represents an event in the system
type EventType ¶ added in v0.9.0
type EventType struct {
Name string `json:"name,omitempty" doc:"Event Type"`
}
EventType represent a type of event
type ExpungeVirtualMachine ¶ added in v0.9.0
type ExpungeVirtualMachine struct { ID *UUID `json:"id" doc:"The ID of the virtual machine"` // contains filtered or unexported fields }
ExpungeVirtualMachine represents the annihilation of a VM
type GetAPILimit ¶ added in v0.9.24
type GetAPILimit struct {
// contains filtered or unexported fields
}
GetAPILimit gets API limit count for the caller
type GetAPILimitResponse ¶ added in v0.9.24
type GetAPILimitResponse struct {
APILimit APILimit `json:"apilimit"`
}
GetAPILimitResponse represents the limits towards the API call
type GetVMPassword ¶ added in v0.9.0
type GetVMPassword struct { ID *UUID `json:"id" doc:"The ID of the virtual machine"` // contains filtered or unexported fields }
GetVMPassword asks for an encrypted password
type GetVirtualMachineUserData ¶ added in v0.9.22
type GetVirtualMachineUserData struct { VirtualMachineID *UUID `json:"virtualmachineid" doc:"The ID of the virtual machine"` // contains filtered or unexported fields }
GetVirtualMachineUserData returns the user-data of the given VM
type Gettable ¶ added in v0.9.12
type Gettable interface { Listable }
Gettable represents an Interface that can be "Get" by the client
type Host ¶ added in v0.10.0
type Host struct { Capabilities string `json:"capabilities,omitempty" doc:"capabilities of the host"` ClusterID *UUID `json:"clusterid,omitempty" doc:"the cluster ID of the host"` ClusterName string `json:"clustername,omitempty" doc:"the cluster name of the host"` ClusterType string `json:"clustertype,omitempty" doc:"the cluster type of the cluster that host belongs to"` CPUAllocated int64 `json:"cpuallocated,omitempty" doc:"the amount of the host's CPU currently allocated"` CPUNumber int `json:"cpunumber,omitempty" doc:"the CPU number of the host"` CPUSockets int `json:"cpusockets,omitempty" doc:"the number of CPU sockets on the host"` CPUSpeed int64 `json:"cpuspeed,omitempty" doc:"the CPU speed of the host"` CPUUsed int64 `json:"cpuused,omitempty" doc:"the amount of the host's CPU currently used"` CPUWithOverProvisioning int64 `json:"cpuwithoverprovisioning,omitempty" doc:"the amount of the host's CPU after applying the cpu.overprovisioning.factor"` Created string `json:"created,omitempty" doc:"the date and time the host was created"` Disconnected string `json:"disconnected,omitempty" doc:"true if the host is disconnected. False otherwise."` DiskSizeAllocated int64 `json:"disksizeallocated,omitempty" doc:"the host's or host storage pool's currently allocated disk size"` DiskSizeTotal int64 `json:"disksizetotal,omitempty" doc:"the total disk size of the host or host storage pool"` DiskSizeUsed int64 `json:"disksizeused,omitempty" doc:"the host's or host storage pool's currently used disk size"` DiskWithOverProvisioning int64 `` /* 130-byte string literal not displayed */ Events string `json:"events,omitempty" doc:"events available for the host"` HAHost *bool `json:"hahost,omitempty" doc:"true if the host is Ha host (dedicated to vms started by HA process; false otherwise"` HostTags string `json:"hosttags,omitempty" doc:"comma-separated list of tags for the host"` Hypervisor string `json:"hypervisor,omitempty" doc:"the host hypervisor"` HypervisorVersion string `json:"hypervisorversion,omitempty" doc:"the hypervisor version"` ID *UUID `json:"id,omitempty" doc:"the ID of the host"` IPAddress net.IP `json:"ipaddress,omitempty" doc:"the IP address of the host"` IsLocalstorageActive *bool `json:"islocalstorageactive,omitempty" doc:"true if local storage is active, false otherwise"` LastPinged string `json:"lastpinged,omitempty" doc:"the date and time the host was last pinged"` ManagementServerID *UUID `json:"managementserverid,omitempty" doc:"the management server ID of the host"` MemoryAllocated int64 `json:"memoryallocated,omitempty" doc:"the amount of VM's memory allocated onto the host"` MemoryPhysical int64 `json:"memoryphysical,omitempty" doc:"the total physical memory of the host"` MemoryReserved int64 `json:"memoryreserved,omitempty" doc:"the amount of the host's memory reserved"` MemoryTotal int64 `json:"memorytotal,omitempty" doc:"the total memory of the host available (must be physical - reserved)"` MemoryUsed int64 `json:"memoryused,omitempty" doc:"the amount of the host's memory used by running vm"` Name string `json:"name,omitempty" doc:"the name of the host"` NetworkKbsRead int64 `json:"networkkbsread,omitempty" doc:"the incoming network traffic on the host"` NetworkKbsWrite int64 `json:"networkkbswrite,omitempty" doc:"the outgoing network traffic on the host"` OSCategoryID *UUID `json:"oscategoryid,omitempty" doc:"the OS category ID of the host"` OSCategoryName string `json:"oscategoryname,omitempty" doc:"the OS category name of the host"` PCIDevices []PCIDevice `json:"pcidevices,omitempty" doc:"PCI cards present in the host"` PodID *UUID `json:"podid,omitempty" doc:"the Pod ID of the host"` PodName string `json:"podname,omitempty" doc:"the Pod name of the host"` Removed string `json:"removed,omitempty" doc:"the date and time the host was removed"` ResourceState string `json:"resourcestate,omitempty" doc:"the resource state of the host"` State string `json:"state,omitempty" doc:"the state of the host"` StorageID *UUID `json:"storageid,omitempty" doc:"the host's storage pool id"` Type string `json:"type,omitempty" doc:"the host type"` Version string `json:"version,omitempty" doc:"the host version"` ZoneID *UUID `json:"zoneid,omitempty" doc:"the Zone ID of the host"` ZoneName string `json:"zonename,omitempty" doc:"the Zone name of the host"` }
Host represents the Hypervisor
type IPAddress ¶ added in v0.9.0
type IPAddress struct { Account string `json:"account,omitempty" doc:"the account the public IP address is associated with"` Allocated string `json:"allocated,omitempty" doc:"date the public IP address was acquired"` Associated string `json:"associated,omitempty" doc:"date the public IP address was associated"` AssociatedNetworkID *UUID `json:"associatednetworkid,omitempty" doc:"the ID of the Network associated with the IP address"` AssociatedNetworkName string `json:"associatednetworkname,omitempty" doc:"the name of the Network associated with the IP address"` Domain string `json:"domain,omitempty" doc:"the domain the public IP address is associated with"` DomainID *UUID `json:"domainid,omitempty" doc:"the domain ID the public IP address is associated with"` ForDisplay bool `json:"fordisplay,omitempty" doc:"is public ip for display to the regular user"` ForVirtualNetwork bool `json:"forvirtualnetwork,omitempty" doc:"the virtual network for the IP address"` ID *UUID `json:"id,omitempty" doc:"public IP address id"` IPAddress net.IP `json:"ipaddress,omitempty" doc:"public IP address"` IsElastic bool `json:"iselastic,omitempty" doc:"is an elastic ip"` IsPortable bool `json:"isportable,omitempty" doc:"is public IP portable across the zones"` IsSourceNat bool `json:"issourcenat,omitempty" doc:"true if the IP address is a source nat address, false otherwise"` IsStaticNat *bool `json:"isstaticnat,omitempty" doc:"true if this ip is for static nat, false otherwise"` IsSystem bool `json:"issystem,omitempty" doc:"true if this ip is system ip (was allocated as a part of deployVm or createLbRule)"` NetworkID *UUID `json:"networkid,omitempty" doc:"the ID of the Network where ip belongs to"` PhysicalNetworkID *UUID `json:"physicalnetworkid,omitempty" doc:"the physical network this belongs to"` Purpose string `` /* 159-byte string literal not displayed */ ReverseDNS []ReverseDNS `json:"reversedns,omitempty" doc:"the list of PTR record(s) associated with the ip address"` State string `json:"state,omitempty" doc:"State of the ip address. Can be: Allocatin, Allocated and Releasing"` Tags []ResourceTag `json:"tags,omitempty" doc:"the list of resource tags associated with ip address"` VirtualMachineDisplayName string `` /* 141-byte string literal not displayed */ VirtualMachineID *UUID `json:"virtualmachineid,omitempty" doc:"virtual machine id the ip address is assigned to (not null only for static nat Ip)"` VirtualMachineName string `` /* 126-byte string literal not displayed */ VlanID *UUID `` /* 126-byte string literal not displayed */ VlanName string `json:"vlanname,omitempty" doc:"the VLAN associated with the IP address"` VMIPAddress net.IP `json:"vmipaddress,omitempty" doc:"virtual machine (dnat) ip address (not null only for static nat Ip)"` ZoneID *UUID `json:"zoneid,omitempty" doc:"the ID of the zone the public IP address belongs to"` ZoneName string `json:"zonename,omitempty" doc:"the name of the zone the public IP address belongs to"` }
IPAddress represents an IP Address
func (IPAddress) ListRequest ¶ added in v0.9.20
func (ipaddress IPAddress) ListRequest() (ListCommand, error)
ListRequest builds the ListAdresses request
func (IPAddress) ResourceType ¶ added in v0.9.7
ResourceType returns the type of the resource
type IPToNetwork ¶ added in v0.9.0
type IPToNetwork struct { IP net.IP `json:"ip,omitempty"` Ipv6 net.IP `json:"ipv6,omitempty"` NetworkID *UUID `json:"networkid,omitempty"` }
IPToNetwork represents a mapping between ip and networks
type IngressRule ¶ added in v0.9.0
type IngressRule struct { Account string `json:"account,omitempty" doc:"account owning the security group rule"` CIDR *CIDR `json:"cidr,omitempty" doc:"the CIDR notation for the base IP address of the security group rule"` Description string `json:"description,omitempty" doc:"description of the security group rule"` EndPort uint16 `json:"endport,omitempty" doc:"the ending port of the security group rule "` IcmpCode uint8 `json:"icmpcode,omitempty" doc:"the code for the ICMP message response"` IcmpType uint8 `json:"icmptype,omitempty" doc:"the type of the ICMP message response"` Protocol string `json:"protocol,omitempty" doc:"the protocol of the security group rule"` RuleID *UUID `json:"ruleid,omitempty" doc:"the id of the security group rule"` SecurityGroupID *UUID `json:"securitygroupid,omitempty"` SecurityGroupName string `json:"securitygroupname,omitempty" doc:"security group name"` StartPort uint16 `json:"startport,omitempty" doc:"the starting port of the security group rule"` UserSecurityGroupList []UserSecurityGroup `json:"usersecuritygrouplist,omitempty"` }
IngressRule represents the ingress rule
type InstanceGroup ¶ added in v0.9.7
type InstanceGroup struct { Account string `json:"account,omitempty" doc:"the account owning the instance group"` Created string `json:"created,omitempty" doc:"time and date the instance group was created"` Domain string `json:"domain,omitempty" doc:"the domain name of the instance group"` DomainID *UUID `json:"domainid,omitempty" doc:"the domain ID of the instance group"` ID *UUID `json:"id,omitempty" doc:"the id of the instance group"` Name string `json:"name,omitempty" doc:"the name of the instance group"` }
InstanceGroup represents a group of VM
type IterateItemFunc ¶ added in v0.9.18
IterateItemFunc represents the callback to iterate a list of results, if false stops
type JobStatusType ¶ added in v0.9.0
type JobStatusType int
JobStatusType represents the status of a Job
const ( // Pending represents a job in progress Pending JobStatusType = iota // Success represents a successfully completed job Success // Failure represents a job that has failed to complete Failure )
func (JobStatusType) String ¶ added in v0.9.22
func (i JobStatusType) String() string
type ListAPIs ¶ added in v0.9.0
type ListAPIs struct { Name string `json:"name,omitempty" doc:"API name"` // contains filtered or unexported fields }
ListAPIs represents a query to list the api
type ListAPIsResponse ¶ added in v0.9.0
ListAPIsResponse represents a list of API
type ListAccounts ¶ added in v0.9.7
type ListAccounts struct { AccountType AccountType `` /* 132-byte string literal not displayed */ DomainID *UUID `json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"` ID *UUID `json:"id,omitempty" doc:"list account by account ID"` IsCleanUpRequired *bool `json:"iscleanuprequired,omitempty" doc:"list accounts by cleanuprequired attribute (values are true or false)"` IsRecursive *bool `` /* 141-byte string literal not displayed */ Keyword string `json:"keyword,omitempty" doc:"List by keyword"` ListAll *bool `` /* 195-byte string literal not displayed */ Name string `json:"name,omitempty" doc:"list account by account name"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` State string `json:"state,omitempty" doc:"list accounts by state. Valid states are enabled, disabled, and locked."` // contains filtered or unexported fields }
ListAccounts represents a query to display the accounts
func (*ListAccounts) SetPage ¶ added in v0.10.3
func (ls *ListAccounts) SetPage(page int)
SetPage sets the current page
func (*ListAccounts) SetPageSize ¶ added in v0.10.3
func (ls *ListAccounts) SetPageSize(pageSize int)
SetPageSize sets the page size
type ListAccountsResponse ¶ added in v0.9.7
ListAccountsResponse represents a list of accounts
type ListAffinityGroupTypes ¶ added in v0.9.0
type ListAffinityGroupTypes struct { Keyword string `json:"keyword,omitempty" doc:"List by keyword"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` // contains filtered or unexported fields }
ListAffinityGroupTypes represents an (anti-)affinity groups search
type ListAffinityGroupTypesResponse ¶ added in v0.9.0
type ListAffinityGroupTypesResponse struct { Count int `json:"count"` AffinityGroupType []AffinityGroupType `json:"affinitygrouptype"` }
ListAffinityGroupTypesResponse represents a list of (anti-)affinity group types
type ListAffinityGroups ¶ added in v0.9.0
type ListAffinityGroups struct { Account string `json:"account,omitempty" doc:"list resources by account. Must be used with the domainid parameter."` DomainID *UUID `json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"` ID *UUID `json:"id,omitempty" doc:"list the affinity group by the ID provided"` IsRecursive *bool `` /* 141-byte string literal not displayed */ Keyword string `json:"keyword,omitempty" doc:"List by keyword"` ListAll *bool `` /* 195-byte string literal not displayed */ Name string `json:"name,omitempty" doc:"lists affinity groups by name"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` Type string `json:"type,omitempty" doc:"lists affinity groups by type"` VirtualMachineID *UUID `json:"virtualmachineid,omitempty" doc:"lists affinity groups by virtual machine ID"` // contains filtered or unexported fields }
ListAffinityGroups represents an (anti-)affinity groups search
func (*ListAffinityGroups) SetPage ¶ added in v0.10.0
func (ls *ListAffinityGroups) SetPage(page int)
SetPage sets the current page
func (*ListAffinityGroups) SetPageSize ¶ added in v0.10.0
func (ls *ListAffinityGroups) SetPageSize(pageSize int)
SetPageSize sets the page size
type ListAffinityGroupsResponse ¶
type ListAffinityGroupsResponse struct { Count int `json:"count"` AffinityGroup []AffinityGroup `json:"affinitygroup"` }
ListAffinityGroupsResponse represents a list of (anti-)affinity groups
type ListAsyncJobs ¶ added in v0.9.0
type ListAsyncJobs struct { Account string `json:"account,omitempty" doc:"list resources by account. Must be used with the domainid parameter."` DomainID *UUID `json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"` IsRecursive *bool `` /* 141-byte string literal not displayed */ Keyword string `json:"keyword,omitempty" doc:"List by keyword"` ListAll *bool `` /* 195-byte string literal not displayed */ Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` StartDate string `json:"startdate,omitempty" doc:"the start date of the async job"` // contains filtered or unexported fields }
ListAsyncJobs list the asynchronous jobs
type ListAsyncJobsResponse ¶ added in v0.9.0
type ListAsyncJobsResponse struct { Count int `json:"count"` AsyncJobs []AsyncJobResult `json:"asyncjobs"` }
ListAsyncJobsResponse represents a list of job results
type ListCommand ¶ added in v0.9.18
type ListCommand interface { Command // SetPage defines the current pages SetPage(int) // SetPageSize defines the size of the page SetPageSize(int) // contains filtered or unexported methods }
ListCommand represents a CloudStack list request
type ListEventTypes ¶ added in v0.9.0
type ListEventTypes struct {
// contains filtered or unexported fields
}
ListEventTypes list the event types
type ListEventTypesResponse ¶ added in v0.9.0
type ListEventTypesResponse struct { Count int `json:"count"` EventType []EventType `json:"eventtype"` // contains filtered or unexported fields }
ListEventTypesResponse represents a response of a list query
type ListEvents ¶ added in v0.9.0
type ListEvents struct { Account string `json:"account,omitempty" doc:"list resources by account. Must be used with the domainid parameter."` DomainID *UUID `json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"` Duration int `json:"duration,omitempty" doc:"the duration of the event"` EndDate string `` /* 152-byte string literal not displayed */ EntryTime int `json:"entrytime,omitempty" doc:"the time the event was entered"` ID *UUID `json:"id,omitempty" doc:"the ID of the event"` IsRecursive *bool `` /* 254-byte string literal not displayed */ Keyword string `json:"keyword,omitempty" doc:"List by keyword"` Level string `json:"level,omitempty" doc:"the event level (INFO, WARN, ERROR)"` ListAll *bool `` /* 195-byte string literal not displayed */ Page int `json:"page,omitempty" ` PageSize int `json:"pagesize,omitempty"` StartDate string `` /* 156-byte string literal not displayed */ Type string `json:"type,omitempty" doc:"the event type (see event types)"` // contains filtered or unexported fields }
ListEvents list the events
type ListEventsResponse ¶ added in v0.9.0
ListEventsResponse represents a response of a list query
type ListHosts ¶ added in v0.10.0
type ListHosts struct { ClusterID *UUID `json:"clusterid,omitempty" doc:"lists hosts existing in particular cluster"` Details []string `` /* 138-byte string literal not displayed */ HAHost *bool `json:"hahost,omitempty" doc:"if true, list only hosts dedicated to HA"` Hypervisor string `json:"hypervisor,omitempty" doc:"hypervisor type of host: KVM,Simulator"` ID *UUID `json:"id,omitempty" doc:"the id of the host"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` Name string `json:"name,omitempty" doc:"the name of the host"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` PodID *UUID `json:"podid,omitempty" doc:"the Pod ID for the host"` ResourceState string `` /* 249-byte string literal not displayed */ State string `json:"state,omitempty" doc:"the state of the host"` Type string `json:"type,omitempty" doc:"the host type"` ZoneID *UUID `json:"zoneid,omitempty" doc:"the Zone ID for the host"` // contains filtered or unexported fields }
ListHosts lists hosts
type ListHostsResponse ¶ added in v0.10.0
ListHostsResponse represents a list of hosts
type ListInstanceGroups ¶ added in v0.9.7
type ListInstanceGroups struct { Account string `json:"account,omitempty" doc:"list resources by account. Must be used with the domainid parameter."` DomainID *UUID `json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"` ID *UUID `json:"id,omitempty" doc:"list instance groups by ID"` IsRecursive *bool `` /* 141-byte string literal not displayed */ Keyword string `json:"keyword,omitempty" doc:"List by keyword"` ListAll *bool `` /* 195-byte string literal not displayed */ Name string `json:"name,omitempty" doc:"list instance groups by name"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` // contains filtered or unexported fields }
ListInstanceGroups lists VM groups
type ListInstanceGroupsResponse ¶ added in v0.9.7
type ListInstanceGroupsResponse struct { Count int `json:"count"` InstanceGroup []InstanceGroup `json:"instancegroup"` }
ListInstanceGroupsResponse represents a list of instance groups
type ListNetworkOfferings ¶ added in v0.9.0
type ListNetworkOfferings struct { Availability string `json:"availability,omitempty" doc:"the availability of network offering. Default value is Required"` DisplayText string `json:"displaytext,omitempty" doc:"list network offerings by display text"` GuestIPType string `json:"guestiptype,omitempty" doc:"list network offerings by guest type: Shared or Isolated"` ID *UUID `json:"id,omitempty" doc:"list network offerings by id"` IsDefault *bool `json:"isdefault,omitempty" doc:"true if need to list only default network offerings. Default value is false"` IsTagged *bool `json:"istagged,omitempty" doc:"true if offering has tags specified"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` Name string `json:"name,omitempty" doc:"list network offerings by name"` NetworkID *UUID `` /* 152-byte string literal not displayed */ Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` SourceNATSupported *bool `` /* 131-byte string literal not displayed */ SpecifyIPRanges *bool `json:"specifyipranges,omitempty" doc:"true if need to list only network offerings which support specifying ip ranges"` SpecifyVlan *bool `json:"specifyvlan,omitempty" doc:"the tags for the network offering."` State string `json:"state,omitempty" doc:"list network offerings by state"` SupportedServices []Service `json:"supportedservices,omitempty" doc:"list network offerings supporting certain services"` Tags string `json:"tags,omitempty" doc:"list network offerings by tags"` TrafficType string `json:"traffictype,omitempty" doc:"list by traffic type"` ZoneID *UUID `json:"zoneid,omitempty" doc:"list network offerings available for network creation in specific zone"` // contains filtered or unexported fields }
ListNetworkOfferings represents a query for network offerings
func (*ListNetworkOfferings) SetPage ¶ added in v0.12.0
func (ls *ListNetworkOfferings) SetPage(page int)
SetPage sets the current page
func (*ListNetworkOfferings) SetPageSize ¶ added in v0.12.0
func (ls *ListNetworkOfferings) SetPageSize(pageSize int)
SetPageSize sets the page size
type ListNetworkOfferingsResponse ¶ added in v0.9.0
type ListNetworkOfferingsResponse struct { Count int `json:"count"` NetworkOffering []NetworkOffering `json:"networkoffering"` }
ListNetworkOfferingsResponse represents a list of service offerings
type ListNetworks ¶ added in v0.9.0
type ListNetworks struct { Account string `json:"account,omitempty" doc:"list resources by account. Must be used with the domainid parameter."` CanUseForDeploy *bool `json:"canusefordeploy,omitempty" doc:"list networks available for vm deployment"` DisplayNetwork *bool `json:"displaynetwork,omitempty" doc:"list resources by display flag; only ROOT admin is eligible to pass this parameter"` DomainID *UUID `json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"` ID *UUID `json:"id,omitempty" doc:"list networks by id"` IsRecursive *bool `` /* 141-byte string literal not displayed */ IsSystem *bool `json:"issystem,omitempty" doc:"true if network is system, false otherwise"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` ListAll *bool `` /* 195-byte string literal not displayed */ Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` PhysicalNetworkID *UUID `json:"physicalnetworkid,omitempty" doc:"list networks by physical network id"` RestartRequired *bool `json:"restartrequired,omitempty" doc:"list networks by restartRequired"` SpecifyIPRanges *bool `json:"specifyipranges,omitempty" doc:"true if need to list only networks which support specifying ip ranges"` SupportedServices []Service `json:"supportedservices,omitempty" doc:"list networks supporting certain services"` Tags []ResourceTag `json:"tags,omitempty" doc:"List resources by tags (key/value pairs)"` TrafficType string `json:"traffictype,omitempty" doc:"type of the traffic"` Type string `json:"type,omitempty" doc:"the type of the network. Supported values are: Isolated and Shared"` ZoneID *UUID `json:"zoneid,omitempty" doc:"the Zone ID of the network"` // contains filtered or unexported fields }
ListNetworks represents a query to a network
func (*ListNetworks) SetPage ¶ added in v0.9.21
func (listNetwork *ListNetworks) SetPage(page int)
SetPage sets the current page
func (*ListNetworks) SetPageSize ¶ added in v0.9.21
func (listNetwork *ListNetworks) SetPageSize(pageSize int)
SetPageSize sets the page size
type ListNetworksResponse ¶ added in v0.9.0
ListNetworksResponse represents the list of networks
type ListNics ¶ added in v0.9.0
type ListNics struct { ForDisplay bool `json:"fordisplay,omitempty" doc:"list resources by display flag; only ROOT admin is eligible to pass this parameter"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` NetworkID *UUID `json:"networkid,omitempty" doc:"list nic of the specific vm's network"` NicID *UUID `json:"nicid,omitempty" doc:"the ID of the nic to to list IPs"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` VirtualMachineID *UUID `json:"virtualmachineid,omitempty" doc:"the ID of the vm"` // contains filtered or unexported fields }
ListNics represents the NIC search
func (*ListNics) SetPageSize ¶ added in v0.9.18
SetPageSize sets the page size
type ListNicsResponse ¶ added in v0.9.0
ListNicsResponse represents a list of templates
type ListOSCategories ¶ added in v0.11.0
type ListOSCategories struct { ID *UUID `json:"id,omitempty" doc:"list Os category by id"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` Name string `json:"name,omitempty" doc:"list os category by name"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` // contains filtered or unexported fields }
ListOSCategories lists the OS categories
type ListOSCategoriesResponse ¶ added in v0.11.0
type ListOSCategoriesResponse struct { Count int `json:"count"` OSCategory []OSCategory `json:"oscategory"` }
ListOSCategoriesResponse represents a list of OS categories
type ListPublicIPAddresses ¶ added in v0.9.0
type ListPublicIPAddresses struct { Account string `json:"account,omitempty" doc:"list resources by account. Must be used with the domainid parameter."` AllocatedOnly *bool `json:"allocatedonly,omitempty" doc:"limits search results to allocated public IP addresses"` AssociatedNetworkID *UUID `json:"associatednetworkid,omitempty" doc:"lists all public IP addresses associated to the network specified"` DomainID *UUID `json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"` ForDisplay *bool `json:"fordisplay,omitempty" doc:"list resources by display flag; only ROOT admin is eligible to pass this parameter"` ForLoadBalancing *bool `json:"forloadbalancing,omitempty" doc:"list only ips used for load balancing"` ForVirtualNetwork *bool `json:"forvirtualnetwork,omitempty" doc:"the virtual network for the IP address"` ID *UUID `json:"id,omitempty" doc:"lists ip address by id"` IPAddress net.IP `json:"ipaddress,omitempty" doc:"lists the specified IP address"` IsElastic *bool `json:"iselastic,omitempty" doc:"list only elastic ip addresses"` IsRecursive *bool `` /* 141-byte string literal not displayed */ IsSourceNat *bool `json:"issourcenat,omitempty" doc:"list only source nat ip addresses"` IsStaticNat *bool `json:"isstaticnat,omitempty" doc:"list only static nat ip addresses"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` ListAll *bool `` /* 195-byte string literal not displayed */ Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` PhysicalNetworkID *UUID `json:"physicalnetworkid,omitempty" doc:"lists all public IP addresses by physical network id"` Tags []ResourceTag `json:"tags,omitempty" doc:"List resources by tags (key/value pairs)"` VlanID *UUID `json:"vlanid,omitempty" doc:"lists all public IP addresses by VLAN ID"` ZoneID *UUID `json:"zoneid,omitempty" doc:"lists all public IP addresses by Zone ID"` // contains filtered or unexported fields }
ListPublicIPAddresses represents a search for public IP addresses
func (*ListPublicIPAddresses) SetPage ¶ added in v0.9.20
func (ls *ListPublicIPAddresses) SetPage(page int)
SetPage sets the current page
func (*ListPublicIPAddresses) SetPageSize ¶ added in v0.9.20
func (ls *ListPublicIPAddresses) SetPageSize(pageSize int)
SetPageSize sets the page size
type ListPublicIPAddressesResponse ¶ added in v0.9.0
type ListPublicIPAddressesResponse struct { Count int `json:"count"` PublicIPAddress []IPAddress `json:"publicipaddress"` }
ListPublicIPAddressesResponse represents a list of public IP addresses
type ListResourceDetails ¶ added in v0.9.22
type ListResourceDetails struct { ResourceType string `json:"resourcetype" doc:"list by resource type"` Account string `json:"account,omitempty" doc:"list resources by account. Must be used with the domainid parameter."` DomainID *UUID `json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"` ForDisplay bool `json:"fordisplay,omitempty" doc:"if set to true, only details marked with display=true, are returned. False by default"` Key string `json:"key,omitempty" doc:"list by key"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` ListAll bool `` /* 195-byte string literal not displayed */ Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` ResourceID *UUID `json:"resourceid,omitempty" doc:"list by resource id"` Value string `json:"value,omitempty" doc:"list by key, value. Needs to be passed only along with key"` IsRecursive bool `` /* 141-byte string literal not displayed */ // contains filtered or unexported fields }
ListResourceDetails lists the resource tag(s) (but different from listTags...)
type ListResourceDetailsResponse ¶ added in v0.9.22
type ListResourceDetailsResponse struct { Count int `json:"count"` ResourceDetail []ResourceTag `json:"resourcedetail"` }
ListResourceDetailsResponse represents a list of resource details
type ListResourceLimits ¶ added in v0.9.7
type ListResourceLimits struct { Account string `json:"account,omitempty" doc:"list resources by account. Must be used with the domainid parameter."` DomainID string `json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"` ID int64 `json:"id,omitempty" doc:"Lists resource limits by ID."` IsRecursive *bool `` /* 141-byte string literal not displayed */ Keyword string `json:"keyword,omitempty" doc:"List by keyword"` ListAll *bool `` /* 195-byte string literal not displayed */ Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` ResourceType ResourceType `` /* 957-byte string literal not displayed */ ResourceTypeName string `` /* 1059-byte string literal not displayed */ // contains filtered or unexported fields }
ListResourceLimits lists the resource limits
type ListResourceLimitsResponse ¶ added in v0.9.7
type ListResourceLimitsResponse struct { Count int `json:"count"` ResourceLimit []ResourceLimit `json:"resourcelimit"` }
ListResourceLimitsResponse represents a list of resource limits
type ListSSHKeyPairs ¶ added in v0.9.0
type ListSSHKeyPairs struct { Account string `json:"account,omitempty" doc:"list resources by account. Must be used with the domainid parameter."` DomainID *UUID `json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"` Fingerprint string `json:"fingerprint,omitempty" doc:"A public key fingerprint to look for"` IsRecursive *bool `` /* 141-byte string literal not displayed */ Keyword string `json:"keyword,omitempty" doc:"List by keyword"` ListAll *bool `` /* 195-byte string literal not displayed */ Name string `json:"name,omitempty" doc:"A key pair name to look for"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` // contains filtered or unexported fields }
ListSSHKeyPairs represents a query for a list of SSH KeyPairs
func (*ListSSHKeyPairs) SetPage ¶ added in v0.9.19
func (ls *ListSSHKeyPairs) SetPage(page int)
SetPage sets the current page
func (*ListSSHKeyPairs) SetPageSize ¶ added in v0.9.19
func (ls *ListSSHKeyPairs) SetPageSize(pageSize int)
SetPageSize sets the page size
type ListSSHKeyPairsResponse ¶
type ListSSHKeyPairsResponse struct { Count int `json:"count"` SSHKeyPair []SSHKeyPair `json:"sshkeypair"` }
ListSSHKeyPairsResponse represents a list of SSH key pairs
type ListSecurityGroups ¶ added in v0.9.0
type ListSecurityGroups struct { Account string `json:"account,omitempty" doc:"list resources by account. Must be used with the domainid parameter."` DomainID *UUID `json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"` ID *UUID `json:"id,omitempty" doc:"list the security group by the id provided"` IsRecursive *bool `` /* 141-byte string literal not displayed */ Keyword string `json:"keyword,omitempty" doc:"List by keyword"` ListAll *bool `` /* 195-byte string literal not displayed */ Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` SecurityGroupName string `json:"securitygroupname,omitempty" doc:"lists security groups by name"` VirtualMachineID *UUID `json:"virtualmachineid,omitempty" doc:"lists security groups by virtual machine id"` // contains filtered or unexported fields }
ListSecurityGroups represents a search for security groups
func (*ListSecurityGroups) SetPage ¶ added in v0.9.21
func (lsg *ListSecurityGroups) SetPage(page int)
SetPage sets the current page
func (*ListSecurityGroups) SetPageSize ¶ added in v0.9.21
func (lsg *ListSecurityGroups) SetPageSize(pageSize int)
SetPageSize sets the page size
type ListSecurityGroupsResponse ¶
type ListSecurityGroupsResponse struct { Count int `json:"count"` SecurityGroup []SecurityGroup `json:"securitygroup"` }
ListSecurityGroupsResponse represents a list of security groups
type ListServiceOfferings ¶ added in v0.9.0
type ListServiceOfferings struct { DomainID *UUID `json:"domainid,omitempty" doc:"the ID of the domain associated with the service offering"` ID *UUID `json:"id,omitempty" doc:"ID of the service offering"` IsSystem *bool `json:"issystem,omitempty" doc:"is this a system vm offering"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` Name string `json:"name,omitempty" doc:"name of the service offering"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` Restricted *bool `` /* 185-byte string literal not displayed */ SystemVMType string `` /* 136-byte string literal not displayed */ VirtualMachineID *UUID `` /* 175-byte string literal not displayed */ // contains filtered or unexported fields }
ListServiceOfferings represents a query for service offerings
func (*ListServiceOfferings) SetPage ¶ added in v0.9.24
func (lso *ListServiceOfferings) SetPage(page int)
SetPage sets the current page
func (*ListServiceOfferings) SetPageSize ¶ added in v0.9.24
func (lso *ListServiceOfferings) SetPageSize(pageSize int)
SetPageSize sets the page size
type ListServiceOfferingsResponse ¶
type ListServiceOfferingsResponse struct { Count int `json:"count"` ServiceOffering []ServiceOffering `json:"serviceoffering"` }
ListServiceOfferingsResponse represents a list of service offerings
type ListSnapshots ¶ added in v0.9.0
type ListSnapshots struct { Account string `json:"account,omitempty" doc:"list resources by account. Must be used with the domainid parameter."` DomainID *UUID `json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"` ID *UUID `json:"id,omitempty" doc:"lists snapshot by snapshot ID"` IntervalType string `json:"intervaltype,omitempty" doc:"valid values are HOURLY, DAILY, WEEKLY, and MONTHLY."` IsRecursive *bool `` /* 141-byte string literal not displayed */ Keyword string `json:"keyword,omitempty" doc:"List by keyword"` ListAll *bool `` /* 195-byte string literal not displayed */ Name string `json:"name,omitempty" doc:"lists snapshot by snapshot name"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` SnapshotType string `json:"snapshottype,omitempty" doc:"valid values are MANUAL or RECURRING."` Tags []ResourceTag `json:"tags,omitempty" doc:"List resources by tags (key/value pairs)"` VolumeID *UUID `json:"volumeid,omitempty" doc:"the ID of the disk volume"` ZoneID *UUID `json:"zoneid,omitempty" doc:"list snapshots by zone id"` // contains filtered or unexported fields }
ListSnapshots lists the volume snapshots
type ListSnapshotsResponse ¶ added in v0.9.0
type ListSnapshotsResponse struct { Count int `json:"count"` Snapshot []Snapshot `json:"snapshot"` }
ListSnapshotsResponse represents a list of volume snapshots
type ListTags ¶ added in v0.9.0
type ListTags struct { Account string `json:"account,omitempty" doc:"list resources by account. Must be used with the domainid parameter."` Customer string `json:"customer,omitempty" doc:"list by customer name"` DomainID *UUID `json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"` IsRecursive *bool `` /* 141-byte string literal not displayed */ Key string `json:"key,omitempty" doc:"list by key"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` ListAll *bool `` /* 195-byte string literal not displayed */ Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` ResourceID *UUID `json:"resourceid,omitempty" doc:"list by resource id"` ResourceType string `json:"resourcetype,omitempty" doc:"list by resource type"` Value string `json:"value,omitempty" doc:"list by value"` // contains filtered or unexported fields }
ListTags list resource tag(s)
type ListTagsResponse ¶ added in v0.9.0
type ListTagsResponse struct { Count int `json:"count"` Tag []ResourceTag `json:"tag"` }
ListTagsResponse represents a list of resource tags
type ListTemplates ¶ added in v0.9.0
type ListTemplates struct { TemplateFilter string `` /* 737-byte string literal not displayed */ Account string `json:"account,omitempty" doc:"list resources by account. Must be used with the domainid parameter."` DomainID *UUID `json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"` Hypervisor string `json:"hypervisor,omitempty" doc:"the hypervisor for which to restrict the search"` ID *UUID `json:"id,omitempty" doc:"the template ID"` IsRecursive *bool `` /* 141-byte string literal not displayed */ Keyword string `json:"keyword,omitempty" doc:"List by keyword"` ListAll *bool `` /* 195-byte string literal not displayed */ Name string `json:"name,omitempty" doc:"the template name"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` ShowRemoved *bool `json:"showremoved,omitempty" doc:"show removed templates as well"` Tags []ResourceTag `json:"tags,omitempty" doc:"List resources by tags (key/value pairs)"` ZoneID *UUID `json:"zoneid,omitempty" doc:"list templates by zoneid"` // contains filtered or unexported fields }
ListTemplates represents a template query filter
func (*ListTemplates) SetPage ¶ added in v0.9.20
func (ls *ListTemplates) SetPage(page int)
SetPage sets the current page
func (*ListTemplates) SetPageSize ¶ added in v0.9.20
func (ls *ListTemplates) SetPageSize(pageSize int)
SetPageSize sets the page size
type ListTemplatesResponse ¶
type ListTemplatesResponse struct { Count int `json:"count"` Template []Template `json:"template"` }
ListTemplatesResponse represents a list of templates
type ListUsers ¶ added in v0.9.22
type ListUsers struct { Account string `json:"account,omitempty" doc:"list resources by account. Must be used with the domainid parameter."` AccountType int64 `` /* 129-byte string literal not displayed */ DomainID *UUID `json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"` ID *UUID `json:"id,omitempty" doc:"List user by ID."` IsRecursive bool `` /* 141-byte string literal not displayed */ Keyword string `json:"keyword,omitempty" doc:"List by keyword"` ListAll bool `` /* 195-byte string literal not displayed */ Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` State string `json:"state,omitempty" doc:"List users by state of the user account."` Username string `json:"username,omitempty" doc:"List user by the username"` // contains filtered or unexported fields }
ListUsers represents the search for Users
type ListUsersResponse ¶ added in v0.9.22
ListUsersResponse represents a list of users
type ListVirtualMachines ¶ added in v0.9.0
type ListVirtualMachines struct { Account string `json:"account,omitempty" doc:"list resources by account. Must be used with the domainid parameter."` AffinityGroupID *UUID `json:"affinitygroupid,omitempty" doc:"list vms by affinity group"` Details []string `` /* 253-byte string literal not displayed */ DisplayVM *bool `json:"displayvm,omitempty" doc:"list resources by display flag; only ROOT admin is eligible to pass this parameter"` DomainID *UUID `json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"` ForVirtualNetwork *bool `` /* 126-byte string literal not displayed */ GroupID *UUID `json:"groupid,omitempty" doc:"the group ID"` HostID *UUID `json:"hostid,omitempty" doc:"the host ID"` Hypervisor string `json:"hypervisor,omitempty" doc:"the target hypervisor for the template"` ID *UUID `json:"id,omitempty" doc:"the ID of the virtual machine"` IDs []string `json:"ids,omitempty" doc:"the IDs of the virtual machines, mutually exclusive with id"` IPAddress net.IP `json:"ipaddress,omitempty" doc:"an IP address to filter the result"` IsoID *UUID `json:"isoid,omitempty" doc:"list vms by iso"` IsRecursive *bool `` /* 141-byte string literal not displayed */ Keyword string `json:"keyword,omitempty" doc:"List by keyword"` ListAll *bool `` /* 195-byte string literal not displayed */ Name string `json:"name,omitempty" doc:"name of the virtual machine"` NetworkID *UUID `json:"networkid,omitempty" doc:"list by network id"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` ServiceOfferindID *UUID `json:"serviceofferingid,omitempty" doc:"list by the service offering"` State string `json:"state,omitempty" doc:"state of the virtual machine"` Tags []ResourceTag `json:"tags,omitempty" doc:"List resources by tags (key/value pairs)"` TemplateID *UUID `json:"templateid,omitempty" doc:"list vms by template"` ZoneID *UUID `json:"zoneid,omitempty" doc:"the availability zone ID"` // contains filtered or unexported fields }
ListVirtualMachines represents a search for a VM
func (*ListVirtualMachines) SetPage ¶ added in v0.9.18
func (ls *ListVirtualMachines) SetPage(page int)
SetPage sets the current page
func (*ListVirtualMachines) SetPageSize ¶ added in v0.9.18
func (ls *ListVirtualMachines) SetPageSize(pageSize int)
SetPageSize sets the page size
type ListVirtualMachinesResponse ¶
type ListVirtualMachinesResponse struct { Count int `json:"count"` VirtualMachine []VirtualMachine `json:"virtualmachine"` }
ListVirtualMachinesResponse represents a list of virtual machines
type ListVolumes ¶ added in v0.9.0
type ListVolumes struct { Account string `json:"account,omitempty" doc:"list resources by account. Must be used with the domainid parameter."` DiskOfferingID *UUID `json:"diskofferingid,omitempty" doc:"list volumes by disk offering"` DisplayVolume *bool `json:"displayvolume,omitempty" doc:"list resources by display flag; only ROOT admin is eligible to pass this parameter"` DomainID *UUID `json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"` HostID *UUID `json:"hostid,omitempty" doc:"list volumes on specified host"` ID *UUID `json:"id,omitempty" doc:"the ID of the disk volume"` IsRecursive *bool `` /* 141-byte string literal not displayed */ Keyword string `json:"keyword,omitempty" doc:"List by keyword"` ListAll *bool `` /* 195-byte string literal not displayed */ Name string `json:"name,omitempty" doc:"the name of the disk volume"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` PodID *UUID `json:"podid,omitempty" doc:"the pod id the disk volume belongs to"` StorageID *UUID `json:"storageid,omitempty" doc:"the ID of the storage pool, available to ROOT admin only"` Tags []ResourceTag `json:"tags,omitempty" doc:"List resources by tags (key/value pairs)"` Type string `json:"type,omitempty" doc:"the type of disk volume"` VirtualMachineID *UUID `json:"virtualmachineid,omitempty" doc:"the ID of the virtual machine"` ZoneID *UUID `json:"zoneid,omitempty" doc:"the ID of the availability zone"` // contains filtered or unexported fields }
ListVolumes represents a query listing volumes
func (*ListVolumes) SetPage ¶ added in v0.9.18
func (ls *ListVolumes) SetPage(page int)
SetPage sets the current page
func (*ListVolumes) SetPageSize ¶ added in v0.9.18
func (ls *ListVolumes) SetPageSize(pageSize int)
SetPageSize sets the page size
type ListVolumesResponse ¶ added in v0.9.0
ListVolumesResponse represents a list of volumes
type ListZones ¶ added in v0.9.0
type ListZones struct { Available *bool `` /* 180-byte string literal not displayed */ DomainID *UUID `json:"domainid,omitempty" doc:"the ID of the domain associated with the zone"` ID *UUID `json:"id,omitempty" doc:"the ID of the zone"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` Name string `json:"name,omitempty" doc:"the name of the zone"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` ShowCapacities *bool `json:"showcapacities,omitempty" doc:"flag to display the capacity of the zones"` Tags []ResourceTag `json:"tags,omitempty" doc:"List zones by resource tags (key/value pairs)"` // contains filtered or unexported fields }
ListZones represents a query for zones
func (*ListZones) SetPageSize ¶ added in v0.9.18
SetPageSize sets the page size
type ListZonesResponse ¶
ListZonesResponse represents a list of zones
type Listable ¶ added in v0.9.16
type Listable interface { // ListRequest builds the list command ListRequest() (ListCommand, error) }
Listable represents an Interface that can be "List" by the client
type MACAddress ¶ added in v0.10.3
type MACAddress net.HardwareAddr
MACAddress is a nicely JSON serializable net.HardwareAddr
func MAC48 ¶ added in v0.10.3
func MAC48(a, b, c, d, e, f byte) MACAddress
MAC48 builds a MAC-48 MACAddress
func MustParseMAC ¶ added in v0.11.0
func MustParseMAC(s string) MACAddress
MustParseMAC acts like ParseMAC but panics if in case of an error
func ParseMAC ¶ added in v0.10.3
func ParseMAC(s string) (MACAddress, error)
ParseMAC converts a string into a MACAddress
func (MACAddress) MarshalJSON ¶ added in v0.10.3
func (mac MACAddress) MarshalJSON() ([]byte, error)
MarshalJSON converts the MAC Address to a string representation
func (MACAddress) String ¶ added in v0.10.3
func (mac MACAddress) String() string
String returns the MAC address in standard format
func (*MACAddress) UnmarshalJSON ¶ added in v0.10.3
func (mac *MACAddress) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the raw JSON into the MAC address
type MigrateVirtualMachine ¶ added in v0.9.24
type MigrateVirtualMachine struct { HostID *UUID `json:"hostid,omitempty" doc:"Destination Host ID to migrate VM to. Required for live migrating a VM from host to host"` StorageID *UUID `` /* 130-byte string literal not displayed */ VirtualMachineID *UUID `json:"virtualmachineid" doc:"the ID of the virtual machine"` // contains filtered or unexported fields }
MigrateVirtualMachine (Async) attempts migration of a VM to a different host or Root volume of the vm to a different storage pool
type Network ¶ added in v0.9.0
type Network struct { Account string `json:"account,omitempty" doc:"the owner of the network"` AccountID *UUID `json:"accountid,omitempty" doc:"the owner ID of the network"` BroadcastDomainType string `json:"broadcastdomaintype,omitempty" doc:"Broadcast domain type of the network"` BroadcastURI string `json:"broadcasturi,omitempty" doc:"broadcast uri of the network."` CanUseForDeploy bool `json:"canusefordeploy,omitempty" doc:"list networks available for vm deployment"` CIDR *CIDR `json:"cidr,omitempty" doc:"Cloudstack managed address space, all CloudStack managed VMs get IP address from CIDR"` DisplayNetwork bool `json:"displaynetwork,omitempty" doc:"an optional field, whether to the display the network to the end user or not."` DisplayText string `json:"displaytext,omitempty" doc:"the displaytext of the network"` DNS1 net.IP `json:"dns1,omitempty" doc:"the first DNS for the network"` DNS2 net.IP `json:"dns2,omitempty" doc:"the second DNS for the network"` Domain string `json:"domain,omitempty" doc:"the domain name of the network owner"` DomainID *UUID `json:"domainid,omitempty" doc:"the domain id of the network owner"` EndIP net.IP `json:"endip,omitempty" doc:"the ending IP address in the network IP range. Required for managed networks."` Gateway net.IP `json:"gateway,omitempty" doc:"the network's gateway"` ID *UUID `json:"id,omitempty" doc:"the id of the network"` IP6CIDR *CIDR `json:"ip6cidr,omitempty" doc:"the cidr of IPv6 network"` IP6Gateway net.IP `json:"ip6gateway,omitempty" doc:"the gateway of IPv6 network"` IsDefault bool `json:"isdefault,omitempty" doc:"true if network is default, false otherwise"` IsPersistent bool `json:"ispersistent,omitempty" doc:"list networks that are persistent"` IsSystem bool `json:"issystem,omitempty" doc:"true if network is system, false otherwise"` Name string `json:"name,omitempty" doc:"the name of the network"` Netmask net.IP `json:"netmask,omitempty" doc:"the network's netmask"` NetworkCIDR *CIDR `` /* 154-byte string literal not displayed */ NetworkDomain string `json:"networkdomain,omitempty" doc:"the network domain"` NetworkOfferingAvailability string `json:"networkofferingavailability,omitempty" doc:"availability of the network offering the network is created from"` NetworkOfferingConserveMode bool `json:"networkofferingconservemode,omitempty" doc:"true if network offering is ip conserve mode enabled"` NetworkOfferingDisplayText string `json:"networkofferingdisplaytext,omitempty" doc:"display text of the network offering the network is created from"` NetworkOfferingID *UUID `json:"networkofferingid,omitempty" doc:"network offering id the network is created from"` NetworkOfferingName string `json:"networkofferingname,omitempty" doc:"name of the network offering the network is created from"` PhysicalNetworkID *UUID `json:"physicalnetworkid,omitempty" doc:"the physical network id"` Related string `json:"related,omitempty" doc:"related to what other network configuration"` ReservedIPRange string `` /* 144-byte string literal not displayed */ RestartRequired bool `json:"restartrequired,omitempty" doc:"true network requires restart"` Service []Service `json:"service,omitempty" doc:"the list of services"` SpecifyIPRanges bool `json:"specifyipranges,omitempty" doc:"true if network supports specifying ip ranges, false otherwise"` StartIP net.IP `json:"startip,omitempty" doc:"the beginning IP address in the network IP range. Required for managed networks."` State string `json:"state,omitempty" doc:"state of the network"` StrechedL2Subnet bool `json:"strechedl2subnet,omitempty" doc:"true if network can span multiple zones"` SubdomainAccess bool `json:"subdomainaccess,omitempty" doc:"true if users from subdomains can access the domain level network"` Tags []ResourceTag `json:"tags,omitempty" doc:"the list of resource tags associated with network"` TrafficType string `json:"traffictype,omitempty" doc:"the traffic type of the network"` Type string `json:"type,omitempty" doc:"the type of the network"` Vlan string `json:"vlan,omitemtpy" doc:"The vlan of the network. This parameter is visible to ROOT admins only"` ZoneID *UUID `json:"zoneid,omitempty" doc:"zone id of the network"` ZoneName string `json:"zonename,omitempty" doc:"the name of the zone the network belongs to"` ZonesNetworkSpans []Zone `` /* 144-byte string literal not displayed */ }
Network represents a network
func (Network) ListRequest ¶ added in v0.9.21
func (network Network) ListRequest() (ListCommand, error)
ListRequest builds the ListNetworks request
func (Network) ResourceType ¶ added in v0.9.7
ResourceType returns the type of the resource
type NetworkOffering ¶ added in v0.9.0
type NetworkOffering struct { Availability string `json:"availability,omitempty" doc:"availability of the network offering"` ConserveMode bool `json:"conservemode,omitempty" doc:"true if network offering is ip conserve mode enabled"` Created string `json:"created,omitempty" doc:"the date this network offering was created"` Details map[string]string `json:"details,omitempty" doc:"additional key/value details tied with network offering"` DisplayText string `json:"displaytext,omitempty" doc:"an alternate display text of the network offering."` EgressDefaultPolicy bool `` /* 135-byte string literal not displayed */ GuestIPType string `json:"guestiptype,omitempty" doc:"guest type of the network offering, can be Shared or Isolated"` ID *UUID `json:"id,omitempty" doc:"the id of the network offering"` IsDefault bool `json:"isdefault,omitempty" doc:"true if network offering is default, false otherwise"` IsPersistent bool `json:"ispersistent,omitempty" doc:"true if network offering supports persistent networks, false otherwise"` MaxConnections int `json:"maxconnections,omitempty" doc:"maximum number of concurrents connections to be handled by lb"` Name string `json:"name,omitempty" doc:"the name of the network offering"` NetworkRate int `json:"networkrate,omitempty" doc:"data transfer rate in megabits per second allowed."` Service []Service `json:"service,omitempty" doc:"the list of supported services"` ServiceOfferingID *UUID `json:"serviceofferingid,omitempty" doc:"the ID of the service offering used by virtual router provider"` SpecifyIPRanges bool `json:"specifyipranges,omitempty" doc:"true if network offering supports specifying ip ranges, false otherwise"` SpecifyVlan bool `json:"specifyvlan,omitempty" doc:"true if network offering supports vlans, false otherwise"` State string `json:"state,omitempty" doc:"state of the network offering. Can be Disabled/Enabled/Inactive"` SupportsStrechedL2Subnet bool `json:"supportsstrechedl2subnet,omitempty" doc:"true if network offering supports network that span multiple zones"` Tags string `json:"tags,omitempty" doc:"the tags for the network offering"` TrafficType string `` /* 150-byte string literal not displayed */ }
NetworkOffering corresponds to the Compute Offerings
func (NetworkOffering) ListRequest ¶ added in v0.12.0
func (no NetworkOffering) ListRequest() (ListCommand, error)
ListRequest builds the ListNetworkOfferings request
This doesn't take into account the IsDefault flag as the default value is true.
type Nic ¶ added in v0.9.0
type Nic struct { BroadcastURI string `json:"broadcasturi,omitempty" doc:"the broadcast uri of the nic"` DeviceID *UUID `json:"deviceid,omitempty" doc:"device id for the network when plugged into the virtual machine"` Gateway net.IP `json:"gateway,omitempty" doc:"the gateway of the nic"` ID *UUID `json:"id,omitempty" doc:"the ID of the nic"` IP6Address net.IP `json:"ip6address,omitempty" doc:"the IPv6 address of network"` IP6CIDR *CIDR `json:"ip6cidr,omitempty" doc:"the cidr of IPv6 network"` IP6Gateway net.IP `json:"ip6gateway,omitempty" doc:"the gateway of IPv6 network"` IPAddress net.IP `json:"ipaddress,omitempty" doc:"the ip address of the nic"` IsDefault bool `json:"isdefault,omitempty" doc:"true if nic is default, false otherwise"` IsolationURI string `json:"isolationuri,omitempty" doc:"the isolation uri of the nic"` MACAddress MACAddress `json:"macaddress,omitempty" doc:"true if nic is default, false otherwise"` Netmask net.IP `json:"netmask,omitempty" doc:"the netmask of the nic"` NetworkID *UUID `json:"networkid,omitempty" doc:"the ID of the corresponding network"` NetworkName string `json:"networkname,omitempty" doc:"the name of the corresponding network"` ReverseDNS []ReverseDNS `json:"reversedns,omitempty" doc:"the list of PTR record(s) associated with the virtual machine"` SecondaryIP []NicSecondaryIP `json:"secondaryip,omitempty" doc:"the Secondary ipv4 addr of nic"` TrafficType string `json:"traffictype,omitempty" doc:"the traffic type of the nic"` Type string `json:"type,omitempty" doc:"the type of the nic"` VirtualMachineID *UUID `json:"virtualmachineid,omitempty" doc:"Id of the vm to which the nic belongs"` }
Nic represents a Network Interface Controller (NIC)
func (Nic) ListRequest ¶ added in v0.9.18
func (nic Nic) ListRequest() (ListCommand, error)
ListRequest build a ListNics request from the given Nic
type NicSecondaryIP ¶ added in v0.9.0
type NicSecondaryIP struct { ID *UUID `json:"id,omitempty" doc:"the ID of the secondary private IP addr"` IPAddress net.IP `json:"ipaddress,omitempty" doc:"Secondary IP address"` NetworkID *UUID `json:"networkid,omitempty" doc:"the ID of the network"` NicID *UUID `json:"nicid,omitempty" doc:"the ID of the nic"` VirtualMachineID *UUID `json:"virtualmachineid,omitempty" doc:"the ID of the vm"` }
NicSecondaryIP represents a link between NicID and IPAddress
type OSCategory ¶ added in v0.11.0
type OSCategory struct { ID string `json:"id,omitempty" doc:"the ID of the OS category"` Name string `json:"name,omitempty" doc:"the name of the OS category"` }
OSCategory represents an OS category
type PCIDevice ¶ added in v0.9.30
type PCIDevice struct { PCIVendorName string `json:"pcivendorname,omitempty" doc:"Device vendor name of pci card"` DeviceID *UUID `json:"deviceid,omitempty" doc:"Device model ID of pci card"` RemainingCapacity int `` /* 129-byte string literal not displayed */ MaxCapacity int `json:"maxcapacity,omitempty" doc:"Maximum vgpu can be created with this vgpu type on the given pci group"` PCIVendorID *UUID `json:"pcivendorid,omitempty" doc:"Device vendor ID of pci card"` PCIDeviceName string `json:"pcidevicename,omitempty" doc:"Device model name of pci card"` }
PCIDevice represents a PCI card present in the host
type Password ¶ added in v0.9.14
type Password struct {
EncryptedPassword string `json:"encryptedpassword"`
}
Password represents an encrypted password
TODO: method to decrypt it, https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34014652
type PrepareTemplate ¶ added in v0.9.24
type PrepareTemplate struct { TemplateID *UUID `json:"templateid" doc:"template ID of the template to be prepared in primary storage(s)."` ZoneID *UUID `json:"zoneid" doc:"zone ID of the template to be prepared in primary storage(s)."` // contains filtered or unexported fields }
PrepareTemplate represents a template preparation
type QueryAsyncJobResult ¶ added in v0.9.0
type QueryAsyncJobResult struct { JobID *UUID `json:"jobid" doc:"the ID of the asynchronous job"` // contains filtered or unexported fields }
QueryAsyncJobResult represents a query to fetch the status of async job
type QueryReverseDNSForPublicIPAddress ¶ added in v0.10.1
type QueryReverseDNSForPublicIPAddress struct { ID *UUID `json:"id,omitempty" doc:"the ID of the public IP address"` // contains filtered or unexported fields }
QueryReverseDNSForPublicIPAddress is a command to create/query the PTR record of a public IP address
type QueryReverseDNSForVirtualMachine ¶ added in v0.10.1
type QueryReverseDNSForVirtualMachine struct { ID *UUID `json:"id,omitempty" doc:"the ID of the virtual machine"` // contains filtered or unexported fields }
QueryReverseDNSForVirtualMachine is a command to create/query the PTR record(s) of a virtual machine
type RebootVirtualMachine ¶ added in v0.9.0
type RebootVirtualMachine struct { ID *UUID `json:"id" doc:"The ID of the virtual machine"` // contains filtered or unexported fields }
RebootVirtualMachine (Async) represents the rebooting of the virtual machine
type Record ¶ added in v0.9.28
type Record int
Record represent record type
const ( // A record type A Record = iota // AAAA record type AAAA // ALIAS record type ALIAS // CNAME record type CNAME // HINFO record type HINFO // MX record type MX // NAPTR record type NAPTR // NS record type NS // POOL record type POOL // SPF record type SPF // SRV record type SRV // SSHFP record type SSHFP // TXT record type TXT // URL record type URL )
type RecoverVirtualMachine ¶ added in v0.9.0
type RecoverVirtualMachine struct { ID *UUID `json:"id" doc:"The ID of the virtual machine"` // contains filtered or unexported fields }
RecoverVirtualMachine represents the restoration of the virtual machine
type RegisterSSHKeyPair ¶ added in v0.9.0
type RegisterSSHKeyPair struct { Name string `json:"name" doc:"Name of the keypair"` PublicKey string `json:"publickey" doc:"Public key material of the keypair"` Account string `json:"account,omitempty" doc:"an optional account for the ssh key. Must be used with domainid."` DomainID *UUID `` /* 131-byte string literal not displayed */ // contains filtered or unexported fields }
RegisterSSHKeyPair represents a new registration of a public key in a keypair
type RegisterTemplate ¶ added in v0.9.24
type RegisterTemplate struct { Account string `json:"account,omitempty" doc:"an optional accountName. Must be used with domainid."` Bits int `json:"bits,omitempty" doc:"32 or 64 bits support. 64 by default"` Checksum string `json:"checksum,omitempty" doc:"the MD5 checksum value of this template"` Details map[string]string `json:"details,omitempty" doc:"Template details in key/value pairs."` DisplayText string `json:"displaytext" doc:"the display text of the template. This is usually used for display purposes."` DomainID *UUID `json:"domainid,omitempty" doc:"an optional domainid. If the account parameter is used, domainid must also be used."` Format string `json:"format" doc:"the format for the template. Possible values include QCOW2, RAW, and VHD."` Hypervisor string `json:"hypervisor" doc:"the target hypervisor for the template"` IsDynamicallyScalable *bool `` /* 138-byte string literal not displayed */ IsExtractable *bool `json:"isextractable,omitempty" doc:"true if the template or its derivatives are extractable; default is false"` IsFeatured *bool `json:"isfeatured,omitempty" doc:"true if this template is a featured template, false otherwise"` IsPublic *bool `json:"ispublic,omitempty" doc:"true if the template is available to all accounts; default is true"` IsRouting *bool `json:"isrouting,omitempty" doc:"true if the template type is routing i.e., if template is used to deploy router"` IsSystem *bool `json:"issystem,omitempty" doc:"true if the template type is system i.e., if template is used to deploy system VM"` Name string `json:"name" doc:"the name of the template"` OsTypeID *UUID `json:"ostypeid" doc:"the ID of the OS Type that best represents the OS of this template."` PasswordEnabled *bool `json:"passwordenabled,omitempty" doc:"true if the template supports the password reset feature; default is false"` RequiresHVM *bool `json:"requireshvm,omitempty" doc:"true if this template requires HVM"` SSHKeyEnabled *bool `json:"sshkeyenabled,omitempty" doc:"true if the template supports the sshkey upload feature; default is false"` TemplateTag string `json:"templatetag,omitempty" doc:"the tag for this template."` URL string `json:"url" doc:"the URL of where the template is hosted. Possible URL include http:// and https://"` ZoneID *UUID `json:"zoneid" doc:"the ID of the zone the template is to be hosted on"` // contains filtered or unexported fields }
RegisterTemplate represents a template registration
type RegisterUserKeys ¶ added in v0.9.7
type RegisterUserKeys struct { ID *UUID `json:"id" doc:"User id"` // contains filtered or unexported fields }
RegisterUserKeys registers a new set of key of the given user
NB: only the APIKey and SecretKey will be filled
type RemoveIPFromNic ¶ added in v0.9.0
type RemoveIPFromNic struct { ID *UUID `json:"id" doc:"the ID of the secondary ip address to nic"` // contains filtered or unexported fields }
RemoveIPFromNic (Async) represents a deletion request
type RemoveNicFromVirtualMachine ¶ added in v0.9.0
type RemoveNicFromVirtualMachine struct { NicID *UUID `json:"nicid" doc:"NIC ID"` VirtualMachineID *UUID `json:"virtualmachineid" doc:"Virtual Machine ID"` // contains filtered or unexported fields }
RemoveNicFromVirtualMachine (Async) removes a NIC from a VM
type ResetPasswordForVirtualMachine ¶ added in v0.9.0
type ResetPasswordForVirtualMachine struct { ID *UUID `json:"id" doc:"The ID of the virtual machine"` // contains filtered or unexported fields }
ResetPasswordForVirtualMachine resets the password for virtual machine. The virtual machine must be in a "Stopped" state...
type ResetSSHKeyForVirtualMachine ¶ added in v0.9.0
type ResetSSHKeyForVirtualMachine struct { ID *UUID `json:"id" doc:"The ID of the virtual machine"` KeyPair string `json:"keypair" doc:"name of the ssh key pair used to login to the virtual machine"` Account string `json:"account,omitempty" doc:"an optional account for the ssh key. Must be used with domainid."` DomainID *UUID `` /* 139-byte string literal not displayed */ // contains filtered or unexported fields }
ResetSSHKeyForVirtualMachine (Async) represents a change for the key pairs
type ResizeVolume ¶ added in v0.9.0
type ResizeVolume struct { ID *UUID `json:"id" doc:"the ID of the disk volume"` DiskOfferingID *UUID `json:"diskofferingid,omitempty" doc:"new disk offering id"` ShrinkOk *bool `json:"shrinkok,omitempty" doc:"Verify OK to Shrink"` Size int64 `json:"size,omitempty" doc:"New volume size in G"` // contains filtered or unexported fields }
ResizeVolume (Async) resizes a volume
type ResourceLimit ¶ added in v0.9.7
type ResourceLimit struct { Account string `json:"account,omitempty" doc:"the account of the resource limit"` Domain string `json:"domain,omitempty" doc:"the domain name of the resource limit"` DomainID *UUID `json:"domainid,omitempty" doc:"the domain ID of the resource limit"` Max int64 `json:"max,omitempty" doc:"the maximum number of the resource. A -1 means the resource currently has no limit."` ResourceType ResourceType `` /* 169-byte string literal not displayed */ ResourceTypeName string `` /* 194-byte string literal not displayed */ }
ResourceLimit represents the limit on a particular resource
type ResourceTag ¶ added in v0.9.0
type ResourceTag struct { Account string `json:"account,omitempty" doc:"the account associated with the tag"` Customer string `json:"customer,omitempty" doc:"customer associated with the tag"` Domain string `json:"domain,omitempty" doc:"the domain associated with the tag"` DomainID *UUID `json:"domainid,omitempty" doc:"the ID of the domain associated with the tag"` Key string `json:"key,omitempty" doc:"tag key name"` ResourceID *UUID `json:"resourceid,omitempty" doc:"id of the resource"` ResourceType string `json:"resourcetype,omitempty" doc:"resource type"` Value string `json:"value,omitempty" doc:"tag value"` }
ResourceTag is a tag associated with a resource
http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/4.9/management.html
type ResourceType ¶ added in v0.9.7
type ResourceType string
ResourceType represents the ID of a resource type (for limits)
const ( // VirtualMachineType is the resource type ID of a VM VirtualMachineType ResourceType = "0" // IPAddressType is the resource type ID of an IP address IPAddressType ResourceType = "1" // VolumeType is the resource type ID of a volume VolumeType ResourceType = "2" // SnapshotType is the resource type ID of a snapshot SnapshotType ResourceType = "3" // TemplateType is the resource type ID of a template TemplateType ResourceType = "4" // ProjectType is the resource type ID of a project ProjectType ResourceType = "5" // NetworkType is the resource type ID of a network NetworkType ResourceType = "6" // VPCType is the resource type ID of a VPC VPCType ResourceType = "7" // CPUType is the resource type ID of a CPU CPUType ResourceType = "8" // MemoryType is the resource type ID of Memory MemoryType ResourceType = "9" // PrimaryStorageType is the resource type ID of primary storage PrimaryStorageType ResourceType = "10" // SecondaryStorageType is the resource type ID of secondary storage SecondaryStorageType ResourceType = "11" )
type ResourceTypeName ¶ added in v0.9.7
type ResourceTypeName string
ResourceTypeName represents the name of a resource type (for limits)
const ( // VirtualMachineTypeName is the resource type name of a VM VirtualMachineTypeName ResourceTypeName = "user_vm" // IPAddressTypeName is the resource type name of an IP address IPAddressTypeName ResourceTypeName = "public_ip" // VolumeTypeName is the resource type name of a volume VolumeTypeName ResourceTypeName = "volume" // SnapshotTypeName is the resource type name of a snapshot SnapshotTypeName ResourceTypeName = "snapshot" // TemplateTypeName is the resource type name of a template TemplateTypeName ResourceTypeName = "template" // ProjectTypeName is the resource type name of a project ProjectTypeName ResourceTypeName = "project" // NetworkTypeName is the resource type name of a network NetworkTypeName ResourceTypeName = "network" // VPCTypeName is the resource type name of a VPC VPCTypeName ResourceTypeName = "vpc" // CPUTypeName is the resource type name of a CPU CPUTypeName ResourceTypeName = "cpu" // MemoryTypeName is the resource type name of Memory MemoryTypeName ResourceTypeName = "memory" // PrimaryStorageTypeName is the resource type name of primary storage PrimaryStorageTypeName ResourceTypeName = "primary_storage" // SecondaryStorageTypeName is the resource type name of secondary storage SecondaryStorageTypeName ResourceTypeName = "secondary_storage" )
type RestartNetwork ¶ added in v0.9.0
type RestartNetwork struct { ID *UUID `json:"id" doc:"The id of the network to restart."` Cleanup *bool `json:"cleanup,omitempty" doc:"If cleanup old network elements"` // contains filtered or unexported fields }
RestartNetwork (Async) updates a network
type RestoreVirtualMachine ¶ added in v0.9.0
type RestoreVirtualMachine struct { VirtualMachineID *UUID `json:"virtualmachineid" doc:"Virtual Machine ID"` TemplateID *UUID `` /* 157-byte string literal not displayed */ RootDiskSize int64 `` /* 142-byte string literal not displayed */ // contains filtered or unexported fields }
RestoreVirtualMachine (Async) represents the restoration of the virtual machine
type RetryStrategyFunc ¶ added in v0.9.11
RetryStrategyFunc represents a how much time to wait between two calls to CloudStack
func MonotonicRetryStrategyFunc ¶ added in v0.9.26
func MonotonicRetryStrategyFunc(seconds int) RetryStrategyFunc
MonotonicRetryStrategyFunc returns a function that waits for n seconds for each iteration
type ReverseDNS ¶ added in v0.10.1
type ReverseDNS struct { DomainName string `json:"domainname,omitempty" doc:"the domain name of the PTR record"` IP6Address net.IP `json:"ip6address,omitempty" doc:"the IPv6 address linked with the PTR record (mutually exclusive with ipaddress)"` IPAddress net.IP `json:"ipaddress,omitempty" doc:"the IPv4 address linked with the PTR record (mutually exclusive with ip6address)"` NicID *UUID `json:"nicid,omitempty" doc:"the virtual machine default NIC ID"` PublicIPID *UUID `json:"publicipid,omitempty" doc:"the public IP address ID"` VirtualMachineID *UUID `json:"virtualmachineid,omitempty" doc:"the virtual machine ID"` }
ReverseDNS represents the PTR record linked with an IPAddress or IP6Address belonging to a Virtual Machine or a Public IP Address (Elastic IP) instance
type RevertSnapshot ¶ added in v0.9.0
type RevertSnapshot struct { ID *UUID `json:"id" doc:"The ID of the snapshot"` // contains filtered or unexported fields }
RevertSnapshot (Async) reverts a volume snapshot
type RevokeSecurityGroupEgress ¶ added in v0.9.0
type RevokeSecurityGroupEgress struct { ID *UUID `json:"id" doc:"The ID of the egress rule"` // contains filtered or unexported fields }
RevokeSecurityGroupEgress (Async) represents the ingress/egress rule deletion
type RevokeSecurityGroupIngress ¶ added in v0.9.0
type RevokeSecurityGroupIngress struct { ID *UUID `json:"id" doc:"The ID of the ingress rule"` // contains filtered or unexported fields }
RevokeSecurityGroupIngress (Async) represents the ingress/egress rule deletion
type SSHKeyPair ¶
type SSHKeyPair struct { Fingerprint string `json:"fingerprint,omitempty" doc:"Fingerprint of the public key"` Name string `json:"name,omitempty" doc:"Name of the keypair"` PrivateKey string `json:"privatekey,omitempty" doc:"Private key"` }
SSHKeyPair represents an SSH key pair
func (SSHKeyPair) Delete ¶ added in v0.9.12
func (ssh SSHKeyPair) Delete(ctx context.Context, client *Client) error
Delete removes the given SSH key, by Name
func (SSHKeyPair) ListRequest ¶ added in v0.9.19
func (ssh SSHKeyPair) ListRequest() (ListCommand, error)
ListRequest builds the ListSSHKeyPairs request
type ScaleVirtualMachine ¶ added in v0.9.0
type ScaleVirtualMachine struct { ID *UUID `json:"id" doc:"The ID of the virtual machine"` ServiceOfferingID *UUID `json:"serviceofferingid" doc:"the ID of the service offering for the virtual machine"` Details map[string]string `` /* 128-byte string literal not displayed */ // contains filtered or unexported fields }
ScaleVirtualMachine (Async) scales the virtual machine to a new service offering.
ChangeServiceForVirtualMachine does the same thing but returns the new Virtual Machine which is more consistent with the rest of the API.
type SecurityGroup ¶
type SecurityGroup struct { Account string `json:"account,omitempty" doc:"the account owning the security group"` Description string `json:"description,omitempty" doc:"the description of the security group"` Domain string `json:"domain,omitempty" doc:"the domain name of the security group"` DomainID *UUID `json:"domainid,omitempty" doc:"the domain ID of the security group"` EgressRule []EgressRule `json:"egressrule,omitempty" doc:"the list of egress rules associated with the security group"` ID *UUID `json:"id,omitempty" doc:"the ID of the security group"` IngressRule []IngressRule `json:"ingressrule,omitempty" doc:"the list of ingress rules associated with the security group"` Name string `json:"name,omitempty" doc:"the name of the security group"` }
SecurityGroup represent a firewalling set of rules
func (SecurityGroup) Delete ¶ added in v0.9.12
func (sg SecurityGroup) Delete(ctx context.Context, client *Client) error
Delete deletes the given Security Group
func (SecurityGroup) ListRequest ¶ added in v0.9.21
func (sg SecurityGroup) ListRequest() (ListCommand, error)
ListRequest builds the ListSecurityGroups request
func (SecurityGroup) RuleByID ¶ added in v0.9.22
func (sg SecurityGroup) RuleByID(ruleID UUID) (*IngressRule, *EgressRule)
RuleByID returns IngressRule or EgressRule by a rule ID
func (SecurityGroup) UserSecurityGroup ¶ added in v0.10.1
func (sg SecurityGroup) UserSecurityGroup() UserSecurityGroup
UserSecurityGroup converts a SecurityGroup to a UserSecurityGroup
type Service ¶ added in v0.9.0
type Service struct { Capability []ServiceCapability `json:"capability,omitempty"` Name string `json:"name"` Provider []ServiceProvider `json:"provider,omitempty"` }
Service is a feature of a network
type ServiceCapability ¶ added in v0.9.0
type ServiceCapability struct { CanChooseServiceCapability bool `json:"canchooseservicecapability"` Name string `json:"name"` Value string `json:"value"` }
ServiceCapability represents optional capability of a service
type ServiceOffering ¶
type ServiceOffering struct { Authorized bool `json:"authorized,omitempty" doc:"is the account/domain authorized to use this service offering"` CPUNumber int `json:"cpunumber,omitempty" doc:"the number of CPU"` CPUSpeed int `json:"cpuspeed,omitempty" doc:"the clock rate CPU speed in Mhz"` Created string `json:"created,omitempty" doc:"the date this service offering was created"` DefaultUse bool `json:"defaultuse,omitempty" doc:"is this a default system vm offering"` DeploymentPlanner string `json:"deploymentplanner,omitempty" doc:"deployment strategy used to deploy VM."` DiskBytesReadRate int64 `json:"diskBytesReadRate,omitempty" doc:"bytes read rate of the service offering"` DiskBytesWriteRate int64 `json:"diskBytesWriteRate,omitempty" doc:"bytes write rate of the service offering"` DiskIopsReadRate int64 `json:"diskIopsReadRate,omitempty" doc:"io requests read rate of the service offering"` DiskIopsWriteRate int64 `json:"diskIopsWriteRate,omitempty" doc:"io requests write rate of the service offering"` Displaytext string `json:"displaytext,omitempty" doc:"an alternate display text of the service offering."` Domain string `json:"domain,omitempty" doc:"Domain name for the offering"` DomainID *UUID `json:"domainid,omitempty" doc:"the domain id of the service offering"` HostTags string `json:"hosttags,omitempty" doc:"the host tag for the service offering"` HypervisorSnapshotReserve int `` /* 149-byte string literal not displayed */ ID *UUID `json:"id,omitempty" doc:"the id of the service offering"` IsCustomized bool `json:"iscustomized,omitempty" doc:"is true if the offering is customized"` IsCustomizedIops bool `json:"iscustomizediops,omitempty" doc:"true if disk offering uses custom iops, false otherwise"` IsSystem bool `json:"issystem,omitempty" doc:"is this a system vm offering"` IsVolatile bool `` /* 158-byte string literal not displayed */ LimitCPUUse bool `json:"limitcpuuse,omitempty" doc:"restrict the CPU usage to committed service offering"` MaxIops int64 `json:"maxiops,omitempty" doc:"the max iops of the disk offering"` Memory int `json:"memory,omitempty" doc:"the memory in MB"` MinIops int64 `json:"miniops,omitempty" doc:"the min iops of the disk offering"` Name string `json:"name,omitempty" doc:"the name of the service offering"` NetworkRate int `json:"networkrate,omitempty" doc:"data transfer rate in megabits per second allowed."` OfferHA bool `json:"offerha,omitempty" doc:"the ha support in the service offering"` Restricted bool `json:"restricted,omitempty" doc:"is this offering restricted"` ServiceOfferingDetails map[string]string `json:"serviceofferingdetails,omitempty" doc:"additional key/value details tied with this service offering"` StorageType string `json:"storagetype,omitempty" doc:"the storage type for this service offering"` SystemVMType string `json:"systemvmtype,omitempty" doc:"is this a the systemvm type for system vm offering"` Tags string `json:"tags,omitempty" doc:"the tags for the service offering"` }
ServiceOffering corresponds to the Compute Offerings
A service offering correspond to some hardware features (CPU, RAM).
func (ServiceOffering) ListRequest ¶ added in v0.9.24
func (so ServiceOffering) ListRequest() (ListCommand, error)
ListRequest builds the ListSecurityGroups request
type ServiceProvider ¶ added in v0.9.0
type ServiceProvider struct { CanEnableIndividualService bool `json:"canenableindividualservice"` DestinationPhysicalNetworkID *UUID `json:"destinationphysicalnetworkid"` ID *UUID `json:"id"` Name string `json:"name"` PhysicalNetworkID *UUID `json:"physicalnetworkid"` ServiceList []string `json:"servicelist,omitempty"` }
ServiceProvider represents the provider of the service
type Snapshot ¶ added in v0.9.0
type Snapshot struct { Account string `json:"account,omitempty" doc:"the account associated with the snapshot"` AccountID *UUID `json:"accountid,omitempty" doc:"the account ID associated with the snapshot"` Created string `json:"created,omitempty" doc:"the date the snapshot was created"` Domain string `json:"domain,omitempty" doc:"the domain name of the snapshot's account"` DomainID *UUID `json:"domainid,omitempty" doc:"the domain ID of the snapshot's account"` ID *UUID `json:"id,omitempty" doc:"ID of the snapshot"` IntervalType string `json:"intervaltype,omitempty" doc:"valid types are hourly, daily, weekly, monthy, template, and none."` Name string `json:"name,omitempty" doc:"name of the snapshot"` PhysicalSize int64 `json:"physicalsize,omitempty" doc:"physical size of the snapshot on image store"` Revertable *bool `json:"revertable,omitempty" doc:"indicates whether the underlying storage supports reverting the volume to this snapshot"` Size int64 `json:"size,omitempty" doc:"the size of original volume"` SnapshotType string `json:"snapshottype,omitempty" doc:"the type of the snapshot"` State string `` /* 237-byte string literal not displayed */ Tags []ResourceTag `json:"tags,omitempty" doc:"the list of resource tags associated with snapshot"` VolumeID *UUID `json:"volumeid,omitempty" doc:"ID of the disk volume"` VolumeName string `json:"volumename,omitempty" doc:"name of the disk volume"` VolumeType string `json:"volumetype,omitempty" doc:"type of the disk volume"` ZoneID *UUID `json:"zoneid,omitempty" doc:"id of the availability zone"` }
Snapshot represents a volume snapshot
func (Snapshot) ResourceType ¶ added in v0.9.7
ResourceType returns the type of the resource
type SnapshotState ¶ added in v0.9.24
type SnapshotState string
SnapshotState represents the Snapshot.State enum
See: https://github.com/apache/cloudstack/blob/master/api/src/main/java/com/cloud/storage/Snapshot.java
const ( // Allocated ... (TODO) Allocated SnapshotState = "Allocated" // Creating ... (TODO) Creating SnapshotState = "Creating" // CreatedOnPrimary ... (TODO) CreatedOnPrimary SnapshotState = "CreatedOnPrimary" // BackingUp ... (TODO) BackingUp SnapshotState = "BackingUp" // BackedUp ... (TODO) BackedUp SnapshotState = "BackedUp" // Copying ... (TODO) Copying SnapshotState = "Copying" // Destroying ... (TODO) Destroying SnapshotState = "Destroying" // Destroyed ... (TODO) Destroyed SnapshotState = "Destroyed" // Error is a state where the user can't see the snapshot while the snapshot may still exist on the storage Error SnapshotState = "Error" )
type StartVirtualMachine ¶ added in v0.9.0
type StartVirtualMachine struct { ID *UUID `json:"id" doc:"The ID of the virtual machine"` DeploymentPlanner string `json:"deploymentplanner,omitempty" doc:"Deployment planner to use for vm allocation. Available to ROOT admin only"` HostID *UUID `json:"hostid,omitempty" doc:"destination Host ID to deploy the VM to - parameter available for root admin only"` // contains filtered or unexported fields }
StartVirtualMachine (Async) represents the creation of the virtual machine
type StopVirtualMachine ¶ added in v0.9.0
type StopVirtualMachine struct { ID *UUID `json:"id" doc:"The ID of the virtual machine"` Forced *bool `` /* 161-byte string literal not displayed */ // contains filtered or unexported fields }
StopVirtualMachine (Async) represents the stopping of the virtual machine
type Taggable ¶ added in v0.9.7
type Taggable interface { // CloudStack resource type of the Taggable type ResourceType() string }
Taggable represents a resource which can have tags attached
This is a helper to fill the resourcetype of a CreateTags call
type Template ¶
type Template struct { Account string `json:"account,omitempty" doc:"the account name to which the template belongs"` AccountID *UUID `json:"accountid,omitempty" doc:"the account id to which the template belongs"` Bootable bool `json:"bootable,omitempty" doc:"true if the ISO is bootable, false otherwise"` Checksum string `json:"checksum,omitempty" doc:"checksum of the template"` Created string `json:"created,omitempty" doc:"the date this template was created"` CrossZones bool `json:"crossZones,omitempty" doc:"true if the template is managed across all Zones, false otherwise"` Details map[string]string `json:"details,omitempty" doc:"additional key/value details tied with template"` DisplayText string `json:"displaytext,omitempty" doc:"the template display text"` Domain string `json:"domain,omitempty" doc:"the name of the domain to which the template belongs"` DomainID *UUID `json:"domainid,omitempty" doc:"the ID of the domain to which the template belongs"` Format string `json:"format,omitempty" doc:"the format of the template."` HostID *UUID `json:"hostid,omitempty" doc:"the ID of the secondary storage host for the template"` HostName string `json:"hostname,omitempty" doc:"the name of the secondary storage host for the template"` Hypervisor string `json:"hypervisor,omitempty" doc:"the hypervisor on which the template runs"` ID *UUID `json:"id,omitempty" doc:"the template ID"` IsDynamicallyScalable bool `` /* 138-byte string literal not displayed */ IsExtractable bool `json:"isextractable,omitempty" doc:"true if the template is extractable, false otherwise"` IsFeatured bool `json:"isfeatured,omitempty" doc:"true if this template is a featured template, false otherwise"` IsPublic bool `json:"ispublic,omitempty" doc:"true if this template is a public template, false otherwise"` IsReady bool `json:"isready,omitempty" doc:"true if the template is ready to be deployed from, false otherwise."` Name string `json:"name,omitempty" doc:"the template name"` OsTypeID *UUID `json:"ostypeid,omitempty" doc:"the ID of the OS type for this template."` OsTypeName string `json:"ostypename,omitempty" doc:"the name of the OS type for this template."` PasswordEnabled bool `json:"passwordenabled,omitempty" doc:"true if the reset password feature is enabled, false otherwise"` Removed string `json:"removed,omitempty" doc:"the date this template was removed"` Size int64 `json:"size,omitempty" doc:"the size of the template"` SourceTemplateID *UUID `json:"sourcetemplateid,omitempty" doc:"the template ID of the parent template if present"` SSHKeyEnabled bool `json:"sshkeyenabled,omitempty" doc:"true if template is sshkey enabled, false otherwise"` Status string `json:"status,omitempty" doc:"the status of the template"` Tags []ResourceTag `json:"tags,omitempty" doc:"the list of resource tags associated with tempate"` TemplateDirectory string `json:"templatedirectory,omitempty" doc:"Template directory"` TemplateTag string `json:"templatetag,omitempty" doc:"the tag of this template"` TemplateType string `json:"templatetype,omitempty" doc:"the type of the template"` URL string `json:"url,omitempty" doc:"Original URL of the template where it was downloaded"` ZoneID *UUID `json:"zoneid,omitempty" doc:"the ID of the zone for this template"` ZoneName string `json:"zonename,omitempty" doc:"the name of the zone for this template"` }
Template represents a machine to be deployed
See: http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/latest/templates.html
func (Template) ListRequest ¶ added in v0.9.20
func (temp Template) ListRequest() (ListCommand, error)
ListRequest builds the ListTemplates request
func (Template) ResourceType ¶ added in v0.9.7
ResourceType returns the type of the resource
type UUID ¶ added in v0.11.0
type UUID struct {
uuid.UUID
}
UUID holds a UUID v4
func MustParseUUID ¶ added in v0.11.0
MustParseUUID acts like ParseUUID but panic in case of a failure
func (UUID) MarshalJSON ¶ added in v0.11.0
MarshalJSON converts the UUID to a string representation
func (*UUID) UnmarshalJSON ¶ added in v0.11.0
UnmarshalJSON unmarshals the raw JSON into the MAC address
type UUIDItem ¶ added in v0.9.9
type UUIDItem struct { Description string `json:"description,omitempty"` SerialVersionUID int64 `json:"serialVersionUID,omitempty"` UUID string `json:"uuid"` }
UUIDItem represents an item of the UUIDList part of an ErrorResponse
type UpdateDNSRecord ¶ added in v0.9.28
type UpdateDNSRecord struct { ID int64 `json:"id,omitempty"` DomainID int64 `json:"domain_id,omitempty"` Name string `json:"name,omitempty"` TTL int `json:"ttl,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` Content string `json:"content,omitempty"` RecordType string `json:"record_type,omitempty"` Prio int `json:"prio,omitempty"` }
UpdateDNSRecord represents a DNS record
type UpdateDNSRecordResponse ¶ added in v0.9.28
type UpdateDNSRecordResponse struct {
Record UpdateDNSRecord `json:"record"`
}
UpdateDNSRecordResponse represents the creation of a DNS record
type UpdateDefaultNicForVirtualMachine ¶ added in v0.9.0
type UpdateDefaultNicForVirtualMachine struct { NicID *UUID `json:"nicid" doc:"NIC ID"` VirtualMachineID *UUID `json:"virtualmachineid" doc:"Virtual Machine ID"` // contains filtered or unexported fields }
UpdateDefaultNicForVirtualMachine (Async) adds a NIC to a VM
type UpdateHost ¶ added in v0.10.0
type UpdateHost struct { Allocationstate string `` /* 172-byte string literal not displayed */ HostTags []string `json:"hosttags,omitempty" doc:"list of tags to be added to the host"` ID *UUID `json:"id" doc:"the ID of the host to update"` OSCategoryID *UUID `json:"oscategoryid,omitempty" doc:"the id of Os category to update the host with"` URL string `json:"url,omitempty" doc:"the new uri for the secondary storage: nfs://host/path"` // contains filtered or unexported fields }
UpdateHost changes the resources state of a host
type UpdateIPAddress ¶ added in v0.9.0
type UpdateIPAddress struct { ID *UUID `json:"id" doc:"the id of the public ip address to update"` CustomID *UUID `` /* 131-byte string literal not displayed */ ForDisplay *bool `json:"fordisplay,omitempty" doc:"an optional field, whether to the display the ip to the end user or not"` // contains filtered or unexported fields }
UpdateIPAddress (Async) represents the IP modification
type UpdateInstanceGroup ¶ added in v0.9.7
type UpdateInstanceGroup struct { ID *UUID `json:"id" doc:"Instance group ID"` Name string `json:"name,omitempty" doc:"new instance group name"` // contains filtered or unexported fields }
UpdateInstanceGroup updates a VM group
type UpdateNetwork ¶ added in v0.9.0
type UpdateNetwork struct { ChangeCIDR *bool `json:"changecidr,omitempty" doc:"Force update even if cidr type is different"` CustomID *UUID `` /* 131-byte string literal not displayed */ DisplayNetwork *bool `json:"displaynetwork,omitempty" doc:"an optional field, whether to the display the network to the end user or not."` DisplayText string `json:"displaytext,omitempty" doc:"the new display text for the network"` EndIP net.IP `json:"endip,omitempty" doc:"the ending IP address in the network IP range. Required for managed networks."` GuestVMCIDR *CIDR `json:"guestvmcidr,omitempty" doc:"CIDR for Guest VMs,Cloudstack allocates IPs to Guest VMs only from this CIDR"` ID *UUID `json:"id" doc:"the ID of the network"` Name string `json:"name,omitempty" doc:"the new name for the network"` Netmask net.IP `json:"netmask,omitempty" doc:"the netmask of the network. Required for managed networks."` NetworkDomain string `json:"networkdomain,omitempty" doc:"network domain"` NetworkOfferingID *UUID `json:"networkofferingid,omitempty" doc:"network offering ID"` StartIP net.IP `json:"startip,omitempty" doc:"the beginning IP address in the network IP range. Required for managed networks."` // contains filtered or unexported fields }
UpdateNetwork (Async) updates a network
type UpdateNetworkOffering ¶ added in v0.9.22
type UpdateNetworkOffering struct { Availability string `` /* 178-byte string literal not displayed */ DisplayText string `json:"displaytext,omitempty" doc:"the display text of the network offering"` ID *UUID `json:"id,omitempty" doc:"the id of the network offering"` KeepAliveEnabled *bool `` /* 227-byte string literal not displayed */ MaxConnections int `json:"maxconnections,omitempty" doc:"maximum number of concurrent connections supported by the network offering"` Name string `json:"name,omitempty" doc:"the name of the network offering"` SortKey int `json:"sortkey,omitempty" doc:"sort key of the network offering, integer"` State string `json:"state,omitempty" doc:"update state for the network offering"` // contains filtered or unexported fields }
UpdateNetworkOffering represents a modification of a network offering
type UpdateResourceLimit ¶ added in v0.9.24
type UpdateResourceLimit struct { Account string `json:"account,omitempty" doc:"Update resource for a specified account. Must be used with the domainid parameter."` DomainID string `` /* 197-byte string literal not displayed */ Max int64 `json:"max,omitempty" doc:"Maximum resource limit."` ResourceType ResourceType `` /* 733-byte string literal not displayed */ // contains filtered or unexported fields }
UpdateResourceLimit updates the resource limit
type UpdateResourceLimitResponse ¶ added in v0.9.24
type UpdateResourceLimitResponse struct {
ResourceLimit ResourceLimit `json:"resourcelimit"`
}
UpdateResourceLimitResponse represents an updated resource limit
type UpdateReverseDNSForPublicIPAddress ¶ added in v0.10.1
type UpdateReverseDNSForPublicIPAddress struct { DomainName string `json:"domainname,omitempty" doc:"the domain name for the PTR record. It must have a valid TLD"` ID *UUID `json:"id,omitempty" doc:"the ID of the public IP address"` // contains filtered or unexported fields }
UpdateReverseDNSForPublicIPAddress is a command to create/update the PTR record of a public IP address
type UpdateReverseDNSForVirtualMachine ¶ added in v0.10.1
type UpdateReverseDNSForVirtualMachine struct { DomainName string `json:"domainname,omitempty" doc:"the domain name for the PTR record(s). It must have a valid TLD"` ID *UUID `json:"id,omitempty" doc:"the ID of the virtual machine"` // contains filtered or unexported fields }
UpdateReverseDNSForVirtualMachine is a command to create/update the PTR record(s) of a virtual machine
type UpdateTemplate ¶ added in v0.9.24
type UpdateTemplate struct { Bootable *bool `json:"bootable,omitempty" doc:"true if image is bootable, false otherwise"` Details map[string]string `json:"details,omitempty" doc:"Details in key/value pairs."` DisplayText string `json:"displaytext,omitempty" doc:"the display text of the image"` Format string `json:"format,omitempty" doc:"the format for the image"` ID *UUID `json:"id" doc:"the ID of the image file"` IsDynamicallyScalable *bool `` /* 142-byte string literal not displayed */ IsRouting *bool `json:"isrouting,omitempty" doc:"true if the template type is routing i.e., if template is used to deploy router"` Name string `json:"name,omitempty" doc:"the name of the image file"` OsTypeID *UUID `json:"ostypeid,omitempty" doc:"the ID of the OS type that best represents the OS of this image."` PasswordEnabled *bool `json:"passwordenabled,omitempty" doc:"true if the image supports the password reset feature; default is false"` SortKey int `json:"sortkey,omitempty" doc:"sort key of the template, integer"` // contains filtered or unexported fields }
UpdateTemplate represents a template change
type UpdateUser ¶ added in v0.9.22
type UpdateUser struct { ID *UUID `json:"id" doc:"User uuid"` Email string `json:"email,omitempty" doc:"email"` FirstName string `json:"firstname,omitempty" doc:"first name"` LastName string `json:"lastname,omitempty" doc:"last name"` Password string `` /* 187-byte string literal not displayed */ Timezone string `` /* 140-byte string literal not displayed */ UserAPIKey string `json:"userapikey,omitempty" doc:"The API key for the user. Must be specified with userSecretKey"` UserName string `json:"username,omitempty" doc:"Unique username"` UserSecretKey string `json:"usersecretkey,omitempty" doc:"The secret key for the user. Must be specified with userApiKey"` // contains filtered or unexported fields }
UpdateUser represents the modification of a User
type UpdateVMAffinityGroup ¶ added in v0.9.0
type UpdateVMAffinityGroup struct { ID *UUID `json:"id" doc:"The ID of the virtual machine"` AffinityGroupIDs []UUID `` /* 269-byte string literal not displayed */ AffinityGroupNames []string `` /* 272-byte string literal not displayed */ // contains filtered or unexported fields }
UpdateVMAffinityGroup (Async) represents a modification of a (anti-)affinity group
type UpdateVMNicIP ¶ added in v0.11.5
type UpdateVMNicIP struct { IPAddress net.IP `` /* 202-byte string literal not displayed */ NicID *UUID `json:"nicid" doc:"the ID of the nic."` // contains filtered or unexported fields }
UpdateVMNicIP updates the default IP address of a VM Nic
type UpdateVirtualMachine ¶ added in v0.9.0
type UpdateVirtualMachine struct { ID *UUID `json:"id" doc:"The ID of the virtual machine"` CustomID *UUID `` /* 131-byte string literal not displayed */ Details map[string]string `json:"details,omitempty" doc:"Details in key/value pairs."` DisplayName string `json:"displayname,omitempty" doc:"user generated name"` DisplayVM *bool `json:"displayvm,omitempty" doc:"an optional field, whether to the display the vm to the end user or not."` Group string `json:"group,omitempty" doc:"group of the virtual machine"` HAEnable *bool `json:"haenable,omitempty" doc:"true if high-availability is enabled for the virtual machine, false otherwise"` IsDynamicallyScalable *bool `` /* 132-byte string literal not displayed */ Name string `json:"name,omitempty" doc:"new host name of the vm. The VM has to be stopped/started for this update to take affect"` SecurityGroupIDs []UUID `json:"securitygroupids,omitempty" doc:"list of security group ids to be applied on the virtual machine."` UserData string `` /* 372-byte string literal not displayed */ // contains filtered or unexported fields }
UpdateVirtualMachine represents the update of the virtual machine
type User ¶ added in v0.9.7
type User struct { APIKey string `json:"apikey,omitempty" doc:"the api key of the user"` Account string `json:"account,omitempty" doc:"the account name of the user"` AccountID *UUID `json:"accountid,omitempty" doc:"the account ID of the user"` AccountType int16 `json:"accounttype,omitempty" doc:"the account type of the user"` Created string `json:"created,omitempty" doc:"the date and time the user account was created"` Domain string `json:"domain,omitempty" doc:"the domain name of the user"` DomainID *UUID `json:"domainid,omitempty" doc:"the domain ID of the user"` Email string `json:"email,omitempty" doc:"the user email address"` FirstName string `json:"firstname,omitempty" doc:"the user firstname"` ID *UUID `json:"id,omitempty" doc:"the user ID"` IsCallerChildDomain bool `json:"iscallerchilddomain,omitempty" doc:"the boolean value representing if the updating target is in caller's child domain"` IsDefault bool `json:"isdefault,omitempty" doc:"true if user is default, false otherwise"` LastName string `json:"lastname,omitempty" doc:"the user lastname"` RoleID *UUID `json:"roleid,omitempty" doc:"the ID of the role"` RoleName string `json:"rolename,omitempty" doc:"the name of the role"` RoleType string `json:"roletype,omitempty" doc:"the type of the role"` SecretKey string `json:"secretkey,omitempty" doc:"the secret key of the user"` State string `json:"state,omitempty" doc:"the user state"` Timezone string `json:"timezone,omitempty" doc:"the timezone user was created in"` UserName string `json:"username,omitempty" doc:"the user name"` }
User represents a User
type UserSecurityGroup ¶
type UserSecurityGroup struct { Group string `json:"group,omitempty"` Account string `json:"account,omitempty"` }
UserSecurityGroup represents the traffic of another security group
func (UserSecurityGroup) String ¶ added in v0.10.4
func (usg UserSecurityGroup) String() string
String gives the UserSecurityGroup name
type VirtualMachine ¶
type VirtualMachine struct { Account string `json:"account,omitempty" doc:"the account associated with the virtual machine"` AccountID *UUID `json:"accountid,omitempty" doc:"the account ID associated with the virtual machine"` AffinityGroup []AffinityGroup `json:"affinitygroup,omitempty" doc:"list of affinity groups associated with the virtual machine"` ClusterID *UUID `json:"clusterid,omitempty" doc:"the ID of the vm's cluster"` ClusterName string `json:"clustername,omitempty" doc:"the name of the vm's cluster"` CPUNumber int `json:"cpunumber,omitempty" doc:"the number of cpu this virtual machine is running with"` CPUSpeed int `json:"cpuspeed,omitempty" doc:"the speed of each cpu"` CPUUsed string `json:"cpuused,omitempty" doc:"the amount of the vm's CPU currently used"` Created string `json:"created,omitempty" doc:"the date when this virtual machine was created"` Details map[string]string `json:"details,omitempty" doc:"Vm details in key/value pairs."` DiskIoRead int64 `json:"diskioread,omitempty" doc:"the read (io) of disk on the vm"` DiskIoWrite int64 `json:"diskiowrite,omitempty" doc:"the write (io) of disk on the vm"` DiskKbsRead int64 `json:"diskkbsread,omitempty" doc:"the read (bytes) of disk on the vm"` DiskKbsWrite int64 `json:"diskkbswrite,omitempty" doc:"the write (bytes) of disk on the vm"` DiskOfferingID *UUID `json:"diskofferingid,omitempty" doc:"the ID of the disk offering of the virtual machine"` DiskOfferingName string `json:"diskofferingname,omitempty" doc:"the name of the disk offering of the virtual machine"` DisplayName string `json:"displayname,omitempty" doc:"user generated name. The name of the virtual machine is returned if no displayname exists."` DisplayVM bool `json:"displayvm,omitempty" doc:"an optional field whether to the display the vm to the end user or not."` Domain string `json:"domain,omitempty" doc:"the name of the domain in which the virtual machine exists"` DomainID *UUID `json:"domainid,omitempty" doc:"the ID of the domain in which the virtual machine exists"` ForVirtualNetwork bool `json:"forvirtualnetwork,omitempty" doc:"the virtual network for the service offering"` Group string `json:"group,omitempty" doc:"the group name of the virtual machine"` GroupID *UUID `json:"groupid,omitempty" doc:"the group ID of the virtual machine"` HAEnable bool `json:"haenable,omitempty" doc:"true if high-availability is enabled, false otherwise"` HostID *UUID `json:"hostid,omitempty" doc:"the ID of the host for the virtual machine"` HostName string `json:"hostname,omitempty" doc:"the name of the host for the virtual machine"` Hypervisor string `json:"hypervisor,omitempty" doc:"the hypervisor on which the template runs"` ID *UUID `json:"id,omitempty" doc:"the ID of the virtual machine"` InstanceName string `json:"instancename,omitempty" doc:"instance name of the user vm; this parameter is returned to the ROOT admin only"` IsDynamicallyScalable bool `` /* 133-byte string literal not displayed */ IsoDisplayText string `json:"isodisplaytext,omitempty" doc:"an alternate display text of the ISO attached to the virtual machine"` IsoID *UUID `json:"isoid,omitempty" doc:"the ID of the ISO attached to the virtual machine"` IsoName string `json:"isoname,omitempty" doc:"the name of the ISO attached to the virtual machine"` KeyPair string `json:"keypair,omitempty" doc:"ssh key-pair"` Memory int `json:"memory,omitempty" doc:"the memory allocated for the virtual machine"` Name string `json:"name,omitempty" doc:"the name of the virtual machine"` NetworkKbsRead int64 `json:"networkkbsread,omitempty" doc:"the incoming network traffic on the vm"` NetworkKbsWrite int64 `json:"networkkbswrite,omitempty" doc:"the outgoing network traffic on the host"` Nic []Nic `json:"nic,omitempty" doc:"the list of nics associated with vm"` OSCategoryID *UUID `json:"oscategoryid,omitempty" doc:"Os category ID of the virtual machine"` OSCategoryName string `json:"oscategoryname,omitempty" doc:"Os category name of the virtual machine"` Password string `json:"password,omitempty" doc:"the password (if exists) of the virtual machine"` PasswordEnabled bool `json:"passwordenabled,omitempty" doc:"true if the password rest feature is enabled, false otherwise"` PCIDevices []PCIDevice `json:"pcidevices,omitempty" doc:"list of PCI devices"` PodID *UUID `json:"podid,omitempty" doc:"the ID of the vm's pod"` PodName string `json:"podname,omitempty" doc:"the name of the vm's pod"` PublicIP string `json:"publicip,omitempty" doc:"public IP address id associated with vm via Static nat rule"` PublicIPID *UUID `json:"publicipid,omitempty" doc:"public IP address id associated with vm via Static nat rule"` RootDeviceID int64 `json:"rootdeviceid,omitempty" doc:"device ID of the root volume"` RootDeviceType string `json:"rootdevicetype,omitempty" doc:"device type of the root volume"` SecurityGroup []SecurityGroup `json:"securitygroup,omitempty" doc:"list of security groups associated with the virtual machine"` ServiceOfferingID *UUID `json:"serviceofferingid,omitempty" doc:"the ID of the service offering of the virtual machine"` ServiceOfferingName string `json:"serviceofferingname,omitempty" doc:"the name of the service offering of the virtual machine"` ServiceState string `json:"servicestate,omitempty" doc:"State of the Service from LB rule"` State string `json:"state,omitempty" doc:"the state of the virtual machine"` Tags []ResourceTag `json:"tags,omitempty" doc:"the list of resource tags associated with vm"` TemplateDisplayText string `json:"templatedisplaytext,omitempty" doc:"an alternate display text of the template for the virtual machine"` TemplateID *UUID `` /* 151-byte string literal not displayed */ TemplateName string `json:"templatename,omitempty" doc:"the name of the template for the virtual machine"` ZoneID *UUID `json:"zoneid,omitempty" doc:"the ID of the availablility zone for the virtual machine"` ZoneName string `json:"zonename,omitempty" doc:"the name of the availability zone for the virtual machine"` }
VirtualMachine represents a virtual machine
See: http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/stable/virtual_machines.html
func (VirtualMachine) DefaultNic ¶ added in v0.9.10
func (vm VirtualMachine) DefaultNic() *Nic
DefaultNic returns the default nic
func (VirtualMachine) Delete ¶ added in v0.9.12
func (vm VirtualMachine) Delete(ctx context.Context, client *Client) error
Delete destroys the VM
func (VirtualMachine) IP ¶ added in v0.9.18
func (vm VirtualMachine) IP() *net.IP
IP returns the default nic IP address
func (VirtualMachine) ListRequest ¶ added in v0.9.18
func (vm VirtualMachine) ListRequest() (ListCommand, error)
ListRequest builds the ListVirtualMachines request
func (VirtualMachine) NicByID ¶ added in v0.9.2
func (vm VirtualMachine) NicByID(nicID UUID) *Nic
NicByID returns the corresponding interface base on its ID
func (VirtualMachine) NicByNetworkID ¶ added in v0.9.2
func (vm VirtualMachine) NicByNetworkID(networkID UUID) *Nic
NicByNetworkID returns the corresponding interface based on the given NetworkID
A VM cannot be connected twice to a same network.
func (VirtualMachine) NicsByType ¶ added in v0.9.2
func (vm VirtualMachine) NicsByType(nicType string) []Nic
NicsByType returns the corresponding interfaces base on the given type
func (VirtualMachine) ResourceType ¶ added in v0.9.7
func (VirtualMachine) ResourceType() string
ResourceType returns the type of the resource
type VirtualMachineState ¶ added in v0.11.0
type VirtualMachineState string
VirtualMachineState holds the state of the instance
https://github.com/apache/cloudstack/blob/master/api/src/main/java/com/cloud/vm/VirtualMachine.java
const ( // VirtualMachineStarting VM is being started. At this state, you should find host id filled which means it's being started on that host VirtualMachineStarting VirtualMachineState = "Starting" // VirtualMachineRunning VM is running. host id has the host that it is running on VirtualMachineRunning VirtualMachineState = "Running" // VirtualMachineStopping VM is being stopped. host id has the host that it is being stopped on VirtualMachineStopping VirtualMachineState = "Stopping" // VirtualMachineStopped VM is stopped. host id should be null VirtualMachineStopped VirtualMachineState = "Stopped" // VirtualMachineDestroyed VM is marked for destroy VirtualMachineDestroyed VirtualMachineState = "Destroyed" // VirtualMachineExpunging "VM is being expunged VirtualMachineExpunging VirtualMachineState = "Expunging" // VirtualMachineMigrating VM is being live migrated. host id holds destination host, last host id holds source host VirtualMachineMigrating VirtualMachineState = "Migrating" // VirtualMachineMoving VM is being migrated offline (volume is being moved). VirtualMachineMoving VirtualMachineState = "Moving" // VirtualMachineError VM is in error VirtualMachineError VirtualMachineState = "Error" // VirtualMachineUnknown VM state is unknown VirtualMachineUnknown VirtualMachineState = "Unknown" // VirtualMachineShutdowned VM is shutdowned from inside VirtualMachineShutdowned VirtualMachineState = "Shutdowned" )
type VirtualMachineUserData ¶ added in v0.9.25
type VirtualMachineUserData struct { UserData string `json:"userdata,omitempty" doc:"Base 64 encoded VM user data"` VirtualMachineID *UUID `json:"virtualmachineid,omitempty" doc:"the ID of the virtual machine"` }
VirtualMachineUserData represents the base64 encoded user-data
func (VirtualMachineUserData) Decode ¶ added in v0.9.25
func (userdata VirtualMachineUserData) Decode() (string, error)
Decode decodes as a readable string the content of the user-data (base64 · gzip)
type Volume ¶ added in v0.9.0
type Volume struct { Account string `json:"account,omitempty" doc:"the account associated with the disk volume"` Attached string `json:"attached,omitempty" doc:"the date the volume was attached to a VM instance"` ChainInfo string `json:"chaininfo,omitempty" doc:"the chain info of the volume"` ClusterID *UUID `json:"clusterid,omitempty" doc:"ID of the cluster"` ClusterName string `json:"clustername,omitempty" doc:"name of the cluster"` Created string `json:"created,omitempty" doc:"the date the disk volume was created"` Destroyed bool `json:"destroyed,omitempty" doc:"the boolean state of whether the volume is destroyed or not"` DeviceID int64 `` /* 143-byte string literal not displayed */ DiskBytesReadRate int64 `json:"diskBytesReadRate,omitempty" doc:"bytes read rate of the disk volume"` DiskBytesWriteRate int64 `json:"diskBytesWriteRate,omitempty" doc:"bytes write rate of the disk volume"` DiskIopsReadRate int64 `json:"diskIopsReadRate,omitempty" doc:"io requests read rate of the disk volume"` DiskIopsWriteRate int64 `json:"diskIopsWriteRate,omitempty" doc:"io requests write rate of the disk volume"` DiskOfferingDisplayText string `json:"diskofferingdisplaytext,omitempty" doc:"the display text of the disk offering"` DiskOfferingID *UUID `json:"diskofferingid,omitempty" doc:"ID of the disk offering"` DiskOfferingName string `json:"diskofferingname,omitempty" doc:"name of the disk offering"` DisplayVolume bool `json:"displayvolume,omitempty" doc:"an optional field whether to the display the volume to the end user or not."` Domain string `json:"domain,omitempty" doc:"the domain associated with the disk volume"` DomainID *UUID `json:"domainid,omitempty" doc:"the ID of the domain associated with the disk volume"` Hypervisor string `json:"hypervisor,omitempty" doc:"Hypervisor the volume belongs to"` ID *UUID `json:"id,omitempty" doc:"ID of the disk volume"` IsExtractable *bool `json:"isextractable,omitempty" doc:"true if the volume is extractable, false otherwise"` IsoDisplayText string `json:"isodisplaytext,omitempty" doc:"an alternate display text of the ISO attached to the virtual machine"` IsoID *UUID `json:"isoid,omitempty" doc:"the ID of the ISO attached to the virtual machine"` IsoName string `json:"isoname,omitempty" doc:"the name of the ISO attached to the virtual machine"` MaxIops int64 `json:"maxiops,omitempty" doc:"max iops of the disk volume"` MinIops int64 `json:"miniops,omitempty" doc:"min iops of the disk volume"` Name string `json:"name,omitempty" doc:"name of the disk volume"` Path string `json:"path,omitempty" doc:"the path of the volume"` PodID *UUID `json:"podid,omitempty" doc:"ID of the pod"` PodName string `json:"podname,omitempty" doc:"name of the pod"` QuiesceVM bool `json:"quiescevm,omitempty" doc:"need quiesce vm or not when taking snapshot"` ServiceOfferingDisplayText string `json:"serviceofferingdisplaytext,omitempty" doc:"the display text of the service offering for root disk"` ServiceOfferingID *UUID `json:"serviceofferingid,omitempty" doc:"ID of the service offering for root disk"` ServiceOfferingName string `json:"serviceofferingname,omitempty" doc:"name of the service offering for root disk"` Size uint64 `json:"size,omitempty" doc:"size of the disk volume"` SnapshotID *UUID `json:"snapshotid,omitempty" doc:"ID of the snapshot from which this volume was created"` State string `json:"state,omitempty" doc:"the state of the disk volume"` Status string `json:"status,omitempty" doc:"the status of the volume"` Storage string `json:"storage,omitempty" doc:"name of the primary storage hosting the disk volume"` StorageID *UUID `json:"storageid,omitempty" doc:"id of the primary storage hosting the disk volume; returned to admin user only"` StorageType string `json:"storagetype,omitempty" doc:"shared or local storage"` Tags []ResourceTag `json:"tags,omitempty" doc:"the list of resource tags associated with volume"` TemplateDisplayText string `json:"templatedisplaytext,omitempty" doc:"an alternate display text of the template for the virtual machine"` TemplateID string `` // no *UUID because of the -1 thingy... /* 151-byte string literal not displayed */ TemplateName string `json:"templatename,omitempty" doc:"the name of the template for the virtual machine"` Type string `json:"type,omitempty" doc:"type of the disk volume (ROOT or DATADISK)"` VirtualMachineID *UUID `json:"virtualmachineid,omitempty" doc:"id of the virtual machine"` VMDisplayName string `json:"vmdisplayname,omitempty" doc:"display name of the virtual machine"` VMName string `json:"vmname,omitempty" doc:"name of the virtual machine"` VMState string `json:"vmstate,omitempty" doc:"state of the virtual machine"` ZoneID *UUID `json:"zoneid,omitempty" doc:"ID of the availability zone"` ZoneName string `json:"zonename,omitempty" doc:"name of the availability zone"` }
Volume represents a volume linked to a VM
func (Volume) ListRequest ¶ added in v0.9.18
func (vol Volume) ListRequest() (ListCommand, error)
ListRequest builds the ListVolumes request
func (Volume) ResourceType ¶ added in v0.9.7
ResourceType returns the type of the resource
type WaitAsyncJobResultFunc ¶ added in v0.9.22
type WaitAsyncJobResultFunc func(*AsyncJobResult, error) bool
WaitAsyncJobResultFunc represents the callback to wait a results of an async request, if false stops
type Zone ¶
type Zone struct { AllocationState string `json:"allocationstate,omitempty" doc:"the allocation state of the cluster"` Description string `json:"description,omitempty" doc:"Zone description"` DhcpProvider string `json:"dhcpprovider,omitempty" doc:"the dhcp Provider for the Zone"` DisplayText string `json:"displaytext,omitempty" doc:"the display text of the zone"` DNS1 net.IP `json:"dns1,omitempty" doc:"the first DNS for the Zone"` DNS2 net.IP `json:"dns2,omitempty" doc:"the second DNS for the Zone"` Domain string `json:"domain,omitempty" doc:"Network domain name for the networks in the zone"` DomainID *UUID `json:"domainid,omitempty" doc:"the UUID of the containing domain, null for public zones"` DomainName string `json:"domainname,omitempty" doc:"the name of the containing domain, null for public zones"` GuestCIDRAddress *CIDR `json:"guestcidraddress,omitempty" doc:"the guest CIDR address for the Zone"` ID *UUID `json:"id,omitempty" doc:"Zone id"` InternalDNS1 net.IP `json:"internaldns1,omitempty" doc:"the first internal DNS for the Zone"` InternalDNS2 net.IP `json:"internaldns2,omitempty" doc:"the second internal DNS for the Zone"` IP6DNS1 net.IP `json:"ip6dns1,omitempty" doc:"the first IPv6 DNS for the Zone"` IP6DNS2 net.IP `json:"ip6dns2,omitempty" doc:"the second IPv6 DNS for the Zone"` LocalStorageEnabled *bool `json:"localstorageenabled,omitempty" doc:"true if local storage offering enabled, false otherwise"` Name string `json:"name,omitempty" doc:"Zone name"` NetworkType string `json:"networktype,omitempty" doc:"the network type of the zone; can be Basic or Advanced"` ResourceDetails map[string]string `json:"resourcedetails,omitempty" doc:"Meta data associated with the zone (key/value pairs)"` SecurityGroupsEnabled *bool `json:"securitygroupsenabled,omitempty" doc:"true if security groups support is enabled, false otherwise"` Tags []ResourceTag `json:"tags,omitempty" doc:"the list of resource tags associated with zone."` Vlan string `json:"vlan,omitempty" doc:"the vlan range of the zone"` ZoneToken string `json:"zonetoken,omitempty" doc:"Zone Token"` }
Zone represents a data center
TODO: represent correctly the capacity field.
func (Zone) ListRequest ¶ added in v0.9.18
func (zone Zone) ListRequest() (ListCommand, error)
ListRequest builds the ListZones request
Source Files
¶
- accounts.go
- accounttype_string.go
- addresses.go
- affinity_groups.go
- apis.go
- async_jobs.go
- cidr.go
- client.go
- copier.go
- cserrorcode_string.go
- dns.go
- doc.go
- errorcode_string.go
- events.go
- hosts.go
- jobstatustype_string.go
- limits.go
- macaddress.go
- network_offerings.go
- networks.go
- nics.go
- record_string.go
- request.go
- request_type.go
- resource_metadata.go
- reversedns.go
- security_groups.go
- serialization.go
- service_offerings.go
- snapshots.go
- ssh_keypairs.go
- tags.go
- templates.go
- users.go
- uuid.go
- version.go
- virtual_machines.go
- vm_groups.go
- volumes.go
- zones.go
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
cs
cs Inspired by its older brother cs (https://pypi.org/project/cs) a convenient and flexible client for CloudStack tailored for Exoscale infrastructure.
|
cs Inspired by its older brother cs (https://pypi.org/project/cs) a convenient and flexible client for CloudStack tailored for Exoscale infrastructure. |
v3
|
|
generator
Module
|