awscommon

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: 4 Imported by: 0

Documentation

Overview

Package awscommon has set of methods which performs the task idependent of resource types in cloud such as dealing with availability-zone, region and etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonInput

type CommonInput struct {
	AvailabilityZone string
	SortInput        []string
	GetRaw           bool
}

CommonInput Implements GetAvailabilityZones, GetRegions, GetRegionFromAvail and GetUniqueNumberFromTags

func (*CommonInput) GetAvailabilityZones

func (r *CommonInput) GetAvailabilityZones(con aws.EstablishConnectionInput) ([]string, error)

GetAvailabilityZones gets the list of availability-zones in the selected region.

func (*CommonInput) GetRegionFromAvail

func (r *CommonInput) GetRegionFromAvail(con aws.EstablishConnectionInput) (string, error)

GetRegionFromAvail will fetch the region from the availability-zone selected.

func (*CommonInput) GetRegions

GetRegions get the list of regions available in the selected cloud provider.

func (*CommonInput) GetUniqueNumberFromTags

func (r *CommonInput) GetUniqueNumberFromTags() (int, error)

GetUniqueNumberFromTags will return an unique number generated from the latest created resource type. Newly created number will be appended to the name of the resource that will be created further.

type CommonResponse

type CommonResponse struct {
	Regions       []string
	GetRegionsRaw *ec2.DescribeRegionsOutput
}

CommonResponse holds the responses form the methods implemented by above structure

type Tag

type Tag struct {
	Resource string
	Name     string
	Value    string
}

Tag holds the info for tagging cloud resource which was or will be created.

func (*Tag) CreateTags

func (t *Tag) CreateTags(con aws.EstablishConnectionInput) (string, error)

CreateTags will create the tags to the selected resource and sends back the response.

Jump to

Keyboard shortcuts

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