Documentation
¶
Index ¶
- func ErrCode(msg string, err error) error
- type EC2Option
- type Ec2
- func (e *Ec2) GetImage(ctx context.Context, ids ...string) ([]*ec2.Image, error)
- func (e *Ec2) GetInstance(ctx context.Context, id string) (*ec2.Instance, error)
- func (e *Ec2) GetInstanceVolume(ctx context.Context, id, volid string) (*ec2.Volume, error)
- func (e *Ec2) GetSnapshot(ctx context.Context, ids ...string) ([]*ec2.Snapshot, error)
- func (e *Ec2) GetVolume(ctx context.Context, ids ...string) ([]*ec2.Volume, error)
- func (e *Ec2) ListImages(ctx context.Context, org string) ([]map[string]*string, error)
- func (e *Ec2) ListInstanceSnapshots(ctx context.Context, id string) ([]string, error)
- func (e *Ec2) ListInstanceVolumes(ctx context.Context, id string) ([]string, error)
- func (e *Ec2) ListInstances(ctx context.Context, org string, per int64, next *string) ([]map[string]*string, *string, error)
- func (e *Ec2) ListSnapshots(ctx context.Context, org string, per int64, next *string) ([]map[string]*string, *string, error)
- func (e *Ec2) ListVolumes(ctx context.Context, org string, per int64, next *string) ([]map[string]*string, *string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EC2Option ¶
type EC2Option func(*Ec2)
func WithCredentials ¶
func WithDefaultKMSKeyId ¶
func WithDefaultSgs ¶
func WithDefaultSubnets ¶
func WithSession ¶
type Ec2 ¶
type Ec2 struct {
Service ec2iface.EC2API
DefaultKMSKeyId string
DefaultSgs []string
DefaultSubnets []string
// contains filtered or unexported fields
}
Ec2 is a wrapper around the aws EC2 service with some default config info
func (*Ec2) GetInstance ¶
GetInstance gets details about an instance by ID
func (*Ec2) GetInstanceVolume ¶
func (*Ec2) GetSnapshot ¶
func (*Ec2) ListImages ¶
func (*Ec2) ListInstanceSnapshots ¶
ListInstanceSnapshots returns the snapshots for all volumes for an instance
func (*Ec2) ListInstanceVolumes ¶
ListInstanceVolumes returns the volumes for an instance
func (*Ec2) ListInstances ¶
func (e *Ec2) ListInstances(ctx context.Context, org string, per int64, next *string) ([]map[string]*string, *string, error)
ListInstances lists the instances that are not terminated and not spot
func (*Ec2) ListSnapshots ¶
Click to show internal directories.
Click to hide internal directories.