ec2

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Overview

Code generated by generate-cached. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCreateTagsInput

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

func BuildDeleteTagsInput

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

func TagMapToTags

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

Types

type AwsClient

type AwsClient interface {
	GetRegion() ptypes.AwsRegion
	GetAccountID() ptypes.AwsAccountID
}

type Ec2Repository

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

func NewEc2Repository

func NewEc2Repository(ctx context.Context, client *v3.Client) *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) ListRegionByInput added in v0.3.1

func (r *Ec2Repository) ListRegionByInput(query *ec2.DescribeRegionsInput) ([]types.Region, error)

func (*Ec2Repository) ListRegionsAll added in v0.3.1

func (r *Ec2Repository) ListRegionsAll() ([]types.Region, error)

func (*Ec2Repository) ListRegionsOptIn added in v0.3.1

func (r *Ec2Repository) ListRegionsOptIn() ([]types.Region, 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)

func (*Ec2Repository) WithCache added in v0.4.0

func (r *Ec2Repository) WithCache(dc *cache.DataCache) *Ec2RepositoryCached

WithCache returns a Ec2RepositoryCached that stores/retrieves results via the given DataCache. The cache namespace is set to "<accountID>:<region>".

type Ec2RepositoryCached added in v0.4.0

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

Ec2RepositoryCached wraps Ec2Repository and caches results of Get*/List* calls.

func (*Ec2RepositoryCached) GetInstanceTypes added in v0.4.0

func (c *Ec2RepositoryCached) GetInstanceTypes() ([]types.InstanceType, error)

GetInstanceTypes returns cached results when available, otherwise delegates to the underlying repository.

func (*Ec2RepositoryCached) ListInstancesAll added in v0.4.0

func (c *Ec2RepositoryCached) ListInstancesAll() ([]Instance, error)

ListInstancesAll returns cached results when available, otherwise delegates to the underlying repository.

func (*Ec2RepositoryCached) ListInstancesByInput added in v0.4.0

func (c *Ec2RepositoryCached) ListInstancesByInput(query *awsec2.DescribeInstancesInput) ([]Instance, error)

ListInstancesByInput returns cached results when available, otherwise delegates to the underlying repository.

func (*Ec2RepositoryCached) ListRegionByInput added in v0.4.0

func (c *Ec2RepositoryCached) ListRegionByInput(query *awsec2.DescribeRegionsInput) ([]types.Region, error)

ListRegionByInput returns cached results when available, otherwise delegates to the underlying repository.

func (*Ec2RepositoryCached) ListRegionsAll added in v0.4.0

func (c *Ec2RepositoryCached) ListRegionsAll() ([]types.Region, error)

ListRegionsAll returns cached results when available, otherwise delegates to the underlying repository.

func (*Ec2RepositoryCached) ListRegionsOptIn added in v0.4.0

func (c *Ec2RepositoryCached) ListRegionsOptIn() ([]types.Region, error)

ListRegionsOptIn returns cached results when available, otherwise delegates to the underlying repository.

func (*Ec2RepositoryCached) ListSnapshotsAll added in v0.4.0

func (c *Ec2RepositoryCached) ListSnapshotsAll() ([]Snapshot, error)

ListSnapshotsAll returns cached results when available, otherwise delegates to the underlying repository.

func (*Ec2RepositoryCached) ListSnapshotsByInput added in v0.4.0

func (c *Ec2RepositoryCached) ListSnapshotsByInput(query *awsec2.DescribeSnapshotsInput) ([]Snapshot, error)

ListSnapshotsByInput returns cached results when available, otherwise delegates to the underlying repository.

func (*Ec2RepositoryCached) ListVolumesAll added in v0.4.0

func (c *Ec2RepositoryCached) ListVolumesAll() ([]Volume, error)

ListVolumesAll returns cached results when available, otherwise delegates to the underlying repository.

func (*Ec2RepositoryCached) ListVolumesByInput added in v0.4.0

func (c *Ec2RepositoryCached) ListVolumesByInput(describeInput *awsec2.DescribeVolumesInput) ([]Volume, error)

ListVolumesByInput returns cached results when available, otherwise delegates to the underlying repository.

func (*Ec2RepositoryCached) ListVpcsAll added in v0.4.0

func (c *Ec2RepositoryCached) ListVpcsAll() ([]Vpc, error)

ListVpcsAll returns cached results when available, otherwise delegates to the underlying repository.

func (*Ec2RepositoryCached) ListVpcsByInput added in v0.4.0

func (c *Ec2RepositoryCached) ListVpcsByInput(describeInput *awsec2.DescribeVpcsInput) ([]Vpc, error)

ListVpcsByInput returns cached results when available, otherwise delegates to the underlying repository.

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