instances

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: MPL-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Action

func Action(client *gcorecloud.ServiceClient, instanceID string, opts ActionOptsBuilder) (r tasks.Result)

Action run an action for the instance.

func MetadataItemDelete added in v0.8.13

func MetadataItemDelete(client *gcorecloud.ServiceClient, id string, opts MetadataItemOpts) (r metadata.MetadataActionResult)

MetadataItemDelete deletes defined metadata key for an instance.

func MetadataItemGet added in v0.8.13

func MetadataItemGet(client *gcorecloud.ServiceClient, id string, opts MetadataItemOpts) (r metadata.MetadataResult)

MetadataItemGet gets defined metadata key for an instance.

Types

type ActionOpts

type ActionOpts struct {
	Action          types.InstanceActionType `json:"action" required:"true" validate:"required,enum"`
	ActivateProfile *bool                    `json:"activate_profile,omitempty"`
}

ActionOpts represents options used to run action.

func (ActionOpts) ToActionMap

func (opts ActionOpts) ToActionMap() (map[string]interface{}, error)

ToActionMap builds a request body from ActionOpts.

func (ActionOpts) Validate

func (opts ActionOpts) Validate() error

Validate checks if the ActionOpts is valid.

type ActionOptsBuilder

type ActionOptsBuilder interface {
	ToActionMap() (map[string]interface{}, error)
}

ActionOptsBuilder allows extensions to add parameters to the action request.

type MetadataItemBuilder added in v0.8.13

type MetadataItemBuilder interface {
	ToMetadataItemQuery() (string, error)
}

type MetadataItemOpts added in v0.8.13

type MetadataItemOpts struct {
	Key string `q:"key" validate:"required"`
}

MetadataItemOpts represents options used to find a metadata.

func (MetadataItemOpts) ToMetadataItemQuery added in v0.8.13

func (opts MetadataItemOpts) ToMetadataItemQuery() (string, error)

ToMetadataItemQuery builds a query string from MetadataItemOpts.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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