Documentation
¶
Index ¶
- Constants
- type Auth
- type BlockDeviceMapping
- type CreateKeyPairResponse
- type CreateSecurityGroupResponse
- type CreateTagsResponse
- type DeleteSecurityGroupResponse
- type DescribeInstancesResponse
- type DescribeKeyPairsResponse
- type DescribeSecurityGroupsResponse
- type DescribeSpotInstanceRequestsResponse
- type DescribeSubnetsResponse
- type EC2
- func (e *EC2) AuthorizeSecurityGroup(groupId string, permissions []IpPermission) error
- func (e *EC2) CreateKeyPair(name string) ([]byte, error)
- func (e *EC2) CreateSecurityGroup(name string, description string, vpcId string) (*SecurityGroup, error)
- func (e *EC2) CreateTags(id string, tags map[string]string) error
- func (e *EC2) DeleteKeyPair(name string) error
- func (e *EC2) DeleteSecurityGroup(groupId string) error
- func (e *EC2) DescribeSpotInstanceRequests(spotInstanceRequestId string) (string, string, error)
- func (e *EC2) GetInstance(instanceId string) (EC2Instance, error)
- func (e *EC2) GetKeyPair(name string) (*KeyPair, error)
- func (e *EC2) GetKeyPairs() ([]KeyPair, error)
- func (e *EC2) GetSecurityGroupById(id string) (*SecurityGroup, error)
- func (e *EC2) GetSecurityGroups() ([]SecurityGroup, error)
- func (e *EC2) GetSubnets(filters []Filter) ([]Subnet, error)
- func (e *EC2) ImportKeyPair(name, publicKey string) error
- func (e *EC2) RequestSpotInstances(amiId string, instanceType string, zone string, instanceCount int, ...) (string, error)
- func (e *EC2) RestartInstance(instanceId string) error
- func (e *EC2) RunInstance(amiId string, instanceType string, zone string, minCount int, maxCount int, ...) (EC2Instance, error)
- func (e *EC2) StartInstance(instanceId string) error
- func (e *EC2) StopInstance(instanceId string, force bool) error
- func (e *EC2) TerminateInstance(instanceId string) error
- type EC2Instance
- type ErrorResponse
- type Filter
- type ImportKeyPairResponse
- type Instance
- type IpPermission
- type KeyPair
- type RequestSpotInstancesResponse
- type RunInstancesResponse
- type SecurityGroup
- type Subnet
Constants ¶
View Source
const (
ErrorDuplicateGroup = "InvalidGroup.Duplicate"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockDeviceMapping ¶
type CreateKeyPairResponse ¶
type CreateTagsResponse ¶
type DescribeInstancesResponse ¶
type DescribeInstancesResponse struct {
RequestId string `xml:"requestId"`
ReservationSet []struct {
InstancesSet []EC2Instance `xml:"instancesSet>item"`
} `xml:"reservationSet>item"`
}
type DescribeSecurityGroupsResponse ¶
type DescribeSecurityGroupsResponse struct {
RequestId string `xml:"requestId"`
SecurityGroupInfo []SecurityGroup `xml:"securityGroupInfo>item"`
}
type DescribeSpotInstanceRequestsResponse ¶ added in v0.3.0
type DescribeSubnetsResponse ¶
type EC2 ¶
func (*EC2) AuthorizeSecurityGroup ¶
func (e *EC2) AuthorizeSecurityGroup(groupId string, permissions []IpPermission) error
func (*EC2) CreateSecurityGroup ¶
func (*EC2) DeleteKeyPair ¶
func (*EC2) DeleteSecurityGroup ¶
func (*EC2) DescribeSpotInstanceRequests ¶ added in v0.3.0
func (*EC2) GetInstance ¶
func (e *EC2) GetInstance(instanceId string) (EC2Instance, error)
func (*EC2) GetKeyPairs ¶
func (*EC2) GetSecurityGroupById ¶
func (e *EC2) GetSecurityGroupById(id string) (*SecurityGroup, error)
func (*EC2) GetSecurityGroups ¶
func (e *EC2) GetSecurityGroups() ([]SecurityGroup, error)
func (*EC2) ImportKeyPair ¶
func (*EC2) RequestSpotInstances ¶ added in v0.3.0
func (*EC2) RestartInstance ¶
func (*EC2) RunInstance ¶
func (*EC2) StartInstance ¶
func (*EC2) TerminateInstance ¶
type EC2Instance ¶
type EC2Instance struct {
InstanceId string `xml:"instanceId"`
ImageId string `xml:"imageId"`
InstanceState struct {
Code int `xml:"code"`
Name string `xml:"name"`
} `xml:"instanceState"`
PrivateDnsName string `xml:"privateDnsName"`
DnsName string `xml:"dnsName"`
Reason string `xml:"reason"`
AmiLaunchIndex string `xml:"amiLaunchIndex"`
ProductCodes string `xml:"productCodes"`
InstanceType string `xml:"instanceType"`
LaunchTime string `xml:"launchTime"`
Placement struct {
AvailabilityZone string `xml:"availabilityZone"`
GroupName string `xml:"groupName"`
Tenancy string `xml:"tenancy"`
} `xml:"placement"`
KernelId string `xml:"kernelId"`
Monitoring struct {
State string `xml:"state"`
} `xml:"monitoring"`
SubnetId string `xml:"subnetId"`
VpcId string `xml:"vpcId"`
IpAddress string `xml:"ipAddress"`
PrivateIpAddress string `xml:"privateIpAddress"`
SourceDestCheck bool `xml:"sourceDestCheck"`
GroupSet []struct {
GroupId string `xml:"groupId"`
GroupName string `xml:"groupName"`
} `xml:"groupSet"`
StateReason struct {
Code string `xml:"code"`
Message string `xml:"message"`
} `xml:"stateReason"`
Architecture string `xml:"architecture"`
RootDeviceType string `xml:"rootDeviceType"`
RootDeviceName string `xml:"rootDeviceName"`
BlockDeviceMapping string `xml:"blockDeviceMapping"`
VirtualizationType string `xml:"virtualizationType"`
ClientToken string `xml:"clientToken"`
Hypervisor string `xml:"hypervisor"`
NetworkInterfaceSet []struct {
NetworkInterfaceId string `xml:"networkInterfaceId"`
SubnetId string `xml:"subnetId"`
VpcId string `xml:"vpcId"`
Description string `xml:"description"`
OwnerId string `xml:"ownerId"`
Status string `xml:"status"`
MacAddress string `xml:"macAddress"`
PrivateIpAddress string `xml:"privateIpAddress"`
PrivateDnsName string `xml:"privateDnsName"`
SourceDestCheck string `xml:"sourceDestCheck"`
GroupSet []struct {
GroupId string `xml:"groupId"`
GroupName string `xml:"groupName"`
} `xml:"groupSet>item"`
Attachment struct {
AttachmentId string `xml:"attachmentId"`
DeviceIndex string `xml:"deviceIndex"`
Status string `xml:"status"`
AttachTime string `xml:"attachTime"`
DeleteOnTermination bool `xml:"deleteOnTermination"`
} `xml:"attachment"`
PrivateIpAddressesSet []struct {
PrivateIpAddress string `xml:"privateIpAddress"`
PrivateDnsName string `xml:"privateDnsName"`
Primary bool `xml:"primary"`
} `xml:"privateIpAddressesSet>item"`
} `xml:"networkInterfaceSet>item"`
EbsOptimized bool `xml:"ebsOptimized"`
}
type ErrorResponse ¶
type ImportKeyPairResponse ¶
type IpPermission ¶
type RequestSpotInstancesResponse ¶ added in v0.3.0
type RunInstancesResponse ¶
type RunInstancesResponse struct {
RequestId string `xml:"requestId"`
ReservationId string `xml:"reservationId"`
OwnerId string `xml:"ownerId"`
Instances []EC2Instance `xml:"instancesSet>item"`
}
type SecurityGroup ¶
type SecurityGroup struct {
GroupName string `xml:"groupName"`
GroupId string `xml:"groupId"`
VpcId string `xml:"vpcId"`
OwnerId string `xml:"ownerId"`
IpPermissions []IpPermission `xml:"ipPermissions>item,omitempty"`
IpPermissionsEgress []IpPermission `xml:"ipPermissionsEgress>item,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.