Documentation
¶
Index ¶
- Constants
- func AllocateEIP(ctx context.Context, cli *ec2.Client) (*string, *string, error)
- func AssociateEIP(ctx context.Context, cli *ec2.Client, eipAllocId, instanceId string) (*string, error)
- func ConvertChoosableEIPList(eipList []*ChoosableEIP) []peco.Choosable
- func ConvertChoosableList(ec2List []*ChoosableEC2) []peco.Choosable
- func DisassociateEIP(ctx context.Context, cli *ec2.Client, allocId string) error
- func GetBlockDeviceMappings(ctx context.Context, cli *ec2.Client, instanceId string) ([]types.InstanceBlockDeviceMapping, error)
- func GetEIPFromInstance(ctx context.Context, cli *ec2.Client, instanceId string) (*types.Address, error)
- func GetInstances(region string) ([]types.Instance, error)
- func GetInstancesFromId(ctx context.Context, cli *ec2.Client, ids ...string) ([]types.Instance, error)
- func GetNotAssociateEIP(ctx context.Context, cli *ec2.Client) (*types.Address, error)
- func MakeEC2Client(ctx context.Context, region string) (*ec2.Client, error)
- func ReleaseEIP(ctx context.Context, cli *ec2.Client, allocId string) error
- type ChoosableEC2
- type ChoosableEC2s
- type ChoosableEIP
- type EC2Handler
- type Ebs
- type Instances
- type Launcher
Constants ¶
View Source
const ( EC2_LIST_CACHE_PREFIX = "aws.instances.cache." EC2_STATE_ANY = "" EC2_STATE_RUNNING = "running" EC2_STATE_STOPPED = "stopped" )
Variables ¶
This section is empty.
Functions ¶
func AssociateEIP ¶
func ConvertChoosableEIPList ¶ added in v0.3.2
func ConvertChoosableEIPList(eipList []*ChoosableEIP) []peco.Choosable
func ConvertChoosableList ¶
func ConvertChoosableList(ec2List []*ChoosableEC2) []peco.Choosable
func DisassociateEIP ¶
func GetBlockDeviceMappings ¶ added in v0.6.0
func GetEIPFromInstance ¶
func GetInstancesFromId ¶ added in v0.6.0
func GetNotAssociateEIP ¶
func MakeEC2Client ¶ added in v0.6.1
Types ¶
type ChoosableEC2 ¶
type ChoosableEC2 struct { InstanceId string Name string Status string InstanceType string PublicIP string PrivateIP string IPv6 string }
func ConvertChoosableEC2List ¶
func ConvertChoosableEC2List(instances []types.Instance, state string) []*ChoosableEC2
func (*ChoosableEC2) Choice ¶
func (e *ChoosableEC2) Choice() string
func (*ChoosableEC2) String ¶ added in v0.4.1
func (e *ChoosableEC2) String() string
func (*ChoosableEC2) Value ¶
func (e *ChoosableEC2) Value() string
type ChoosableEC2s ¶
type ChoosableEC2s []*ChoosableEC2
func (ChoosableEC2s) Len ¶
func (e ChoosableEC2s) Len() int
func (ChoosableEC2s) Less ¶
func (e ChoosableEC2s) Less(i, j int) bool
func (ChoosableEC2s) Swap ¶
func (e ChoosableEC2s) Swap(i, j int)
type ChoosableEIP ¶ added in v0.3.2
type ChoosableEIP struct { AllocationId string AssociateId string PublicIP string InstanceId string Name string }
func ChooseEIP ¶ added in v0.3.2
func ChooseEIP(ctx context.Context, region string) ([]*ChoosableEIP, error)
func LoadEIPList ¶ added in v0.3.2
func LoadEIPList(ctx context.Context, region string) ([]*ChoosableEIP, error)
func (*ChoosableEIP) Choice ¶ added in v0.3.2
func (c *ChoosableEIP) Choice() string
func (*ChoosableEIP) Value ¶ added in v0.3.2
func (c *ChoosableEIP) Value() string
type EC2Handler ¶
func NewEC2Handler ¶
func NewEC2Handler(m *cstore.Manager) *EC2Handler
func (*EC2Handler) ChooseEC2 ¶
func (h *EC2Handler) ChooseEC2(region, state string, reload bool) ([]string, error)
func (*EC2Handler) GetCacheStore ¶
func (r *EC2Handler) GetCacheStore(region string) (*cstore.CStore, error)
func (*EC2Handler) LoadChoosableEC2List ¶
func (r *EC2Handler) LoadChoosableEC2List(region, state string, reload bool) ([]*ChoosableEC2, error)
type Ebs ¶ added in v0.6.0
type Ebs struct { DeviceName string DeleteOnTermination bool Encrypted *bool SizeGB int64 VolumeType string }
why encrypted use *bool? for modify root device volume size. cannot specify encrypted root device
Click to show internal directories.
Click to hide internal directories.