amicopy

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LocateSingleAMI

func LocateSingleAMI(id string, ec2Conn *ec2.EC2) (*ec2.Image, error)

LocateSingleAMI tries to locate a single AMI for the given ID.

Types

type AmiCopy

type AmiCopy interface {
	Copy(ui *packer.Ui) error
	Input() *ec2.CopyImageInput
	Output() *ec2.CopyImageOutput
	Tag() error
	TargetAccountID() string
}

AmiCopy defines the interface to copy images

type AmiCopyImpl added in v1.0.7

type AmiCopyImpl struct {
	EC2 *ec2.EC2

	SourceImage     *ec2.Image
	EnsureAvailable bool
	KeepArtifact    bool
	TagsOnly        bool
	// contains filtered or unexported fields
}

AmiCopyImpl holds data and methods related to copying an image.

func (*AmiCopyImpl) Copy added in v1.0.7

func (ac *AmiCopyImpl) Copy(ui *packer.Ui) (err error)

Copy will perform an EC2 copy based on the `Input` field. It will also call Tag to copy the source tags, if any.

func (*AmiCopyImpl) Input added in v1.0.7

func (ac *AmiCopyImpl) Input() *ec2.CopyImageInput

func (*AmiCopyImpl) Output added in v1.0.7

func (ac *AmiCopyImpl) Output() *ec2.CopyImageOutput

func (*AmiCopyImpl) SetInput added in v1.0.7

func (ac *AmiCopyImpl) SetInput(input *ec2.CopyImageInput)

func (*AmiCopyImpl) SetTargetAccountID added in v1.0.7

func (ac *AmiCopyImpl) SetTargetAccountID(id string)

func (*AmiCopyImpl) Tag added in v1.0.7

func (ac *AmiCopyImpl) Tag() (err error)

Tag will copy tags from the source image to the target (if any).

func (*AmiCopyImpl) TargetAccountID added in v1.0.7

func (ac *AmiCopyImpl) TargetAccountID() string

type AmiManifest added in v1.0.7

type AmiManifest struct {
	AccountID string `json:"account_id"`
	Region    string `json:"region"`
	ImageID   string `json:"image_id"`
}

AmiManifest holds the data about the resulting copied image

Jump to

Keyboard shortcuts

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