reset

package
v0.37.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteAthenaResources

func DeleteAthenaResources(athenaSvc AthenaService) error

DeleteAthenaResources deletes all aethna resources in the current aws session

func NukeAccount

func NukeAccount(input *NukeAccountInput) error

NukeAccount directly triggers aws-nuke to be called on the configuration file provided, bypassing any manual prompts. Returns an error if there's any, else nil.

Types

type AthenaReset

type AthenaReset struct {
	Client athenaiface.AthenaAPI
}

AthenaReset defines a concrete implementation of the above Service interface

func (AthenaReset) DeleteNamedQuery

func (athenaReset AthenaReset) DeleteNamedQuery(input *athena.DeleteNamedQueryInput) (*athena.DeleteNamedQueryOutput, error)

DeleteNamedQuery implemenation

func (AthenaReset) DeleteWorkGroup

func (athenaReset AthenaReset) DeleteWorkGroup(input *athena.DeleteWorkGroupInput) (*athena.DeleteWorkGroupOutput, error)

DeleteWorkGroup implemenation

func (AthenaReset) ListNamedQueries

func (athenaReset AthenaReset) ListNamedQueries(input *athena.ListNamedQueriesInput) (*athena.ListNamedQueriesOutput, error)

ListNamedQueries implemenation

func (AthenaReset) ListWorkGroups

func (athenaReset AthenaReset) ListWorkGroups(input *athena.ListWorkGroupsInput) (*athena.ListWorkGroupsOutput, error)

ListWorkGroups implemenation

type AthenaService

type AthenaService interface {
	ListWorkGroups(input *athena.ListWorkGroupsInput) (*athena.ListWorkGroupsOutput, error)
	ListNamedQueries(input *athena.ListNamedQueriesInput) (*athena.ListNamedQueriesOutput, error)
	DeleteNamedQuery(input *athena.DeleteNamedQueryInput) (*athena.DeleteNamedQueryOutput, error)
	DeleteWorkGroup(input *athena.DeleteWorkGroupInput) (*athena.DeleteWorkGroupOutput, error)
}

AthenaService interface

type Nuke

type Nuke struct {
}

Nuke implements the NukeService interface using rebuy-de/aws-nuke https://github.com/rebuy-de/aws-nuke

func (Nuke) Load

func (nuke Nuke) Load(configPath string) (*config.Nuke, error)

Load returns an aws-nuke Nuke configuration with the provided configuration file. This will provide the information needed to know what can be nuked by aws-nuke.

func (Nuke) NewAccount

func (nuke Nuke) NewAccount(creds awsutil.Credentials) (*awsutil.Account,
	error)

NewAccount returns an aws-nuke Account that is created from the provided aws-nuke Credentials. This will provide the account information needed for aws-nuke to access an account to nuke.

func (Nuke) Run

func (nuke Nuke) Run(cmd *cmd.Nuke) error

Run executes and returns the result of the aws-nuke nuke.

type NukeAccountInput

type NukeAccountInput struct {
	ChildAccountID string
	RoleName       string
	ConfigPath     string
	NoDryRun       bool
	Token          common.TokenService
	Nuke           Nuker
}

NukeAccountInput is the container used for the TokenService and the NukeService to execute a Nuke for an AWS Account

type Nuker

type Nuker interface {
	NewAccount(awsutil.Credentials) (*awsutil.Account, error)
	Load(string) (*config.Nuke, error)
	Run(*cmd.Nuke) error
}

Nuker interface requires methods that are necessary to set up and execute a Nuke in an AWS Account.

Jump to

Keyboard shortcuts

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