Documentation ¶
Index ¶
- type EC2Option
- type Ec2
- func (e *Ec2) AttachVolume(ctx context.Context, input *ec2.AttachVolumeInput) (string, error)
- func (e *Ec2) AuthorizeSecurityGroup(ctx context.Context, direction, sg string, permissions []*ec2.IpPermission) error
- func (e *Ec2) CreateImage(ctx context.Context, input *ec2.CreateImageInput) (string, error)
- func (e *Ec2) CreateInstance(ctx context.Context, input *ec2.RunInstancesInput) (*ec2.Instance, error)
- func (e *Ec2) CreateSecurityGroup(ctx context.Context, input *ec2.CreateSecurityGroupInput) (*ec2.CreateSecurityGroupOutput, error)
- func (e *Ec2) CreateSnapshot(ctx context.Context, input *ec2.CreateSnapshotInput) (string, error)
- func (e *Ec2) CreateVolume(ctx context.Context, input *ec2.CreateVolumeInput) (*ec2.Volume, error)
- func (e *Ec2) DeleteInstance(ctx context.Context, id string) error
- func (e *Ec2) DeleteSecurityGroup(ctx context.Context, id string) error
- func (e *Ec2) DeleteSnapshot(ctx context.Context, input *ec2.DeleteSnapshotInput) error
- func (e *Ec2) DeleteVolume(ctx context.Context, id string) error
- func (e *Ec2) DeregisterImage(ctx context.Context, input *ec2.DeregisterImageInput) error
- func (e *Ec2) DetachVolume(ctx context.Context, input *ec2.DetachVolumeInput) (string, error)
- 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) GetSecurityGroup(ctx context.Context, ids ...string) ([]*ec2.SecurityGroup, error)
- func (e *Ec2) GetSnapshot(ctx context.Context, ids ...string) ([]*ec2.Snapshot, error)
- func (e *Ec2) GetSubnetByID(ctx context.Context, id string) (*ec2.Subnet, error)
- func (e *Ec2) GetVPCByID(ctx context.Context, id string) (*ec2.Vpc, error)
- func (e *Ec2) GetVolume(ctx context.Context, ids ...string) ([]*ec2.Volume, error)
- func (e *Ec2) ListImages(ctx context.Context, org, name string) ([]map[string]*string, error)
- func (e *Ec2) ListInstanceSnapshots(ctx context.Context, id string) ([]string, error)
- func (e *Ec2) ListInstanceTypeOfferings(ctx context.Context, azs []string, per int64, next *string) ([]*ec2.InstanceTypeOffering, *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) ListSecurityGroups(ctx context.Context, org string) ([]map[string]*string, error)
- func (e *Ec2) ListSnapshots(ctx context.Context, input *ec2.DescribeSnapshotsInput) (*ec2.DescribeSnapshotsOutput, error)
- func (e *Ec2) ListSubnets(ctx context.Context, vpc string) ([]map[string]string, error)
- func (e *Ec2) ListVPCs(ctx context.Context) ([]map[string]string, error)
- func (e *Ec2) ListVolumeModifications(ctx context.Context, id string) ([]*ec2.VolumeModification, error)
- func (e *Ec2) ListVolumeSnapshots(ctx context.Context, id string) ([]string, error)
- func (e *Ec2) ListVolumes(ctx context.Context, org string, per int64, next *string) ([]map[string]*string, *string, error)
- func (e *Ec2) ModifyVolume(ctx context.Context, input *ec2.ModifyVolumeInput) (*ec2.VolumeModification, error)
- func (e *Ec2) RebootInstance(ctx context.Context, ids ...string) error
- func (e *Ec2) RevokeSecurityGroup(ctx context.Context, direction, sg string, permissions []*ec2.IpPermission) error
- func (e *Ec2) StartInstance(ctx context.Context, ids ...string) error
- func (e *Ec2) StopInstance(ctx context.Context, force bool, ids ...string) error
- func (e *Ec2) UpdateAttributes(ctx context.Context, input *ec2.ModifyInstanceAttributeInput) error
- func (e *Ec2) UpdateRawTags(ctx context.Context, rawTags map[string]string, ids ...string) error
- func (e *Ec2) UpdateTags(ctx context.Context, input *ec2.CreateTagsInput) error
- func (e *Ec2) WaitUntilSecurityGroupExists(ctx context.Context, id string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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) AttachVolume ¶ added in v0.20.0
func (*Ec2) AuthorizeSecurityGroup ¶ added in v0.6.0
func (*Ec2) CreateImage ¶ added in v0.17.0
CreateImage creates a new image and returns the image details
func (*Ec2) CreateInstance ¶ added in v0.8.0
func (e *Ec2) CreateInstance(ctx context.Context, input *ec2.RunInstancesInput) (*ec2.Instance, error)
CreateInstance creates a new instance and returns the instance details
func (*Ec2) CreateSecurityGroup ¶ added in v0.6.0
func (e *Ec2) CreateSecurityGroup(ctx context.Context, input *ec2.CreateSecurityGroupInput) (*ec2.CreateSecurityGroupOutput, error)
func (*Ec2) CreateSnapshot ¶ added in v0.18.0
func (*Ec2) CreateVolume ¶ added in v0.11.0
CreateVolume creates a new volume and returns the volume details
func (*Ec2) DeleteInstance ¶ added in v0.8.0
DeleteInstance terminates an instance
func (*Ec2) DeleteSecurityGroup ¶ added in v0.3.0
DeleteSecurityGroup deletes the given security group
func (*Ec2) DeleteSnapshot ¶ added in v0.21.0
func (*Ec2) DeleteVolume ¶ added in v0.11.0
func (*Ec2) DeregisterImage ¶ added in v0.22.0
func (*Ec2) DetachVolume ¶ added in v0.19.0
func (*Ec2) GetInstance ¶
GetInstance gets details about an instance by ID
func (*Ec2) GetInstanceVolume ¶
func (*Ec2) GetSecurityGroup ¶ added in v0.2.4
GetSecurityGroup Get the given security groups by a list of ids
func (*Ec2) GetSnapshot ¶
func (*Ec2) GetSubnetByID ¶ added in v0.27.0
func (*Ec2) GetVPCByID ¶ added in v0.9.0
func (*Ec2) ListImages ¶
func (*Ec2) ListInstanceSnapshots ¶
ListInstanceSnapshots returns the snapshots for all volumes for an instance
func (*Ec2) ListInstanceTypeOfferings ¶ added in v0.28.0
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) ListSecurityGroups ¶ added in v0.2.4
ListSecurityGroups List all security groups in an aws account
func (*Ec2) ListSnapshots ¶
func (e *Ec2) ListSnapshots(ctx context.Context, input *ec2.DescribeSnapshotsInput) (*ec2.DescribeSnapshotsOutput, error)
func (*Ec2) ListSubnets ¶ added in v0.5.0
func (*Ec2) ListVolumeModifications ¶ added in v0.7.0
func (e *Ec2) ListVolumeModifications(ctx context.Context, id string) ([]*ec2.VolumeModification, error)
ListVolumeModifications returns the modifications events for a volume
func (*Ec2) ListVolumeSnapshots ¶ added in v0.7.0
ListVolumeSnapshots returns the snapshots for a volume
func (*Ec2) ListVolumes ¶
func (*Ec2) ModifyVolume ¶ added in v0.15.0
func (e *Ec2) ModifyVolume(ctx context.Context, input *ec2.ModifyVolumeInput) (*ec2.VolumeModification, error)