ec2

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCreateTagsInput

func BuildCreateTagsInput(tags map[string]string, resources ...service.EntityInterface) *ec2.CreateTagsInput

func BuildDeleteTagsInput

func BuildDeleteTagsInput(tags map[string]string, resources ...service.EntityInterface) *ec2.DeleteTagsInput

func TagMapToTags

func TagMapToTags(tags map[string]string) []types.Tag

Types

type AwsClient

type AwsClient interface {
	GetRegion() ptypes.AwsRegion
	GetAccountID() ptypes.AwsAccountID
	EC2() *ec2.Client
	Pricing() *pricing.Client
}

type Ec2Repository

type Ec2Repository struct {
	// contains filtered or unexported fields
}

func NewEc2Repository

func NewEc2Repository(ctx context.Context, client AwsClient) *Ec2Repository

func (*Ec2Repository) CreateVolumeTags

func (r *Ec2Repository) CreateVolumeTags(tagsInput *ec2.CreateTagsInput) (*ec2.CreateTagsOutput, error)

func (*Ec2Repository) CreateVpcTags

func (r *Ec2Repository) CreateVpcTags(tagsInput *ec2.CreateTagsInput) (*ec2.CreateTagsOutput, error)

func (*Ec2Repository) DeleteVolume

func (r *Ec2Repository) DeleteVolume(deleteInput *ec2.DeleteVolumeInput) (*ec2.DeleteVolumeOutput, error)

func (*Ec2Repository) DeleteVolumeTags

func (r *Ec2Repository) DeleteVolumeTags(tagsInput *ec2.DeleteTagsInput) (*ec2.DeleteTagsOutput, error)

func (*Ec2Repository) DeleteVpc

func (r *Ec2Repository) DeleteVpc(deleteInput *ec2.DeleteVpcInput) (*ec2.DeleteVpcOutput, error)

func (*Ec2Repository) DeleteVpcTags

func (r *Ec2Repository) DeleteVpcTags(tagsInput *ec2.DeleteTagsInput) (*ec2.DeleteTagsOutput, error)

func (*Ec2Repository) GetInstanceTypes

func (r *Ec2Repository) GetInstanceTypes() ([]types.InstanceType, error)

func (*Ec2Repository) GetRegion

func (r *Ec2Repository) GetRegion() ptypes.AwsRegion

func (*Ec2Repository) ListInstancesAll

func (r *Ec2Repository) ListInstancesAll() ([]Instance, error)

func (*Ec2Repository) ListInstancesByInput

func (r *Ec2Repository) ListInstancesByInput(query *ec2.DescribeInstancesInput) ([]Instance, error)

func (*Ec2Repository) ListSnapshotsAll

func (r *Ec2Repository) ListSnapshotsAll() ([]Snapshot, error)

func (*Ec2Repository) ListSnapshotsByInput

func (r *Ec2Repository) ListSnapshotsByInput(query *ec2.DescribeSnapshotsInput) ([]Snapshot, error)

func (*Ec2Repository) ListVolumesAll

func (r *Ec2Repository) ListVolumesAll() ([]Volume, error)

func (*Ec2Repository) ListVolumesByInput

func (r *Ec2Repository) ListVolumesByInput(describeInput *ec2.DescribeVolumesInput) ([]Volume, error)

func (*Ec2Repository) ListVpcsAll

func (r *Ec2Repository) ListVpcsAll() ([]Vpc, error)

func (*Ec2Repository) ListVpcsByInput

func (r *Ec2Repository) ListVpcsByInput(describeInput *ec2.DescribeVpcsInput) ([]Vpc, error)

type Instance

type Instance struct {
	service.AbstractResource
	types.Instance
}

func NewInstance

func NewInstance(client AwsClient, instance types.Instance) Instance

func (Instance) GetInstanceFamily

func (e Instance) GetInstanceFamily() string

func (Instance) GetInstanceType

func (e Instance) GetInstanceType() string

func (Instance) GetName

func (e Instance) GetName() string

func (Instance) GetPrivateIpAddress

func (e Instance) GetPrivateIpAddress() string

func (Instance) GetState

func (e Instance) GetState() string

func (Instance) GetTagValue

func (e Instance) GetTagValue(tag string) string

func (Instance) GetTags

func (e Instance) GetTags() map[string]string

type InstanceList

type InstanceList struct {
	Items []Instance
}

type Snapshot

type Snapshot struct {
	service.AbstractResource
	types.Snapshot
}

func NewSnapshot

func NewSnapshot(client AwsClient, snapshot types.Snapshot) Snapshot

func (Snapshot) GetName

func (e Snapshot) GetName() string

func (Snapshot) GetTagValue

func (e Snapshot) GetTagValue(tag string) string

func (Snapshot) GetTags

func (e Snapshot) GetTags() map[string]string

type Volume

type Volume struct {
	service.AbstractResource
	types.Volume
}

func NewVolume

func NewVolume(client AwsClient, volume types.Volume) Volume

func (Volume) GetName

func (e Volume) GetName() string

func (Volume) GetSize

func (e Volume) GetSize() int32

func (Volume) GetState

func (e Volume) GetState() types.VolumeState

func (Volume) GetTagValue

func (e Volume) GetTagValue(tag string) string

func (Volume) GetTags

func (e Volume) GetTags() map[string]string

type Vpc

type Vpc struct {
	service.AbstractResource
	types.Vpc
}

func NewVpc

func NewVpc(client AwsClient, vpc types.Vpc) Vpc

func (Vpc) GetName

func (e Vpc) GetName() string

func (Vpc) GetTagValue

func (e Vpc) GetTagValue(tag string) string

func (Vpc) GetTags

func (e Vpc) GetTags() map[string]string

Jump to

Keyboard shortcuts

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