instances

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

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.

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.

Jump to

Keyboard shortcuts

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