ec2

package
v0.0.0-...-19bd712 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 11 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 interface {
	DescribeNetworkAcls(ctx context.Context, params *ec2.DescribeNetworkAclsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeNetworkAclsOutput, error)
	DescribeSecurityGroups(ctx context.Context, params *ec2.DescribeSecurityGroupsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeSecurityGroupsOutput, error)
	DescribeVpcs(ctx context.Context, params *ec2.DescribeVpcsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeVpcsOutput, error)
	DescribeFlowLogs(ctx context.Context, params *ec2.DescribeFlowLogsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeFlowLogsOutput, error)
	GetEbsEncryptionByDefault(ctx context.Context, params *ec2.GetEbsEncryptionByDefaultInput, optFns ...func(*ec2.Options)) (*ec2.GetEbsEncryptionByDefaultOutput, error)
	DescribeInstances(ctx context.Context, params *ec2.DescribeInstancesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstancesOutput, error)
	CreateSnapshots(ctx context.Context, params *ec2.CreateSnapshotsInput, optFns ...func(*ec2.Options)) (*ec2.CreateSnapshotsOutput, error)
	DescribeSnapshots(ctx context.Context, params *ec2.DescribeSnapshotsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeSnapshotsOutput, error)
	DeleteSnapshot(ctx context.Context, params *ec2.DeleteSnapshotInput, optFns ...func(*ec2.Options)) (*ec2.DeleteSnapshotOutput, error)
	DescribeRouteTables(ctx context.Context, params *ec2.DescribeRouteTablesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeRouteTablesOutput, error)
	DescribeVolumes(ctx context.Context, params *ec2.DescribeVolumesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeVolumesOutput, error)
}

type EBSEncryption

type EBSEncryption struct {
	Enabled bool `json:"enabled"`
	// contains filtered or unexported fields
}

func (EBSEncryption) GetRegion

func (e EBSEncryption) GetRegion() string

func (EBSEncryption) GetResourceArn

func (e EBSEncryption) GetResourceArn() string

func (EBSEncryption) GetResourceName

func (e EBSEncryption) GetResourceName() string

func (EBSEncryption) GetResourceType

func (e EBSEncryption) GetResourceType() string

type EBSSnapshot

type EBSSnapshot struct {
	Instance   Ec2Instance
	SnapshotId string
	State      types.SnapshotState
	Region     string

	VolumeSize  int
	IsEncrypted bool
	// contains filtered or unexported fields
}

func FromSnapshot

func FromSnapshot(snapshot types.Snapshot, region string, awsAccount string, ins Ec2Instance) EBSSnapshot

func FromSnapshotInfo

func FromSnapshotInfo(snapshot types.SnapshotInfo, region string, awsAccount string, ins Ec2Instance) EBSSnapshot

func (EBSSnapshot) GetResourceArn

func (e EBSSnapshot) GetResourceArn() string

func (EBSSnapshot) GetResourceName

func (e EBSSnapshot) GetResourceName() string

func (EBSSnapshot) GetResourceType

func (e EBSSnapshot) GetResourceType() string

type Ec2Instance

type Ec2Instance struct {
	types.Instance
	Region string

	RootVolume *Volume
	// contains filtered or unexported fields
}

func (Ec2Instance) GetResourceArn

func (i Ec2Instance) GetResourceArn() string

func (Ec2Instance) GetResourceId

func (i Ec2Instance) GetResourceId() string

func (Ec2Instance) GetResourceMacAddresses

func (i Ec2Instance) GetResourceMacAddresses() []string

TODO: Use genertic implementation with custom functions

func (Ec2Instance) GetResourceName

func (i Ec2Instance) GetResourceName() string

func (Ec2Instance) GetResourceSecurityGroups

func (i Ec2Instance) GetResourceSecurityGroups() []SecurityGroupInfo

TODO: Use genertic implementation with custom functions

func (Ec2Instance) GetResourceTags

func (i Ec2Instance) GetResourceTags() map[string]string

TODO: Use genertic implementation with custom functions

func (Ec2Instance) GetResourceType

func (i Ec2Instance) GetResourceType() string

type ElasticCompute

