Documentation
¶
Overview ¶
Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at
http://aws.amazon.com/apache2.0/
or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Code generated by go generate; DO NOT EDIT.
The regions queried were: - ap-northeast-1 - ap-northeast-2 - ap-northeast-3 - ap-south-1 - ap-southeast-1 - ap-southeast-2 - ca-central-1 - eu-central-1 - eu-north-1 - eu-west-1 - eu-west-2 - eu-west-3 - sa-east-1 - us-east-1 - us-east-2 - us-west-1 - us-west-2
Index ¶
- Variables
- func GetDefaultNetworkCardIndex(instanceType string) (int, error)
- func GetENILimit(instanceType string) (int, error)
- func GetHypervisorType(instanceType string) (string, error)
- func GetIPv4Limit(instanceType string) (int, error)
- func GetIsBareMetal(instanceType string) (bool, error)
- func SetInstance(instanceType ec2types.InstanceType, eniLimit int, ipv4Limit int, ...)
- type InstanceTypeLimits
- type NetworkCard
Constants ¶
This section is empty.
Variables ¶
var ErrInstanceTypeNotExist = errors.New("instance type does not exist")
var ErrNoInfo = errors.New("no info on instance type due to not being publicly available")
Functions ¶
func GetENILimit ¶
func GetHypervisorType ¶
func GetIPv4Limit ¶
func GetIsBareMetal ¶
func SetInstance ¶
func SetInstance(instanceType ec2types.InstanceType, eniLimit int, ipv4Limit int, defaultNetworkCardIndex int, networkCards []NetworkCard, hypervisorType ec2types.InstanceTypeHypervisor, isBareMetalInstance bool)
Types ¶
type InstanceTypeLimits ¶
type InstanceTypeLimits struct {
ENILimit int
IPv4Limit int
DefaultNetworkCardIndex int
NetworkCards []NetworkCard
HypervisorType string
IsBareMetal bool
}
InstanceTypeLimits keeps track of limits for an instance type
func GetInstance ¶
func GetInstance(instanceType string) (InstanceTypeLimits, bool)
func New ¶
func New(eniLimit int, ipv4Limit int, defaultNetworkCardIndex int, networkCards []NetworkCard, hypervisorType string, isBareMetalInstance bool) InstanceTypeLimits
type NetworkCard ¶
type NetworkCard struct {
// max number of interfaces supported per card
MaximumNetworkInterfaces int64
// the index of current card
NetworkCardIndex int64
NetworkPerformance string
}
func GetNetworkCards ¶
func GetNetworkCards(instanceType string) ([]NetworkCard, error)