awsebs

package
v0.0.0-...-0204bc1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRegionFromEC2Metadata

func GetRegionFromEC2Metadata() (string, error)

GetRegionFromEC2Metadata retrieves the region from the EC2 metadata service. Only works when the call is performed from inside AWS

func NewProvider

func NewProvider(ctx context.Context, config map[string]string) (blockstorage.Provider, error)

NewProvider returns a provider for the EBS storage type in the specified region

Types

type EC2

type EC2 struct {
	*ec2.EC2
	DryRun bool
}

EC2 is kasten's wrapper around ec2.EC2 structs

type EbsStorage

type EbsStorage struct {
	Ec2Cli *EC2
	Role   string
	// contains filtered or unexported fields
}

EbsStorage implements blockstorage.Provider

func (*EbsStorage) CheckVolumeCreate

func (s *EbsStorage) CheckVolumeCreate(ctx context.Context) (bool, error)

CheckVolumeCreate checks if client as permission to create volumes

func (*EbsStorage) FromRegion

func (s *EbsStorage) FromRegion(ctx context.Context, region string) ([]string, error)

FromRegion is part of zone.Mapper

func (*EbsStorage) GetRegions

func (s *EbsStorage) GetRegions(ctx context.Context) ([]string, error)

func (*EbsStorage) SetTags

func (s *EbsStorage) SetTags(ctx context.Context, resource interface{}, tags map[string]string) error

SetTags is part of blockstorage.Provider

func (*EbsStorage) SnapshotCopy

func (s *EbsStorage) SnapshotCopy(ctx context.Context, from, to blockstorage.Snapshot) (*blockstorage.Snapshot, error)

SnapshotCopy is part of blockstorage.Provider SnapshotCopy copies snapshot 'from' to 'to'. Follows aws restrictions regarding encryption; i.e., copying unencrypted to encrypted snapshot is allowed but not vice versa.

func (*EbsStorage) SnapshotCopyWithArgs

func (s *EbsStorage) SnapshotCopyWithArgs(ctx context.Context, from blockstorage.Snapshot, to blockstorage.Snapshot, args map[string]string) (*blockstorage.Snapshot, error)

SnapshotCopyWithArgs is part of blockstorage.Provider

func (*EbsStorage) SnapshotCreate

func (s *EbsStorage) SnapshotCreate(ctx context.Context, volume blockstorage.Volume, tags map[string]string) (*blockstorage.Snapshot, error)

SnapshotCreate is part of blockstorage.Provider

func (*EbsStorage) SnapshotCreateWaitForCompletion

func (s *EbsStorage) SnapshotCreateWaitForCompletion(ctx context.Context, snap *blockstorage.Snapshot) error

SnapshotCreateWaitForCompletion is part of blockstorage.Provider

func (*EbsStorage) SnapshotDelete

func (s *EbsStorage) SnapshotDelete(ctx context.Context, snapshot *blockstorage.Snapshot) error

SnapshotDelete is part of blockstorage.Provider

func (*EbsStorage) SnapshotGet

func (s *EbsStorage) SnapshotGet(ctx context.Context, id string) (*blockstorage.Snapshot, error)

SnapshotGet is part of blockstorage.Provider

func (*EbsStorage) SnapshotRestoreTargets

func (s *EbsStorage) SnapshotRestoreTargets(ctx context.Context, snapshot *blockstorage.Snapshot) (global bool, regionsAndZones map[string][]string, err error)

SnapshotRestoreTargets is part of blockstorage.RestoreTargeter

func (*EbsStorage) SnapshotsList

func (s *EbsStorage) SnapshotsList(ctx context.Context, tags map[string]string) ([]*blockstorage.Snapshot, error)

SnapshotsList is part of blockstorage.Provider

func (*EbsStorage) Type

func (s *EbsStorage) Type() blockstorage.Type

Type is part of blockstorage.Provider

func (*EbsStorage) VolumeCreate

func (s *EbsStorage) VolumeCreate(ctx context.Context, volume blockstorage.Volume) (*blockstorage.Volume, error)

VolumeCreate is part of blockstorage.Provider

func (*EbsStorage) VolumeCreateFromSnapshot

func (s *EbsStorage) VolumeCreateFromSnapshot(ctx context.Context, snapshot blockstorage.Snapshot, tags map[string]string) (*blockstorage.Volume, error)

VolumeCreateFromSnapshot is part of blockstorage.Provider

func (*EbsStorage) VolumeDelete

func (s *EbsStorage) VolumeDelete(ctx context.Context, volume *blockstorage.Volume) error

VolumeDelete is part of blockstorage.Provider

func (*EbsStorage) VolumeGet

func (s *EbsStorage) VolumeGet(ctx context.Context, id string, zone string) (*blockstorage.Volume, error)

VolumeGet is part of blockstorage.Provider

func (*EbsStorage) VolumesList

func (s *EbsStorage) VolumesList(ctx context.Context, tags map[string]string, zone string) ([]*blockstorage.Volume, error)

VolumesList is part of blockstorage.Provider

Jump to

Keyboard shortcuts

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