type ElasticCompute interface {
	DescribeNetworkAcl(ctx context.Context) ([]awslib.AwsResource, error)
	DescribeSecurityGroups(ctx context.Context) ([]awslib.AwsResource, error)
	DescribeVPCs(ctx context.Context) ([]awslib.AwsResource, error)
	GetEbsEncryptionByDefault(ctx context.Context) ([]awslib.AwsResource, error)
	GetRouteTableForSubnet(ctx context.Context, region string, subnetId string, vpcId string) (types.RouteTable, error)
}

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClient

NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockClient) CreateSnapshots

func (_m *MockClient) CreateSnapshots(ctx context.Context, params *serviceec2.CreateSnapshotsInput, optFns ...func(*serviceec2.Options)) (*serviceec2.CreateSnapshotsOutput, error)

CreateSnapshots provides a mock function with given fields: ctx, params, optFns

func (*MockClient) DeleteSnapshot

func (_m *MockClient) DeleteSnapshot(ctx context.Context, params *serviceec2.DeleteSnapshotInput, optFns ...func(*serviceec2.Options)) (*serviceec2.DeleteSnapshotOutput, error)

DeleteSnapshot provides a mock function with given fields: ctx, params, optFns

func (*MockClient) DescribeFlowLogs

func (_m *MockClient) DescribeFlowLogs(ctx context.Context, params *serviceec2.DescribeFlowLogsInput, optFns ...func(*serviceec2.Options)) (*serviceec2.DescribeFlowLogsOutput, error)

DescribeFlowLogs provides a mock function with given fields: ctx, params, optFns

func (*MockClient) DescribeInstances

func (_m *MockClient) DescribeInstances(ctx context.Context, params *serviceec2.DescribeInstancesInput, optFns ...func(*serviceec2.Options)) (*serviceec2.DescribeInstancesOutput, error)

DescribeInstances provides a mock function with given fields: ctx, params, optFns

func (*MockClient) DescribeNetworkAcls

func (_m *MockClient) DescribeNetworkAcls(ctx context.Context, params *serviceec2.DescribeNetworkAclsInput, optFns ...func(*serviceec2.Options)) (*serviceec2.DescribeNetworkAclsOutput, error)

DescribeNetworkAcls provides a mock function with given fields: ctx, params, optFns

func (*MockClient) DescribeRouteTables

func (_m *MockClient) DescribeRouteTables(ctx context.Context, params *serviceec2.DescribeRouteTablesInput, optFns ...func(*serviceec2.Options)) (*serviceec2.DescribeRouteTablesOutput, error)

DescribeRouteTables provides a mock function with given fields: ctx, params, optFns

func (*MockClient) DescribeSecurityGroups

func (_m *MockClient) DescribeSecurityGroups(ctx context.Context, params *serviceec2.DescribeSecurityGroupsInput, optFns ...func(*serviceec2.Options)) (*serviceec2.DescribeSecurityGroupsOutput, error)

DescribeSecurityGroups provides a mock function with given fields: ctx, params, optFns

func (*MockClient) DescribeSnapshots

func (_m *MockClient) DescribeSnapshots(ctx context.Context, params *serviceec2.DescribeSnapshotsInput, optFns ...func(*serviceec2.Options)) (*serviceec2.DescribeSnapshotsOutput, error)

DescribeSnapshots provides a mock function with given fields: ctx, params, optFns

func (*MockClient) DescribeVolumes

func (_m *MockClient) DescribeVolumes(ctx context.Context, params *serviceec2.DescribeVolumesInput, optFns ...func(*serviceec2.Options)) (*serviceec2.DescribeVolumesOutput, error)

DescribeVolumes provides a mock function with given fields: ctx, params, optFns

func (*MockClient) DescribeVpcs

func (_m *MockClient) DescribeVpcs(ctx context.Context, params *serviceec2.DescribeVpcsInput, optFns ...func(*serviceec2.Options)) (*serviceec2.DescribeVpcsOutput, error)

DescribeVpcs provides a mock function with given fields: ctx, params, optFns

func (*MockClient) EXPECT

func (_m *MockClient) EXPECT() *MockClient_Expecter

func (*MockClient) GetEbsEncryptionByDefault

