aws

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func Create

func Create(ctx context.Context, config *aws.Config) (*Client, error)

func (*Client) DiscoverInstances

func (c *Client) DiscoverInstances(ctx context.Context, scanScope *models.ScanScopeType) ([]types.Instance, error)

func (*Client) DiscoverScopes

func (c *Client) DiscoverScopes(ctx context.Context) (*models.Scopes, error)

func (*Client) GetInstances

func (c *Client) GetInstances(ctx context.Context, filters []ec2types.Filter, excludeTags []Tag, regionID string) ([]types.Instance, error)

func (*Client) ListAllRegions

func (c *Client) ListAllRegions(ctx context.Context, isRecursive bool) ([]Region, error)

func (*Client) RunScanningJob

func (c *Client) RunScanningJob(ctx context.Context, region, id string, config provider.ScanningJobConfig) (types.Instance, error)

type InstanceImpl

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

func (*InstanceImpl) AttachVolume

func (i *InstanceImpl) AttachVolume(ctx context.Context, volume types.Volume, deviceName string) error

func (*InstanceImpl) Delete

func (i *InstanceImpl) Delete(ctx context.Context) error

func (*InstanceImpl) GetAvailabilityZone

func (i *InstanceImpl) GetAvailabilityZone() string

func (*InstanceImpl) GetID

func (i *InstanceImpl) GetID() string

func (*InstanceImpl) GetLocation

func (i *InstanceImpl) GetLocation() string

func (*InstanceImpl) GetRootVolume

func (i *InstanceImpl) GetRootVolume(ctx context.Context) (types.Volume, error)

func (*InstanceImpl) WaitForReady

func (i *InstanceImpl) WaitForReady(ctx context.Context) error

type Region

type Region struct {
	Name string
	VPCs []VPC
}

type ScanScope

type ScanScope struct {
	AllRegions  bool
	Regions     []Region
	ScanStopped bool
	// Only targets that have these tags will be selected for scanning within the selected scan scope.
	// Multiple tags will be treated as an AND operator.
	TagSelector []Tag
	// Targets that have these tags will be excluded from the scan, even if they match the tag selector.
	// Multiple tags will be treated as an AND operator.
	ExcludeTags []Tag
}

type SecurityGroup

type SecurityGroup struct {
	ID string
}

type SnapshotImpl

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

func (*SnapshotImpl) Copy

func (s *SnapshotImpl) Copy(ctx context.Context, dstRegion string) (types.Snapshot, error)

func (*SnapshotImpl) CreateVolume

func (s *SnapshotImpl) CreateVolume(ctx context.Context, availabilityZone string) (types.Volume, error)

func (*SnapshotImpl) Delete

func (s *SnapshotImpl) Delete(ctx context.Context) error

func (*SnapshotImpl) GetID

func (s *SnapshotImpl) GetID() string

func (*SnapshotImpl) GetRegion

func (s *SnapshotImpl) GetRegion() string

func (*SnapshotImpl) WaitForReady

func (s *SnapshotImpl) WaitForReady(ctx context.Context) error

type Tag

type Tag struct {
	Key string
	Val string
}

type VPC

type VPC struct {
	ID             string
	SecurityGroups []SecurityGroup
}

type VolumeImpl

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

func (*VolumeImpl) Delete

func (v *VolumeImpl) Delete(ctx context.Context) error

func (*VolumeImpl) GetID

func (v *VolumeImpl) GetID() string

func (*VolumeImpl) TakeSnapshot

func (v *VolumeImpl) TakeSnapshot(ctx context.Context) (types.Snapshot, error)

func (*VolumeImpl) WaitForAttached

func (v *VolumeImpl) WaitForAttached(ctx context.Context) error

func (*VolumeImpl) WaitForReady

func (v *VolumeImpl) WaitForReady(ctx context.Context) error

Jump to

Keyboard shortcuts

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