core

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ShareWithPrefix = "ShareWith"
	All             = "all"
)
View Source
const (
	DefaultRegion = "us-east-1"
)

Variables

This section is empty.

Functions

func AccountSessionKey

func AccountSessionKey(account *common.Account, region string) utils.SessionKey

func GetAccount

func GetAccount(sessionFactory *utils.AWSSessionFactory, configAccount *common.Account) (common.Account, error)

func ListAMIs

func ListAMIs(sess *session.Session) (common.Images, error)

List AMIs from the given AWS session the session is attached to an AWS account and region

func ValidateAccount

func ValidateAccount(sessionFactory *utils.AWSSessionFactory, account *common.Account) error

Types

type AMISharePlan

type AMISharePlan struct {
	SourceAccount  AMISharePlanAccount   `yaml:"source-account"`
	TargetAccounts []AMISharePlanAccount `yaml:"target-accounts"`
}

type AMISharePlanAccount

type AMISharePlanAccount struct {
	ID         string        `yaml:"id"`
	Alias      string        `yaml:"alias"`
	AssumeRole string        `yaml:"assume-role"`
	AMIs       ImagesByGroup `yaml:"amis"`
}

type AWSShareAMI

type AWSShareAMI struct {
	ShareParams *common.ShareParams
	// contains filtered or unexported fields
}

func NewAWSShareAMI

func NewAWSShareAMI(params *common.ShareParams) (AWSShareAMI, error)

func (*AWSShareAMI) FilterAMIs

func (shareAMI *AWSShareAMI) FilterAMIs(sourceImages ImagesByRegion, account common.Account) (ImagesByGroup, error)

func (*AWSShareAMI) Run

func (shareAMI *AWSShareAMI) Run() error

func (*AWSShareAMI) ScanForAMIs

func (shareAMI *AWSShareAMI) ScanForAMIs(account *common.Account) (ImagesByRegion, error)

func (*AWSShareAMI) ValidateAccounts

func (shareAMI *AWSShareAMI) ValidateAccounts() error

func (*AWSShareAMI) WritePlan

func (shareAMI *AWSShareAMI) WritePlan(plan *AMISharePlan) error

type EC2Image

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

func (*EC2Image) AddTags

func (e *EC2Image) AddTags(tags map[string]string, tagSnapshots bool) error

func (*EC2Image) CopyTags

func (e *EC2Image) CopyTags(sess *session.Session, shareSnapshots bool) error

Copy tags to target account via AWS session the session is attached to an AWS account and region

func (*EC2Image) Date

func (e *EC2Image) Date() time.Time

func (*EC2Image) MarshalYAML

func (e *EC2Image) MarshalYAML() (interface{}, error)

func (*EC2Image) Match

func (e *EC2Image) Match(filter common.Filter) bool

func (*EC2Image) Properties

func (e *EC2Image) Properties() types.Properties

func (*EC2Image) ShareWithAccount

func (e *EC2Image) ShareWithAccount(accountId string, shareSnapshots bool) error

func (*EC2Image) String

func (e *EC2Image) String() string

type ImagesByGroup

type ImagesByGroup map[string]ImagesByRegion

type ImagesByRegion

type ImagesByRegion map[string]common.Images

Jump to

Keyboard shortcuts

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