GetEbsEncryptionByDefault provides a mock function with given fields: ctx, params, optFns

type MockClient_CreateSnapshots_Call

type MockClient_CreateSnapshots_Call struct {
	*mock.Call
}

MockClient_CreateSnapshots_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSnapshots'

func (*MockClient_CreateSnapshots_Call) Return

func (*MockClient_CreateSnapshots_Call) Run

type MockClient_DeleteSnapshot_Call

type MockClient_DeleteSnapshot_Call struct {
	*mock.Call
}

MockClient_DeleteSnapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSnapshot'

func (*MockClient_DeleteSnapshot_Call) Return

func (*MockClient_DeleteSnapshot_Call) Run

type MockClient_DescribeFlowLogs_Call

type MockClient_DescribeFlowLogs_Call struct {
	*mock.Call
}

MockClient_DescribeFlowLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeFlowLogs'

func (*MockClient_DescribeFlowLogs_Call) Return

func (*MockClient_DescribeFlowLogs_Call) Run

type MockClient_DescribeInstances_Call

type MockClient_DescribeInstances_Call struct {
	*mock.Call
}

MockClient_DescribeInstances_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeInstances'

func (*MockClient_DescribeInstances_Call) Return

func (*MockClient_DescribeInstances_Call) Run

type MockClient_DescribeNetworkAcls_Call

type MockClient_DescribeNetworkAcls_Call struct {
	*mock.Call
}

MockClient_DescribeNetworkAcls_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeNetworkAcls'

func (*MockClient_DescribeNetworkAcls_Call) Return

func (*MockClient_DescribeNetworkAcls_Call) Run

type MockClient_DescribeRouteTables_Call

type MockClient_DescribeRouteTables_Call struct {
	*mock.Call
}

MockClient_DescribeRouteTables_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeRouteTables'

func (*MockClient_DescribeRouteTables_Call) Return

func (*MockClient_DescribeRouteTables_Call) Run

type MockClient_DescribeSecurityGroups_Call

type MockClient_DescribeSecurityGroups_Call struct {
	*mock.Call
}

MockClient_DescribeSecurityGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeSecurityGroups'

func (*MockClient_DescribeSecurityGroups_Call) Return

func (*MockClient_DescribeSecurityGroups_Call) Run

type MockClient_DescribeSnapshots_Call

type MockClient_DescribeSnapshots_Call struct {
	*mock.Call
}

MockClient_DescribeSnapshots_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeSnapshots'

func (*MockClient_DescribeSnapshots_Call) Return

func (*MockClient_DescribeSnapshots_Call) Run

type MockClient_DescribeVolumes_Call

type MockClient_DescribeVolumes_Call struct {
	*mock.Call
}

MockClient_DescribeVolumes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeVolumes'

func (*MockClient_DescribeVolumes_Call) Return

func (*MockClient_DescribeVolumes_Call) Run

type MockClient_DescribeVpcs_Call

type MockClient_DescribeVpcs_Call struct {
	*mock.Call
}

MockClient_DescribeVpcs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeVpcs'

func (*MockClient_DescribeVpcs_Call) Return

func (*MockClient_DescribeVpcs_Call) Run

type MockClient_Expecter

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

func (*MockClient_Expecter) CreateSnapshots

