aws

package
v21.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Overview

Package aws contains the implementation of stack for Amazon

Index

Constants

This section is empty.

Variables

View Source
var InstanceTypes = map[string]*InstanceType{}/* 196 elements not displayed */

InstanceTypes is a map of EC2 resources.

Functions

func IsOperation

func IsOperation(op interface{}, name string, fieldType reflect.Type) bool

IsOperation checks if 'op' interface has a field with 'name' of type 'fieldType'

func New

New creates and initializes an AWS stack

func NullStack

func NullStack() *stack

NullStack is not exposed through API, is needed essentially by tests

Types

type Attributes

type Attributes struct {
	ClockSpeed                  string `json:"clockSpeed,omitempty"`
	CurrentGeneration           string `json:"currentGeneration,omitempty"`
	DedicatedEbsThroughput      string `json:"dedicatedEbsThroughput,omitempty"`
	Ecu                         string `json:"ecu,omitempty"`
	Gpu                         string `json:"gpu,omitempty"`
	EnhancedNetworkingSupported string `json:"enhancedNetworkingSupported,omitempty"`
	InstanceFamily              string `json:"instanceFamily,omitempty"`
	InstanceType                string `json:"instanceType,omitempty"`
	LicenseModel                string `json:"licenseModel,omitempty"`
	Location                    string `json:"location,omitempty"`
	LocationType                string `json:"locationType,omitempty"`
	Memory                      string `json:"memory,omitempty"`
	NetworkPerformance          string `json:"networkPerformance,omitempty"`
	NormalizationSizeFactor     string `json:"normalizationSizeFactor,omitempty"`
	OperatingSystem             string `json:"operatingSystem,omitempty"`
	Operation                   string `json:"operation,omitempty"`
	PhysicalProcessor           string `json:"physicalProcessor,omitempty"`
	PreInstalledSw              string `json:"preInstalledSw,omitempty"`
	ProcessorArchitecture       string `json:"processorArchitecture,omitempty"`
	ProcessorFeatures           string `json:"processorFeatures,omitempty"`
	Servicecode                 string `json:"servicecode,omitempty"`
	Servicename                 string `json:"servicename,omitempty"`
	Storage                     string `json:"storage,omitempty"`
	Tenancy                     string `json:"tenancy,omitempty"`
	Usagetype                   string `json:"usagetype,omitempty"`
	Vcpu                        string `json:"vcpu,omitempty"`
}

Attributes attributes of a computing instance

type Card

type Card struct {
	EffectiveDate   string          `json:"effectiveDate,omitempty"`
	OfferTermCode   string          `json:"offerTermCode,omitempty"`
	PriceDimensions PriceDimensions `json:"priceDimensions,omitempty"`
	Sku             string          `json:"sku,omitempty"`
	TermAttributes  TermAttributes  `json:"termAttributes,omitempty"`
}

Card compute instance price card

type IPInSubnet

type IPInSubnet struct {
	Subnet   string
	Name     string
	ID       string
	IP       string
	PublicIP string
}

IPInSubnet ...

type InstanceType

type InstanceType struct {
	InstanceType string
	VCPU         int64
	MemoryMb     int64
	GPU          int64
	MaxPods      int64
}

InstanceType is an EC2 instance type.

type OnDemand

type OnDemand struct {
	Cards map[string]Card
}

OnDemand on demand compute instance cards

type OpContext

type OpContext struct {
	ProjectID    string
	DesiredState string
}

OpContext ...

type Price

type Price struct {
	Product         Product `json:"product,omitempty"`
	PublicationDate string  `json:"publicationDate,omitempty"`
	ServiceCode     string  `json:"serviceCode,omitempty"`
	Terms           Terms   `json:"terms,omitempty"`
}

Price Compute instance price information

func NewPriceFromJSONValue

func NewPriceFromJSONValue(in aws.JSONValue) (Price, fail.Error)

NewPriceFromJSONValue creates a Price instance from the content of an aws.JSONValue

func (Price) GetCPUFreq

func (p Price) GetCPUFreq() float64

func (Price) GetCores

func (p Price) GetCores() int

func (Price) GetDiskSize

func (p Price) GetDiskSize() float64

func (Price) GetGPUNumber

func (p Price) GetGPUNumber() int

func (Price) GetRAMSize

func (p Price) GetRAMSize() float64

type PriceDimension

type PriceDimension struct {
	AppliesTo    []string           `json:"appliesTo,omitempty"`
	BeginRange   string             `json:"beginRange,omitempty"`
	Description  string             `json:"description,omitempty"`
	EndRange     string             `json:"endRange,omitempty"`
	PricePerUnit map[string]float32 `json:"pricePerUnit,omitempty"`
	RateCode     string             `json:"RateCode,omitempty"`
	Unit         string             `json:"Unit,omitempty"`
}

PriceDimension compute instance price related to term condition

type PriceDimensions

type PriceDimensions struct {
	PriceDimensionMap map[string]PriceDimension `json:"price_dimension_map,omitempty"`
}

PriceDimensions compute instance price dimensions

type Product

type Product struct {
	Attributes    Attributes `json:"attributes,omitempty"`
	ProductFamily string     `json:"productFamily,omitempty"`
	Sku           string     `json:"sku,omitempty"`
}

Product compute instance product

type Reserved

type Reserved struct {
	Cards map[string]Card `json:"cards,omitempty"`
}

Reserved represents compute instance cards

type Result

type Result struct {
	State string
	Error error
	Done  bool
}

Result ...

type TermAttributes

type TermAttributes struct {
	LeaseContractLength string `json:"leaseContractLength,omitempty"`
	OfferingClass       string `json:"offeringClass,omitempty"`
	PurchaseOption      string `json:"purchaseOption,omitempty"`
}

TermAttributes compute instance terms

type Terms

type Terms struct {
	OnDemand OnDemand `json:"onDemand,omitempty"`
	Reserved Reserved `json:"reserved,omitempty"`
}

Terms compute instance prices terms

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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