awsinstance

package
v0.0.0-...-c891ed9 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonComputeInput

type CommonComputeInput struct {
	InstanceIds []string
	VpcId       string
	GetRaw      bool
}

func (*CommonComputeInput) GetInstanceFromVpc

func (*CommonComputeInput) SearchInstance

func (des *CommonComputeInput) SearchInstance(con aws.EstablishConnectionInput) (bool, error)

type CommonComputeResponse

type CommonComputeResponse struct {
	InstanceIds []string                     `json:"InstanceIds,omitempty"`
	GetInstRaw  *ec2.DescribeInstancesOutput `json:"DescribeInstRaw,omitempty"`
}

type CreateServerInput

type CreateServerInput struct {
	InstanceName string
	ImageId      string
	InstanceType string
	KeyName      string
	MaxCount     int64
	MinCount     int64
	SubnetId     string
	SecGroupId   string
	UserData     string
	AssignPubIp  bool
	GetRaw       bool
}

func (*CreateServerInput) CreateServer

func (csrv *CreateServerInput) CreateServer(con aws.EstablishConnectionInput) ([]ServerResponse, error)

type DeleteServerInput

type DeleteServerInput struct {
	VpcId       string   `json:"VpcId,omitempty"`
	InstanceIds []string `json:"InstanceIds,omitempty"`
	GetRaw      bool
}

func (*DeleteServerInput) DeleteServer

func (*DeleteServerInput) DeleteServerFromVpc

func (d *DeleteServerInput) DeleteServerFromVpc(con aws.EstablishConnectionInput) ([]ServerResponse, error)

type DescribeInstanceInput

type DescribeInstanceInput struct {
	InstanceIds []string `json:"InstanceIds,omitempty"`
	VpcIds      []string `json:"VpcIds,omitempty"`
	SubnetIds   []string `json:"SubnetIds,omitempty"`
	Filters     Filters  `json:"Filters,omitempty"`
	GetRaw      bool
}

func (*DescribeInstanceInput) GetAllServers

func (d *DescribeInstanceInput) GetAllServers(con neuronaws.EstablishConnectionInput) ([]ServerResponse, error)

This function is meant to get all the servers from a particular region.

func (*DescribeInstanceInput) GetServersDetails

func (d *DescribeInstanceInput) GetServersDetails(con neuronaws.EstablishConnectionInput) ([]ServerResponse, error)

This function is tailored to get the details of the random servers you enter

func (*DescribeInstanceInput) GetServersFromNetwork

func (d *DescribeInstanceInput) GetServersFromNetwork(con neuronaws.EstablishConnectionInput) ([]ServerResponse, error)

This function is tailored to fectch the servers from network, to fetch the data one has to pass either subnet-id else vpc-id to filters to make the life easy.

func (*DescribeInstanceInput) GetServersFromSubnet

func (d *DescribeInstanceInput) GetServersFromSubnet(con neuronaws.EstablishConnectionInput) ([]ServerResponse, error)

type Filters

type Filters struct {
	Name  string
	Value []string
}

type ServerResponse

type ServerResponse struct {
	InstanceName        string                        `json:"InstanceName,omitempty"`
	InstanceId          string                        `json:"InstanceId,omitempty"`
	SubnetId            string                        `json:"SubnetId,omitempty"`
	PrivateIpAddress    string                        `json:"IpAddress,omitempty"`
	PublicIpAddress     string                        `json:"PublicIpAddress,omitempty"`
	PrivateDnsName      string                        `json:"PrivateDnsName,omitempty"`
	CreatedOn           string                        `json:"CreatedOn,omitempty"`
	State               string                        `json:"State,omitempty"`
	InstanceDeleteState string                        `json:"InstanceDeleteState,omitempty"`
	InstanceType        string                        `json:"InstanceType,omitempty"`
	Cloud               string                        `json:"Cloud,omitempty"`
	Region              string                        `json:"Region,omitempty"`
	PreviousState       string                        `json:"PreviousState,omitempty"`
	CurrentState        string                        `json:"CurrentState,omitempty"`
	DefaultResponse     interface{}                   `json:"DefaultResponse,omitempty"`
	Error               error                         `json:"Error,omitempty"`
	CreateInstRaw       *ec2.DescribeInstancesOutput  `json:"CreateInstRaw,omitempty"`
	GetInstRaw          *ec2.DescribeInstancesOutput  `json:"DescribeInstRaw,omitempty"`
	DeleteInstRaw       *ec2.TerminateInstancesOutput `json:"DeleteInstRaw,omitempty"`
	StartInstRaw        *ec2.StartInstancesOutput     `json:"StartInstRaw,omitempty"`
	StopInstRaw         *ec2.StopInstancesOutput      `json:"StopInstRaw,omitempty"`
	CreateImgRaw        *ec2.CreateImageOutput        `json:"CreateImgRaw,omitempty"`
	DescribeImg         *ec2.DescribeImagesOutput     `json:"DescribeImg,omitempty"`
}

type UpdateServerInput

type UpdateServerInput struct {
	InstanceIds []string `json:"InstanceIds,omitempty"`
	Action      string
	GetRaw      bool
}

func (*UpdateServerInput) UpdateServer

Jump to

Keyboard shortcuts

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