Documentation
¶
Index ¶
- func GetRegionFromEC2Metadata() (string, error)
- func NewProvider(ctx context.Context, config map[string]string) (blockstorage.Provider, error)
- type EC2
- type EbsStorage
- func (s *EbsStorage) CheckVolumeCreate(ctx context.Context) (bool, error)
- func (s *EbsStorage) FromRegion(ctx context.Context, region string) ([]string, error)
- func (s *EbsStorage) GetRegions(ctx context.Context) ([]string, error)
- func (s *EbsStorage) SetTags(ctx context.Context, resource interface{}, tags map[string]string) error
- func (s *EbsStorage) SnapshotCopy(ctx context.Context, from, to blockstorage.Snapshot) (*blockstorage.Snapshot, error)
- func (s *EbsStorage) SnapshotCopyWithArgs(ctx context.Context, from blockstorage.Snapshot, to blockstorage.Snapshot, ...) (*blockstorage.Snapshot, error)
- func (s *EbsStorage) SnapshotCreate(ctx context.Context, volume blockstorage.Volume, tags map[string]string) (*blockstorage.Snapshot, error)
- func (s *EbsStorage) SnapshotCreateWaitForCompletion(ctx context.Context, snap *blockstorage.Snapshot) error
- func (s *EbsStorage) SnapshotDelete(ctx context.Context, snapshot *blockstorage.Snapshot) error
- func (s *EbsStorage) SnapshotGet(ctx context.Context, id string) (*blockstorage.Snapshot, error)
- func (s *EbsStorage) SnapshotRestoreTargets(ctx context.Context, snapshot *blockstorage.Snapshot) (global bool, regionsAndZones map[string][]string, err error)
- func (s *EbsStorage) SnapshotsList(ctx context.Context, tags map[string]string) ([]*blockstorage.Snapshot, error)
- func (s *EbsStorage) Type() blockstorage.Type
- func (s *EbsStorage) VolumeCreate(ctx context.Context, volume blockstorage.Volume) (*blockstorage.Volume, error)
- func (s *EbsStorage) VolumeCreateFromSnapshot(ctx context.Context, snapshot blockstorage.Snapshot, tags map[string]string) (*blockstorage.Volume, error)
- func (s *EbsStorage) VolumeDelete(ctx context.Context, volume *blockstorage.Volume) error
- func (s *EbsStorage) VolumeGet(ctx context.Context, id string, zone string) (*blockstorage.Volume, error)
- func (s *EbsStorage) VolumesList(ctx context.Context, tags map[string]string, zone string) ([]*blockstorage.Volume, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRegionFromEC2Metadata ¶
GetRegionFromEC2Metadata retrieves the region from the EC2 metadata service. Only works when the call is performed from inside AWS
func NewProvider ¶
NewProvider returns a provider for the EBS storage type in the specified region
Types ¶
type EbsStorage ¶
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 ¶
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