Documentation
¶
Index ¶
- Constants
- func Create(client *gcorecloud.ServiceClient, opts CreateOptsBuilder) (r tasks.Result)
- func Delete(client *gcorecloud.ServiceClient, instanceID string, opts DeleteOptsBuilder) (r tasks.Result)
- func ExtractInstanceIDFromTask(task *tasks.Task) (string, error)
- func ExtractInstanceInterfacesInto(r pagination.Page, v interface{}) error
- func ExtractInstanceSecurityGroupInto(r pagination.Page, v interface{}) error
- func ExtractInstanceSecurityGroups(r pagination.Page) ([]gcorecloud.ItemIDName, error)
- func ExtractInstancesInto(r pagination.Page, v interface{}) error
- func ExtractMetadataInto(r pagination.Page, v interface{}) error
- func List(client *gcorecloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- func ListInterfaces(client *gcorecloud.ServiceClient, id string) pagination.Pager
- func ListSecurityGroups(client *gcorecloud.ServiceClient, id string) pagination.Pager
- func ListSecurityGroupsAll(client *gcorecloud.ServiceClient, id string) ([]gcorecloud.ItemIDName, error)
- func MetadataList(client *gcorecloud.ServiceClient, id string) pagination.Pager
- func Resize(client *gcorecloud.ServiceClient, id string, opts ChangeFlavorOptsBuilder) (r tasks.Result)
- type ChangeFlavorOpts
- type ChangeFlavorOptsBuilder
- type CreateNewInterfaceFloatingIPOpts
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type CreateVolumeOpts
- type DeleteOpts
- type DeleteOptsBuilder
- type DeleteResult
- type FloatingIP
- type GetResult
- type Instance
- type InstanceAddress
- type InstanceInterfacePage
- type InstancePage
- type InstanceSecurityGroupPage
- type InstanceTaskResult
- type InstanceVolume
- type Interface
- type InterfaceActionResult
- type InterfaceOpts
- type InterfaceOptsBuilder
- type ListOpts
- type ListOptsBuilder
- type Metadata
- type MetadataActionResult
- func MetadataCreate(client *gcorecloud.ServiceClient, id string, opts MetadataSetOpts) (r MetadataActionResult)
- func MetadataDelete(client *gcorecloud.ServiceClient, id string, key string) (r MetadataActionResult)
- func MetadataUpdate(client *gcorecloud.ServiceClient, id string, opts MetadataSetOpts) (r MetadataActionResult)
- type MetadataOpts
- type MetadataOptsBuilder
- type MetadataPage
- type MetadataResult
- type MetadataSetOpts
- type NetworkDetail
- type PortIP
- type SecurityGroupActionResult
- type SecurityGroupOpts
- type SecurityGroupOptsBuilder
- type Subnet
- type UpdateResult
- func PowerCycle(client *gcorecloud.ServiceClient, id string) (r UpdateResult)
- func Reboot(client *gcorecloud.ServiceClient, id string) (r UpdateResult)
- func Resume(client *gcorecloud.ServiceClient, id string) (r UpdateResult)
- func Start(client *gcorecloud.ServiceClient, id string) (r UpdateResult)
- func Stop(client *gcorecloud.ServiceClient, id string) (r UpdateResult)
- func Suspend(client *gcorecloud.ServiceClient, id string) (r UpdateResult)
Constants ¶
const DefaultAvailabilityZone = "nova"
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(client *gcorecloud.ServiceClient, opts CreateOptsBuilder) (r tasks.Result)
Create creates an instance.
func Delete ¶
func Delete(client *gcorecloud.ServiceClient, instanceID string, opts DeleteOptsBuilder) (r tasks.Result)
func ExtractInstanceInterfacesInto ¶
func ExtractInstanceInterfacesInto(r pagination.Page, v interface{}) error
func ExtractInstanceSecurityGroupInto ¶
func ExtractInstanceSecurityGroupInto(r pagination.Page, v interface{}) error
func ExtractInstanceSecurityGroups ¶
func ExtractInstanceSecurityGroups(r pagination.Page) ([]gcorecloud.ItemIDName, error)
ExtractInstanceSecurityGroups accepts a Page struct, specifically a InstanceSecurityGroupPage struct, and extracts the elements into a slice of instance security group structs. In other words, a generic collection is mapped into a relevant slice.
func ExtractInstancesInto ¶
func ExtractInstancesInto(r pagination.Page, v interface{}) error
func ExtractMetadataInto ¶
func ExtractMetadataInto(r pagination.Page, v interface{}) error
func List ¶
func List(client *gcorecloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
func ListInterfaces ¶
func ListInterfaces(client *gcorecloud.ServiceClient, id string) pagination.Pager
ListInterfaces retrieves network interfaces for instance
func ListSecurityGroups ¶
func ListSecurityGroups(client *gcorecloud.ServiceClient, id string) pagination.Pager
ListSecurityGroups retrieves security groups interfaces for instance
func ListSecurityGroupsAll ¶
func ListSecurityGroupsAll(client *gcorecloud.ServiceClient, id string) ([]gcorecloud.ItemIDName, error)
ListSecurityGroupsAll is a convenience function that returns all instance security groups.
func MetadataList ¶
func MetadataList(client *gcorecloud.ServiceClient, id string) pagination.Pager
func Resize ¶
func Resize(client *gcorecloud.ServiceClient, id string, opts ChangeFlavorOptsBuilder) (r tasks.Result)
Resize instance.
Types ¶
type ChangeFlavorOpts ¶
type ChangeFlavorOpts struct {
FlavorID string `json:"flavor_id" required:"true" validate:"required"`
}
func (ChangeFlavorOpts) ToChangeFlavorActionMap ¶
func (opts ChangeFlavorOpts) ToChangeFlavorActionMap() (map[string]interface{}, error)
ToChangeFlavorActionMap builds a request body from ChangeFlavorOpts.
func (ChangeFlavorOpts) Validate ¶
func (opts ChangeFlavorOpts) Validate() error
type ChangeFlavorOptsBuilder ¶
type ChangeFlavorOptsBuilder interface {
ToChangeFlavorActionMap() (map[string]interface{}, error)
}
ChangeFlavorOptsBuilder builds parameters or change flavor request.
type CreateNewInterfaceFloatingIPOpts ¶
type CreateNewInterfaceFloatingIPOpts struct {
Source types.FloatingIPSource `json:"source" validate:"required,enum"`
ExistingFloatingID string `json:"existing_floating_id" validate:"rfe=Source:existing,sfe=Source:new,omitempty,ip"`
}
func (CreateNewInterfaceFloatingIPOpts) Validate ¶
func (opts CreateNewInterfaceFloatingIPOpts) Validate() error
Validate
type CreateOpts ¶
type CreateOpts struct {
Flavor string `json:"flavor" required:"true"`
Names []string `json:"names,omitempty" validate:"required_without=NameTemplates"`
NameTemplates []string `json:"name_templates,omitempty" validate:"required_without=Names"`
Volumes []CreateVolumeOpts `json:"volumes" required:"true" validate:"required,dive"`
Interfaces []InterfaceOpts `json:"interfaces" required:"true" validate:"required,dive"`
SecurityGroups []gcorecloud.ItemID `json:"security_groups" validate:"omitempty,dive,uuid4"`
Keypair string `json:"keypair_name"`
Password string `json:"password" validate:"omitempty,required_with=Username"`
Username string `json:"username" validate:"omitempty,required_with=Password"`
UserData string `json:"user_data" validate:"omitempty,base64"`
Metadata *MetadataSetOpts `json:"metadata,omitempty" validate:"omitempty,dive"`
Configuration *MetadataSetOpts `json:"configuration,omitempty" validate:"omitempty,dive"`
AllowAppPorts bool `json:"allow_app_ports,omitempty"`
}
CreateOpts represents options used to create a instance.
func (CreateOpts) ToInstanceCreateMap ¶
func (opts CreateOpts) ToInstanceCreateMap() (map[string]interface{}, error)
ToInstanceCreateMap builds a request body from CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult represents the result of a create operation. Call its Extract method to interpret it as a Instance.
func (CreateResult) Extract ¶
Extract is a function that accepts a result and extracts a instance resource.
func (CreateResult) ExtractInto ¶
func (r CreateResult) ExtractInto(v interface{}) error
type CreateVolumeOpts ¶
type CreateVolumeOpts struct {
Source types.VolumeSource `json:"source" required:"true" validate:"required,enum"`
BootIndex int `json:"boot_index"`
Size int `json:"size,omitempty" validate:"rfe=Source:image;new-volume,sfe=Source:snapshot;existing-volume"`
TypeName volumes.VolumeType `json:"type_name,omitempty" validate:"omitempty"`
AttachmentTag string `json:"attachment_tag,omitempty" validate:"omitempty"`
Name string `json:"name,omitempty" validate:"omitempty"`
ImageID string `` /* 156-byte string literal not displayed */
SnapshotID string `` /* 156-byte string literal not displayed */
VolumeID string `` /* 156-byte string literal not displayed */
}
CreateVolumeOpts represents options used to create a volume.
func (*CreateVolumeOpts) Validate ¶
func (opts *CreateVolumeOpts) Validate() error
type DeleteOpts ¶
type DeleteOpts struct {
Volumes []string `q:"volumes" validate:"omitempty,dive,uuid4" delimiter:"comma"`
DeleteFloatings bool `q:"delete_floatings" validate:"omitempty,allowed_without=FloatingIPs"`
FloatingIPs []string `q:"floatings" validate:"omitempty,allowed_without=DeleteFloatings,dive,uuid4" delimiter:"comma"`
}
DeleteOpts. Set parameters for delete operation
func (DeleteOpts) ToInstanceDeleteQuery ¶
func (opts DeleteOpts) ToInstanceDeleteQuery() (string, error)
ToInstanceDeleteQuery formats a DeleteOpts into a query string.
func (*DeleteOpts) Validate ¶
func (opts *DeleteOpts) Validate() error
type DeleteOptsBuilder ¶
DeleteOptsBuilder allows extensions to add additional parameters to the Delete request.
type DeleteResult ¶
type DeleteResult struct {
// contains filtered or unexported fields
}
DeleteResult represents the result of a delete operation
func (DeleteResult) Extract ¶
Extract is a function that accepts a result and extracts a instance resource.
func (DeleteResult) ExtractInto ¶
func (r DeleteResult) ExtractInto(v interface{}) error
type FloatingIP ¶
type FloatingIP struct {
FloatingIPAddress net.IP `json:"floating_ip_address"`
RouterID string `json:"router_id"`
SubnetID string `json:"subnet_id"`
Status string `json:"status"`
ID string `json:"id"`
PortID string `json:"port_id"`
DNSDomain string `json:"dns_domain"`
DNSName string `json:"dns_name"`
FixedIPAddress net.IP `json:"fixed_ip_address"`
UpdatedAt *gcorecloud.JSONRFC3339Z `json:"updated_at"`
CreatedAt gcorecloud.JSONRFC3339Z `json:"created_at"`
CreatorTaskID *string `json:"creator_task_id"`
ProjectID int `json:"project_id"`
RegionID int `json:"region_id"`
Region string `json:"region"`
}
FloatingIP represents a floating ip of instance port.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult represents the result of a get operation. Call its Extract method to interpret it as a Instance.
func Get ¶
func Get(client *gcorecloud.ServiceClient, id string) (r GetResult)
Get retrieves a specific instance based on its unique ID.
func (GetResult) Extract ¶
Extract is a function that accepts a result and extracts a instance resource.
func (GetResult) ExtractInto ¶
func (r GetResult) ExtractInto(v interface{}) error
type Instance ¶
type Instance struct {
ID string `json:"instance_id"`
Name string `json:"instance_name"`
Description string `json:"instance_description"`
CreatedAt gcorecloud.JSONRFC3339ZZ `json:"instance_created"`
Status string `json:"status"`
VMState string `json:"vm_state"`
TaskState *string `json:"task_state"`
Flavor flavors.Flavor `json:"flavor"`
Metadata map[string]interface{} `json:"metadata"`
Volumes []InstanceVolume `json:"volumes"`
Addresses map[string][]InstanceAddress `json:"addresses"`
SecurityGroups []gcorecloud.ItemName `json:"security_groups"`
CreatorTaskID *string `json:"creator_task_id"`
TaskID *string `json:"task_id"`
ProjectID int `json:"project_id"`
RegionID int `json:"region_id"`
Region string `json:"region"`
AvailabilityZone string `json:"availability_zone"`
}
Instance represents a instance structure.
func ExtractInstances ¶
func ExtractInstances(r pagination.Page) ([]Instance, error)
ExtractInstances accepts a Page struct, specifically a InstancePage struct, and extracts the elements into a slice of instance structs. In other words, a generic collection is mapped into a relevant slice.
func ListAll ¶
func ListAll(client *gcorecloud.ServiceClient, opts ListOptsBuilder) ([]Instance, error)
ListAll is a convenience function that returns all instances.
func (*Instance) UnmarshalJSON ¶
UnmarshalJSON - implements Unmarshaler interface
type InstanceAddress ¶
type InstanceInterfacePage ¶
type InstanceInterfacePage struct {
pagination.LinkedPageBase
}
InstanceInterfacePage is the page returned by a pager when traversing over a collection of instance interfaces.
func (InstanceInterfacePage) IsEmpty ¶
func (r InstanceInterfacePage) IsEmpty() (bool, error)
IsEmpty checks whether a InstanceInterfacePage struct is empty.
func (InstanceInterfacePage) NextPageURL ¶
func (r InstanceInterfacePage) NextPageURL() (string, error)
NextPageURL is invoked when a paginated collection of instance interfaces has reached the end of a page and the pager seeks to traverse over a new one. In order to do this, it needs to construct the next page's URL.
type InstancePage ¶
type InstancePage struct {
pagination.LinkedPageBase
}
InstancePage is the page returned by a pager when traversing over a collection of instances.
func (InstancePage) IsEmpty ¶
func (r InstancePage) IsEmpty() (bool, error)
IsEmpty checks whether a InstancePage struct is empty.
func (InstancePage) NextPageURL ¶
func (r InstancePage) NextPageURL() (string, error)
NextPageURL is invoked when a paginated collection of instances has reached the end of a page and the pager seeks to traverse over a new one. In order to do this, it needs to construct the next page's URL.
type InstanceSecurityGroupPage ¶
type InstanceSecurityGroupPage struct {
pagination.LinkedPageBase
}
InstanceSecurityGroupPage is the page returned by a pager when traversing over a collection of instance security groups.
func (InstanceSecurityGroupPage) IsEmpty ¶
func (r InstanceSecurityGroupPage) IsEmpty() (bool, error)
IsEmpty checks whether a InstanceSecurityGroupPage struct is empty.
func (InstanceSecurityGroupPage) NextPageURL ¶
func (r InstanceSecurityGroupPage) NextPageURL() (string, error)
NextPageURL is invoked when a paginated collection of instance security groups has reached the end of a page and the pager seeks to traverse over a new one. In order to do this, it needs to construct the next page's URL.
type InstanceTaskResult ¶
type InstanceVolume ¶
type Interface ¶
type Interface struct {
PortID string `json:"port_id"`
MacAddress gcorecloud.MAC `json:"mac_address"`
NetworkID string `json:"network_id"`
IPAssignments []PortIP `json:"ip_assignments"`
NetworkDetails NetworkDetail `json:"network_details"`
FloatingIPDetails []FloatingIP `json:"floatingip_details"`
}
Interface represents a instance port interface.
func ExtractInstanceInterfaces ¶
func ExtractInstanceInterfaces(r pagination.Page) ([]Interface, error)
ExtractInstanceInterfaces accepts a Page struct, specifically a InstanceInterfacePage struct, and extracts the elements into a slice of instance interface structs. In other words, a generic collection is mapped into a relevant slice.
func ListInterfacesAll ¶
func ListInterfacesAll(client *gcorecloud.ServiceClient, id string) ([]Interface, error)
ListInterfacesAll is a convenience function that returns all instance interfaces.
type InterfaceActionResult ¶
type InterfaceActionResult struct {
gcorecloud.ErrResult
}
InterfaceActionResult represents the result of a actions operation(no content)
func AttachInterface ¶
func AttachInterface(client *gcorecloud.ServiceClient, id string, opts InterfaceOptsBuilder) (r InterfaceActionResult)
AttachInterface adds a interface to the instance.
func DetachInterface ¶
func DetachInterface(client *gcorecloud.ServiceClient, id string, opts InterfaceOptsBuilder) (r InterfaceActionResult)
DetachInterface removes a interface from the instance.
type InterfaceOpts ¶
type InterfaceOpts struct {
Type types.InterfaceType `json:"type,omitempty" validate:"omitempty,enum"`
NetworkID string `json:"network_id,omitempty" validate:"omitempty,uuid4"`
SubnetID string `json:"subnet_id,omitempty" validate:"omitempty,uuid4"`
PortID string `json:"port_id,omitempty" validate:"allowed_without_all=NetworkID SubnetID FloatingIP,omitempty,uuid4"`
IpAddress string `json:"ip_address,omitempty"`
FloatingIP *CreateNewInterfaceFloatingIPOpts `json:"floating_ip,omitempty" validate:"omitempty,dive"`
}
func (InterfaceOpts) ToInterfaceActionMap ¶
func (opts InterfaceOpts) ToInterfaceActionMap() (map[string]interface{}, error)
ToInterfaceActionMap builds a request body from CreateInterfaceOpts.
type InterfaceOptsBuilder ¶
InterfaceOptsBuilder allows extensions to add parameters to the interface request.
type ListOpts ¶
type ListOpts struct {
ExcludeSecGroup string `q:"exclude_secgroup"`
AvailableFloating bool `q:"available_floating"`
Name string `q:"name"`
FlavorID string `q:"flavor_id"`
Limit int `q:"limit" validate:"omitempty,gt=0"`
Offset int `q:"offset" validate:"omitempty,gt=0"`
}
ListOpts allows the filtering and sorting of paginated collections through the API.
func (ListOpts) ToInstanceListQuery ¶
ToInstanceListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
type Metadata ¶
type Metadata struct {
Key string `json:"key"`
Value string `json:"value"`
ReadOnly bool `json:"read_only"`
}
func ExtractMetadata ¶
func ExtractMetadata(r pagination.Page) ([]Metadata, error)
ExtractMetadata accepts a Page struct, specifically a MetadataPage struct, and extracts the elements into a slice of instance metadata structs. In other words, a generic collection is mapped into a relevant slice.
func MetadataListAll ¶
func MetadataListAll(client *gcorecloud.ServiceClient, id string) ([]Metadata, error)
type MetadataActionResult ¶
type MetadataActionResult struct {
gcorecloud.ErrResult
}
MetadataActionResult represents the result of a create, delete or update operation(no content)
func MetadataCreate ¶
func MetadataCreate(client *gcorecloud.ServiceClient, id string, opts MetadataSetOpts) (r MetadataActionResult)
MetadataCreate creates a metadata for an instance.
func MetadataDelete ¶
func MetadataDelete(client *gcorecloud.ServiceClient, id string, key string) (r MetadataActionResult)
MetadataDelete deletes defined metadata key for an instance.
func MetadataUpdate ¶
func MetadataUpdate(client *gcorecloud.ServiceClient, id string, opts MetadataSetOpts) (r MetadataActionResult)
MetadataUpdate updates a metadata for an instance.
type MetadataOpts ¶
type MetadataOpts struct {
Key string `json:"key" validate:"required,max=255"`
Value string `json:"value" validate:"required,max=255"`
}
MetadataOpts. Set parameters for Create or Update operation
type MetadataOptsBuilder ¶
MetadataOptsBuilder allows extensions to add additional parameters to the metadata Create and Update request.
type MetadataPage ¶
type MetadataPage struct {
pagination.LinkedPageBase
}
MetadataPage is the page returned by a pager when traversing over a collection of instance metadata objects.
func (MetadataPage) IsEmpty ¶
func (r MetadataPage) IsEmpty() (bool, error)
IsEmpty checks whether a MetadataPage struct is empty.
func (MetadataPage) NextPageURL ¶
func (r MetadataPage) NextPageURL() (string, error)
NextPageURL is invoked when a paginated collection of instance metadata objects has reached the end of a page and the pager seeks to traverse over a new one. In order to do this, it needs to construct the next page's URL.
type MetadataResult ¶
type MetadataResult struct {
// contains filtered or unexported fields
}
MetadataResult represents the result of a get operation
func MetadataGet ¶
func MetadataGet(client *gcorecloud.ServiceClient, id string, key string) (r MetadataResult)
MetadataGet gets defined metadata key for an instance.
func (MetadataResult) Extract ¶
func (r MetadataResult) Extract() (*Metadata, error)
Extract is a function that accepts a result and extracts a instance metadata resource.
func (MetadataResult) ExtractInto ¶
func (r MetadataResult) ExtractInto(v interface{}) error
type MetadataSetOpts ¶
type MetadataSetOpts struct {
Metadata []MetadataOpts `json:"metadata" validate:"required,min=1,dive"`
}
MetadataSetOpts. Set parameters for Create or Update operation
func (MetadataSetOpts) ToMetadataMap ¶
func (opts MetadataSetOpts) ToMetadataMap() (map[string]interface{}, error)
ToMetadataMap builds a request body from MetadataSetOpts.
type NetworkDetail ¶
type NetworkDetail struct {
Mtu int `json:"mtu"`
UpdatedAt *gcorecloud.JSONRFC3339Z `json:"updated_at"`
CreatedAt gcorecloud.JSONRFC3339Z `json:"created_at"`
ID string `json:"id"`
External bool `json:"external"`
Default bool `json:"default"`
Name string `json:"name"`
Subnets []Subnet `json:"subnets"`
ProjectID int `json:"project_id"`
RegionID int `json:"region_id"`
Region string `json:"region"`
TaskID *string `json:"task_id"`
CreatorTaskID *string `json:"creator_task_id"`
}
NetworkDetail represents a NetworkDetails of instance port.
type SecurityGroupActionResult ¶
type SecurityGroupActionResult struct {
gcorecloud.ErrResult
}
SecurityGroupActionResult represents the result of a actions operation(no content)
func AssignSecurityGroup ¶
func AssignSecurityGroup(client *gcorecloud.ServiceClient, id string, opts SecurityGroupOptsBuilder) (r SecurityGroupActionResult)
AssignSecurityGroup adds a security groups to the instance.
func UnAssignSecurityGroup ¶
func UnAssignSecurityGroup(client *gcorecloud.ServiceClient, id string, opts SecurityGroupOptsBuilder) (r SecurityGroupActionResult)
UnAssignSecurityGroup removes a security groups from the instance.
type SecurityGroupOpts ¶
type SecurityGroupOpts struct {
Name string `json:"name" required:"true" validate:"required"`
}
func (SecurityGroupOpts) ToSecurityGroupActionMap ¶
func (opts SecurityGroupOpts) ToSecurityGroupActionMap() (map[string]interface{}, error)
ToSecurityGroupActionMap builds a request body from SecurityGroupOpts.
type SecurityGroupOptsBuilder ¶
type SecurityGroupOptsBuilder interface {
ToSecurityGroupActionMap() (map[string]interface{}, error)
}
SecurityGroupOptsBuilder allows extensions to add parameters to the security groups request.
type Subnet ¶
type Subnet struct {
ID string `json:"id"`
Name string `json:"name"`
IPVersion gcorecloud.IPVersion `json:"ip_version"`
EnableDHCP bool `json:"enable_dhcp"`
Cidr gcorecloud.CIDR `json:"cidr"`
CreatedAt gcorecloud.JSONRFC3339Z `json:"created_at"`
UpdatedAt *gcorecloud.JSONRFC3339Z `json:"updated_at"`
NetworkID string `json:"network_id"`
TaskID *string `json:"task_id"`
CreatorTaskID *string `json:"creator_task_id"`
ProjectID int `json:"project_id"`
RegionID int `json:"region_id"`
Region string `json:"region"`
}
Subnet port subnet
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult represents the result of an update operation. Call its Extract method to interpret it as a Instance.
func PowerCycle ¶
func PowerCycle(client *gcorecloud.ServiceClient, id string) (r UpdateResult)
PowerCycle instance.
func Reboot ¶
func Reboot(client *gcorecloud.ServiceClient, id string) (r UpdateResult)
Reboot instance.
func Resume ¶
func Resume(client *gcorecloud.ServiceClient, id string) (r UpdateResult)
Resume instance.
func Start ¶
func Start(client *gcorecloud.ServiceClient, id string) (r UpdateResult)
Start instance.
func Suspend ¶
func Suspend(client *gcorecloud.ServiceClient, id string) (r UpdateResult)
Suspend instance.
func (UpdateResult) Extract ¶
Extract is a function that accepts a result and extracts a instance resource.
func (UpdateResult) ExtractInto ¶
func (r UpdateResult) ExtractInto(v interface{}) error