Versions in this module Expand all Collapse all v0 v0.6.0 Nov 8, 2023 Changes in this version + const AWSUnauthorizedOperation + const DefaultBlockDeviceName + const DefaultEnvPrefix + const DefaultRetryAfter + const DefaultScannerInstanceType + const EC2SnapshotDescription + const EC2TagKeyAssetID + const EC2TagKeyAssetScanID + const EC2TagKeyAssetVolumeID + const EC2TagKeyName + const EC2TagKeyOwner + const EC2TagKeyScanID + const EC2TagValueNamePattern + const EC2TagValueOwner + const InstanceReadynessAfter + const InstanceStateFilterName + const LocationSeparator + const RetryServerErrorAfter + const SecurityGroupIDFilterName + const SnapshotIDFilterName + const SnapshotReadynessAfter + const VolumeAttachmentReadynessAfter + const VolumeReadynessAfter + const VpcIDFilterName + func EC2FiltersFromEC2Tags(tags []ec2types.Tag) []ec2types.Filter + func EC2FiltersFromTags(tags []models.Tag) []ec2types.Filter + func EC2TagsFromScanMetadata(meta provider.ScanMetadata) []ec2types.Tag + func WrapError(err error) error + type Config struct + BlockDeviceName string + KeyPairName string + ScannerImage string + ScannerInstanceType string + ScannerRegion string + SecurityGroupID string + SubnetID string + func NewConfig() (*Config, error) + func (c *Config) Validate() error + type FatalError = provider.FatalError + type Instance struct + AvailabilityZone string + ID string + Image string + InstanceType string + LaunchTime time.Time + Metadata provider.ScanMetadata + Platform string + Region string + RootDeviceName string + RootVolumeEncrypted models.RootVolumeEncrypted + RootVolumeSizeGB int32 + SecurityGroups []models.SecurityGroup + Tags []models.Tag + Volumes []Volume + VpcID string + func (i *Instance) AttachVolume(ctx context.Context, volume *Volume, deviceName string) error + func (i *Instance) Delete(ctx context.Context) error + func (i *Instance) IsReady(ctx context.Context) (bool, error) + func (i *Instance) Location() string + func (i *Instance) RootVolume() *Volume + type Location struct + Region string + Vpc string + func NewLocation(l string) (*Location, error) + func (l Location) String() string + type Provider struct + func New(ctx context.Context) (*Provider, error) + func (p *Provider) DiscoverAssets(ctx context.Context) provider.AssetDiscoverer + func (p *Provider) Estimate(ctx context.Context, assetScanStats models.AssetScanStats, asset *models.Asset, ...) (*models.Estimation, error) + func (p *Provider) GetInstances(ctx context.Context, filters []ec2types.Filter, regionID string) ([]Instance, error) + func (p *Provider) Kind() models.CloudProvider + func (p *Provider) ListAllRegions(ctx context.Context) ([]Region, error) + func (p *Provider) RemoveAssetScan(ctx context.Context, config *provider.ScanJobConfig) error + func (p *Provider) RunAssetScan(ctx context.Context, config *provider.ScanJobConfig) error + type Region struct + Name string + VPCs []VPC + type RetryableError = provider.RetryableError + type ScanScope struct + AllRegions bool + ExcludeTags []models.Tag + Regions []Region + ScanStopped bool + TagSelector []models.Tag + type Snapshot struct + ID string + Metadata provider.ScanMetadata + Region string + VolumeID string + func (s *Snapshot) Copy(ctx context.Context, region string) (*Snapshot, error) + func (s *Snapshot) CreateVolume(ctx context.Context, az string) (*Volume, error) + func (s *Snapshot) Delete(ctx context.Context) error + func (s *Snapshot) IsReady(ctx context.Context) (bool, error) + type VPC struct + ID string + SecurityGroups []models.SecurityGroup + type Volume struct + BlockDeviceName string + ID string + Metadata provider.ScanMetadata + Region string + func (v *Volume) CreateSnapshot(ctx context.Context) (*Snapshot, error) + func (v *Volume) Delete(ctx context.Context) error + func (v *Volume) IsAttached(ctx context.Context) (bool, error) + func (v *Volume) IsReady(ctx context.Context) (bool, error) + func (v *Volume) WaitForReady(ctx context.Context, timeout time.Duration, interval time.Duration) error