awsimage

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteImageInput

type DeleteImageInput struct {
	ImageIds []string
}

DeleteImageInput holds the required value terminate image and implements DeleteImage for the same.

func (*DeleteImageInput) DeleteImage

DeleteImage actually terminates the specified captured images. Make sure right image-id is passed through DeleteImageInput, because once image is deleted there is no way of bringing it back.

type GetImageInput

type GetImageInput struct {
	Kind     string   `json:"Kind"`
	ImageIds []string `json:"ImageIds"`
	GetRaw   bool     `json:"GetRaw"`
}

GetImageInput can hold all the required details for fecthing the details of image

func (*GetImageInput) GetAllImage

GetAllImage will get the details of all images present under this account in the entered region.

func (*GetImageInput) GetImage

GetImage will fetch the details of the images, who's Id is passed to it.

func (*GetImageInput) IsImageAvailable

func (i *GetImageInput) IsImageAvailable(con aws.EstablishConnectionInput) (bool, error)

IsImageAvailable will check if the entered image exists in account for that particular region or not.

func (*GetImageInput) SearchImage

SearchImage is tailored to find the Id's of the images, of whom's name is matched with the keyword entered.

type ImageCreateInput

type ImageCreateInput struct {
	InstanceId string
	GetRaw     bool
}

ImageCreateInput implements CreateImage for creation of image

func (*ImageCreateInput) CreateImage

CreateImage will capture the image of the server/vm based on the input received from ImageCreateInput.

type ImageResponse

type ImageResponse struct {
	Name            string                    `json:"Name,omitempty"`
	ImageId         string                    `json:"ImageId,omitempty"`
	ImageIds        []string                  `json:"ImageIds,omitempty"`
	State           string                    `json:"State,omitempty"`
	IsPublic        bool                      `json:"IsPublic,omitempty"`
	CreationDate    string                    `json:"CreationDate,omitempty"`
	Description     string                    `json:"Description,omitempty"`
	DefaultResponse string                    `json:"DefaultResponse,omitempty"`
	DeleteResponse  string                    `json:"ImageResponse,omitempty"`
	SnapShot        SnapshotDetails           `json:"SnapShot,omitempty"`
	CreateImageRaw  *ec2.CreateImageOutput    `json:"CreateImageRaw,omitempty"`
	GetImagesRaw    *ec2.DescribeImagesOutput `json:"GetImagesRaw,omitempty"`
	GetImageRaw     *ec2.Image                `json:"GetImageRaw,omitempty"`
}

ImageResponse contains filtered/unfiltered response received from aws.

type SnapshotDetails

type SnapshotDetails struct {
	SnapshotId string `json:"SnapshotId,omitempty"`
	VolumeType string `json:"VolumeType,omitempty"`
	VolumeSize int64  `json:"VolumeSize,omitempty"`
}

SnapshotDetails holds the details of snapshot captured such as type disk, size of it and etc.

Jump to

Keyboard shortcuts

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