remediation

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("Remediation not associated with policy")
)

Functions

This section is empty.

Types

type Invoker

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

Invoker is responsible for invoking Remediation Lambda

func NewInvoker

func NewInvoker(sess *session.Session) *Invoker

NewInvoker method returns a new instance of Invoker

func (*Invoker) GetRemediations

func (remediator *Invoker) GetRemediations() (*remediationmodels.Remediations, error)

GetRemediations invokes the Lambda in customer account and retrieves the list of available remediations

func (*Invoker) Remediate

func (remediator *Invoker) Remediate(remediation *remediationmodels.RemediateResource) error

Remediate will invoke remediation action in an AWS account

type InvokerAPI

type InvokerAPI interface {
	Remediate(*models.RemediateResource) error
	GetRemediations() (*models.Remediations, error)
}

InvokerAPI is the interface for the Invoker, the component that is responsible for invoking Remediation Lambda

type LambdaInput

type LambdaInput struct {
	Action  *string     `json:"action"`
	Payload interface{} `json:"payload,omitempty"`
}

LambdaInput is the input to the Remediation Lambda running in customer account

type Payload

type Payload struct {
	RemediationID string      `json:"remediationId"`
	Resource      interface{} `json:"resource"`
	Parameters    interface{} `json:"parameters"`
}

Payload is the input to the Lambda running in customer account that will perform the remediation tasks

Jump to

Keyboard shortcuts

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