snapshots

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(client *golangsdk.ServiceClient, id string) (err error)

func UpdateMetadata

func UpdateMetadata(client *golangsdk.ServiceClient, id string, opts UpdateMetadataOpts) (*map[string]interface{}, error)

Types

type CreateOpts

type CreateOpts struct {
	VolumeID    string                 `json:"volume_id" required:"true"`
	Description string                 `json:"display_description,omitempty"`
	Force       bool                   `json:"force,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
	Name        string                 `json:"display_name,omitempty"`
}

type ListOpts

type ListOpts struct {
	Name     string `q:"display_name"`
	Status   string `q:"status"`
	VolumeID string `q:"volume_id"`
}

type Snapshot

type Snapshot struct {
	// Current status of the Snapshot.
	Status string `json:"status"`
	// Display name.
	Name string `json:"display_name"`
	// Instances onto which the Snapshot is attached.
	Attachments []string `json:"attachments"`
	// Logical group.
	AvailabilityZone string `json:"availability_zone"`
	// Is the Snapshot bootable?
	Bootable string `json:"bootable"`
	// Date created.
	CreatedAt time.Time `json:"-"`
	// Display description.
	Description string `json:"display_description"`
	// See VolumeType object for more information.
	VolumeType string `json:"volume_type"`
	// ID of the Snapshot from which this Snapshot was created.
	SnapshotID string `json:"snapshot_id"`
	// ID of the Volume from which this Snapshot was created.
	VolumeID string `json:"volume_id"`
	// User-defined key-value pairs.
	Metadata map[string]string `json:"metadata"`
	// Unique identifier.
	ID string `json:"id"`
	// Size of the Snapshot, in GB.
	Size int `json:"size"`
}

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*Snapshot, error)

func Get

func Get(client *golangsdk.ServiceClient, id string) (*Snapshot, error)

func List

func List(client *golangsdk.ServiceClient, opts ListOpts) ([]Snapshot, error)

func (*Snapshot) UnmarshalJSON

func (r *Snapshot) UnmarshalJSON(b []byte) error

type UpdateMetadataOpts

type UpdateMetadataOpts struct {
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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