data

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ERROR_NO_AMI = "no AMI"

Variables

This section is empty.

Functions

func DescribeAvailabilityZones

func DescribeAvailabilityZones(regionName string) ([]ec2types.AvailabilityZone, error)

func DescribeAvailabilityZonesAsync

func DescribeAvailabilityZonesAsync(regionName string, c chan AvailabilityZonesResult)

func FilterInstaceTypesOfferedByRegion added in v0.7.2

func FilterInstaceTypesOfferedByRegion(instanceTypes []string, region string) ([]string, error)

Get InstanceTypes offerings on current location

func GetAvailabilityZones

func GetAvailabilityZones() []string

func GetDedicatedHost

func GetDedicatedHost(hostID string) (*ec2Types.Host, error)

func GetDedicatedHosts

func GetDedicatedHosts(r DedicatedHostResquest) ([]ec2Types.Host, error)

This function check on all regions for the dedicated host and return the list of hosts matching the request params

func GetInstanceByRegion

func GetInstanceByRegion(r InstanceResquest, regionName string) ([]ec2Types.Instance, error)

func GetRandomAvailabilityZone

func GetRandomAvailabilityZone(region string, excludedAZs []string) (*string, error)

func GetRegions

func GetRegions() ([]string, error)

func GetZoneName

func GetZoneName(azID string, azDescriptions []ec2types.AvailabilityZone) (string, error)

func IsInstanceTypeOfferedByAZ

func IsInstanceTypeOfferedByAZ(region, instanceType, az string) (bool, error)

func IsInstanceTypeOfferedByRegion

func IsInstanceTypeOfferedByRegion(instanceType, region string) (bool, error)

func LokupRegionOfferingInstanceType

func LokupRegionOfferingInstanceType(instanceType string) (*string, error)

Check on all regions which offers the type of instance got one having it

Types

type AvailabilityZonesResult

type AvailabilityZonesResult struct {
	AvailabilityZones []ec2types.AvailabilityZone
	Err               error
}

type DedicatedHostResquest

type DedicatedHostResquest struct {
	HostID string
	Tags   map[string]string
}

type ImageInfo

type ImageInfo struct {
	Region *string
	Image  *ec2Types.Image
}

func FindAMI

func FindAMI(amiName, amiArch *string) (*ImageInfo, error)

This function check all regions to get the AMI filter by its name it will return the first region where the AMI is offered

func GetAMI

func GetAMI(r ImageRequest) (*ImageInfo, error)

GetAMI based on params defined by request In case multiple AMIs it will return the newest

func IsAMIOffered

func IsAMIOffered(r ImageRequest) (bool, *ImageInfo, error)

IsAMIOffered checks if an ami based on its Name is offered on a specific region

type ImageRequest

type ImageRequest struct {
	Name, Arch, Owner *string
	Region            *string
	BlockDeviceType   *string
}

type InstanceResquest

type InstanceResquest struct {
	Tags map[string]string
}

Jump to

Keyboard shortcuts

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