Documentation
¶
Overview ¶
Package egoscale is a mapping for the Exoscale API (https://community.exoscale.com/api/compute/).
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. If anything feels odd or unclear, please let us know: https://github.com/exoscale/egoscale/issues
req := &egoscale.DeployVirtualMachine{ Size: 10, ServiceOfferingID: egoscale.MustParseUUID("..."), TemplateID: egoscale.MustParseUUID("..."), ZoneID: egoscale.MastParseUUID("..."), } 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: egoscale.MustParseUUID("..."), TemplateID: egoscale.MustParseUUID("..."), ZoneID: egoscale.MustParseUUID("..."), } 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.com/v1", "EXO...", "...") // sets a logger on stderr cs.Logger = log.New(os.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, 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 a Logger.
APIs ¶
All the available APIs on the server and provided by the API Discovery plugin.
cs := egoscale.NewClient("https://api.exoscale.com/v1", "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: "Open HTTP/HTTPS ports from the outside world", }) securityGroup := resp.(*egoscale.SecurityGroup) resp, err = cs.Request(&egoscale.AuthorizeSecurityGroupIngress{ Description: "SSH traffic", SecurityGroupID: securityGroup.ID, CidrList: []CIDR{ *egoscale.MustParseCIDR("0.0.0.0/0"), *egoscale.MustParseCIDR("::/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 and Deletable).
// List all Security Groups sgs, _ := cs.List(&egoscale.SecurityGroup{}) for _, s := range sgs { sg := s.(egoscale.SecurityGroup) // ... } // Get a Security Group sgQuery := &egoscale.SecurityGroup{Name: "Load balancer"} resp, err := cs.Get(sgQuery); err != nil { ... } sg := resp.(*egoscale.SecurityGroup) if err := cs.Delete(sg); err != nil { ... } // The SecurityGroup has been deleted
See: https://community.exoscale.com/documentation/compute/security-groups/
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 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.
See: https://community.exoscale.com/documentation/compute/eip/
Index ¶
- Constants
- Variables
- func ExtractJSONTag(defaultName, jsonTag string) (string, bool)
- func FibonacciRetryStrategy(iteration int64) time.Duration
- type API
- type APIField
- type APIKey
- type APIKeyType
- type APIParam
- type Account
- type ActivateIP6
- type AddIPToNic
- type AddNicToVirtualMachine
- type AffinityGroup
- type AffinityGroupType
- type AntiAffinityGroup
- type AssociateIPAddress
- type AsyncCommand
- type AsyncJobResult
- type AttachISO
- type AuthorizeSecurityGroupEgress
- type AuthorizeSecurityGroupIngress
- type BooleanResponse
- type BucketUsage
- type CIDR
- type CSErrorCode
- type ChangeServiceForVirtualMachine
- type Client
- func (c *Client) APIDescription(command Command) string
- func (c *Client) APIName(command Command) string
- func (c *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(ctx context.Context, name string) (*DNSDomain, error)
- func (client *Client) CreateRecord(ctx context.Context, name string, rec DNSRecord) (*DNSRecord, error)
- func (client *Client) CreateRunstatusIncident(ctx context.Context, incident RunstatusIncident) (*RunstatusIncident, error)
- func (client *Client) CreateRunstatusMaintenance(ctx context.Context, maintenance RunstatusMaintenance) (*RunstatusMaintenance, error)
- func (client *Client) CreateRunstatusPage(ctx context.Context, page RunstatusPage) (*RunstatusPage, error)
- func (client *Client) CreateRunstatusService(ctx context.Context, service RunstatusService) (*RunstatusService, error)
- func (c *Client) Delete(g Deletable) error
- func (client *Client) DeleteDomain(ctx context.Context, name string) error
- func (client *Client) DeleteRecord(ctx context.Context, name string, recordID int64) error
- func (client *Client) DeleteRunstatusIncident(ctx context.Context, incident RunstatusIncident) error
- func (client *Client) DeleteRunstatusMaintenance(ctx context.Context, maintenance RunstatusMaintenance) error
- func (client *Client) DeleteRunstatusPage(ctx context.Context, page RunstatusPage) error
- func (client *Client) DeleteRunstatusService(ctx context.Context, service RunstatusService) error
- func (c *Client) DeleteWithContext(ctx context.Context, g Deletable) error
- func (c *Client) Do(req *http.Request) (*http.Response, error)
- func (c *Client) Get(ls Listable) (interface{}, error)
- func (client *Client) GetDomain(ctx context.Context, name string) (*DNSDomain, error)
- func (client *Client) GetDomains(ctx context.Context) ([]DNSDomain, error)
- func (client *Client) GetRecord(ctx context.Context, domain string, recordID int64) (*DNSRecord, error)
- func (client *Client) GetRecords(ctx context.Context, domain string) ([]DNSRecord, error)
- func (client *Client) GetRecordsWithFilters(ctx context.Context, domain, name, recordType string) ([]DNSRecord, error)
- func (client *Client) GetRunstatusIncident(ctx context.Context, incident RunstatusIncident) (*RunstatusIncident, error)
- func (client *Client) GetRunstatusMaintenance(ctx context.Context, maintenance RunstatusMaintenance) (*RunstatusMaintenance, error)
- func (client *Client) GetRunstatusPage(ctx context.Context, page RunstatusPage) (*RunstatusPage, error)
- func (client *Client) GetRunstatusService(ctx context.Context, service RunstatusService) (*RunstatusService, error)
- func (c *Client) GetWithContext(ctx context.Context, ls Listable) (interface{}, error)
- func (c *Client) List(g Listable) ([]interface{}, error)
- func (client *Client) ListRunstatusIncidents(ctx context.Context, page RunstatusPage) ([]RunstatusIncident, error)
- func (client *Client) ListRunstatusMaintenances(ctx context.Context, page RunstatusPage) ([]RunstatusMaintenance, error)
- func (client *Client) ListRunstatusPages(ctx context.Context) ([]RunstatusPage, error)
- func (client *Client) ListRunstatusServices(ctx context.Context, page RunstatusPage) ([]RunstatusService, error)
- func (c *Client) ListWithContext(ctx context.Context, g Listable) (s []interface{}, err error)
- func (c *Client) Paginate(g Listable, callback IterateItemFunc)
- func (client *Client) PaginateRunstatusIncidents(ctx context.Context, page RunstatusPage, ...)
- func (client *Client) PaginateRunstatusMaintenances(ctx context.Context, page RunstatusPage, ...)
- func (client *Client) PaginateRunstatusPages(ctx context.Context, callback func(pages []RunstatusPage, e error) bool)
- func (client *Client) PaginateRunstatusServices(ctx context.Context, page RunstatusPage, ...)
- func (c *Client) PaginateWithContext(ctx context.Context, g Listable, 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 (c *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 (c *Client) TraceOff()
- func (c *Client) TraceOn()
- func (client *Client) UpdateRecord(ctx context.Context, name string, rec UpdateDNSRecord) (*DNSRecord, error)
- func (client *Client) UpdateRunstatusIncident(ctx context.Context, incident RunstatusIncident, event RunstatusEvent) error
- func (client *Client) UpdateRunstatusMaintenance(ctx context.Context, maintenance RunstatusMaintenance, event RunstatusEvent) error
- type ClientOpt
- type Command
- type CommandInfo
- type CreateAPIKey
- type CreateAffinityGroup
- type CreateAntiAffinityGroup
- type CreateInstanceGroup
- type CreateInstancePool
- type CreateInstancePoolResponse
- type CreateNetwork
- type CreateSSHKeyPair
- type CreateSecurityGroup
- type CreateSnapshot
- type CreateTags
- type DNSDomain
- type DNSDomainResponse
- type DNSErrorResponse
- type DNSRecord
- type DNSRecordResponse
- type Deletable
- type DeleteAffinityGroup
- type DeleteAntiAffinityGroup
- type DeleteInstanceGroup
- type DeleteNetwork
- type DeleteReverseDNSFromPublicIPAddress
- type DeleteReverseDNSFromVirtualMachine
- type DeleteSSHKeyPair
- type DeleteSecurityGroup
- type DeleteSnapshot
- type DeleteTags
- type DeleteTemplate
- type DeployVirtualMachine
- type DestroyInstancePool
- type DestroyVirtualMachine
- type DetachISO
- type DisassociateIPAddress
- type EgressRule
- type ErrorCode
- type ErrorResponse
- type Event
- type EventType
- type EvictInstancePoolMembers
- type ExportSnapshot
- type ExportSnapshotResponse
- type ExpungeVirtualMachine
- type GetAPIKey
- type GetInstancePool
- type GetInstancePoolResponse
- type GetVMPassword
- type GetVirtualMachineUserData
- type Healthcheck
- type IPAddress
- type IPToNetwork
- type ISO
- type IngressRule
- type InstanceGroup
- type InstancePool
- type InstancePoolState
- type IterateItemFunc
- type JobStatusType
- type ListAPIKeyOperations
- type ListAPIKeyOperationsResponse
- type ListAPIKeys
- type ListAPIKeysResponse
- type ListAPIs
- type ListAPIsResponse
- type ListAccounts
- type ListAccountsResponse
- type ListAffinityGroupTypes
- type ListAffinityGroupTypesResponse
- type ListAffinityGroups
- type ListAffinityGroupsResponse
- type ListAntiAffinityGroups
- func (ListAntiAffinityGroups) Each(resp interface{}, callback IterateItemFunc)
- func (ls *ListAntiAffinityGroups) ListRequest() (ListCommand, error)
- func (ListAntiAffinityGroups) Response() interface{}
- func (ls *ListAntiAffinityGroups) SetPage(page int)
- func (ls *ListAntiAffinityGroups) SetPageSize(pageSize int)
- type ListAntiAffinityGroupsResponse
- type ListAsyncJobs
- type ListAsyncJobsResponse
- type ListBucketsUsage
- type ListBucketsUsageResponse
- type ListCommand
- type ListEventTypes
- type ListEventTypesResponse
- type ListEvents
- type ListEventsResponse
- type ListISOs
- type ListISOsResponse
- type ListInstanceGroups
- type ListInstanceGroupsResponse
- type ListInstancePools
- type ListInstancePoolsResponse
- type ListNetworks
- type ListNetworksResponse
- type ListNics
- type ListNicsResponse
- type ListOSCategories
- type ListOSCategoriesResponse
- type ListPublicIPAddresses
- func (ListPublicIPAddresses) Each(resp interface{}, callback IterateItemFunc)
- func (ls *ListPublicIPAddresses) ListRequest() (ListCommand, error)
- func (ListPublicIPAddresses) Response() interface{}
- func (ls *ListPublicIPAddresses) SetPage(page int)
- func (ls *ListPublicIPAddresses) SetPageSize(pageSize int)
- type ListPublicIPAddressesResponse
- type ListResourceDetails
- type ListResourceDetailsResponse
- type ListResourceLimits
- type ListResourceLimitsResponse
- type ListSSHKeyPairs
- type ListSSHKeyPairsResponse
- type ListSecurityGroups
- type ListSecurityGroupsResponse
- type ListServiceOfferings
- func (ListServiceOfferings) Each(resp interface{}, callback IterateItemFunc)
- func (ls *ListServiceOfferings) ListRequest() (ListCommand, error)
- func (ListServiceOfferings) Response() interface{}
- func (ls *ListServiceOfferings) SetPage(page int)
- func (ls *ListServiceOfferings) SetPageSize(pageSize int)
- 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 Network
- type Nic
- type NicSecondaryIP
- type OSCategory
- type PCIDevice
- type Password
- type QueryAsyncJobResult
- type QueryReverseDNSForPublicIPAddress
- type QueryReverseDNSForVirtualMachine
- type RebootVirtualMachine
- type Record
- type RecoverVirtualMachine
- type RegisterCustomTemplate
- type RegisterSSHKeyPair
- type RegisterUserKeys
- type RemoveIPFromNic
- type RemoveNicFromVirtualMachine
- type ResetPasswordForVirtualMachine
- type ResetSSHKeyForVirtualMachine
- type ResizeVolume
- type ResourceDetail
- type ResourceLimit
- type ResourceTag
- type ResourceType
- type ResourceTypeName
- type RestartNetwork
- type RestoreVirtualMachine
- type RetryStrategyFunc
- type ReverseDNS
- type RevertSnapshot
- type RevokeAPIKey
- type RevokeAPIKeyResponse
- type RevokeSecurityGroupEgress
- type RevokeSecurityGroupIngress
- type RunstatusErrorResponse
- type RunstatusEvent
- type RunstatusIncident
- type RunstatusIncidentList
- type RunstatusMaintenance
- type RunstatusMaintenanceList
- type RunstatusPage
- type RunstatusPageList
- type RunstatusService
- type RunstatusServiceList
- type RunstatusValidationErrorResponse
- type SSHKeyPair
- type ScaleInstancePool
- 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 UpdateIPAddress
- type UpdateInstanceGroup
- type UpdateInstancePool
- type UpdateNetwork
- type UpdateReverseDNSForPublicIPAddress
- type UpdateReverseDNSForVirtualMachine
- type UpdateVMAffinityGroup
- type UpdateVMNicIP
- type UpdateVirtualMachine
- type UpdateVirtualMachineSecurityGroups
- 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 ( // DefaultTimeout represents the default API client HTTP request timeout. DefaultTimeout = 60 * time.Second )
const Version = version.Version
Version of the library Deprecated: use the github.com/exoscale/egoscale/version package.
Variables ¶
var ErrAPIError = errors.New("API error")
ErrAPIError represents an error indicating an API-side issue.
var ErrInvalidRequest = errors.New("invalid request")
ErrInvalidRequest represents an error indicating that the caller's request is invalid.
var ErrNotFound = errors.New("resource not found")
ErrNotFound represents an error indicating a non-existent resource.
var ErrTooManyFound = errors.New("multiple resources found")
ErrTooManyFound represents an error indicating multiple results found for a single resource.
var UserAgent = fmt.Sprintf("egoscale/%s (%s; %s/%s)", version.Version, runtime.Version(), runtime.GOOS, runtime.GOARCH)
UserAgent is the "User-Agent" HTTP request header added to outgoing HTTP requests.
Functions ¶
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" 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 APIKey ¶ added in v0.20.0
type APIKey struct { Name string `json:"name"` Key string `json:"key"` Secret string `json:"secret,omitempty"` Operations []string `json:"operations,omitempty"` Resources []string `json:"resources,omitempty"` Type APIKeyType `json:"type"` }
APIKey represents an API key
type APIKeyType ¶ added in v0.20.0
type APIKeyType string
APIKeyType holds the type of the API key
const ( // APIKeyTypeUnrestricted is unrestricted APIKeyTypeUnrestricted APIKeyType = "unrestricted" // APIKeyTypeRestricted is restricted APIKeyTypeRestricted APIKeyType = "restricted" )
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"` 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"` 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 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.com/api/compute/#activateip6_GET
func (ActivateIP6) AsyncResponse ¶ added in v0.13.0
func (ActivateIP6) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (ActivateIP6) Response ¶ added in v0.13.0
func (ActivateIP6) Response() interface{}
Response returns the struct to unmarshal
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
func (AddIPToNic) AsyncResponse ¶ added in v0.13.0
func (AddIPToNic) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (AddIPToNic) Response ¶ added in v0.13.0
func (AddIPToNic) Response() interface{}
Response returns the struct to unmarshal
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 `` /* 146-byte string literal not displayed */ // contains filtered or unexported fields }
AddNicToVirtualMachine (Async) adds a NIC to a VM
func (AddNicToVirtualMachine) AsyncResponse ¶ added in v0.13.0
func (AddNicToVirtualMachine) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (AddNicToVirtualMachine) Response ¶ added in v0.13.0
func (AddNicToVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
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"` 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 []UUID `json:"virtualmachineIds,omitempty" doc:"virtual machine IDs associated with this Affinity Group"` }
AffinityGroup represents an 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 deletes 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 AntiAffinityGroup ¶ added in v0.23.0
type AntiAffinityGroup struct { Account string `json:"account,omitempty" doc:"the account owning the Anti-Affinity Group"` Description string `json:"description,omitempty" doc:"the description of the Anti-Affinity Group"` ID *UUID `json:"id,omitempty" doc:"the ID of the Anti-Affinity Group"` Name string `json:"name,omitempty" doc:"the name of the Anti-Affinity Group"` Type string `json:"type,omitempty" doc:"the type of the Anti-Affinity Group"` VirtualMachineIDs []UUID `json:"virtualmachineIds,omitempty" doc:"virtual machine IDs associated with this Anti-Affinity Group"` }
AntiAffinityGroup represents an Anti-Affinity Group.
func (AntiAffinityGroup) Delete ¶ added in v0.23.0
func (ag AntiAffinityGroup) Delete(ctx context.Context, client *Client) error
Delete deletes the given Anti-Affinity Group.
func (AntiAffinityGroup) ListRequest ¶ added in v0.23.0
func (ag AntiAffinityGroup) ListRequest() (ListCommand, error)
ListRequest builds the ListAntiAffinityGroups request.
type AssociateIPAddress ¶ added in v0.9.0
type AssociateIPAddress struct { Description string `json:"description,omitempty" doc:"The IP address description."` HealthcheckInterval int64 `json:"interval,omitempty" doc:"healthcheck definition: time in seconds to wait for each check. Default: 10, minimum: 5"` HealthcheckMode string `json:"mode,omitempty" doc:"healthcheck definition: healthcheck mode can be either 'tcp', 'http', or 'https'"` HealthcheckPath string `` /* 174-byte string literal not displayed */ HealthcheckPort int64 `` /* 143-byte string literal not displayed */ HealthcheckStrikesFail int64 `` /* 136-byte string literal not displayed */ HealthcheckStrikesOk int64 `` /* 135-byte string literal not displayed */ HealthcheckTimeout int64 `` /* 139-byte string literal not displayed */ HealthcheckTLSSkipVerify bool `json:"tls-skip-verify,omitempty" doc:"healthcheck definition: skip TLS verification for HTTPS checks. Default: false"` HealthcheckTLSSNI string `` /* 132-byte string literal not displayed */ ZoneID *UUID `json:"zoneid,omitempty" doc:"the ID of the availability zone you want to acquire a public IP address from"` // contains filtered or unexported fields }
AssociateIPAddress (Async) represents the IP creation
func (AssociateIPAddress) AsyncResponse ¶ added in v0.13.0
func (AssociateIPAddress) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (AssociateIPAddress) Response ¶ added in v0.13.0
func (AssociateIPAddress) Response() interface{}
Response returns the struct to unmarshal
type AsyncCommand ¶ added in v0.9.0
type AsyncCommand interface { Command AsyncResponse() interface{} }
AsyncCommand represents a async 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" 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) DeepCopy ¶ added in v0.18.0
func (a *AsyncJobResult) DeepCopy() *AsyncJobResult
DeepCopy create a true copy of the receiver.
func (*AsyncJobResult) DeepCopyInto ¶ added in v0.18.0
func (a *AsyncJobResult) DeepCopyInto(out *AsyncJobResult)
DeepCopyInto copies the receiver into out.
In (a) must be non nil. out must be non nil
func (AsyncJobResult) Error ¶ added in v0.9.22
func (a AsyncJobResult) Error() error
Error builds an error message from the result
func (AsyncJobResult) ListRequest ¶ added in v0.13.0
func (a AsyncJobResult) ListRequest() (ListCommand, error)
ListRequest buils the (empty) ListAsyncJobs request
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 AttachISO ¶ added in v0.13.1
type AttachISO struct { ID *UUID `json:"id" doc:"the ID of the ISO file"` VirtualMachineID *UUID `json:"virtualmachineid" doc:"the ID of the virtual machine"` // contains filtered or unexported fields }
AttachISO represents the request to attach an ISO to a virtual machine.
func (AttachISO) AsyncResponse ¶ added in v0.13.1
func (AttachISO) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
type AuthorizeSecurityGroupEgress ¶ added in v0.9.0
type AuthorizeSecurityGroupEgress AuthorizeSecurityGroupIngress
AuthorizeSecurityGroupEgress (Async) represents the egress rule creation
func (AuthorizeSecurityGroupEgress) AsyncResponse ¶ added in v0.13.0
func (AuthorizeSecurityGroupEgress) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (AuthorizeSecurityGroupEgress) Response ¶ added in v0.13.0
func (AuthorizeSecurityGroupEgress) Response() interface{}
Response returns the struct to unmarshal
type AuthorizeSecurityGroupIngress ¶ added in v0.9.0
type AuthorizeSecurityGroupIngress struct { CIDRList []CIDR `json:"cidrlist,omitempty" doc:"the cidr list associated"` Description string `json:"description,omitempty" doc:"the description of the ingress/egress rule"` EndPort uint16 `json:"endport,omitempty" doc:"end port for this ingress/egress rule"` IcmpCode int `json:"icmpcode,omitempty" doc:"error code for this icmp message"` IcmpType int `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, IPIP 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/egress rule"` UserSecurityGroupList []UserSecurityGroup `json:"usersecuritygrouplist,omitempty" doc:"user to security group mapping"` // contains filtered or unexported fields }
AuthorizeSecurityGroupIngress (Async) represents the ingress rule creation
func (AuthorizeSecurityGroupIngress) AsyncResponse ¶ added in v0.13.0
func (AuthorizeSecurityGroupIngress) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (AuthorizeSecurityGroupIngress) Response ¶ added in v0.13.0
func (AuthorizeSecurityGroupIngress) Response() interface{}
Response returns the struct to unmarshal
type BooleanResponse ¶ added in v0.9.0
type BooleanResponse struct { DisplayText string `json:"displaytext,omitempty"` Success bool `json:"success"` }
BooleanResponse represents a boolean response (usually after a deletion)
func (BooleanResponse) Error ¶ added in v0.9.0
func (e BooleanResponse) Error() error
Error formats a CloudStack job response into a standard error
type BucketUsage ¶ added in v0.25.0
type BucketUsage struct { Created string `json:"created"` Name string `json:"name"` Region string `json:"region"` Usage int64 `json:"usage"` }
BucketUsage represents the usage (in bytes) for a bucket
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.
func (ChangeServiceForVirtualMachine) Response ¶ added in v0.13.0
func (ChangeServiceForVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
type Client ¶
type Client struct { // HTTPClient holds the HTTP client HTTPClient *http.Client // Endpoint is the HTTP URL 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 // Public API secondary client *v2.Client // contains filtered or unexported fields }
Client represents the API client
func NewClient ¶
NewClient creates an Exoscale API client. Note: unless the WithoutV2Client() ClientOpt is passed, this function initializes a v2.Client embedded into the returned *Client struct inheriting the Exoscale API credentials, endpoint and timeout value, but not the custom http.Client. The 2 clients must not share the same *http.Client, as it can cause middleware clashes.
func (*Client) APIDescription ¶ added in v0.10.0
APIDescription returns the description of the given command
func (*Client) AsyncListWithContext ¶ added in v0.9.16
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 ¶
func (client *Client) CreateRecord(ctx context.Context, name string, rec DNSRecord) (*DNSRecord, error)
CreateRecord creates a DNS record
func (*Client) CreateRunstatusIncident ¶ added in v0.13.2
func (client *Client) CreateRunstatusIncident(ctx context.Context, incident RunstatusIncident) (*RunstatusIncident, error)
CreateRunstatusIncident create runstatus incident
func (*Client) CreateRunstatusMaintenance ¶ added in v0.13.2
func (client *Client) CreateRunstatusMaintenance(ctx context.Context, maintenance RunstatusMaintenance) (*RunstatusMaintenance, error)
CreateRunstatusMaintenance create runstatus Maintenance
func (*Client) CreateRunstatusPage ¶ added in v0.13.2
func (client *Client) CreateRunstatusPage(ctx context.Context, page RunstatusPage) (*RunstatusPage, error)
CreateRunstatusPage create runstatus page
func (*Client) CreateRunstatusService ¶ added in v0.13.2
func (client *Client) CreateRunstatusService(ctx context.Context, service RunstatusService) (*RunstatusService, error)
CreateRunstatusService create runstatus service
func (*Client) DeleteDomain ¶
DeleteDomain delets a DNS domain
func (*Client) DeleteRecord ¶
DeleteRecord deletes a record
func (*Client) DeleteRunstatusIncident ¶ added in v0.13.2
func (client *Client) DeleteRunstatusIncident(ctx context.Context, incident RunstatusIncident) error
DeleteRunstatusIncident delete runstatus incident
func (*Client) DeleteRunstatusMaintenance ¶ added in v0.13.2
func (client *Client) DeleteRunstatusMaintenance(ctx context.Context, maintenance RunstatusMaintenance) error
DeleteRunstatusMaintenance delete runstatus Maintenance
func (*Client) DeleteRunstatusPage ¶ added in v0.13.2
func (client *Client) DeleteRunstatusPage(ctx context.Context, page RunstatusPage) error
DeleteRunstatusPage delete runstatus page
func (*Client) DeleteRunstatusService ¶ added in v0.13.2
func (client *Client) DeleteRunstatusService(ctx context.Context, service RunstatusService) error
DeleteRunstatusService delete runstatus service
func (*Client) DeleteWithContext ¶ added in v0.9.12
DeleteWithContext removes the given resource of fails
func (*Client) Do ¶ added in v0.35.3
Do implemements the v2.HttpRequestDoer interface in order to intercept HTTP response before the generated code closes its body, giving us a chance to return meaningful error messages from the API. This is only relevant for API v2 operations.
func (*Client) GetDomains ¶ added in v0.9.28
GetDomains gets DNS domains
func (*Client) GetRecord ¶ added in v0.9.0
func (client *Client) GetRecord(ctx context.Context, domain string, recordID int64) (*DNSRecord, error)
GetRecord returns a DNS record
func (*Client) GetRecords ¶
GetRecords returns the DNS records
func (*Client) GetRecordsWithFilters ¶ added in v0.11.0
func (client *Client) GetRecordsWithFilters(ctx context.Context, domain, name, recordType string) ([]DNSRecord, error)
GetRecordsWithFilters returns the DNS records (filters can be empty)
func (*Client) GetRunstatusIncident ¶ added in v0.13.2
func (client *Client) GetRunstatusIncident(ctx context.Context, incident RunstatusIncident) (*RunstatusIncident, error)
GetRunstatusIncident retrieves the details of a specific incident.
func (*Client) GetRunstatusMaintenance ¶ added in v0.13.2
func (client *Client) GetRunstatusMaintenance(ctx context.Context, maintenance RunstatusMaintenance) (*RunstatusMaintenance, error)
GetRunstatusMaintenance retrieves the details of a specific maintenance.
func (*Client) GetRunstatusPage ¶ added in v0.13.2
func (client *Client) GetRunstatusPage(ctx context.Context, page RunstatusPage) (*RunstatusPage, error)
GetRunstatusPage fetches the runstatus page
func (*Client) GetRunstatusService ¶ added in v0.13.2
func (client *Client) GetRunstatusService(ctx context.Context, service RunstatusService) (*RunstatusService, error)
GetRunstatusService displays service detail.
func (*Client) GetWithContext ¶ added in v0.9.12
GetWithContext populates the given resource or fails
func (*Client) ListRunstatusIncidents ¶ added in v0.13.2
func (client *Client) ListRunstatusIncidents(ctx context.Context, page RunstatusPage) ([]RunstatusIncident, error)
ListRunstatusIncidents lists the incidents for a specific page.
func (*Client) ListRunstatusMaintenances ¶ added in v0.13.2
func (client *Client) ListRunstatusMaintenances(ctx context.Context, page RunstatusPage) ([]RunstatusMaintenance, error)
ListRunstatusMaintenances returns the list of maintenances for the page.
func (*Client) ListRunstatusPages ¶ added in v0.13.2
func (client *Client) ListRunstatusPages(ctx context.Context) ([]RunstatusPage, error)
ListRunstatusPages list all the runstatus pages
func (*Client) ListRunstatusServices ¶ added in v0.13.2
func (client *Client) ListRunstatusServices(ctx context.Context, page RunstatusPage) ([]RunstatusService, error)
ListRunstatusServices displays the list of services.
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 (c *Client) Paginate(g Listable, callback IterateItemFunc)
Paginate runs the ListCommand and paginates
func (*Client) PaginateRunstatusIncidents ¶ added in v0.14.1
func (client *Client) PaginateRunstatusIncidents(ctx context.Context, page RunstatusPage, callback func(*RunstatusIncident, error) bool)
PaginateRunstatusIncidents paginate Incidents
func (*Client) PaginateRunstatusMaintenances ¶ added in v0.14.1
func (client *Client) PaginateRunstatusMaintenances(ctx context.Context, page RunstatusPage, callback func(*RunstatusMaintenance, error) bool)
PaginateRunstatusMaintenances paginate Maintenances
func (*Client) PaginateRunstatusPages ¶ added in v0.14.1
func (client *Client) PaginateRunstatusPages(ctx context.Context, callback func(pages []RunstatusPage, e error) bool)
PaginateRunstatusPages paginate on runstatus pages
func (*Client) PaginateRunstatusServices ¶ added in v0.14.1
func (client *Client) PaginateRunstatusServices(ctx context.Context, page RunstatusPage, callback func(*RunstatusService, error) bool)
PaginateRunstatusServices paginates Services
func (*Client) PaginateWithContext ¶ added in v0.9.18
func (c *Client) PaginateWithContext(ctx context.Context, g Listable, 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 (c *Client) TraceOff()
TraceOff deactivates the HTTP tracer
func (*Client) TraceOn ¶ added in v0.10.5
func (c *Client) TraceOn()
TraceOn activates the HTTP tracer
func (*Client) UpdateRecord ¶
func (client *Client) UpdateRecord(ctx context.Context, name string, rec UpdateDNSRecord) (*DNSRecord, error)
UpdateRecord updates a DNS record
func (*Client) UpdateRunstatusIncident ¶ added in v0.13.2
func (client *Client) UpdateRunstatusIncident(ctx context.Context, incident RunstatusIncident, event RunstatusEvent) error
UpdateRunstatusIncident create runstatus incident event Events can be updates or final message with status completed.
func (*Client) UpdateRunstatusMaintenance ¶ added in v0.13.2
func (client *Client) UpdateRunstatusMaintenance(ctx context.Context, maintenance RunstatusMaintenance, event RunstatusEvent) error
UpdateRunstatusMaintenance adds a event to a maintenance. Events can be updates or final message with status completed.
type ClientOpt ¶ added in v0.37.0
type ClientOpt func(*Client)
ClientOpt represents a new Client option.
func WithHTTPClient ¶ added in v0.37.0
WithHTTPClient overrides the Client's default HTTP client.
func WithTimeout ¶ added in v0.37.0
WithTimeout overrides the Client's default timeout value (DefaultTimeout).
func WithTrace ¶ added in v0.37.0
func WithTrace() ClientOpt
WithTrace enables the Client's HTTP request tracing.
func WithoutV2Client ¶ added in v0.43.0
func WithoutV2Client() ClientOpt
WithoutV2Client disables implicit v2.Client embedding.
type Command ¶ added in v0.9.0
type Command interface {
Response() interface{}
}
Command represents a generic request
type CommandInfo ¶ added in v0.10.0
CommandInfo represents the meta data related to a Command
type CreateAPIKey ¶ added in v0.20.0
type CreateAPIKey struct { Name string `json:"name"` Operations string `json:"operations,omitempty"` Resources string `json:"resources,omitempty"` // contains filtered or unexported fields }
CreateAPIKey represents an API key creation
func (CreateAPIKey) Response ¶ added in v0.20.0
func (CreateAPIKey) Response() interface{}
Response returns the struct to unmarshal
type CreateAffinityGroup ¶ added in v0.9.0
type CreateAffinityGroup struct { Description string `json:"description,omitempty" doc:"Optional description of 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 Group Group types"` // contains filtered or unexported fields }
CreateAffinityGroup (Async) represents a new Affinity Group.
func (CreateAffinityGroup) AsyncResponse ¶ added in v0.13.0
func (CreateAffinityGroup) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job.
func (CreateAffinityGroup) Response ¶ added in v0.13.0
func (CreateAffinityGroup) Response() interface{}
Response returns the struct to unmarshal.
type CreateAntiAffinityGroup ¶ added in v0.23.0
type CreateAntiAffinityGroup struct { Name string `json:"name" doc:"Name of the Anti-Affinity Group"` Description string `json:"description,omitempty" doc:"Optional description of the Anti-Affinity Group"` // contains filtered or unexported fields }
CreateAntiAffinityGroup represents an Anti-Affinity Group creation.
func (CreateAntiAffinityGroup) AsyncResponse ¶ added in v0.23.0
func (CreateAntiAffinityGroup) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job.
func (CreateAntiAffinityGroup) Response ¶ added in v0.23.0
func (CreateAntiAffinityGroup) Response() interface{}
Response returns the struct to unmarshal.
type CreateInstanceGroup ¶ added in v0.9.7
type CreateInstanceGroup struct { Name string `json:"name" doc:"the name of the instance group"` // contains filtered or unexported fields }
CreateInstanceGroup creates a VM group
func (CreateInstanceGroup) Response ¶ added in v0.13.0
func (CreateInstanceGroup) Response() interface{}
Response returns the struct to unmarshal
type CreateInstancePool ¶ added in v0.20.0
type CreateInstancePool struct { Name string `json:"name"` Description string `json:"description,omitempty"` ServiceOfferingID *UUID `json:"serviceofferingid"` TemplateID *UUID `json:"templateid"` ZoneID *UUID `json:"zoneid"` AntiAffinityGroupIDs []UUID `json:"affinitygroupids,omitempty"` SecurityGroupIDs []UUID `json:"securitygroupids,omitempty"` NetworkIDs []UUID `json:"networkids,omitempty"` IPv6 bool `json:"ipv6,omitempty"` KeyPair string `json:"keypair,omitempty"` UserData string `json:"userdata,omitempty"` Size int `json:"size"` RootDiskSize int `json:"rootdisksize,omitempty"` // contains filtered or unexported fields }
CreateInstancePool represents an Instance Pool creation API request.
func (CreateInstancePool) Response ¶ added in v0.20.0
func (CreateInstancePool) Response() interface{}
Response returns an empty structure to unmarshal an Instance Pool creation API response into.
type CreateInstancePoolResponse ¶ added in v0.20.0
type CreateInstancePoolResponse struct { ID *UUID `json:"id"` Name string `json:"name"` Description string `json:"description"` ServiceOfferingID *UUID `json:"serviceofferingid"` TemplateID *UUID `json:"templateid"` ZoneID *UUID `json:"zoneid"` AntiAffinityGroupIDs []UUID `json:"affinitygroupids"` SecurityGroupIDs []UUID `json:"securitygroupids"` NetworkIDs []UUID `json:"networkids"` IPv6 bool `json:"ipv6"` KeyPair string `json:"keypair"` UserData string `json:"userdata"` Size int64 `json:"size"` RootDiskSize int `json:"rootdisksize"` State InstancePoolState `json:"state"` }
CreateInstancePoolResponse represents an Instance Pool creation API response.
type CreateNetwork ¶ added in v0.9.0
type CreateNetwork struct { DisplayText string `json:"displaytext,omitempty" doc:"the display text of the network"` // This field is required but might be empty 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"` 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"` 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
func (CreateNetwork) Response ¶ added in v0.13.0
func (CreateNetwork) Response() interface{}
Response returns the struct to unmarshal
type CreateSSHKeyPair ¶ added in v0.9.0
type CreateSSHKeyPair struct { Name string `json:"name" doc:"Name of the keypair"` // contains filtered or unexported fields }
CreateSSHKeyPair represents a new keypair to be created
func (CreateSSHKeyPair) Response ¶ added in v0.13.0
func (CreateSSHKeyPair) Response() interface{}
Response returns the struct to unmarshal
type CreateSecurityGroup ¶ added in v0.9.0
type CreateSecurityGroup struct { Name string `json:"name" doc:"name of the security group"` Description string `json:"description,omitempty" doc:"the description of the security group"` // contains filtered or unexported fields }
CreateSecurityGroup represents a security group creation
func (CreateSecurityGroup) Response ¶ added in v0.13.0
func (CreateSecurityGroup) Response() interface{}
Response returns the struct to unmarshal
type CreateSnapshot ¶ added in v0.9.0
type CreateSnapshot struct { VolumeID *UUID `json:"volumeid" doc:"The ID of the disk volume"` QuiesceVM *bool `json:"quiescevm,omitempty" doc:"quiesce vm if true"` // contains filtered or unexported fields }
CreateSnapshot (Async) creates an instant snapshot of a volume
func (CreateSnapshot) AsyncResponse ¶ added in v0.13.0
func (CreateSnapshot) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (CreateSnapshot) Response ¶ added in v0.13.0
func (CreateSnapshot) Response() interface{}
Response returns the struct to unmarshal
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)
func (CreateTags) AsyncResponse ¶ added in v0.13.0
func (CreateTags) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (CreateTags) Response ¶ added in v0.13.0
func (CreateTags) Response() interface{}
Response returns the struct to unmarshal
type DNSDomain ¶
type DNSDomain struct { ID int64 `json:"id"` 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 { 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 Affinity Group to be deleted.
func (DeleteAffinityGroup) AsyncResponse ¶ added in v0.13.0
func (DeleteAffinityGroup) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job.
func (DeleteAffinityGroup) Response ¶ added in v0.13.0
func (DeleteAffinityGroup) Response() interface{}
Response returns the struct to unmarshal.
type DeleteAntiAffinityGroup ¶ added in v0.23.0
type DeleteAntiAffinityGroup struct { ID *UUID `json:"id,omitempty" doc:"The ID of the Anti-Affinity Group. Mutually exclusive with name parameter"` Name string `json:"name,omitempty" doc:"The name of the Anti-Affinity Group. Mutually exclusive with ID parameter"` // contains filtered or unexported fields }
DeleteAntiAffinityGroup (Async) represents an Anti-Affinity Group to be deleted.
func (DeleteAntiAffinityGroup) AsyncResponse ¶ added in v0.23.0
func (DeleteAntiAffinityGroup) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job.
func (DeleteAntiAffinityGroup) Response ¶ added in v0.23.0
func (DeleteAntiAffinityGroup) Response() interface{}
Response returns the struct to unmarshal.
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
func (DeleteInstanceGroup) Response ¶ added in v0.13.0
func (DeleteInstanceGroup) Response() interface{}
Response returns the struct to unmarshal
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
func (DeleteNetwork) AsyncResponse ¶ added in v0.13.0
func (DeleteNetwork) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (DeleteNetwork) Response ¶ added in v0.13.0
func (DeleteNetwork) Response() interface{}
Response returns the struct to unmarshal
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
func (*DeleteReverseDNSFromPublicIPAddress) Response ¶ added in v0.13.0
func (*DeleteReverseDNSFromPublicIPAddress) Response() interface{}
Response returns the struct to unmarshal
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
func (*DeleteReverseDNSFromVirtualMachine) Response ¶ added in v0.13.0
func (*DeleteReverseDNSFromVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
type DeleteSSHKeyPair ¶ added in v0.9.0
type DeleteSSHKeyPair struct { Name string `json:"name" doc:"Name of the keypair"` // contains filtered or unexported fields }
DeleteSSHKeyPair represents a new keypair to be created
func (DeleteSSHKeyPair) Response ¶ added in v0.13.0
func (DeleteSSHKeyPair) Response() interface{}
Response returns the struct to unmarshal
type DeleteSecurityGroup ¶ added in v0.9.0
type DeleteSecurityGroup struct { 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
func (DeleteSecurityGroup) Response ¶ added in v0.13.0
func (DeleteSecurityGroup) Response() interface{}
Response returns the struct to unmarshal
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
func (DeleteSnapshot) AsyncResponse ¶ added in v0.13.0
func (DeleteSnapshot) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (DeleteSnapshot) Response ¶ added in v0.13.0
func (DeleteSnapshot) Response() interface{}
Response returns the struct to unmarshal
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)
func (DeleteTags) AsyncResponse ¶ added in v0.13.0
func (DeleteTags) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (DeleteTags) Response ¶ added in v0.13.0
func (DeleteTags) Response() interface{}
Response returns the struct to unmarshal
type DeleteTemplate ¶ added in v0.9.24
type DeleteTemplate struct { ID *UUID `json:"id" doc:"the ID of the template"` // contains filtered or unexported fields }
DeleteTemplate deletes a template by ID
func (DeleteTemplate) AsyncResponse ¶ added in v0.17.0
func (DeleteTemplate) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (DeleteTemplate) Response ¶ added in v0.17.0
func (DeleteTemplate) Response() interface{}
Response returns the struct to unmarshal
type DeployVirtualMachine ¶ added in v0.9.0
type DeployVirtualMachine struct { AffinityGroupIDs []UUID `` /* 188-byte string literal not displayed */ AffinityGroupNames []string `` /* 190-byte string literal not displayed */ 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"` Group string `json:"group,omitempty" doc:"an optional group for 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"` 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.
func (DeployVirtualMachine) AsyncResponse ¶ added in v0.13.0
func (DeployVirtualMachine) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (DeployVirtualMachine) Response ¶ added in v0.13.0
func (DeployVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
type DestroyInstancePool ¶ added in v0.20.0
type DestroyInstancePool struct { ID *UUID `json:"id"` ZoneID *UUID `json:"zoneid"` // contains filtered or unexported fields }
DestroyInstancePool represents an Instance Pool destruction API request.
func (DestroyInstancePool) Response ¶ added in v0.20.0
func (DestroyInstancePool) Response() interface{}
Response returns an empty structure to unmarshal an Instance Pool destruction API response into.
type DestroyVirtualMachine ¶ added in v0.9.0
type DestroyVirtualMachine struct { ID *UUID `json:"id" doc:"The ID of the virtual machine"` // contains filtered or unexported fields }
DestroyVirtualMachine (Async) represents the destruction of the virtual machine
func (DestroyVirtualMachine) AsyncResponse ¶ added in v0.13.0
func (DestroyVirtualMachine) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (DestroyVirtualMachine) Response ¶ added in v0.13.0
func (DestroyVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
type DetachISO ¶ added in v0.13.1
type DetachISO struct { VirtualMachineID *UUID `json:"virtualmachineid" doc:"The ID of the virtual machine"` // contains filtered or unexported fields }
DetachISO represents the request to detach an ISO to a virtual machine.
func (DetachISO) AsyncResponse ¶ added in v0.13.1
func (DetachISO) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
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
func (DisassociateIPAddress) AsyncResponse ¶ added in v0.13.0
func (DisassociateIPAddress) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (DisassociateIPAddress) Response ¶ added in v0.13.0
func (DisassociateIPAddress) Response() interface{}
Response returns the struct to unmarshal
type EgressRule ¶ added in v0.9.0
type EgressRule IngressRule
EgressRule represents the ingress rule
type ErrorCode ¶ added in v0.9.2
type ErrorCode int
ErrorCode represents the CloudStack ApiErrorCode enum
const ( ErrorCode = 401 // NotFound represents ... (TODO) NotFound ErrorCode = 404 // 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
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"` ID *UUID `json:"id" 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
func (Event) ListRequest ¶ added in v0.13.0
func (event Event) ListRequest() (ListCommand, error)
ListRequest builds the ListEvents request
type EventType ¶ added in v0.9.0
type EventType struct {
Name string `json:"name,omitempty" doc:"Event Type"`
}
EventType represent a type of event
func (EventType) ListRequest ¶ added in v0.13.0
func (EventType) ListRequest() (ListCommand, error)
ListRequest builds the ListEventTypes request
type EvictInstancePoolMembers ¶ added in v0.27.0
type EvictInstancePoolMembers struct { ID *UUID `json:"id"` ZoneID *UUID `json:"zoneid"` MemberIDs []UUID `json:"memberids"` // contains filtered or unexported fields }
EvictInstancePoolMembers represents an Instance Pool members eviction API request.
func (EvictInstancePoolMembers) Response ¶ added in v0.27.0
func (EvictInstancePoolMembers) Response() interface{}
Response returns an empty structure to unmarshal an Instance Pool members eviction API response into.
type ExportSnapshot ¶ added in v0.24.0
type ExportSnapshot struct { ID *UUID `json:"id" doc:"The ID of the snapshot"` // contains filtered or unexported fields }
ExportSnapshot (Async) exports a volume snapshot
func (ExportSnapshot) AsyncResponse ¶ added in v0.24.0
func (ExportSnapshot) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (ExportSnapshot) Response ¶ added in v0.24.0
func (ExportSnapshot) Response() interface{}
Response returns the struct to unmarshal
type ExportSnapshotResponse ¶ added in v0.24.0
type ExportSnapshotResponse struct { PresignedURL string `json:"presignedurl"` MD5sum string `json:"md5sum"` }
ExportSnapshotResponse represents the response of a snapshot export operation
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
func (ExpungeVirtualMachine) AsyncResponse ¶ added in v0.13.0
func (ExpungeVirtualMachine) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (ExpungeVirtualMachine) Response ¶ added in v0.13.0
func (ExpungeVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
type GetAPIKey ¶ added in v0.20.0
type GetAPIKey struct { Key string `json:"key"` // contains filtered or unexported fields }
GetAPIKey get an API key
type GetInstancePool ¶ added in v0.20.0
type GetInstancePool struct { ID *UUID `json:"id"` ZoneID *UUID `json:"zoneid"` // contains filtered or unexported fields }
GetInstancePool retrieves an Instance Pool's details.
func (GetInstancePool) Response ¶ added in v0.20.0
func (GetInstancePool) Response() interface{}
Response returns an empty structure to unmarshal an Instance Pool get API response into.
type GetInstancePoolResponse ¶ added in v0.20.0
type GetInstancePoolResponse struct { Count int InstancePools []InstancePool `json:"instancepool"` }
GetInstancePoolResponse get Instance Pool API response.
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
func (GetVMPassword) Response ¶ added in v0.13.0
func (GetVMPassword) Response() interface{}
Response returns the struct to unmarshal
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
func (GetVirtualMachineUserData) Response ¶ added in v0.13.0
func (GetVirtualMachineUserData) Response() interface{}
Response returns the struct to unmarshal
type Healthcheck ¶ added in v0.15.0
type Healthcheck struct { Interval int64 `json:"interval,omitempty" doc:"healthcheck definition: time in seconds to wait for each check. Default: 10, minimum: 5"` Mode string `json:"mode,omitempty" doc:"healthcheck definition: healthcheck mode can be either 'tcp' or 'http'"` Path string `` /* 163-byte string literal not displayed */ Port int64 `` /* 143-byte string literal not displayed */ StrikesFail int64 `` /* 136-byte string literal not displayed */ StrikesOk int64 `` /* 135-byte string literal not displayed */ Timeout int64 `` /* 139-byte string literal not displayed */ TLSSNI string `json:"tls-sni,omitempty" doc:"healthcheck definition: server name to present for HTTPS checks"` TLSSkipVerify bool `json:"tls-skip-verify" doc:"healthcheck definition: bypass certificate chain verification for HTTPS checks"` }
Healthcheck represents an Healthcheck attached to an IP
type IPAddress ¶ added in v0.9.0
type IPAddress struct { 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"` Description string `json:"description,omitempty" doc:"The IP address description."` ForVirtualNetwork bool `json:"forvirtualnetwork,omitempty" doc:"the virtual network for the IP address"` Healthcheck *Healthcheck `json:"healthcheck,omitempty" doc:"The IP healthcheck configuration"` 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 ISO ¶ added in v0.13.1
type ISO Template
ISO represents an attachable ISO disc
func (ISO) ListRequest ¶ added in v0.13.1
func (iso ISO) ListRequest() (ListCommand, error)
ListRequest produces the ListIsos command.
func (ISO) ResourceType ¶ added in v0.13.1
ResourceType returns the type of the resource
type IngressRule ¶ added in v0.9.0
type IngressRule struct { 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 int `json:"icmpcode,omitempty" doc:"the code for the ICMP message response"` IcmpType int `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" doc:"the id of the security group rule"` SecurityGroupName string `json:"securitygroupname,omitempty" doc:"security group name"` StartPort uint16 `json:"startport,omitempty" doc:"the starting port of the security group rule"` }
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"` 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
func (InstanceGroup) ListRequest ¶ added in v0.13.0
func (ig InstanceGroup) ListRequest() (ListCommand, error)
ListRequest builds the ListInstanceGroups request
type InstancePool ¶ added in v0.20.0
type InstancePool struct { ID *UUID `json:"id"` Name string `json:"name"` Description string `json:"description"` ServiceOfferingID *UUID `json:"serviceofferingid"` TemplateID *UUID `json:"templateid"` ZoneID *UUID `json:"zoneid"` AntiAffinityGroupIDs []UUID `json:"affinitygroupids"` SecurityGroupIDs []UUID `json:"securitygroupids"` NetworkIDs []UUID `json:"networkids"` IPv6 bool `json:"ipv6"` KeyPair string `json:"keypair"` UserData string `json:"userdata"` Size int `json:"size"` RootDiskSize int `json:"rootdisksize"` State InstancePoolState `json:"state"` VirtualMachines []VirtualMachine `json:"virtualmachines"` }
InstancePool represents an Instance Pool.
type InstancePoolState ¶ added in v0.20.0
type InstancePoolState string
InstancePoolState represents the state of an Instance Pool.
const ( // InstancePoolCreating creating state. InstancePoolCreating InstancePoolState = "creating" // InstancePoolRunning running state. InstancePoolRunning InstancePoolState = "running" // InstancePoolDestroying destroying state. InstancePoolDestroying InstancePoolState = "destroying" // InstancePoolScalingUp scaling up state. InstancePoolScalingUp InstancePoolState = "scaling-up" // InstancePoolScalingDown scaling down state. InstancePoolScalingDown InstancePoolState = "scaling-down" )
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 ListAPIKeyOperations ¶ added in v0.20.0
type ListAPIKeyOperations struct {
// contains filtered or unexported fields
}
ListAPIKeyOperations represents a search for operations for the current API key
func (ListAPIKeyOperations) Response ¶ added in v0.20.0
func (ListAPIKeyOperations) Response() interface{}
Response returns the struct to unmarshal
type ListAPIKeyOperationsResponse ¶ added in v0.20.0
type ListAPIKeyOperationsResponse struct {
Operations []string `json:"operations"`
}
ListAPIKeyOperationsResponse represents a list of operations for the current API key
type ListAPIKeys ¶ added in v0.20.0
type ListAPIKeys struct {
// contains filtered or unexported fields
}
ListAPIKeys represents a search for API keys
func (ListAPIKeys) Response ¶ added in v0.20.0
func (ListAPIKeys) Response() interface{}
Response returns the struct to unmarshal
type ListAPIKeysResponse ¶ added in v0.20.0
ListAPIKeysResponse represents a list of API keys
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 { 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)"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` 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) Each ¶ added in v0.13.0
func (ListAccounts) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListAccounts) ListRequest ¶ added in v0.13.0
func (ls *ListAccounts) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListAccounts) Response ¶ added in v0.13.0
func (ListAccounts) Response() interface{}
Response returns the struct to unmarshal
func (*ListAccounts) SetPage ¶ added in v0.10.3
func (ls *ListAccounts) SetPage(page int)
SetPage sets the current apge
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 Affinity Groups types search.
func (ListAffinityGroupTypes) Response ¶ added in v0.13.0
func (ListAffinityGroupTypes) Response() interface{}
Response returns the struct to unmarshal.
type ListAffinityGroupTypesResponse ¶ added in v0.9.0
type ListAffinityGroupTypesResponse struct { Count int `json:"count"` AffinityGroupType []AffinityGroupType `json:"affinitygrouptype"` }
ListAffinityGroupTypesResponse represents a list of Affinity Group types.
type ListAffinityGroups ¶ added in v0.9.0
type ListAffinityGroups struct { ID *UUID `json:"id,omitempty" doc:"List the Affinity Group by the ID provided"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` 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 Affinity Groups search.
func (ListAffinityGroups) Each ¶ added in v0.13.0
func (ListAffinityGroups) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue.
func (*ListAffinityGroups) ListRequest ¶ added in v0.13.0
func (ls *ListAffinityGroups) ListRequest() (ListCommand, error)
ListRequest returns itself.
func (ListAffinityGroups) Response ¶ added in v0.13.0
func (ListAffinityGroups) Response() interface{}
Response returns the struct to unmarshal.
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 Affinity Groups.
type ListAntiAffinityGroups ¶ added in v0.23.0
type ListAntiAffinityGroups struct { ID *UUID `json:"id,omitempty" doc:"List the Anti-Affinity Group by the ID provided"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` Name string `json:"name,omitempty" doc:"Lists Anti-Affinity Groups by name"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` VirtualMachineID *UUID `json:"virtualmachineid,omitempty" doc:"Lists Anti-Affinity Groups by virtual machine ID"` // contains filtered or unexported fields }
ListAntiAffinityGroups represents an Anti-Affinity Groups search.
func (ListAntiAffinityGroups) Each ¶ added in v0.23.0
func (ListAntiAffinityGroups) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue.
func (*ListAntiAffinityGroups) ListRequest ¶ added in v0.23.0
func (ls *ListAntiAffinityGroups) ListRequest() (ListCommand, error)
ListRequest returns itself.
func (ListAntiAffinityGroups) Response ¶ added in v0.23.0
func (ListAntiAffinityGroups) Response() interface{}
Response returns the struct to unmarshal.
func (*ListAntiAffinityGroups) SetPage ¶ added in v0.23.0
func (ls *ListAntiAffinityGroups) SetPage(page int)
SetPage sets the current page.
func (*ListAntiAffinityGroups) SetPageSize ¶ added in v0.23.0
func (ls *ListAntiAffinityGroups) SetPageSize(pageSize int)
SetPageSize sets the page size.
type ListAntiAffinityGroupsResponse ¶ added in v0.23.0
type ListAntiAffinityGroupsResponse struct { Count int `json:"count"` AntiAffinityGroup []AffinityGroup `json:"antiaffinitygroup"` }
ListAntiAffinityGroupsResponse represents a list of Anti-Affinity Groups.
type ListAsyncJobs ¶ added in v0.9.0
type ListAsyncJobs struct { Keyword string `json:"keyword,omitempty" doc:"List by keyword"` 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
func (ListAsyncJobs) Each ¶ added in v0.13.0
func (ListAsyncJobs) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListAsyncJobs) ListRequest ¶ added in v0.13.0
func (ls *ListAsyncJobs) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListAsyncJobs) Response ¶ added in v0.13.0
func (ListAsyncJobs) Response() interface{}
Response returns the struct to unmarshal
func (*ListAsyncJobs) SetPage ¶ added in v0.13.0
func (ls *ListAsyncJobs) SetPage(page int)
SetPage sets the current apge
func (*ListAsyncJobs) SetPageSize ¶ added in v0.13.0
func (ls *ListAsyncJobs) SetPageSize(pageSize int)
SetPageSize sets the page size
type ListAsyncJobsResponse ¶ added in v0.9.0
type ListAsyncJobsResponse struct { Count int `json:"count"` AsyncJob []AsyncJobResult `json:"asyncjobs"` }
ListAsyncJobsResponse represents a list of job results
type ListBucketsUsage ¶ added in v0.25.0
type ListBucketsUsage struct {
// contains filtered or unexported fields
}
ListBucketsUsage represents a listBucketsUsage API request
func (ListBucketsUsage) Response ¶ added in v0.25.0
func (ListBucketsUsage) Response() interface{}
Response returns the struct to unmarshal
type ListBucketsUsageResponse ¶ added in v0.25.0
type ListBucketsUsageResponse struct { Count int `json:"count"` BucketsUsage []BucketUsage `json:"bucketsusage"` }
ListBucketsUsageResponse represents a listBucketsUsage API response
type ListCommand ¶ added in v0.9.18
type ListCommand interface { Listable Command // SetPage defines the current pages SetPage(int) // SetPageSize defines the size of the page SetPageSize(int) // Each reads the data from the response and feeds channels, and returns true if we are on the last page Each(interface{}, IterateItemFunc) }
ListCommand represents a listing request
type ListEventTypes ¶ added in v0.9.0
type ListEventTypes struct { Page int `json:"page,omitempty"` // fake PageSize int `json:"pagesize,omitempty"` // fake // contains filtered or unexported fields }
ListEventTypes list the event types
func (ListEventTypes) Each ¶ added in v0.13.0
func (ListEventTypes) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListEventTypes) ListRequest ¶ added in v0.13.0
func (ls *ListEventTypes) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListEventTypes) Response ¶ added in v0.13.0
func (ListEventTypes) Response() interface{}
Response returns the struct to unmarshal
func (*ListEventTypes) SetPage ¶ added in v0.13.0
func (ls *ListEventTypes) SetPage(page int)
SetPage sets the current apge
func (*ListEventTypes) SetPageSize ¶ added in v0.13.0
func (ls *ListEventTypes) SetPageSize(pageSize int)
SetPageSize sets the page size
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 { 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"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` Level string `json:"level,omitempty" doc:"the event level (INFO, WARN, ERROR)"` 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
func (ListEvents) Each ¶ added in v0.13.0
func (ListEvents) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListEvents) ListRequest ¶ added in v0.13.0
func (ls *ListEvents) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListEvents) Response ¶ added in v0.13.0
func (ListEvents) Response() interface{}
Response returns the struct to unmarshal
func (*ListEvents) SetPage ¶ added in v0.13.0
func (ls *ListEvents) SetPage(page int)
SetPage sets the current apge
func (*ListEvents) SetPageSize ¶ added in v0.13.0
func (ls *ListEvents) SetPageSize(pageSize int)
SetPageSize sets the page size
type ListEventsResponse ¶ added in v0.9.0
ListEventsResponse represents a response of a list query
type ListISOs ¶ added in v0.13.1
type ListISOs struct { Bootable *bool `json:"bootable,omitempty" doc:"True if the ISO is bootable, false otherwise"` ID *UUID `json:"id,omitempty" doc:"List ISO by id"` IsoFilter string `` /* 742-byte string literal not displayed */ IsPublic *bool `json:"ispublic,omitempty" doc:"True if the ISO is publicly available to all users, false otherwise."` IsReady *bool `json:"isready,omitempty" doc:"True if this ISO is ready to be deployed"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` Name string `json:"name,omitempty" doc:"List all isos by name"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` ShowRemoved *bool `json:"showremoved,omitempty" doc:"Show removed ISOs as well"` Tags []ResourceTag `json:"tags,omitempty" doc:"List resources by tags (key/value pairs). Note: multiple tags are OR'ed, not AND'ed."` ZoneID *UUID `json:"zoneid,omitempty" doc:"The ID of the zone"` // contains filtered or unexported fields }
ListISOs represents the list all available ISO files request
func (ListISOs) Each ¶ added in v0.13.1
func (ListISOs) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListISOs) ListRequest ¶ added in v0.13.1
func (ls *ListISOs) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListISOs) Response ¶ added in v0.13.1
func (ListISOs) Response() interface{}
Response returns the struct to unmarshal
func (*ListISOs) SetPageSize ¶ added in v0.13.1
SetPageSize sets the page size
type ListISOsResponse ¶ added in v0.13.1
ListISOsResponse represents a list of ISO files
type ListInstanceGroups ¶ added in v0.9.7
type ListInstanceGroups struct { ID *UUID `json:"id,omitempty" doc:"List instance groups by ID"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` 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
func (ListInstanceGroups) Each ¶ added in v0.13.0
func (ListInstanceGroups) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListInstanceGroups) ListRequest ¶ added in v0.13.0
func (ls *ListInstanceGroups) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListInstanceGroups) Response ¶ added in v0.13.0
func (ListInstanceGroups) Response() interface{}
Response returns the struct to unmarshal
func (*ListInstanceGroups) SetPage ¶ added in v0.13.0
func (ls *ListInstanceGroups) SetPage(page int)
SetPage sets the current apge
func (*ListInstanceGroups) SetPageSize ¶ added in v0.13.0
func (ls *ListInstanceGroups) SetPageSize(pageSize int)
SetPageSize sets the page size
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 ListInstancePools ¶ added in v0.20.0
type ListInstancePools struct { ZoneID *UUID `json:"zoneid"` // contains filtered or unexported fields }
ListInstancePools represents a list Instance Pool API request.
func (ListInstancePools) Response ¶ added in v0.20.0
func (ListInstancePools) Response() interface{}
Response returns an empty structure to unmarshal an Instance Pool list API response into.
type ListInstancePoolsResponse ¶ added in v0.20.0
type ListInstancePoolsResponse struct { Count int InstancePools []InstancePool `json:"instancepool"` }
ListInstancePoolsResponse represents a list Instance Pool API response.
type ListNetworks ¶ added in v0.9.0
type ListNetworks struct { CanUseForDeploy *bool `json:"canusefordeploy,omitempty" doc:"List networks available for vm deployment"` ID *UUID `json:"id,omitempty" doc:"List networks by id"` IsSystem *bool `json:"issystem,omitempty" doc:"true If network is system, false otherwise"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` 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). Note: multiple tags are OR'ed, not AND'ed."` 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) Each ¶ added in v0.13.0
func (ListNetworks) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListNetworks) ListRequest ¶ added in v0.13.0
func (ls *ListNetworks) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListNetworks) Response ¶ added in v0.13.0
func (ListNetworks) Response() interface{}
Response returns the struct to unmarshal
func (*ListNetworks) SetPage ¶ added in v0.9.21
func (ls *ListNetworks) SetPage(page int)
SetPage sets the current apge
func (*ListNetworks) SetPageSize ¶ added in v0.9.21
func (ls *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 { 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) Each ¶ added in v0.13.0
func (ListNics) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListNics) ListRequest ¶ added in v0.13.0
func (ls *ListNics) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListNics) Response ¶ added in v0.13.0
func (ListNics) Response() interface{}
Response returns the struct to unmarshal
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
func (ListOSCategories) Each ¶ added in v0.13.0
func (ListOSCategories) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListOSCategories) ListRequest ¶ added in v0.13.0
func (ls *ListOSCategories) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListOSCategories) Response ¶ added in v0.13.0
func (ListOSCategories) Response() interface{}
Response returns the struct to unmarshal
func (*ListOSCategories) SetPage ¶ added in v0.13.0
func (ls *ListOSCategories) SetPage(page int)
SetPage sets the current apge
func (*ListOSCategories) SetPageSize ¶ added in v0.13.0
func (ls *ListOSCategories) SetPageSize(pageSize int)
SetPageSize sets the page size
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 { 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"` 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"` 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"` 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). Note: multiple tags are OR'ed, not AND'ed."` 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) Each ¶ added in v0.13.0
func (ListPublicIPAddresses) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListPublicIPAddresses) ListRequest ¶ added in v0.13.0
func (ls *ListPublicIPAddresses) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListPublicIPAddresses) Response ¶ added in v0.13.0
func (ListPublicIPAddresses) Response() interface{}
Response returns the struct to unmarshal
func (*ListPublicIPAddresses) SetPage ¶ added in v0.9.20
func (ls *ListPublicIPAddresses) SetPage(page int)
SetPage sets the current apge
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"` 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"` 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"` // contains filtered or unexported fields }
ListResourceDetails lists the resource tag(s) (but different from listTags...)
func (ListResourceDetails) Each ¶ added in v0.13.0
func (ListResourceDetails) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListResourceDetails) ListRequest ¶ added in v0.13.0
func (ls *ListResourceDetails) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListResourceDetails) Response ¶ added in v0.13.0
func (ListResourceDetails) Response() interface{}
Response returns the struct to unmarshal
func (*ListResourceDetails) SetPage ¶ added in v0.13.0
func (ls *ListResourceDetails) SetPage(page int)
SetPage sets the current apge
func (*ListResourceDetails) SetPageSize ¶ added in v0.13.0
func (ls *ListResourceDetails) SetPageSize(pageSize int)
SetPageSize sets the page size
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 { ID int64 `json:"id,omitempty" doc:"Lists resource limits by ID."` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` ResourceType ResourceType `` /* 868-byte string literal not displayed */ ResourceTypeName string `` /* 956-byte string literal not displayed */ // contains filtered or unexported fields }
ListResourceLimits lists the resource limits
func (ListResourceLimits) Each ¶ added in v0.13.0
func (ListResourceLimits) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListResourceLimits) ListRequest ¶ added in v0.13.0
func (ls *ListResourceLimits) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListResourceLimits) Response ¶ added in v0.13.0
func (ListResourceLimits) Response() interface{}
Response returns the struct to unmarshal
func (*ListResourceLimits) SetPage ¶ added in v0.13.0
func (ls *ListResourceLimits) SetPage(page int)
SetPage sets the current apge
func (*ListResourceLimits) SetPageSize ¶ added in v0.13.0
func (ls *ListResourceLimits) SetPageSize(pageSize int)
SetPageSize sets the page size
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 { Fingerprint string `json:"fingerprint,omitempty" doc:"A public key fingerprint to look for"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` 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) Each ¶ added in v0.13.0
func (ListSSHKeyPairs) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListSSHKeyPairs) ListRequest ¶ added in v0.13.0
func (ls *ListSSHKeyPairs) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListSSHKeyPairs) Response ¶ added in v0.13.0
func (ListSSHKeyPairs) Response() interface{}
Response returns the struct to unmarshal
func (*ListSSHKeyPairs) SetPage ¶ added in v0.9.19
func (ls *ListSSHKeyPairs) SetPage(page int)
SetPage sets the current apge
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 { ID *UUID `json:"id,omitempty" doc:"list the security group by the id provided"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` 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) Each ¶ added in v0.13.0
func (ListSecurityGroups) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListSecurityGroups) ListRequest ¶ added in v0.13.0
func (ls *ListSecurityGroups) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListSecurityGroups) Response ¶ added in v0.13.0
func (ListSecurityGroups) Response() interface{}
Response returns the struct to unmarshal
func (*ListSecurityGroups) SetPage ¶ added in v0.9.21
func (ls *ListSecurityGroups) SetPage(page int)
SetPage sets the current apge
func (*ListSecurityGroups) SetPageSize ¶ added in v0.9.21
func (ls *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 { 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) Each ¶ added in v0.13.0
func (ListServiceOfferings) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListServiceOfferings) ListRequest ¶ added in v0.13.0
func (ls *ListServiceOfferings) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListServiceOfferings) Response ¶ added in v0.13.0
func (ListServiceOfferings) Response() interface{}
Response returns the struct to unmarshal
func (*ListServiceOfferings) SetPage ¶ added in v0.9.24
func (ls *ListServiceOfferings) SetPage(page int)
SetPage sets the current apge
func (*ListServiceOfferings) SetPageSize ¶ added in v0.9.24
func (ls *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 { 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."` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` 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). Note: multiple tags are OR'ed, not AND'ed."` 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
func (ListSnapshots) Each ¶ added in v0.13.0
func (ListSnapshots) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListSnapshots) ListRequest ¶ added in v0.13.0
func (ls *ListSnapshots) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListSnapshots) Response ¶ added in v0.13.0
func (ListSnapshots) Response() interface{}
Response returns the struct to unmarshal
func (*ListSnapshots) SetPage ¶ added in v0.12.3
func (ls *ListSnapshots) SetPage(page int)
SetPage sets the current apge
func (*ListSnapshots) SetPageSize ¶ added in v0.12.3
func (ls *ListSnapshots) SetPageSize(pageSize int)
SetPageSize sets the page size
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 { Customer string `json:"customer,omitempty" doc:"list by customer name"` Key string `json:"key,omitempty" doc:"list by key"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` 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)
func (ListTags) Each ¶ added in v0.13.0
func (ListTags) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListTags) ListRequest ¶ added in v0.13.0
func (ls *ListTags) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListTags) Response ¶ added in v0.13.0
func (ListTags) Response() interface{}
Response returns the struct to unmarshal
func (*ListTags) SetPageSize ¶ added in v0.13.0
SetPageSize sets the page size
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 `` /* 700-byte string literal not displayed */ ID *UUID `json:"id,omitempty" doc:"the template ID"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` 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). Note: multiple tags are OR'ed, not AND'ed."` ZoneID *UUID `json:"zoneid,omitempty" doc:"list templates by zoneid"` // contains filtered or unexported fields }
ListTemplates represents a template query filter
func (ListTemplates) Each ¶ added in v0.13.0
func (ListTemplates) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListTemplates) ListRequest ¶ added in v0.13.0
func (ls *ListTemplates) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListTemplates) Response ¶ added in v0.13.0
func (ListTemplates) Response() interface{}
Response returns the struct to unmarshal
func (*ListTemplates) SetPage ¶ added in v0.9.20
func (ls *ListTemplates) SetPage(page int)
SetPage sets the current apge
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 { ID *UUID `json:"id,omitempty" doc:"List user by ID."` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` 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
func (ListUsers) Each ¶ added in v0.13.0
func (ListUsers) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListUsers) ListRequest ¶ added in v0.13.0
func (ls *ListUsers) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListUsers) Response ¶ added in v0.13.0
func (ListUsers) Response() interface{}
Response returns the struct to unmarshal
func (*ListUsers) SetPageSize ¶ added in v0.13.0
SetPageSize sets the page size
type ListUsersResponse ¶ added in v0.9.22
ListUsersResponse represents a list of users
type ListVirtualMachines ¶ added in v0.9.0
type ListVirtualMachines struct { AffinityGroupID *UUID `json:"affinitygroupid,omitempty" doc:"list vms by affinity group"` Details []string `` /* 253-byte string literal not displayed */ ForVirtualNetwork *bool `` /* 126-byte string literal not displayed */ GroupID *UUID `json:"groupid,omitempty" doc:"the group ID"` ID *UUID `json:"id,omitempty" doc:"the ID of the virtual machine"` IDs []UUID `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"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` ManagerID *UUID `json:"managerid,omitempty" doc:"list by manager id"` 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). Note: multiple tags are OR'ed, not AND'ed."` 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) Each ¶ added in v0.13.0
func (ListVirtualMachines) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListVirtualMachines) ListRequest ¶ added in v0.13.0
func (ls *ListVirtualMachines) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListVirtualMachines) Response ¶ added in v0.13.0
func (ListVirtualMachines) Response() interface{}
Response returns the struct to unmarshal
func (*ListVirtualMachines) SetPage ¶ added in v0.9.18
func (ls *ListVirtualMachines) SetPage(page int)
SetPage sets the current apge
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 { DiskOfferingID *UUID `json:"diskofferingid,omitempty" doc:"List volumes by disk offering"` ID *UUID `json:"id,omitempty" doc:"The ID of the disk volume"` Keyword string `json:"keyword,omitempty" doc:"List by keyword"` Name string `json:"name,omitempty" doc:"The name of the disk volume"` Page int `json:"page,omitempty"` PageSize int `json:"pagesize,omitempty"` Tags []ResourceTag `json:"tags,omitempty" doc:"List resources by tags (key/value pairs). Note: multiple tags are OR'ed, not AND'ed."` 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) Each ¶ added in v0.13.0
func (ListVolumes) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListVolumes) ListRequest ¶ added in v0.13.0
func (ls *ListVolumes) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListVolumes) Response ¶ added in v0.13.0
func (ListVolumes) Response() interface{}
Response returns the struct to unmarshal
func (*ListVolumes) SetPage ¶ added in v0.9.18
func (ls *ListVolumes) SetPage(page int)
SetPage sets the current apge
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 */ 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) Each ¶ added in v0.13.0
func (ListZones) Each(resp interface{}, callback IterateItemFunc)
Each triggers the callback for each, valid answer or any non 404 issue
func (*ListZones) ListRequest ¶ added in v0.13.0
func (ls *ListZones) ListRequest() (ListCommand, error)
ListRequest returns itself
func (ListZones) Response ¶ added in v0.13.0
func (ListZones) Response() interface{}
Response returns the struct to unmarshal
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 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"` 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"` 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"` 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,omitempty" 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 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 *UUID `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
func (OSCategory) ListRequest ¶ added in v0.13.0
func (osCat OSCategory) ListRequest() (ListCommand, error)
ListRequest builds the ListOSCategories request
type PCIDevice ¶ added in v0.9.30
type PCIDevice struct { PCIVendorName string `json:"pcivendorname,omitempty" doc:"Device vendor name of pci card"` DeviceID string `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 string `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
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
func (QueryAsyncJobResult) Response ¶ added in v0.13.0
func (QueryAsyncJobResult) Response() interface{}
Response returns the struct to unmarshal
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
func (*QueryReverseDNSForPublicIPAddress) Response ¶ added in v0.13.0
func (*QueryReverseDNSForPublicIPAddress) Response() interface{}
Response returns the struct to unmarshal
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
func (*QueryReverseDNSForVirtualMachine) Response ¶ added in v0.13.0
func (*QueryReverseDNSForVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
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
func (RebootVirtualMachine) AsyncResponse ¶ added in v0.13.0
func (RebootVirtualMachine) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (RebootVirtualMachine) Response ¶ added in v0.13.0
func (RebootVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
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
func (RecoverVirtualMachine) Response ¶ added in v0.13.0
func (RecoverVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
type RegisterCustomTemplate ¶ added in v0.17.0
type RegisterCustomTemplate struct { BootMode string `json:"bootmode" doc:"the template boot mode (legacy/uefi)"` Checksum string `json:"checksum" 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,omitempty" doc:"the display text of the template"` Name string `json:"name" doc:"the name of the template"` PasswordEnabled *bool `json:"passwordenabled,omitempty" doc:"true if the template supports the password reset feature; default is false"` 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"` ZoneID *UUID `json:"zoneid" doc:"the ID of the zone the template is to be hosted on"` // contains filtered or unexported fields }
RegisterCustomTemplate registers a new template
func (RegisterCustomTemplate) AsyncResponse ¶ added in v0.17.0
func (RegisterCustomTemplate) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (RegisterCustomTemplate) Response ¶ added in v0.17.0
func (RegisterCustomTemplate) Response() interface{}
Response returns the struct to unmarshal
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"` // contains filtered or unexported fields }
RegisterSSHKeyPair represents a new registration of a public key in a keypair
func (RegisterSSHKeyPair) Response ¶ added in v0.13.0
func (RegisterSSHKeyPair) Response() interface{}
Response returns the struct to unmarshal
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
func (RegisterUserKeys) Response ¶ added in v0.13.0
func (RegisterUserKeys) Response() interface{}
Response returns the struct to unmarshal
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
func (RemoveIPFromNic) AsyncResponse ¶ added in v0.13.0
func (RemoveIPFromNic) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (RemoveIPFromNic) Response ¶ added in v0.13.0
func (RemoveIPFromNic) Response() interface{}
Response returns the struct to unmarshal
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
func (RemoveNicFromVirtualMachine) AsyncResponse ¶ added in v0.13.0
func (RemoveNicFromVirtualMachine) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (RemoveNicFromVirtualMachine) Response ¶ added in v0.13.0
func (RemoveNicFromVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
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...
func (ResetPasswordForVirtualMachine) AsyncResponse ¶ added in v0.13.0
func (ResetPasswordForVirtualMachine) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (ResetPasswordForVirtualMachine) Response ¶ added in v0.13.0
func (ResetPasswordForVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
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"` // contains filtered or unexported fields }
ResetSSHKeyForVirtualMachine (Async) represents a change for the key pairs
func (ResetSSHKeyForVirtualMachine) AsyncResponse ¶ added in v0.13.0
func (ResetSSHKeyForVirtualMachine) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (ResetSSHKeyForVirtualMachine) Response ¶ added in v0.13.0
func (ResetSSHKeyForVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
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"` Size int64 `json:"size,omitempty" doc:"New volume size in G (must be larger than current size since shrinking the disk is not supported)"` // contains filtered or unexported fields }
ResizeVolume (Async) resizes a volume
func (ResizeVolume) AsyncResponse ¶ added in v0.13.0
func (ResizeVolume) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (ResizeVolume) Response ¶ added in v0.13.0
func (ResizeVolume) Response() interface{}
Response returns the struct to unmarshal
type ResourceDetail ¶ added in v0.13.0
type ResourceDetail ResourceTag
ResourceDetail represents extra details
func (ResourceDetail) ListRequest ¶ added in v0.13.0
func (detail ResourceDetail) ListRequest() (ListCommand, error)
ListRequest builds the ListResourceDetails request
type ResourceLimit ¶ added in v0.9.7
type ResourceLimit struct { 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 `` /* 180-byte string literal not displayed */ }
ResourceLimit represents the limit on a particular resource
func (ResourceLimit) ListRequest ¶ added in v0.13.0
func (limit ResourceLimit) ListRequest() (ListCommand, error)
ListRequest builds the ListResourceLimits request
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"` 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
https://community.exoscale.com/documentation/compute/instance-tags/
func (ResourceTag) ListRequest ¶ added in v0.13.0
func (tag ResourceTag) ListRequest() (ListCommand, error)
ListRequest builds the ListZones request
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
func (RestartNetwork) AsyncResponse ¶ added in v0.13.0
func (RestartNetwork) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (RestartNetwork) Response ¶ added in v0.13.0
func (RestartNetwork) Response() interface{}
Response returns the struct to unmarshal
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
func (RestoreVirtualMachine) AsyncResponse ¶ added in v0.13.0
func (RestoreVirtualMachine) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (RestoreVirtualMachine) Response ¶ added in v0.13.0
func (RestoreVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
type RetryStrategyFunc ¶ added in v0.9.11
RetryStrategyFunc represents a how much time to wait between two calls to the API
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
func (RevertSnapshot) AsyncResponse ¶ added in v0.13.0
func (RevertSnapshot) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (RevertSnapshot) Response ¶ added in v0.13.0
func (RevertSnapshot) Response() interface{}
Response returns the struct to unmarshal
type RevokeAPIKey ¶ added in v0.20.0
type RevokeAPIKey struct { Key string `json:"key"` // contains filtered or unexported fields }
RevokeAPIKey represents a revocation of an API key
func (RevokeAPIKey) Response ¶ added in v0.20.0
func (RevokeAPIKey) Response() interface{}
Response returns the struct to unmarshal
type RevokeAPIKeyResponse ¶ added in v0.20.0
type RevokeAPIKeyResponse struct {
Success bool `json:"success"`
}
RevokeAPIKeyResponse represents the response to an API key revocation
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
func (RevokeSecurityGroupEgress) AsyncResponse ¶ added in v0.13.0
func (RevokeSecurityGroupEgress) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (RevokeSecurityGroupEgress) Response ¶ added in v0.13.0
func (RevokeSecurityGroupEgress) Response() interface{}
Response returns the struct to unmarshal
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
func (RevokeSecurityGroupIngress) AsyncResponse ¶ added in v0.13.0
func (RevokeSecurityGroupIngress) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (RevokeSecurityGroupIngress) Response ¶ added in v0.13.0
func (RevokeSecurityGroupIngress) Response() interface{}
Response returns the struct to unmarshal
type RunstatusErrorResponse ¶ added in v0.13.2
type RunstatusErrorResponse struct {
Detail string `json:"detail"`
}
RunstatusErrorResponse represents the default errors
func (RunstatusErrorResponse) Error ¶ added in v0.13.2
func (req RunstatusErrorResponse) Error() string
Error formats the DNSerror into a string
type RunstatusEvent ¶ added in v0.13.2
type RunstatusEvent struct { Created *time.Time `json:"created,omitempty"` State string `json:"state,omitempty"` Status string `json:"status"` Text string `json:"text"` }
RunstatusEvent is a runstatus event
type RunstatusIncident ¶ added in v0.13.2
type RunstatusIncident struct { EndDate *time.Time `json:"end_date,omitempty"` Events []RunstatusEvent `json:"events,omitempty"` EventsURL string `json:"events_url,omitempty"` ID int `json:"id,omitempty"` PageURL string `json:"page_url,omitempty"` // fake field PostMortem string `json:"post_mortem,omitempty"` RealTime bool `json:"real_time,omitempty"` Services []string `json:"services"` StartDate *time.Time `json:"start_date,omitempty"` State string `json:"state"` Status string `json:"status"` StatusText string `json:"status_text"` Title string `json:"title"` URL string `json:"url,omitempty"` }
RunstatusIncident is a runstatus incident
func (RunstatusIncident) Match ¶ added in v0.13.2
func (incident RunstatusIncident) Match(other RunstatusIncident) bool
Match returns true if the other incident has got similarities with itself
type RunstatusIncidentList ¶ added in v0.13.2
type RunstatusIncidentList struct { Next string `json:"next"` Previous string `json:"previous"` Incidents []RunstatusIncident `json:"results"` }
RunstatusIncidentList is a list of incident
type RunstatusMaintenance ¶ added in v0.13.2
type RunstatusMaintenance struct { Created *time.Time `json:"created,omitempty"` Description string `json:"description,omitempty"` EndDate *time.Time `json:"end_date"` Events []RunstatusEvent `json:"events,omitempty"` EventsURL string `json:"events_url,omitempty"` ID int `json:"id,omitempty"` // missing field PageURL string `json:"page_url,omitempty"` // fake field RealTime bool `json:"real_time,omitempty"` Services []string `json:"services"` StartDate *time.Time `json:"start_date"` Status string `json:"status"` Title string `json:"title"` URL string `json:"url,omitempty"` }
RunstatusMaintenance is a runstatus maintenance
func (*RunstatusMaintenance) FakeID ¶ added in v0.13.2
func (maintenance *RunstatusMaintenance) FakeID() error
FakeID fills up the ID field as it's currently missing
func (RunstatusMaintenance) Match ¶ added in v0.13.2
func (maintenance RunstatusMaintenance) Match(other RunstatusMaintenance) bool
Match returns true if the other maintenance has got similarities with itself
type RunstatusMaintenanceList ¶ added in v0.13.2
type RunstatusMaintenanceList struct { Next string `json:"next"` Previous string `json:"previous"` Maintenances []RunstatusMaintenance `json:"results"` }
RunstatusMaintenanceList is a list of incident
type RunstatusPage ¶ added in v0.13.2
type RunstatusPage struct { Created *time.Time `json:"created,omitempty"` DarkTheme bool `json:"dark_theme,omitempty"` Domain string `json:"domain,omitempty"` GradientEnd string `json:"gradient_end,omitempty"` GradientStart string `json:"gradient_start,omitempty"` HeaderBackground string `json:"header_background,omitempty"` ID int `json:"id,omitempty"` Incidents []RunstatusIncident `json:"incidents,omitempty"` IncidentsURL string `json:"incidents_url,omitempty"` Logo string `json:"logo,omitempty"` Maintenances []RunstatusMaintenance `json:"maintenances,omitempty"` MaintenancesURL string `json:"maintenances_url,omitempty"` Name string `json:"name"` // fake field (used to post a new runstatus page) OkText string `json:"ok_text,omitempty"` Plan string `json:"plan,omitempty"` PublicURL string `json:"public_url,omitempty"` Services []RunstatusService `json:"services,omitempty"` ServicesURL string `json:"services_url,omitempty"` State string `json:"state,omitempty"` Subdomain string `json:"subdomain"` SupportEmail string `json:"support_email,omitempty"` TimeZone string `json:"time_zone,omitempty"` Title string `json:"title,omitempty"` TitleColor string `json:"title_color,omitempty"` TwitterUsername string `json:"twitter_username,omitempty"` URL string `json:"url,omitempty"` }
RunstatusPage runstatus page
func (RunstatusPage) Match ¶ added in v0.13.2
func (page RunstatusPage) Match(other RunstatusPage) bool
Match returns true if the other page has got similarities with itself
type RunstatusPageList ¶ added in v0.13.2
type RunstatusPageList struct { Next string `json:"next"` Previous string `json:"previous"` Pages []RunstatusPage `json:"results"` }
RunstatusPageList runstatus page list
type RunstatusService ¶ added in v0.13.2
type RunstatusService struct { ID int `json:"id"` // missing field Name string `json:"name"` PageURL string `json:"page_url,omitempty"` // fake field State string `json:"state,omitempty"` URL string `json:"url,omitempty"` }
RunstatusService is a runstatus service
func (*RunstatusService) FakeID ¶ added in v0.13.2
func (service *RunstatusService) FakeID() error
FakeID fills up the ID field as it's currently missing
func (RunstatusService) Match ¶ added in v0.13.2
func (service RunstatusService) Match(other RunstatusService) bool
Match returns true if the other service has got similarities with itself
type RunstatusServiceList ¶ added in v0.13.2
type RunstatusServiceList struct { Next string `json:"next"` Previous string `json:"previous"` Services []RunstatusService `json:"results"` }
RunstatusServiceList service list
type RunstatusValidationErrorResponse ¶ added in v0.13.3
RunstatusValidationErrorResponse represents an error in the API
func (RunstatusValidationErrorResponse) Error ¶ added in v0.13.3
func (req RunstatusValidationErrorResponse) Error() string
Error formats the DNSerror into a string
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 ScaleInstancePool ¶ added in v0.20.0
type ScaleInstancePool struct { ID *UUID `json:"id"` ZoneID *UUID `json:"zoneid"` Size int `json:"size"` // contains filtered or unexported fields }
ScaleInstancePool represents an Instance Pool scaling API request.
func (ScaleInstancePool) Response ¶ added in v0.20.0
func (ScaleInstancePool) Response() interface{}
Response returns an empty structure to unmarshal an Instance Pool scaling API response into.
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.
func (ScaleVirtualMachine) AsyncResponse ¶ added in v0.13.0
func (ScaleVirtualMachine) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (ScaleVirtualMachine) Response ¶ added in v0.13.0
func (ScaleVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
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"` EgressRule []EgressRule `json:"egressrule,omitempty" doc:"the list of egress rules associated with the security group"` ID *UUID `json:"id" 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."` 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" 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"` 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) ListRequest ¶ added in v0.12.3
func (ss Snapshot) ListRequest() (ListCommand, error)
ListRequest builds the ListSnapshot request
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"` RescueProfile string `json:"rescueprofile,omitempty" doc:"An optional rescue profile to use when booting"` // contains filtered or unexported fields }
StartVirtualMachine (Async) represents the creation of the virtual machine
func (StartVirtualMachine) AsyncResponse ¶ added in v0.13.0
func (StartVirtualMachine) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (StartVirtualMachine) Response ¶ added in v0.13.0
func (StartVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
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
func (StopVirtualMachine) AsyncResponse ¶ added in v0.13.0
func (StopVirtualMachine) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (StopVirtualMachine) Response ¶ added in v0.13.0
func (StopVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
type Taggable ¶ added in v0.9.7
type Taggable interface { // ResourceType is the name of the Taggable type ResourceType() string }
Taggable represents a resource to which tags can be 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"` BootMode string `json:"bootmode" doc:"the template boot mode (legacy/uefi)"` 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"` 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 target hypervisor for the template"` 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"` OsCategoryID *UUID `json:"oscategoryid,omitempty" doc:"the ID of the OS category for this template"` OsCategoryName string `json:"oscategoryname,omitempty" doc:"the name of the OS category for this template"` 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.
func (Template) ListRequest ¶ added in v0.9.20
func (template 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
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) DeepCopyInto ¶ added in v0.13.3
DeepCopyInto copies the receiver into out.
In must be non nil.
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 UUID.
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
func (UpdateDefaultNicForVirtualMachine) AsyncResponse ¶ added in v0.13.0
func (UpdateDefaultNicForVirtualMachine) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (UpdateDefaultNicForVirtualMachine) Response ¶ added in v0.13.0
func (UpdateDefaultNicForVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
type UpdateIPAddress ¶ added in v0.9.0
type UpdateIPAddress struct { Description string `json:"description,omitempty" doc:"The IP address description."` HealthcheckInterval int64 `json:"interval,omitempty" doc:"healthcheck definition: time in seconds to wait for each check. Default: 10, minimum: 5"` HealthcheckMode string `json:"mode,omitempty" doc:"healthcheck definition: healthcheck mode can be either 'tcp', 'http', or 'https'"` HealthcheckPath string `` /* 163-byte string literal not displayed */ HealthcheckPort int64 `` /* 143-byte string literal not displayed */ HealthcheckStrikesFail int64 `` /* 136-byte string literal not displayed */ HealthcheckStrikesOk int64 `` /* 135-byte string literal not displayed */ HealthcheckTimeout int64 `` /* 139-byte string literal not displayed */ HealthcheckTLSSNI string `json:"tls-sni,omitempty" doc:"healthcheck definition: server name to present for HTTPS checks"` HealthcheckTLSSkipVerify bool `json:"tls-skip-verify,omitempty" doc:"healthcheck definition: bypass certificate chain verification for HTTPS checks"` ID *UUID `json:"id" doc:"the id of the public IP address to update"` // contains filtered or unexported fields }
UpdateIPAddress (Async) represents the IP modification
func (UpdateIPAddress) AsyncResponse ¶ added in v0.13.0
func (UpdateIPAddress) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (UpdateIPAddress) Response ¶ added in v0.13.0
func (UpdateIPAddress) Response() interface{}
Response returns the struct to unmarshal
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
func (UpdateInstanceGroup) Response ¶ added in v0.13.0
func (UpdateInstanceGroup) Response() interface{}
Response returns the struct to unmarshal
type UpdateInstancePool ¶ added in v0.20.0
type UpdateInstancePool struct { ID *UUID `json:"id"` ZoneID *UUID `json:"zoneid"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` TemplateID *UUID `json:"templateid,omitempty"` RootDiskSize int `json:"rootdisksize,omitempty"` UserData string `json:"userdata,omitempty"` IPv6 bool `json:"ipv6,omitempty"` // contains filtered or unexported fields }
UpdateInstancePool represents an Instance Pool update API request.
func (UpdateInstancePool) Response ¶ added in v0.20.0
func (UpdateInstancePool) Response() interface{}
Response returns an empty structure to unmarshal an Instance Pool update API response into.
type UpdateNetwork ¶ added in v0.9.0
type UpdateNetwork struct { ChangeCIDR *bool `json:"changecidr,omitempty" doc:"Force update even if cidr type is different"` 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"` 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
func (UpdateNetwork) AsyncResponse ¶ added in v0.13.0
func (UpdateNetwork) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (UpdateNetwork) Response ¶ added in v0.13.0
func (UpdateNetwork) Response() interface{}
Response returns the struct to unmarshal
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
func (*UpdateReverseDNSForPublicIPAddress) Response ¶ added in v0.13.0
func (*UpdateReverseDNSForPublicIPAddress) Response() interface{}
Response returns the struct to unmarshal
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
func (*UpdateReverseDNSForVirtualMachine) Response ¶ added in v0.13.0
func (*UpdateReverseDNSForVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
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 an Affinity Group.
func (UpdateVMAffinityGroup) AsyncResponse ¶ added in v0.13.0
func (UpdateVMAffinityGroup) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job.
func (UpdateVMAffinityGroup) Response ¶ added in v0.13.0
func (UpdateVMAffinityGroup) Response() interface{}
Response returns the struct to unmarshal.
type UpdateVMNicIP ¶ added in v0.11.5
type UpdateVMNicIP struct { IPAddress net.IP `` /* 210-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
func (UpdateVMNicIP) AsyncResponse ¶ added in v0.13.0
func (UpdateVMNicIP) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (UpdateVMNicIP) Response ¶ added in v0.13.0
func (UpdateVMNicIP) Response() interface{}
Response returns the struct to unmarshal
type UpdateVirtualMachine ¶ added in v0.9.0
type UpdateVirtualMachine struct { ID *UUID `json:"id" doc:"The ID of the virtual machine"` Details map[string]string `json:"details,omitempty" doc:"Details in key/value pairs."` DisplayName string `json:"displayname,omitempty" doc:"user generated name"` Group string `json:"group,omitempty" doc:"group of the virtual machine"` 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
func (UpdateVirtualMachine) Response ¶ added in v0.13.0
func (UpdateVirtualMachine) Response() interface{}
Response returns the struct to unmarshal
type UpdateVirtualMachineSecurityGroups ¶ added in v0.39.0
type UpdateVirtualMachineSecurityGroups struct { ID *UUID `json:"id" doc:"The ID of the virtual machine"` SecurityGroupIDs []UUID `json:"securitygroupids,omitempty" doc:"list of security group ids to be applied on the virtual machine."` // contains filtered or unexported fields }
UpdateVirtualMachineSecurityGroups represents the update of the virtual machine security group membership
func (UpdateVirtualMachineSecurityGroups) AsyncResponse ¶ added in v0.39.0
func (UpdateVirtualMachineSecurityGroups) AsyncResponse() interface{}
AsyncResponse returns the struct to unmarshal the async job
func (UpdateVirtualMachineSecurityGroups) Response ¶ added in v0.39.0
func (UpdateVirtualMachineSecurityGroups) Response() interface{}
Response returns the struct to unmarshal
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"` Created string `json:"created,omitempty" doc:"the date and time the user account was created"` 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"` 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
func (User) ListRequest ¶ added in v0.13.0
func (user User) ListRequest() (ListCommand, error)
ListRequest builds the ListUsers request
type UserSecurityGroup ¶
type UserSecurityGroup struct {
Group string `json:"group,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."` 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"` HostName string `json:"hostname,omitempty" doc:"the name of the host for the virtual machine"` 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"` 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"` Manager string `json:"manager,omitempty" doc:"type of virtual machine manager"` ManagerID *UUID `json:"managerid,omitempty" doc:"ID of the virtual machine manager"` 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"` OSTypeID *UUID `json:"ostypeid,omitempty" doc:"OS type id of the vm"` 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" doc:"Base 64 encoded VM user data"` VirtualMachineID *UUID `json:"virtualmachineid" 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."` 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 *UUID `` // 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"` 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
func (Zone) ListRequest ¶ added in v0.9.18
func (zone Zone) ListRequest() (ListCommand, error)
ListRequest builds the ListZones request
Source Files
¶
- accounts.go
- accounts_response.go
- addresses.go
- affinity_groups.go
- affinitygroups_response.go
- antiaffinity_groups.go
- antiaffinity_groups_response.go
- apis.go
- async_jobs.go
- asyncjobs_response.go
- cidr.go
- client.go
- cserrorcode_string.go
- dns.go
- doc.go
- error.go
- errorcode_string.go
- events.go
- events_response.go
- eventtypes_response.go
- iam_apikey.go
- instance_groups.go
- instance_pool.go
- instancegroups_response.go
- isos.go
- isos_response.go
- jobstatustype_string.go
- macaddress.go
- networks.go
- networks_response.go
- nics.go
- nics_response.go
- oscategories_response.go
- publicipaddresses_response.go
- record_string.go
- request.go
- request_type.go
- resource_limits.go
- resource_metadata.go
- resourcedetails_response.go
- resourcelimits_response.go
- reversedns.go
- runstatus.go
- runstatus_event.go
- runstatus_incident.go
- runstatus_maintenance.go
- runstatus_page.go
- runstatus_service.go
- security_groups.go
- securitygroups_response.go
- serialization.go
- service_offerings.go
- serviceofferings_response.go
- snapshots.go
- snapshots_response.go
- sos_buckets_usage.go
- ssh_keypairs.go
- sshkeypairs_response.go
- tags.go
- tags_response.go
- templates.go
- templates_response.go
- users.go
- users_response.go
- uuid.go
- version.go
- virtual_machines.go
- virtualmachines_response.go
- volumes.go
- volumes_response.go
- zones.go
- zones_response.go
Directories
¶
Path | Synopsis |
---|---|
Package admin contains the privileged API calls.
|
Package admin contains the privileged API calls. |
Package v2 is the new Exoscale client API binding.
|
Package v2 is the new Exoscale client API binding. |
api
Package api implements low-level primitives for interacting with the Exoscale API.
|
Package api implements low-level primitives for interacting with the Exoscale API. |
oapi
Package oapi provides primitives to interact with the openapi HTTP API.
|
Package oapi provides primitives to interact with the openapi HTTP API. |
v3
|
|
generator
Module
|
|
Package version stores the current version of the egoscale package.
|
Package version stores the current version of the egoscale package. |