func (_e *MockClient_Expecter) CreateSnapshots(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_CreateSnapshots_Call

CreateSnapshots is a helper method to define mock.On call

  • ctx context.Context
  • params *serviceec2.CreateSnapshotsInput
  • optFns ...func(*serviceec2.Options)

func (*MockClient_Expecter) DeleteSnapshot

func (_e *MockClient_Expecter) DeleteSnapshot(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_DeleteSnapshot_Call

DeleteSnapshot is a helper method to define mock.On call

  • ctx context.Context
  • params *serviceec2.DeleteSnapshotInput
  • optFns ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeFlowLogs

func (_e *MockClient_Expecter) DescribeFlowLogs(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_DescribeFlowLogs_Call

DescribeFlowLogs is a helper method to define mock.On call

  • ctx context.Context
  • params *serviceec2.DescribeFlowLogsInput
  • optFns ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeInstances

func (_e *MockClient_Expecter) DescribeInstances(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_DescribeInstances_Call

DescribeInstances is a helper method to define mock.On call

  • ctx context.Context
  • params *serviceec2.DescribeInstancesInput
  • optFns ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeNetworkAcls

func (_e *MockClient_Expecter) DescribeNetworkAcls(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_DescribeNetworkAcls_Call

DescribeNetworkAcls is a helper method to define mock.On call

  • ctx context.Context
  • params *serviceec2.DescribeNetworkAclsInput
  • optFns ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeRouteTables

func (_e *MockClient_Expecter) DescribeRouteTables(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_DescribeRouteTables_Call

DescribeRouteTables is a helper method to define mock.On call

  • ctx context.Context
  • params *serviceec2.DescribeRouteTablesInput
  • optFns ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeSecurityGroups

func (_e *MockClient_Expecter) DescribeSecurityGroups(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_DescribeSecurityGroups_Call

DescribeSecurityGroups is a helper method to define mock.On call

  • ctx context.Context
  • params *serviceec2.DescribeSecurityGroupsInput
  • optFns ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeSnapshots

func (_e *MockClient_Expecter) DescribeSnapshots(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_DescribeSnapshots_Call

DescribeSnapshots is a helper method to define mock.On call

  • ctx context.Context
  • params *serviceec2.DescribeSnapshotsInput
  • optFns ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeVolumes

func (_e *MockClient_Expecter) DescribeVolumes(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_DescribeVolumes_Call

DescribeVolumes is a helper method to define mock.On call

  • ctx context.Context
  • params *serviceec2.DescribeVolumesInput
  • optFns ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeVpcs

func (_e *MockClient_Expecter) DescribeVpcs(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_DescribeVpcs_Call

DescribeVpcs is a helper method to define mock.On call

  • ctx context.Context
  • params *serviceec2.DescribeVpcsInput
  • optFns ...func(*serviceec2.Options)

func (*MockClient_Expecter) GetEbsEncryptionByDefault

func (_e *MockClient_Expecter) GetEbsEncryptionByDefault(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_GetEbsEncryptionByDefault_Call

GetEbsEncryptionByDefault is a helper method to define mock.On call

  • ctx context.Context
  • params *serviceec2.GetEbsEncryptionByDefaultInput
  • optFns ...func(*serviceec2.Options)

type MockClient_GetEbsEncryptionByDefault_Call

type MockClient_GetEbsEncryptionByDefault_Call struct {
	*mock.Call
}

MockClient_GetEbsEncryptionByDefault_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEbsEncryptionByDefault'

func (*MockClient_GetEbsEncryptionByDefault_Call) Run

type MockElasticCompute

type MockElasticCompute struct {
	mock.Mock
}

MockElasticCompute is an autogenerated mock type for the ElasticCompute type

func NewMockElasticCompute

func NewMockElasticCompute(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockElasticCompute

NewMockElasticCompute creates a new instance of MockElasticCompute. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockElasticCompute) DescribeNetworkAcl

func (_m *MockElasticCompute) DescribeNetworkAcl(ctx context.Context) ([]awslib.AwsResource, error)

DescribeNetworkAcl provides a mock function with given fields: ctx

func (*MockElasticCompute) DescribeSecurityGroups

func (_m *MockElasticCompute) DescribeSecurityGroups(ctx context.Context) ([]awslib.AwsResource, error)

DescribeSecurityGroups provides a mock function with given fields: ctx

func (*MockElasticCompute) DescribeVPCs

func (_m *MockElasticCompute) DescribeVPCs(ctx context.Context) ([]awslib.AwsResource, error)

DescribeVPCs provides a mock function with given fields: ctx

func (*MockElasticCompute) EXPECT

func (*MockElasticCompute) GetEbsEncryptionByDefault

func (_m *MockElasticCompute) GetEbsEncryptionByDefault(ctx context.Context) ([]awslib.AwsResource, error)

GetEbsEncryptionByDefault provides a mock function with given fields: ctx

func (*MockElasticCompute) GetRouteTableForSubnet

func (_m *MockElasticCompute) GetRouteTableForSubnet(ctx context.Context, region string, subnetId string, vpcId string) (types.RouteTable, error)

GetRouteTableForSubnet provides a mock function with given fields: ctx, region, subnetId, vpcId

type MockElasticCompute_DescribeNetworkAcl_Call

type MockElasticCompute_DescribeNetworkAcl_Call struct {
	*mock.Call
}

MockElasticCompute_DescribeNetworkAcl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeNetworkAcl'

func (*MockElasticCompute_DescribeNetworkAcl_Call) Return

func (*MockElasticCompute_DescribeNetworkAcl_Call) Run

func (*MockElasticCompute_DescribeNetworkAcl_Call) RunAndReturn

type MockElasticCompute_DescribeSecurityGroups_Call

type MockElasticCompute_DescribeSecurityGroups_Call struct {
	*mock.Call
}

MockElasticCompute_DescribeSecurityGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeSecurityGroups'

func (*MockElasticCompute_DescribeSecurityGroups_Call) Return

func (*MockElasticCompute_DescribeSecurityGroups_Call) Run

func (*MockElasticCompute_DescribeSecurityGroups_Call) RunAndReturn

type MockElasticCompute_DescribeVPCs_Call

type MockElasticCompute_DescribeVPCs_Call struct {
	*mock.Call
}

MockElasticCompute_DescribeVPCs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeVPCs'

func (*MockElasticCompute_DescribeVPCs_Call) Return

func (*MockElasticCompute_DescribeVPCs_Call) Run

func (*MockElasticCompute_DescribeVPCs_Call) RunAndReturn

type MockElasticCompute_Expecter

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

func (*MockElasticCompute_Expecter) DescribeNetworkAcl

func (_e *MockElasticCompute_Expecter) DescribeNetworkAcl(ctx interface{}) *MockElasticCompute_DescribeNetworkAcl_Call

DescribeNetworkAcl is a helper method to define mock.On call

  • ctx context.Context

func (*MockElasticCompute_Expecter) DescribeSecurityGroups

func (_e *MockElasticCompute_Expecter) DescribeSecurityGroups(ctx interface{}) *MockElasticCompute_DescribeSecurityGroups_Call

DescribeSecurityGroups is a helper method to define mock.On call

  • ctx context.Context

func (*MockElasticCompute_Expecter) DescribeVPCs

func (_e *MockElasticCompute_Expecter) DescribeVPCs(ctx interface{}) *MockElasticCompute_DescribeVPCs_Call

DescribeVPCs is a helper method to define mock.On call

  • ctx context.Context

func (*MockElasticCompute_Expecter) GetEbsEncryptionByDefault

func (_e *MockElasticCompute_Expecter) GetEbsEncryptionByDefault(ctx interface{}) *MockElasticCompute_GetEbsEncryptionByDefault_Call

GetEbsEncryptionByDefault is a helper method to define mock.On call

  • ctx context.Context

func (*MockElasticCompute_Expecter) GetRouteTableForSubnet

func (_e *MockElasticCompute_Expecter) GetRouteTableForSubnet(ctx interface{}, region interface{}, subnetId interface{}, vpcId interface{}) *MockElasticCompute_GetRouteTableForSubnet_Call

GetRouteTableForSubnet is a helper method to define mock.On call

  • ctx context.Context
  • region string
  • subnetId string
  • vpcId string

type MockElasticCompute_GetEbsEncryptionByDefault_Call

type MockElasticCompute_GetEbsEncryptionByDefault_Call struct {
	*mock.Call
}

MockElasticCompute_GetEbsEncryptionByDefault_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEbsEncryptionByDefault'

func (*MockElasticCompute_GetEbsEncryptionByDefault_Call) Return

func (*MockElasticCompute_GetEbsEncryptionByDefault_Call) Run

func (*MockElasticCompute_GetEbsEncryptionByDefault_Call) RunAndReturn

type MockElasticCompute_GetRouteTableForSubnet_Call

type MockElasticCompute_GetRouteTableForSubnet_Call struct {
	*mock.Call
}

MockElasticCompute_GetRouteTableForSubnet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRouteTableForSubnet'

func (*MockElasticCompute_GetRouteTableForSubnet_Call) Return

func (*MockElasticCompute_GetRouteTableForSubnet_Call) Run

func (*MockElasticCompute_GetRouteTableForSubnet_Call) RunAndReturn

type NACLInfo

type NACLInfo struct {
	types.NetworkAcl
	// contains filtered or unexported fields
}

func (NACLInfo) GetRegion

func (r NACLInfo) GetRegion() string

func (NACLInfo) GetResourceArn

func (r NACLInfo) GetResourceArn() string

func (NACLInfo) GetResourceName

func (r NACLInfo) GetResourceName() string

func (NACLInfo) GetResourceType

func (r NACLInfo) GetResourceType() string

type Provider

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

func NewCurrentRegionEC2Provider

func NewCurrentRegionEC2Provider(log *logp.Logger, awsAccountID string, cfg aws.Config, factory awslib.CrossRegionFactory[Client]) *Provider

func NewEC2Provider

func NewEC2Provider(log *logp.Logger, awsAccountID string, cfg aws.Config, factory awslib.CrossRegionFactory[Client]) *Provider

func (*Provider) CreateSnapshots

func (p *Provider) CreateSnapshots(ctx context.Context, ins *Ec2Instance) ([]EBSSnapshot, error)

func (*Provider) DeleteSnapshot

func (p *Provider) DeleteSnapshot(ctx context.Context, snapshot EBSSnapshot) error

func (*Provider) DescribeInstances

func (p *Provider) DescribeInstances(ctx context.Context) ([]*Ec2Instance, error)

func (*Provider) DescribeNetworkAcl

func (p *Provider) DescribeNetworkAcl(ctx context.Context) ([]awslib.AwsResource, error)

func (*Provider) DescribeSecurityGroups

func (p *Provider) DescribeSecurityGroups(ctx context.Context) ([]awslib.AwsResource, error)

func (*Provider) DescribeSnapshots

func (p *Provider) DescribeSnapshots(ctx context.Context, snapshot EBSSnapshot) ([]EBSSnapshot, error)

TODO: Maybe we should bulk request snapshots? This will limit us scaling the pipeline

func (*Provider) DescribeVPCs

func (p *Provider) DescribeVPCs(ctx context.Context) ([]awslib.AwsResource, error)

func (*Provider) DescribeVolumes

func (p *Provider) DescribeVolumes(ctx context.Context, instances []*Ec2Instance) ([]*Volume, error)

func (*Provider) GetEbsEncryptionByDefault

func (p *Provider) GetEbsEncryptionByDefault(ctx context.Context) ([]awslib.AwsResource, error)

func (*Provider) GetRouteTableForSubnet

func (p *Provider) GetRouteTableForSubnet(ctx context.Context, region string, subnetId string, vpcId string) (types.RouteTable, error)

type SecurityGroup

type SecurityGroup struct {
	types.SecurityGroup
	// contains filtered or unexported fields
}

func (SecurityGroup) GetRegion

func (s SecurityGroup) GetRegion() string

func (SecurityGroup) GetResourceArn

func (s SecurityGroup) GetResourceArn() string

func (SecurityGroup) GetResourceName

func (s SecurityGroup) GetResourceName() string

func (SecurityGroup) GetResourceType

func (s SecurityGroup) GetResourceType() string

type SecurityGroupInfo

type SecurityGroupInfo struct {
	GroupId   *string `json:"group_id,omitempty"`
	GroupName *string `json:"group_name,omitempty"`
}

type Volume

type Volume struct {
	VolumeId   string
	InstanceId string
	Region     string
	Size       int
	Encrypted  bool
	Device     string
}

type VpcInfo

type VpcInfo struct {
	Vpc      types.Vpc       `json:"vpc"`
	FlowLogs []types.FlowLog `json:"flow_logs"`
	// contains filtered or unexported fields
}

func (VpcInfo) GetRegion

func (v VpcInfo) GetRegion() string

func (VpcInfo) GetResourceArn

func (v VpcInfo) GetResourceArn() string

func (VpcInfo) GetResourceName

func (v VpcInfo) GetResourceName() string

func (VpcInfo) GetResourceType

func (v VpcInfo) GetResourceType() string

Jump to

Keyboard shortcuts

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