ec2

package
v0.0.0-...-f1e7488 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrCodeDryRunOperation is the error code returned from a successful dry run operation.
	// A successful dry run operation is returned from AWS when running a request in dry run mode succeeds.
	ErrCodeDryRunOperation = "DryRunOperation"
	// ErrCodeRequestLimitExceeded is returned when too many requests are sent to AWS in a short period of time.
	ErrCodeRequestLimitExceeded = "RequestLimitExceeded"
	// ErrCodeInsufficientInstanceCapacity is returned when not enough instances are available to fulfill the
	// request.
	ErrCodeInsufficientInstanceCapacity = "InsufficientInstanceCapacity"
	// ErrCodeServiceUnavailable is returned when the request has failed due to a temporary failure of the server.
	ErrCodeServiceUnavailable = "ServiceUnavailable"
	// ErrCodeUnavailable is returned when the  server is overloaded and can't handle the request.
	ErrCodeUnavailable = "Unavailable"
	// ErrCodeInternalFailure is returned when the request processing has failed because of an unknown error,
	// exception, or failure.
	ErrCodeInternalFailure = "InternalFailure"
	// ErrCodeInternalError is returned when an internal error has occurred.
	ErrCodeInternalError = "InternalError"
	// ErrCodeInsufficientReservedInstanceCapacity is returned when there are not enough available Reserved Instances
	// to satisfy your minimum request.
	ErrCodeInsufficientReservedInstanceCapacity = "InsufficientReservedInstanceCapacity"
	// ErrCodeInsufficientHostCapacity is returned when there is not enough capacity to fulfill your Dedicated Host request.
	ErrCodeInsufficientHostCapacity = "InsufficientHostCapacity"
	// ErrCodeInsufficientCapacity is returned when there is not enough capacity to fulfill your import instance request.
	ErrCodeInsufficientCapacity = "InsufficientCapacity"
	// ErrCodeInsufficientAddressCapacity is returned when not enough available addresses to satisfy your minimum request.
	ErrCodeInsufficientAddressCapacity = "InsufficientAddressCapacity"
)

Variables

This section is empty.

Functions

func CreateTagSpecifications

func CreateTagSpecifications(input []machines.Tag) []*ec2.TagSpecification

CreateTagSpecifications converts a set of tags into ec2 tag specifications.

func NewAPI

func NewAPI(config client.ConfigProvider) ec2iface.EC2API

NewAPI returns an EC2 client from the given config provider.

func NewMachines

func NewMachines(input *NewInput) (machines.Machines, error)

NewMachines initializes a new machines.Machines EC2 implementation.

Types

type NewInput

type NewInput struct {
	// API has a reference to the EC2 API.
	API ec2iface.EC2API `validate:"required"`
	// CostCalculator contains an implementation of calculator.CostCalculator.
	CostCalculator calculator.CostCalculator `validate:"required"`
	// Logger is an instance of ign.Logger for logging messages in the Machines component.
	Logger ign.Logger `validate:"required"`
	// Limit defines the maximum number of machines that this component can have running simultaneously.
	// -1 is unlimited. Note that the component is still subject to EC2 instance availability.
	Limit *int64 `default:"-1"`
	// WorkerGroupName is the label value set on all machines created by this component. It is used to identify
	// machines created by this component.
	WorkerGroupName string `default:"cloudsim-simulation-worker"`
	// Region contains the name of the region the machines.Machines component will point to.
	Region string
	// Zones contains the set of availability zones this component will launch simulation instances in.
	Zones []Zone
}

NewInput includes a set of field to create a new machines.Machines EC2 implementation.

func (*NewInput) SetDefaults

func (ni *NewInput) SetDefaults() error

SetDefaults sets the default values for NewInput.

func (*NewInput) Validate

func (ni *NewInput) Validate() error

Validate validates that the input values are valid.

type Zone

type Zone struct {
	Zone     string
	SubnetID string
}

Zone contains an AWS EC2 availability zone and its corresponding subnet ID.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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