goamz: github.com/mitchellh/goamz/ec2 Index | Files | Directories

package ec2

import "github.com/mitchellh/goamz/ec2"

Index

Package Files

ec2.go sign.go

func SecurityGroupIds Uses

func SecurityGroupIds(ids ...string) []SecurityGroup

SecurityGroupNames is a convenience function that returns a slice of security groups with the given ids.

func SecurityGroupNames Uses

func SecurityGroupNames(names ...string) []SecurityGroup

SecurityGroupNames is a convenience function that returns a slice of security groups with the given names.

type AcceptVpcPeeringConnection Uses

type AcceptVpcPeeringConnection struct {
    VpcPeeringConnectionId string `xml:"vpcPeeringConnectionId"`
}

The AcceptVpcPeeringConnection request parameters

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AcceptVpcPeeringConnection.html

type AcceptVpcPeeringConnectionResp Uses

type AcceptVpcPeeringConnectionResp struct {
    RequestId            string               `xml:"requestId"`
    VpcPeeringConnection VpcPeeringConnection `xml:"vpcPeeringConnection"`
}

Response to a AcceptVpcPeeringConnection request.

type Address Uses

type Address struct {
    PublicIp                string `xml:"publicIp"`
    AllocationId            string `xml:"allocationId"`
    Domain                  string `xml:"domain"`
    InstanceId              string `xml:"instanceId"`
    AssociationId           string `xml:"associationId"`
    NetworkInterfaceId      string `xml:"networkInterfaceId"`
    NetworkInterfaceOwnerId string `xml:"networkInterfaceOwnerId"`
    PrivateIpAddress        string `xml:"privateIpAddress"`
}

Address represents an Elastic IP Address See http://goo.gl/uxCjp7 for more details

type AllocateAddress Uses

type AllocateAddress struct {
    Domain string
}

The AllocateAddress request parameters

see http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-AllocateAddress.html

type AllocateAddressResp Uses

type AllocateAddressResp struct {
    RequestId    string `xml:"requestId"`
    PublicIp     string `xml:"publicIp"`
    Domain       string `xml:"domain"`
    AllocationId string `xml:"allocationId"`
}

Response to an AllocateAddress request

type AssociateAddress Uses

type AssociateAddress struct {
    InstanceId         string
    PublicIp           string
    AllocationId       string
    AllowReassociation bool
}

The AssociateAddress request parameters

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-AssociateAddress.html

type AssociateAddressResp Uses

type AssociateAddressResp struct {
    RequestId     string `xml:"requestId"`
    Return        bool   `xml:"return"`
    AssociationId string `xml:"associationId"`
}

Response to an AssociateAddress request

type AssociateRouteTableResp Uses

type AssociateRouteTableResp struct {
    RequestId     string `xml:"requestId"`
    AssociationId string `xml:"associationId"`
}

type AttachVolumeResp Uses

type AttachVolumeResp struct {
    RequestId  string `xml:"requestId"`
    VolumeId   string `xml:"volumeId"`
    InstanceId string `xml:"instanceId"`
    Device     string `xml:"device"`
    Status     string `xml:"status"`
    AttachTime string `xml:"attachTime"`
}

Response to an AttachVolume request

type AvailabilityZone Uses

type AvailabilityZone struct {
    Name   string `xml:"zoneName"`
    Region string `xml:"regionName"`
}

AvailabilityZone represents an EC2 availability zone.

type AvailabilityZoneInfo Uses

type AvailabilityZoneInfo struct {
    AvailabilityZone
    State      string   `xml:"zoneState"`
    MessageSet []string `xml:"messageSet>item"`
}

AvailabilityZoneInfo encapsulates details for an availability zone in EC2.

type BlockDevice Uses

type BlockDevice struct {
    DeviceName          string `xml:"deviceName"`
    VolumeId            string `xml:"ebs>volumeId"`
    Status              string `xml:"ebs>status"`
    AttachTime          string `xml:"ebs>attachTime"`
    DeleteOnTermination bool   `xml:"ebs>deleteOnTermination"`
}

BlockDevice represents the association of a block device with an instance.

type BlockDeviceMapping Uses

type BlockDeviceMapping struct {
    DeviceName          string `xml:"deviceName"`
    VirtualName         string `xml:"virtualName"`
    SnapshotId          string `xml:"ebs>snapshotId"`
    VolumeType          string `xml:"ebs>volumeType"`
    VolumeSize          int64  `xml:"ebs>volumeSize"`
    DeleteOnTermination bool   `xml:"ebs>deleteOnTermination"`
    Encrypted           bool   `xml:"ebs>encrypted"`
    NoDevice            bool   `xml:"noDevice"`

    // The number of I/O operations per second (IOPS) that the volume supports.
    IOPS int64 `xml:"ebs>iops"`
}

BlockDeviceMapping represents the association of a block device with an image.

See http://goo.gl/wnDBf for more details.

type CancelSpotRequestResult Uses

type CancelSpotRequestResult struct {
    SpotRequestId string `xml:"spotInstanceRequestId"`
    State         string `xml:"state"`
}

Response to a CancelSpotInstanceRequests request.

See http://goo.gl/3BKHj for more details.

type CancelSpotRequestsResp Uses

type CancelSpotRequestsResp struct {
    RequestId                string                    `xml:"requestId"`
    CancelSpotRequestResults []CancelSpotRequestResult `xml:"spotInstanceRequestSet>item"`
}

type CopyImage Uses

type CopyImage struct {
    SourceRegion  string
    SourceImageId string
    Name          string
    Description   string
    ClientToken   string
}

The CopyImage request parameters.

See http://goo.gl/hQwPCK for more details.

type CopyImageResp Uses

type CopyImageResp struct {
    RequestId string `xml:"requestId"`
    ImageId   string `xml:"imageId"`
}

Response to a CopyImage request.

See http://goo.gl/hQwPCK for more details.

type CreateCustomerGateway Uses

type CreateCustomerGateway struct {
    Type      string
    IpAddress string
    BgpAsn    int
}

type CreateCustomerGatewayResp Uses

type CreateCustomerGatewayResp struct {
    RequestId       string          `xml:"requestId"`
    CustomerGateway CustomerGateway `xml:"customerGateway"`
}

Response to a CreateCustomerGateway request

type CreateDhcpOptions Uses

type CreateDhcpOptions struct {
    DomainNameServers  string
    DomainName         string
    NtpServers         string
    NetbiosNameServers string
    NetbiosNodeType    string
}

The CreateDhcpOptions request parameters

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateDhcpOptions.html

type CreateDhcpOptionsResp Uses

type CreateDhcpOptionsResp struct {
    RequestId   string      `xml:"requestId"`
    DhcpOptions DhcpOptions `xml:"dhcpOptions"`
}

Response to a CreateDhcpOptions request

type CreateImage Uses

type CreateImage struct {
    InstanceId   string
    Name         string
    Description  string
    NoReboot     bool
    BlockDevices []BlockDeviceMapping
}

The CreateImage request parameters.

See http://goo.gl/cxU41 for more details.

type CreateImageResp Uses

type CreateImageResp struct {
    RequestId string `xml:"requestId"`
    ImageId   string `xml:"imageId"`
}

Response to a CreateImage request.

See http://goo.gl/cxU41 for more details.

type CreateInternetGateway Uses

type CreateInternetGateway struct{}

CreateInternetGateway request parameters.

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateInternetGateway.html

type CreateInternetGatewayResp Uses

type CreateInternetGatewayResp struct {
    RequestId       string          `xml:"requestId"`
    InternetGateway InternetGateway `xml:"internetGateway"`
}

CreateInternetGateway response

type CreateKeyPairResp Uses

type CreateKeyPairResp struct {
    RequestId      string `xml:"requestId"`
    KeyName        string `xml:"keyName"`
    KeyFingerprint string `xml:"keyFingerprint"`
    KeyMaterial    string `xml:"keyMaterial"`
}

type CreateNetworkAcl Uses

type CreateNetworkAcl struct {
    VpcId string
}

The CreateNetworkAcl request parameters

http://goo.gl/BZmCRF

type CreateNetworkAclEntryResp Uses

type CreateNetworkAclEntryResp struct {
    RequestId string `xml:"requestId"`
    Return    bool   `xml:"return"`
}

Response to CreateNetworkAclEntry request

type CreateNetworkAclResp Uses

type CreateNetworkAclResp struct {
    RequestId  string     `xml:"requestId"`
    NetworkAcl NetworkAcl `xml:"networkAcl"`
}

Response to a CreateNetworkAcl request

type CreateRoute Uses

type CreateRoute struct {
    RouteTableId           string
    DestinationCidrBlock   string
    GatewayId              string
    InstanceId             string
    NetworkInterfaceId     string
    VpcPeeringConnectionId string
}

CreateRoute request parameters

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateRoute.html

type CreateRouteTable Uses

type CreateRouteTable struct {
    VpcId string
}

The CreateRouteTable request parameters.

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateRouteTable.html

type CreateRouteTableResp Uses

type CreateRouteTableResp struct {
    RequestId  string     `xml:"requestId"`
    RouteTable RouteTable `xml:"routeTable"`
}

Response to a CreateRouteTable request.

type CreateSecurityGroupResp Uses

type CreateSecurityGroupResp struct {
    SecurityGroup
    RequestId string `xml:"requestId"`
}

CreateSecurityGroupResp represents a response to a CreateSecurityGroup request.

type CreateSnapshotResp Uses

type CreateSnapshotResp struct {
    RequestId string `xml:"requestId"`
    Snapshot
}

Response to a CreateSnapshot request.

See http://goo.gl/ttcda for more details.

type CreateSubnet Uses

type CreateSubnet struct {
    VpcId            string
    CidrBlock        string
    AvailabilityZone string
}

The CreateSubnet request parameters

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateSubnet.html

type CreateSubnetResp Uses

type CreateSubnetResp struct {
    RequestId string `xml:"requestId"`
    Subnet    Subnet `xml:"subnet"`
}

Response to a CreateSubnet request

type CreateVolume Uses

type CreateVolume struct {
    AvailZone  string
    Size       int64
    SnapshotId string
    VolumeType string
    IOPS       int64
    Encrypted  bool
}

The CreateVolume request parameters

See http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVolume.html

type CreateVolumeResp Uses

type CreateVolumeResp struct {
    RequestId  string `xml:"requestId"`
    VolumeId   string `xml:"volumeId"`
    Size       int64  `xml:"size"`
    SnapshotId string `xml:"snapshotId"`
    AvailZone  string `xml:"availabilityZone"`
    Status     string `xml:"status"`
    CreateTime string `xml:"createTime"`
    VolumeType string `xml:"volumeType"`
    IOPS       int64  `xml:"iops"`
    Encrypted  bool   `xml:"encrypted"`
}

Response to a CreateVolume request

type CreateVpc Uses

type CreateVpc struct {
    CidrBlock       string
    InstanceTenancy string
}

The CreateVpc request parameters

See http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVpc.html

type CreateVpcPeeringConnection Uses

type CreateVpcPeeringConnection struct {
    PeerOwnerId string
    PeerVpcId   string
    VpcId       string
}

The CreateVpcPeeringConnection request parameters

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVpcPeeringConnection.html

type CreateVpcPeeringConnectionResp Uses

type CreateVpcPeeringConnectionResp struct {
    RequestId            string               `xml:"requestId"`
    VpcPeeringConnection VpcPeeringConnection `xml:"vpcPeeringConnection"`
}

Response to a CreateVpcPeeringConnection

type CreateVpcResp Uses

type CreateVpcResp struct {
    RequestId string `xml:"requestId"`
    VPC       VPC    `xml:"vpc"`
}

Response to a CreateVpc request

type CustomerGateway Uses

type CustomerGateway struct {
    CustomerGatewayId string `xml:"customerGatewayId"`
    State             string `xml:"state"`
    Type              string `xml:"type"`
    IpAddress         string `xml:"ipAddress"`
    BgpAsn            int    `xml:"bgpAsn"`
    Tags              []Tag  `xml:"tagSet>item"`
}

type DeleteCustomerGatewayResp Uses

type DeleteCustomerGatewayResp struct {
    RequestId string `xml:"requestId"`
    Return    bool   `xml:"return"`
}

type DeleteNetworkAclEntryResp Uses

type DeleteNetworkAclEntryResp struct {
    RequestId string `xml:"requestId"`
    Return    bool   `xml:"return"`
}

Response to a DeleteNetworkAclEntry request.

type DeleteNetworkAclResp Uses

type DeleteNetworkAclResp struct {
    RequestId string `xml:"requestId"`
    Return    bool   `xml:"return"`
}

Response to a DeleteNetworkAcl request.

type DeleteVpcPeeringConnection Uses

type DeleteVpcPeeringConnection struct {
    VpcPeeringConnectionId string `xml:"vpcPeeringConnectionId"`
}

The DeleteVpcPeeringConnection request

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteVpcPeeringConnection.html

type DeleteVpcPeeringConnectionResp Uses

type DeleteVpcPeeringConnectionResp struct {
    RequestId string `xml:"requestId"`
}

Response to a DeleteVpcPeeringConnection request.

type DeregisterImageResp Uses

type DeregisterImageResp struct {
    RequestId string `xml:"requestId"`
    Return    bool   `xml:"return"`
}

Response to a DegisterImage request.

See http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DeregisterImage.html

type DescribeAddressesResp Uses

type DescribeAddressesResp struct {
    RequestId string    `xml:"requestId"`
    Addresses []Address `xml:"addressesSet>item"`
}

type DescribeAvailabilityZonesResp Uses

type DescribeAvailabilityZonesResp struct {
    RequestId string                 `xml:"requestId"`
    Zones     []AvailabilityZoneInfo `xml:"availabilityZoneInfo>item"`
}

DescribeAvailabilityZonesResp represents a response to a DescribeAvailabilityZones request in EC2.

type DescribeCustomerGatewaysResp Uses

type DescribeCustomerGatewaysResp struct {
    RequestId        string            `xml:"requestId"`
    CustomerGateways []CustomerGateway `xml:"customerGatewaySet>item"`
}

type DescribeInstanceStatus Uses

type DescribeInstanceStatus struct {
    InstanceIds         []string
    IncludeAllInstances bool
    MaxResults          int64
    NextToken           string
}

type DescribeInstanceStatusResp Uses

type DescribeInstanceStatusResp struct {
    RequestId      string              `xml:"requestId"`
    InstanceStatus []InstanceStatusSet `xml:"instanceStatusSet>item"`
}

type DescribeSpotPriceHistory Uses

type DescribeSpotPriceHistory struct {
    InstanceType       []string
    ProductDescription []string
    AvailabilityZone   string
    StartTime, EndTime time.Time
}

type DescribeSpotPriceHistoryResp Uses

type DescribeSpotPriceHistoryResp struct {
    RequestId string             `xml:"requestId"`
    History   []SpotPriceHistory `xml:"spotPriceHistorySet>item"`
}

Response to a DescribeSpotPriceHisotyr request.

See http://goo.gl/3BKHj for more details.

type DescribeVpcPeeringConnectionResp Uses

type DescribeVpcPeeringConnectionResp struct {
    RequestId             string                 `xml:"requestId"`
    VpcPeeringConnections []VpcPeeringConnection `xml:"vpcPeeringConnectionSet>item"`
}

Response to a DescribeVpcPeeringConnection request.

type DhcpConfigurationSet Uses

type DhcpConfigurationSet struct {
    Tags []Tag `xml:"dhcpConfigurationSet>item"`
}

type DhcpOptions Uses

type DhcpOptions struct {
    DhcpOptionsId         string               `xml:"dhcpOptionsId"`
    DhcpConfigurationSets DhcpConfigurationSet `xml:"dhcpConfigurationSet"`
}

DhcpOptions

type EC2 Uses

type EC2 struct {
    aws.Auth
    aws.Region
    // contains filtered or unexported fields
}

The EC2 type encapsulates operations with a specific EC2 region.

func New Uses

func New(auth aws.Auth, region aws.Region) *EC2

func NewWithClient Uses

func NewWithClient(auth aws.Auth, region aws.Region, client *http.Client) *EC2

New creates a new EC2.

func (*EC2) AcceptVpcPeeringConnection Uses

func (ec2 *EC2) AcceptVpcPeeringConnection(id string) (resp *AcceptVpcPeeringConnectionResp, err error)

AcceptVpcPeeringConnection

func (*EC2) Addresses Uses

func (ec2 *EC2) Addresses(publicIps []string, allocationIds []string, filter *Filter) (resp *DescribeAddressesResp, err error)

DescribeAddresses returns details about one or more Elastic IP Addresses. Returned addresses can be filtered by Public IP, Allocation ID or multiple filters

See http://goo.gl/zW7J4p for more details.

func (*EC2) AllocateAddress Uses

func (ec2 *EC2) AllocateAddress(options *AllocateAddress) (resp *AllocateAddressResp, err error)

Allocate a new Elastic IP.

func (*EC2) AssociateAddress Uses

func (ec2 *EC2) AssociateAddress(options *AssociateAddress) (resp *AssociateAddressResp, err error)

Associate an address with a VPC instance.

func (*EC2) AssociateDhcpOptions Uses

func (ec2 *EC2) AssociateDhcpOptions(dhcpOptionsId string, vpcId string) (resp *SimpleResp, err error)

Associate DhcpOptions to a VPC.

func (*EC2) AssociateRouteTable Uses

func (ec2 *EC2) AssociateRouteTable(id, subnetId string) (*AssociateRouteTableResp, error)

Associate a routing table.

func (*EC2) AttachInternetGateway Uses

func (ec2 *EC2) AttachInternetGateway(id, vpcId string) (resp *SimpleResp, err error)

Attach an InternetGateway.

func (*EC2) AttachVolume Uses

func (ec2 *EC2) AttachVolume(volumeId string, instanceId string, device string) (resp *AttachVolumeResp, err error)

Attach a volume.

func (*EC2) AuthorizeSecurityGroup Uses

func (ec2 *EC2) AuthorizeSecurityGroup(group SecurityGroup, perms []IPPerm) (resp *SimpleResp, err error)

AuthorizeSecurityGroup creates an allowance for clients matching the provided rules to access instances within the given security group.

See http://goo.gl/u2sDJ for more details.

func (*EC2) AuthorizeSecurityGroupEgress Uses

func (ec2 *EC2) AuthorizeSecurityGroupEgress(group SecurityGroup, perms []IPPerm) (resp *SimpleResp, err error)

AuthorizeSecurityGroupEgress creates an allowance for clients matching the provided rules for egress access.

See http://goo.gl/UHnH4L for more details.

func (*EC2) CancelSpotRequests Uses

func (ec2 *EC2) CancelSpotRequests(spotrequestIds []string) (resp *CancelSpotRequestsResp, err error)

CancelSpotRequests requests the cancellation of spot requests when the given ids.

See http://goo.gl/3BKHj for more details.

func (*EC2) CopyImage Uses

func (ec2 *EC2) CopyImage(options *CopyImage) (resp *CopyImageResp, err error)

Copy and Image from one region to another.

See http://goo.gl/hQwPCK for more details.

func (*EC2) CreateCustomerGateway Uses

func (ec2 *EC2) CreateCustomerGateway(options *CreateCustomerGateway) (resp *CreateCustomerGatewayResp, err error)

Create a customer gateway

func (*EC2) CreateDhcpOptions Uses

func (ec2 *EC2) CreateDhcpOptions(options *CreateDhcpOptions) (resp *CreateDhcpOptionsResp, err error)

Create DhcpOptions.

func (*EC2) CreateImage Uses

func (ec2 *EC2) CreateImage(options *CreateImage) (resp *CreateImageResp, err error)

Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped.

See http://goo.gl/cxU41 for more details.

func (*EC2) CreateInternetGateway Uses

func (ec2 *EC2) CreateInternetGateway(
    options *CreateInternetGateway) (resp *CreateInternetGatewayResp, err error)

Create a new internet gateway.

func (*EC2) CreateKeyPair Uses

func (ec2 *EC2) CreateKeyPair(keyName string) (resp *CreateKeyPairResp, err error)

CreateKeyPair creates a new key pair and returns the private key contents.

See http://goo.gl/0S6hV

func (*EC2) CreateNetworkAcl Uses

func (ec2 *EC2) CreateNetworkAcl(options *CreateNetworkAcl) (resp *CreateNetworkAclResp, err error)

CreateNetworkAcl creates a network ACL in a VPC.

http://goo.gl/51X7db

func (*EC2) CreateNetworkAclEntry Uses

func (ec2 *EC2) CreateNetworkAclEntry(networkAclId string, options *NetworkAclEntry) (resp *CreateNetworkAclEntryResp, err error)

CreateNetworkAclEntry creates an entry (a rule) in a network ACL with the specified rule number.

http://goo.gl/BtXhtj

func (*EC2) CreateRoute Uses

func (ec2 *EC2) CreateRoute(options *CreateRoute) (resp *SimpleResp, err error)

Create a new route.

func (*EC2) CreateRouteTable Uses

func (ec2 *EC2) CreateRouteTable(
    options *CreateRouteTable) (resp *CreateRouteTableResp, err error)

Create a new routing table.

func (*EC2) CreateSecurityGroup Uses

func (ec2 *EC2) CreateSecurityGroup(group SecurityGroup) (resp *CreateSecurityGroupResp, err error)

CreateSecurityGroup run a CreateSecurityGroup request in EC2, with the provided name and description.

See http://goo.gl/Eo7Yl for more details.

func (*EC2) CreateSnapshot Uses

func (ec2 *EC2) CreateSnapshot(volumeId, description string) (resp *CreateSnapshotResp, err error)

CreateSnapshot creates a volume snapshot and stores it in S3.

See http://goo.gl/ttcda for more details.

func (*EC2) CreateSubnet Uses

func (ec2 *EC2) CreateSubnet(options *CreateSubnet) (resp *CreateSubnetResp, err error)

Create a new subnet.

func (*EC2) CreateTags Uses

func (ec2 *EC2) CreateTags(resourceIds []string, tags []Tag) (resp *SimpleResp, err error)

CreateTags adds or overwrites one or more tags for the specified taggable resources. For a list of tagable resources, see: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html

See http://goo.gl/Vmkqc for more details

func (*EC2) CreateVolume Uses

func (ec2 *EC2) CreateVolume(options *CreateVolume) (resp *CreateVolumeResp, err error)

Create a new volume.

func (*EC2) CreateVpc Uses

func (ec2 *EC2) CreateVpc(options *CreateVpc) (resp *CreateVpcResp, err error)

Create a new VPC.

func (*EC2) CreateVpcPeeringConnection Uses

func (ec2 *EC2) CreateVpcPeeringConnection(
    options *CreateVpcPeeringConnection) (resp *CreateVpcPeeringConnectionResp, err error)

Create a vpc peering connection

func (*EC2) DeleteCustomerGateway Uses

func (ec2 *EC2) DeleteCustomerGateway(customerGatewayId string) (resp *DeleteCustomerGatewayResp, err error)

func (*EC2) DeleteDhcpOptions Uses

func (ec2 *EC2) DeleteDhcpOptions(id string) (resp *SimpleResp, err error)

Delete DhcpOptions.

func (*EC2) DeleteInternetGateway Uses

func (ec2 *EC2) DeleteInternetGateway(id string) (resp *SimpleResp, err error)

Delete an InternetGateway.

func (*EC2) DeleteKeyPair Uses

func (ec2 *EC2) DeleteKeyPair(name string) (resp *SimpleResp, err error)

DeleteKeyPair deletes a key pair.

See http://goo.gl/0bqok

func (*EC2) DeleteNetworkAcl Uses

func (ec2 *EC2) DeleteNetworkAcl(id string) (resp *DeleteNetworkAclResp, err error)

DeleteNetworkAcl deletes the network ACL with specified id.

http://goo.gl/nC78Wx

func (*EC2) DeleteNetworkAclEntry Uses

func (ec2 *EC2) DeleteNetworkAclEntry(id string, ruleNumber int, egress bool) (resp *DeleteNetworkAclEntryResp, err error)

DeleteNetworkAclEntry deletes the specified ingress or egress entry (rule) from the specified network ACL.

http://goo.gl/moQbE2

func (*EC2) DeleteRoute Uses

func (ec2 *EC2) DeleteRoute(routeTableId, cidr string) (resp *SimpleResp, err error)

Delete a Route.

func (*EC2) DeleteRouteTable Uses

func (ec2 *EC2) DeleteRouteTable(id string) (resp *SimpleResp, err error)

Delete a RouteTable.

func (*EC2) DeleteSecurityGroup Uses

func (ec2 *EC2) DeleteSecurityGroup(group SecurityGroup) (resp *SimpleResp, err error)

DeleteSecurityGroup removes the given security group in EC2.

See http://goo.gl/QJJDO for more details.

func (*EC2) DeleteSnapshots Uses

func (ec2 *EC2) DeleteSnapshots(ids []string) (resp *SimpleResp, err error)

DeleteSnapshots deletes the volume snapshots with the given ids.

Note: If you make periodic snapshots of a volume, the snapshots are incremental so that only the blocks on the device that have changed since your last snapshot are incrementally saved in the new snapshot. Even though snapshots are saved incrementally, the snapshot deletion process is designed so that you need to retain only the most recent snapshot in order to restore the volume.

See http://goo.gl/vwU1y for more details.

func (*EC2) DeleteSubnet Uses

func (ec2 *EC2) DeleteSubnet(id string) (resp *SimpleResp, err error)

Delete a Subnet.

func (*EC2) DeleteTags Uses

func (ec2 *EC2) DeleteTags(resourceIds []string, tags []Tag) (resp *SimpleResp, err error)

DeleteTags deletes tags.

func (*EC2) DeleteVolume Uses

func (ec2 *EC2) DeleteVolume(id string) (resp *SimpleResp, err error)

Delete an EBS volume.

func (*EC2) DeleteVpc Uses

func (ec2 *EC2) DeleteVpc(id string) (resp *SimpleResp, err error)

Delete a VPC.

func (*EC2) DeleteVpcPeeringConnection Uses

func (ec2 *EC2) DeleteVpcPeeringConnection(id string) (resp *DeleteVpcPeeringConnectionResp, err error)

func (*EC2) DeregisterImage Uses

func (ec2 *EC2) DeregisterImage(imageId string) (resp *DeregisterImageResp, err error)

Degisters an image. Note that this does not delete the backing stores of the AMI.

See http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DeregisterImage.html

func (*EC2) DescribeAvailabilityZones Uses

func (ec2 *EC2) DescribeAvailabilityZones(filter *Filter) (resp *DescribeAvailabilityZonesResp, err error)

DescribeAvailabilityZones returns details about availability zones in EC2. The filter parameter is optional, and if provided will limit the availability zones returned to those matching the given filtering rules.

See http://goo.gl/ylxT4R for more details.

func (*EC2) DescribeCustomerGateways Uses

func (ec2 *EC2) DescribeCustomerGateways(ids []string, filter *Filter) (resp *DescribeCustomerGatewaysResp, err error)

func (*EC2) DescribeInstanceStatus Uses

func (ec2 *EC2) DescribeInstanceStatus(options *DescribeInstanceStatus, filter *Filter) (resp *DescribeInstanceStatusResp, err error)

func (*EC2) DescribeInternetGateways Uses

func (ec2 *EC2) DescribeInternetGateways(ids []string, filter *Filter) (resp *InternetGatewaysResp, err error)

DescribeInternetGateways

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInternetGateways.html

func (*EC2) DescribeRouteTables Uses

func (ec2 *EC2) DescribeRouteTables(ids []string, filter *Filter) (resp *RouteTablesResp, err error)

DescribeRouteTables

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeRouteTables.html

func (*EC2) DescribeSpotPriceHistory Uses

func (ec2 *EC2) DescribeSpotPriceHistory(o *DescribeSpotPriceHistory) (resp *DescribeSpotPriceHistoryResp, err error)

DescribeSpotPriceHistory gets the spot pricing history.

See http://goo.gl/3BKHj for more details.

func (*EC2) DescribeSpotRequests Uses

func (ec2 *EC2) DescribeSpotRequests(spotrequestIds []string, filter *Filter) (resp *SpotRequestsResp, err error)

DescribeSpotInstanceRequests returns details about spot requests in EC2. Both parameters are optional, and if provided will limit the spot requests returned to those matching the given spot request ids or filtering rules.

See http://goo.gl/KsKJJk for more details.

func (*EC2) DescribeSubnets Uses

func (ec2 *EC2) DescribeSubnets(ids []string, filter *Filter) (resp *SubnetsResp, err error)

DescribeSubnets

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSubnets.html

func (*EC2) DescribeVpcPeeringConnection Uses

func (ec2 *EC2) DescribeVpcPeeringConnection(ids []string, filter *Filter) (resp *DescribeVpcPeeringConnectionResp, err error)

DescribeVpcPeeringConnection

func (*EC2) DescribeVpcs Uses

func (ec2 *EC2) DescribeVpcs(ids []string, filter *Filter) (resp *VpcsResp, err error)

DescribeVpcs

See http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeVpcs.html

func (*EC2) DetachInternetGateway Uses

func (ec2 *EC2) DetachInternetGateway(id, vpcId string) (resp *SimpleResp, err error)

Detach an InternetGateway.

func (*EC2) DetachVolume Uses

func (ec2 *EC2) DetachVolume(id string) (resp *SimpleResp, err error)

Detaches an EBS volume.

func (*EC2) DisassociateAddress Uses

func (ec2 *EC2) DisassociateAddress(id string) (resp *SimpleResp, err error)

Disassociate an address from a VPC instance.

func (*EC2) DisassociateAddressClassic Uses

func (ec2 *EC2) DisassociateAddressClassic(ip string) (resp *SimpleResp, err error)

Disassociate an address from a VPC instance.

func (*EC2) DisassociateRouteTable Uses

func (ec2 *EC2) DisassociateRouteTable(id string) (*SimpleResp, error)

Disassociate a routing table.

func (*EC2) GetConsoleOutput Uses

func (ec2 *EC2) GetConsoleOutput(options *GetConsoleOutput) (resp *GetConsoleOutputResp, err error)

GetConsoleOutput returns the console output for the sepcified instance. Note that console output is base64-encoded, as in the underlying AWS API.

See http://goo.gl/EY70zb for more details.

func (*EC2) ImageAttribute Uses

func (ec2 *EC2) ImageAttribute(imageId, attribute string) (resp *ImageAttributeResp, err error)

ImageAttribute describes an attribute of an AMI. You can specify only one attribute at a time. Valid attributes are:

description | kernel | ramdisk | launchPermission | productCodes | blockDeviceMapping

See http://goo.gl/bHO3zT for more details.

func (*EC2) Images Uses

func (ec2 *EC2) Images(ids []string, filter *Filter) (resp *ImagesResp, err error)

Images returns details about available images. The ids and filter parameters, if provided, will limit the images returned. For example, to get all the private images associated with this account set the boolean filter "is-public" to 0. For list of filters: http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeImages.html

Note: calling this function with nil ids and filter parameters will result in a very large number of images being returned.

See http://goo.gl/SRBhW for more details.

func (*EC2) ImagesByOwners Uses

func (ec2 *EC2) ImagesByOwners(ids []string, owners []string, filter *Filter) (resp *ImagesResp, err error)

ImagesByOwners returns details about available images. The ids, owners, and filter parameters, if provided, will limit the images returned. For example, to get all the private images associated with this account set the boolean filter "is-public" to 0. For list of filters: http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeImages.html

Note: calling this function with nil ids and filter parameters will result in a very large number of images being returned.

See http://goo.gl/SRBhW for more details.

func (*EC2) ImportKeyPair Uses

func (ec2 *EC2) ImportKeyPair(keyname string, key string) (resp *ImportKeyPairResponse, err error)

ImportKeyPair imports a key into AWS

See http://goo.gl/NbZUvw

func (*EC2) Instances Uses

func (ec2 *EC2) Instances(instIds []string, filter *Filter) (resp *InstancesResp, err error)

Instances returns details about instances in EC2. Both parameters are optional, and if provided will limit the instances returned to those matching the given instance ids or filtering rules.

See http://goo.gl/4No7c for more details.

func (*EC2) KeyPairs Uses

func (ec2 *EC2) KeyPairs(keynames []string, filter *Filter) (resp *KeyPairsResp, err error)

KeyPairs returns list of key pairs for this account

See http://goo.gl/Apzsfz

func (*EC2) ModifyImageAttribute Uses

func (ec2 *EC2) ModifyImageAttribute(imageId string, options *ModifyImageAttribute) (resp *SimpleResp, err error)

ModifyImageAttribute sets attributes for an image.

See http://goo.gl/YUjO4G for more details.

func (*EC2) ModifyInstance Uses

func (ec2 *EC2) ModifyInstance(instId string, options *ModifyInstance) (resp *ModifyInstanceResp, err error)

ModifyImageAttribute modifies the specified attribute of the specified instance. You can specify only one attribute at a time. To modify some attributes, the instance must be stopped.

See http://goo.gl/icuXh5 for more details.

func (*EC2) ModifySubnetAttribute Uses

func (ec2 *EC2) ModifySubnetAttribute(options *ModifySubnetAttribute) (resp *ModifySubnetAttributeResp, err error)

ModifySubnetAttribute

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-ModifySubnetAttribute.html

func (*EC2) ModifyVpcAttribute Uses

func (ec2 *EC2) ModifyVpcAttribute(vpcId string, options *ModifyVpcAttribute) (*SimpleResp, error)

ModifyVpcAttribute modifies the specified attribute of the specified VPC.

See http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/index.html?ApiReference-query-ModifyVpcAttribute.html for more details.

func (*EC2) NetworkAcls Uses

func (ec2 *EC2) NetworkAcls(networkAclIds []string, filter *Filter) (resp *NetworkAclsResp, err error)

NetworkAcls describes one or more of your network ACLs for given filter.

http://goo.gl/mk9RsV

func (*EC2) ReassociateRouteTable Uses

func (ec2 *EC2) ReassociateRouteTable(id, routeTableId string) (*ReassociateRouteTableResp, error)

Re-associate a routing table.

func (*EC2) RebootInstances Uses

func (ec2 *EC2) RebootInstances(ids ...string) (resp *SimpleResp, err error)

RebootInstance requests a reboot of one or more instances. This operation is asynchronous; it only queues a request to reboot the specified instance(s). The operation will succeed if the instances are valid and belong to you.

Requests to reboot terminated instances are ignored.

See http://goo.gl/baoUf for more details.

func (*EC2) RegisterImage Uses

func (ec2 *EC2) RegisterImage(options *RegisterImage) (resp *RegisterImageResp, err error)

Registers a new AMI with EC2.

See: http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-RegisterImage.html

func (*EC2) RejectVpcPeeringConnection Uses

func (ec2 *EC2) RejectVpcPeeringConnection(id string) (resp *RejectVpcPeeringConnectionResp, err error)

RejectVpcPeeringConnection

func (*EC2) ReleaseAddress Uses

func (ec2 *EC2) ReleaseAddress(id string) (resp *SimpleResp, err error)

Release an Elastic IP (VPC).

func (*EC2) ReleasePublicAddress Uses

func (ec2 *EC2) ReleasePublicAddress(publicIp string) (resp *SimpleResp, err error)

Release an Elastic IP (Public)

func (*EC2) ReplaceNetworkAclAssociation Uses

func (ec2 *EC2) ReplaceNetworkAclAssociation(associationId string, networkAclId string) (resp *ReplaceNetworkAclAssociationResponse, err error)

ReplaceNetworkAclAssociation changes which network ACL a subnet is associated with.

http://goo.gl/ar0MH5

func (*EC2) ReplaceRoute Uses

func (ec2 *EC2) ReplaceRoute(options *ReplaceRoute) (resp *SimpleResp, err error)

Replace a new route.

func (*EC2) RequestSpotInstances Uses

func (ec2 *EC2) RequestSpotInstances(options *RequestSpotInstances) (resp *RequestSpotInstancesResp, err error)

RequestSpotInstances requests a new spot instances in EC2.

func (*EC2) ResetImageAttribute Uses

func (ec2 *EC2) ResetImageAttribute(imageId string, options *ResetImageAttribute) (resp *SimpleResp, err error)

ResetImageAttribute resets an attribute of an AMI to its default value.

http://goo.gl/r6ZCPm for more details.

func (*EC2) RevokeSecurityGroup Uses

func (ec2 *EC2) RevokeSecurityGroup(group SecurityGroup, perms []IPPerm) (resp *SimpleResp, err error)

RevokeSecurityGroup revokes permissions from a group.

See http://goo.gl/ZgdxA for more details.

func (*EC2) RevokeSecurityGroupEgress Uses

func (ec2 *EC2) RevokeSecurityGroupEgress(group SecurityGroup, perms []IPPerm) (resp *SimpleResp, err error)

RevokeSecurityGroupEgress revokes egress permissions from a group

see http://goo.gl/Zv4wh8

func (*EC2) RunInstances Uses

func (ec2 *EC2) RunInstances(options *RunInstances) (resp *RunInstancesResp, err error)

RunInstances starts new instances in EC2. If options.MinCount and options.MaxCount are both zero, a single instance will be started; otherwise if options.MaxCount is zero, options.MinCount will be used insteead.

See http://goo.gl/Mcm3b for more details.

func (*EC2) SecurityGroups Uses

func (ec2 *EC2) SecurityGroups(groups []SecurityGroup, filter *Filter) (resp *SecurityGroupsResp, err error)

SecurityGroups returns details about security groups in EC2. Both parameters are optional, and if provided will limit the security groups returned to those matching the given groups or filtering rules.

See http://goo.gl/k12Uy for more details.

func (*EC2) Snapshots Uses

func (ec2 *EC2) Snapshots(ids []string, filter *Filter) (resp *SnapshotsResp, err error)

Snapshots returns details about volume snapshots available to the user. The ids and filter parameters, if provided, limit the snapshots returned.

See http://goo.gl/ogJL4 for more details.

func (*EC2) StartInstances Uses

func (ec2 *EC2) StartInstances(ids ...string) (resp *StartInstanceResp, err error)

StartInstances starts an Amazon EBS-backed AMI that you've previously stopped.

See http://goo.gl/awKeF for more details.

func (*EC2) StopInstances Uses

func (ec2 *EC2) StopInstances(ids ...string) (resp *StopInstanceResp, err error)

StopInstances requests stopping one or more Amazon EBS-backed instances.

See http://goo.gl/436dJ for more details.

func (*EC2) Tags Uses

func (ec2 *EC2) Tags(filter *Filter) (*TagsResp, error)

func (*EC2) TerminateInstances Uses

func (ec2 *EC2) TerminateInstances(instIds []string) (resp *TerminateInstancesResp, err error)

TerminateInstances requests the termination of instances when the given ids.

See http://goo.gl/3BKHj for more details.

func (*EC2) Volumes Uses

func (ec2 *EC2) Volumes(volIds []string, filter *Filter) (resp *VolumesResp, err error)

Finds or lists all volumes.

func (*EC2) VpcAttribute Uses

func (ec2 *EC2) VpcAttribute(vpcId, attribute string) (resp *VpcAttributeResp, err error)

VpcAttribute describes an attribute of a VPC. You can specify only one attribute at a time. Valid attributes are:

enableDnsSupport | enableDnsHostnames

See http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/index.html?ApiReference-query-DescribeVpcAttribute.html for more details.

type Error Uses

type Error struct {
    // HTTP status code (200, 403, ...)
    StatusCode int
    // EC2 error code ("UnsupportedOperation", ...)
    Code string
    // The human-oriented error message
    Message   string
    RequestId string `xml:"RequestID"`
}

Error encapsulates an error returned by EC2.

See http://goo.gl/VZGuC for more details.

func (*Error) Error Uses

func (err *Error) Error() string

type EventsSet Uses

type EventsSet struct {
    Code        string `xml:"code"`
    Description string `xml:"description"`
    NotBefore   string `xml:"notBefore"`
    NotAfter    string `xml:"notAfter"`
}

The DescribeInstanceStatus type encapsulates options for the respective request in EC2.

See http://goo.gl/DFySJY for more details.

type Filter Uses

type Filter struct {
    // contains filtered or unexported fields
}

Filter builds filtering parameters to be used in an EC2 query which supports filtering. For example:

filter := NewFilter()
filter.Add("architecture", "i386")
filter.Add("launch-index", "0")
resp, err := ec2.Instances(nil, filter)

func NewFilter Uses

func NewFilter() *Filter

NewFilter creates a new Filter.

func (*Filter) Add Uses

func (f *Filter) Add(name string, value ...string)

Add appends a filtering parameter with the given name and value(s).

type GetConsoleOutput Uses

type GetConsoleOutput struct {
    InstanceId string
}

The GetConsoleOutput type encapsulates options for the respective request in EC2.

See http://goo.gl/EY70zb for more details.

type GetConsoleOutputResp Uses

type GetConsoleOutputResp struct {
    RequestId  string    `xml:"requestId"`
    InstanceId string    `xml:"instanceId"`
    Timestamp  time.Time `xml:"timestamp"`
    Output     string    `xml:"output"`
}

Response to a GetConsoleOutput request. Note that Output is base64-encoded, as in the underlying AWS API.

See http://goo.gl/EY70zb for more details.

type IPPerm Uses

type IPPerm struct {
    Protocol     string              `xml:"ipProtocol"`
    FromPort     int                 `xml:"fromPort"`
    ToPort       int                 `xml:"toPort"`
    SourceIPs    []string            `xml:"ipRanges>item>cidrIp"`
    SourceGroups []UserSecurityGroup `xml:"groups>item"`
}

IPPerm represents an allowance within an EC2 security group.

See http://goo.gl/4oTxv for more details.

type IcmpCode Uses

type IcmpCode struct {
    Code int `xml:"code"`
    Type int `xml:"type"`
}

IcmpCode

type Image Uses

type Image struct {
    Id                 string               `xml:"imageId"`
    Name               string               `xml:"name"`
    Description        string               `xml:"description"`
    Type               string               `xml:"imageType"`
    State              string               `xml:"imageState"`
    Location           string               `xml:"imageLocation"`
    Public             bool                 `xml:"isPublic"`
    Architecture       string               `xml:"architecture"`
    Platform           string               `xml:"platform"`
    ProductCodes       []string             `xml:"productCode>item>productCode"`
    KernelId           string               `xml:"kernelId"`
    RamdiskId          string               `xml:"ramdiskId"`
    StateReason        string               `xml:"stateReason"`
    OwnerId            string               `xml:"imageOwnerId"`
    OwnerAlias         string               `xml:"imageOwnerAlias"`
    RootDeviceType     string               `xml:"rootDeviceType"`
    RootDeviceName     string               `xml:"rootDeviceName"`
    VirtualizationType string               `xml:"virtualizationType"`
    Hypervisor         string               `xml:"hypervisor"`
    BlockDevices       []BlockDeviceMapping `xml:"blockDeviceMapping>item"`
    Tags               []Tag                `xml:"tagSet>item"`
}

Image represents details about an image.

See http://goo.gl/iSqJG for more details.

type ImageAttributeResp Uses

type ImageAttributeResp struct {
    RequestId    string               `xml:"requestId"`
    ImageId      string               `xml:"imageId"`
    Kernel       string               `xml:"kernel>value"`
    RamDisk      string               `xml:"ramdisk>value"`
    Description  string               `xml:"description>value"`
    Group        string               `xml:"launchPermission>item>group"`
    UserIds      []string             `xml:"launchPermission>item>userId"`
    ProductCodes []string             `xml:"productCodes>item>productCode"`
    BlockDevices []BlockDeviceMapping `xml:"blockDeviceMapping>item"`
}

Response to a DescribeImageAttribute request.

See http://goo.gl/bHO3zT for more details.

type ImagesResp Uses

type ImagesResp struct {
    RequestId string  `xml:"requestId"`
    Images    []Image `xml:"imagesSet>item"`
}

Response to a DescribeImages request.

See http://goo.gl/hLnyg for more details.

type ImportKeyPairResponse Uses

type ImportKeyPairResponse struct {
    RequestId      string `xml:"requestId"`
    KeyName        string `xml:"keyName"`
    KeyFingerprint string `xml:"keyFingerprint"`
}

type Instance Uses

type Instance struct {
    InstanceId         string          `xml:"instanceId"`
    InstanceType       string          `xml:"instanceType"`
    ImageId            string          `xml:"imageId"`
    PrivateDNSName     string          `xml:"privateDnsName"`
    DNSName            string          `xml:"dnsName"`
    KeyName            string          `xml:"keyName"`
    AMILaunchIndex     int             `xml:"amiLaunchIndex"`
    Hypervisor         string          `xml:"hypervisor"`
    VirtType           string          `xml:"virtualizationType"`
    Monitoring         string          `xml:"monitoring>state"`
    AvailZone          string          `xml:"placement>availabilityZone"`
    Tenancy            string          `xml:"placement>tenancy"`
    PlacementGroupName string          `xml:"placement>groupName"`
    State              InstanceState   `xml:"instanceState"`
    Tags               []Tag           `xml:"tagSet>item"`
    VpcId              string          `xml:"vpcId"`
    SubnetId           string          `xml:"subnetId"`
    IamInstanceProfile string          `xml:"iamInstanceProfile"`
    PrivateIpAddress   string          `xml:"privateIpAddress"`
    PublicIpAddress    string          `xml:"ipAddress"`
    Architecture       string          `xml:"architecture"`
    LaunchTime         time.Time       `xml:"launchTime"`
    SourceDestCheck    bool            `xml:"sourceDestCheck"`
    SecurityGroups     []SecurityGroup `xml:"groupSet>item"`
    EbsOptimized       string          `xml:"ebsOptimized"`
    BlockDevices       []BlockDevice   `xml:"blockDeviceMapping>item"`
    RootDeviceName     string          `xml:"rootDeviceName"`
}

Instance encapsulates a running instance in EC2.

See http://goo.gl/OCH8a for more details.

type InstanceState Uses

type InstanceState struct {
    Code int    `xml:"code"` // Watch out, bits 15-8 have unpublished meaning.
    Name string `xml:"name"`
}

InstanceState encapsulates the state of an instance in EC2.

See http://goo.gl/y3ZBq for more details.

type InstanceStateChange Uses

type InstanceStateChange struct {
    InstanceId    string        `xml:"instanceId"`
    CurrentState  InstanceState `xml:"currentState"`
    PreviousState InstanceState `xml:"previousState"`
}

InstanceStateChange informs of the previous and current states for an instance when a state change is requested.

type InstanceStatusSet Uses

type InstanceStatusSet struct {
    InstanceId       string        `xml:"instanceId"`
    AvailabilityZone string        `xml:"availabilityZone"`
    InstanceState    InstanceState `xml:"instanceState"`
    SystemStatus     Status        `xml:"systemStatus"`
    InstanceStatus   Status        `xml:"instanceStatus"`
    Events           []EventsSet   `xml:"eventsSet>item"`
}

type InstancesResp Uses

type InstancesResp struct {
    RequestId    string        `xml:"requestId"`
    Reservations []Reservation `xml:"reservationSet>item"`
}

Response to a DescribeInstances request.

See http://goo.gl/mLbmw for more details.

type InternetGateway Uses

type InternetGateway struct {
    InternetGatewayId string                      `xml:"internetGatewayId"`
    Attachments       []InternetGatewayAttachment `xml:"attachmentSet>item"`
    Tags              []Tag                       `xml:"tagSet>item"`
}

Internet Gateway

type InternetGatewayAttachment Uses

type InternetGatewayAttachment struct {
    VpcId string `xml:"vpcId"`
    State string `xml:"state"`
}

type InternetGatewaysResp Uses

type InternetGatewaysResp struct {
    RequestId        string            `xml:"requestId"`
    InternetGateways []InternetGateway `xml:"internetGatewaySet>item"`
}

Response to a DescribeInternetGateways request.

type KeyPair Uses

type KeyPair struct {
    Name        string `xml:"keyName"`
    Fingerprint string `xml:"keyFingerprint"`
}

type KeyPairsResp Uses

type KeyPairsResp struct {
    RequestId string    `xml:"requestId"`
    Keys      []KeyPair `xml:"keySet>item"`
}

type ModifyImageAttribute Uses

type ModifyImageAttribute struct {
    AddUsers     []string
    RemoveUsers  []string
    AddGroups    []string
    RemoveGroups []string
    ProductCodes []string
    Description  string
}

The ModifyImageAttribute request parameters.

type ModifyInstance Uses

type ModifyInstance struct {
    InstanceType          string
    BlockDevices          []BlockDeviceMapping
    DisableAPITermination bool
    EbsOptimized          bool
    SecurityGroups        []SecurityGroup
    ShutdownBehavior      string
    KernelId              string
    RamdiskId             string
    SourceDestCheck       bool
    SriovNetSupport       bool
    UserData              []byte

    SetSourceDestCheck bool
}

The ModifyInstanceAttribute request parameters.

type ModifyInstanceResp Uses

type ModifyInstanceResp struct {
    RequestId string `xml:"requestId"`
    Return    bool   `xml:"return"`
}

Response to a ModifyInstanceAttribute request.

http://goo.gl/icuXh5 for more details.

type ModifySubnetAttribute Uses

type ModifySubnetAttribute struct {
    SubnetId            string
    MapPublicIpOnLaunch bool
}

The ModifySubnetAttribute request parameters

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-ModifySubnetAttribute.html

type ModifySubnetAttributeResp Uses

type ModifySubnetAttributeResp struct {
    RequestId string `xml:"requestId"`
    Return    bool   `xml:"return"`
}

type ModifyVpcAttribute Uses

type ModifyVpcAttribute struct {
    EnableDnsSupport   bool
    EnableDnsHostnames bool

    SetEnableDnsSupport   bool
    SetEnableDnsHostnames bool
}

The ModifyVpcAttribute request parameters.

See http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/index.html?ApiReference-query-DescribeVpcAttribute.html for more details.

type NetworkAcl Uses

type NetworkAcl struct {
    NetworkAclId   string                  `xml:"networkAclId"`
    VpcId          string                  `xml:"vpcId"`
    Default        string                  `xml:"default"`
    EntrySet       []NetworkAclEntry       `xml:"entrySet>item"`
    AssociationSet []NetworkAclAssociation `xml:"associationSet>item"`
    Tags           []Tag                   `xml:"tagSet>item"`
}

NetworkAcl represent network acl

type NetworkAclAssociation Uses

type NetworkAclAssociation struct {
    NetworkAclAssociationId string `xml:"networkAclAssociationId"`
    NetworkAclId            string `xml:"networkAclId"`
    SubnetId                string `xml:"subnetId"`
}

NetworkAclAssociation

type NetworkAclEntry Uses

type NetworkAclEntry struct {
    RuleNumber int       `xml:"ruleNumber"`
    Protocol   int       `xml:"protocol"`
    RuleAction string    `xml:"ruleAction"`
    Egress     bool      `xml:"egress"`
    CidrBlock  string    `xml:"cidrBlock"`
    IcmpCode   IcmpCode  `xml:"icmpTypeCode"`
    PortRange  PortRange `xml:"portRange"`
}

NetworkAclEntry represent a rule within NetworkAcl

type NetworkAclsResp Uses

type NetworkAclsResp struct {
    RequestId   string       `xml:"requestId"`
    NetworkAcls []NetworkAcl `xml:"networkAclSet>item"`
}

Response to describe NetworkAcls

type PortRange Uses

type PortRange struct {
    From int `xml:"from"`
    To   int `xml:"to"`
}

PortRange

type ReassociateRouteTableResp Uses

type ReassociateRouteTableResp struct {
    RequestId     string `xml:"requestId"`
    AssociationId string `xml:"newAssociationId"`
}

type RegisterImage Uses

type RegisterImage struct {
    ImageLocation   string
    Name            string
    Description     string
    Architecture    string
    KernelId        string
    RamdiskId       string
    RootDeviceName  string
    VirtType        string
    SriovNetSupport string
    BlockDevices    []BlockDeviceMapping
}

The RegisterImage request parameters.

type RegisterImageResp Uses

type RegisterImageResp struct {
    RequestId string `xml:"requestId"`
    ImageId   string `xml:"imageId"`
}

Response to a RegisterImage request.

type RejectVpcPeeringConnection Uses

type RejectVpcPeeringConnection struct {
    VpcPeeringConnectionId string `xml:"vpcPeeringConnectionId"`
}

The RejectVpcPeeringConnection request

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RejectVpcPeeringConnection.html

type RejectVpcPeeringConnectionResp Uses

type RejectVpcPeeringConnectionResp struct {
    RequestId string `xml:"requestId"`
}

Response to a RejectVpcPeeringConnection request.

type ReplaceNetworkAclAssociationResponse Uses

type ReplaceNetworkAclAssociationResponse struct {
    RequestId        string `xml:"requestId"`
    NewAssociationId string `xml:"newAssociationId"`
}

type ReplaceRoute Uses

type ReplaceRoute struct {
    RouteTableId           string
    DestinationCidrBlock   string
    GatewayId              string
    InstanceId             string
    NetworkInterfaceId     string
    VpcPeeringConnectionId string
}

type RequestSpotInstances Uses

type RequestSpotInstances struct {
    SpotPrice                string
    InstanceCount            int
    Type                     string
    ImageId                  string
    KeyName                  string
    InstanceType             string
    SecurityGroups           []SecurityGroup
    IamInstanceProfile       string
    KernelId                 string
    RamdiskId                string
    UserData                 []byte
    AvailZone                string
    PlacementGroupName       string
    Monitoring               bool
    SubnetId                 string
    AssociatePublicIpAddress bool
    PrivateIPAddress         string
    BlockDevices             []BlockDeviceMapping
}

The RequestSpotInstances type encapsulates options for the respective request in EC2.

See http://goo.gl/GRZgCD for more details.

type RequestSpotInstancesResp Uses

type RequestSpotInstancesResp struct {
    RequestId          string              `xml:"requestId"`
    SpotRequestResults []SpotRequestResult `xml:"spotInstanceRequestSet>item"`
}

Response to a RequestSpotInstances request.

See http://goo.gl/GRZgCD for more details.

type Reservation Uses

type Reservation struct {
    ReservationId  string          `xml:"reservationId"`
    OwnerId        string          `xml:"ownerId"`
    RequesterId    string          `xml:"requesterId"`
    SecurityGroups []SecurityGroup `xml:"groupSet>item"`
    Instances      []Instance      `xml:"instancesSet>item"`
}

Reservation represents details about a reservation in EC2.

See http://goo.gl/0ItPT for more details.

type ResetImageAttribute Uses

type ResetImageAttribute struct {
    Attribute string
}

The ResetImageAttribute request parameters.

type ResourceTag Uses

type ResourceTag struct {
    Tag
    ResourceId   string `xml:"resourceId"`
    ResourceType string `xml:"resourceType"`
}

type Route Uses

type Route struct {
    DestinationCidrBlock   string `xml:"destinationCidrBlock"`
    GatewayId              string `xml:"gatewayId"`
    InstanceId             string `xml:"instanceId"`
    InstanceOwnerId        string `xml:"instanceOwnerId"`
    NetworkInterfaceId     string `xml:"networkInterfaceId"`
    State                  string `xml:"state"`
    Origin                 string `xml:"origin"`
    VpcPeeringConnectionId string `xml:"vpcPeeringConnectionId"`
}

type RouteTable Uses

type RouteTable struct {
    RouteTableId string                  `xml:"routeTableId"`
    VpcId        string                  `xml:"vpcId"`
    Associations []RouteTableAssociation `xml:"associationSet>item"`
    Routes       []Route                 `xml:"routeSet>item"`
    Tags         []Tag                   `xml:"tagSet>item"`
}

Routing Table

type RouteTableAssociation Uses

type RouteTableAssociation struct {
    AssociationId string `xml:"routeTableAssociationId"`
    RouteTableId  string `xml:"routeTableId"`
    SubnetId      string `xml:"subnetId"`
    Main          bool   `xml:"main"`
}

type RouteTablesResp Uses

type RouteTablesResp struct {
    RequestId   string       `xml:"requestId"`
    RouteTables []RouteTable `xml:"routeTableSet>item"`
}

Response to a DescribeRouteTables request.

type RunInstances Uses

type RunInstances struct {
    ImageId                  string
    MinCount                 int
    MaxCount                 int
    KeyName                  string
    InstanceType             string
    SecurityGroups           []SecurityGroup
    IamInstanceProfile       string
    KernelId                 string
    RamdiskId                string
    UserData                 []byte
    AvailZone                string
    PlacementGroupName       string
    Monitoring               bool
    SubnetId                 string
    AssociatePublicIpAddress bool
    DisableAPITermination    bool
    EbsOptimized             bool
    ShutdownBehavior         string
    PrivateIPAddress         string
    BlockDevices             []BlockDeviceMapping
    Tenancy                  string
}

The RunInstances type encapsulates options for the respective request in EC2.

See http://goo.gl/Mcm3b for more details.

type RunInstancesResp Uses

type RunInstancesResp struct {
    RequestId      string          `xml:"requestId"`
    ReservationId  string          `xml:"reservationId"`
    OwnerId        string          `xml:"ownerId"`
    SecurityGroups []SecurityGroup `xml:"groupSet>item"`
    Instances      []Instance      `xml:"instancesSet>item"`
}

Response to a RunInstances request.

See http://goo.gl/Mcm3b for more details.

type SecurityGroup Uses

type SecurityGroup struct {
    Id          string `xml:"groupId"`
    Name        string `xml:"groupName"`
    Description string `xml:"groupDescription"`
    VpcId       string `xml:"vpcId"`
    Tags        []Tag  `xml:"tagSet>item"`
}

SecurityGroup represents an EC2 security group. If SecurityGroup is used as a parameter, then one of Id or Name may be empty. If both are set, then Id is used.

type SecurityGroupInfo Uses

type SecurityGroupInfo struct {
    SecurityGroup
    OwnerId       string   `xml:"ownerId"`
    Description   string   `xml:"groupDescription"`
    IPPerms       []IPPerm `xml:"ipPermissions>item"`
    IPPermsEgress []IPPerm `xml:"ipPermissionsEgress>item"`
}

SecurityGroup encapsulates details for a security group in EC2.

See http://goo.gl/CIdyP for more details.

type SecurityGroupsResp Uses

type SecurityGroupsResp struct {
    RequestId string              `xml:"requestId"`
    Groups    []SecurityGroupInfo `xml:"securityGroupInfo>item"`
}

SecurityGroupsResp represents a response to a DescribeSecurityGroups request in EC2.

See http://goo.gl/k12Uy for more details.

type SimpleResp Uses

type SimpleResp struct {
    XMLName   xml.Name
    RequestId string `xml:"requestId"`
}

SimpleResp represents a response to an EC2 request which on success will return no other information besides a request id.

type Snapshot Uses

type Snapshot struct {
    Id          string `xml:"snapshotId"`
    VolumeId    string `xml:"volumeId"`
    VolumeSize  string `xml:"volumeSize"`
    Status      string `xml:"status"`
    StartTime   string `xml:"startTime"`
    Description string `xml:"description"`
    Progress    string `xml:"progress"`
    OwnerId     string `xml:"ownerId"`
    OwnerAlias  string `xml:"ownerAlias"`
    Encrypted   bool   `xml:"encrypted"`
    Tags        []Tag  `xml:"tagSet>item"`
}

Snapshot represents details about a volume snapshot.

See http://goo.gl/nkovs for more details.

type SnapshotsResp Uses

type SnapshotsResp struct {
    RequestId string     `xml:"requestId"`
    Snapshots []Snapshot `xml:"snapshotSet>item"`
}

Response to a DescribeSnapshots request.

See http://goo.gl/nClDT for more details.

type SpotInstanceSpec Uses

type SpotInstanceSpec struct {
    ImageId                  string
    KeyName                  string
    InstanceType             string
    SecurityGroups           []SecurityGroup
    IamInstanceProfile       string
    KernelId                 string
    RamdiskId                string
    UserData                 []byte
    AvailZone                string
    PlacementGroupName       string
    Monitoring               bool
    SubnetId                 string
    AssociatePublicIpAddress bool
    PrivateIPAddress         string
    BlockDevices             []BlockDeviceMapping
}

type SpotLaunchSpec Uses

type SpotLaunchSpec struct {
    ImageId            string               `xml:"imageId"`
    KeyName            string               `xml:"keyName"`
    InstanceType       string               `xml:"instanceType"`
    SecurityGroups     []SecurityGroup      `xml:"groupSet>item"`
    IamInstanceProfile string               `xml:"iamInstanceProfile"`
    KernelId           string               `xml:"kernelId"`
    RamdiskId          string               `xml:"ramdiskId"`
    PlacementGroupName string               `xml:"placement>groupName"`
    Monitoring         bool                 `xml:"monitoring>enabled"`
    SubnetId           string               `xml:"subnetId"`
    BlockDevices       []BlockDeviceMapping `xml:"blockDeviceMapping>item"`
}

type SpotPriceHistory Uses

type SpotPriceHistory struct {
    InstanceType       string    `xml:"instanceType"`
    ProductDescription string    `xml:"productDescription"`
    SpotPrice          string    `xml:"spotPrice"`
    Timestamp          time.Time `xml:"timestamp"`
    AvailabilityZone   string    `xml:"availabilityZone"`
}

type SpotRequestResult Uses

type SpotRequestResult struct {
    SpotRequestId  string         `xml:"spotInstanceRequestId"`
    SpotPrice      string         `xml:"spotPrice"`
    Type           string         `xml:"type"`
    AvailZone      string         `xml:"launchedAvailabilityZone"`
    InstanceId     string         `xml:"instanceId"`
    State          string         `xml:"state"`
    Status         SpotStatus     `xml:"status"`
    SpotLaunchSpec SpotLaunchSpec `xml:"launchSpecification"`
    CreateTime     string         `xml:"createTime"`
    Tags           []Tag          `xml:"tagSet>item"`
}

type SpotRequestsResp Uses

type SpotRequestsResp struct {
    RequestId          string              `xml:"requestId"`
    SpotRequestResults []SpotRequestResult `xml:"spotInstanceRequestSet>item"`
}

Response to a DescribeSpotInstanceRequests request.

See http://goo.gl/KsKJJk for more details.

type SpotStatus Uses

type SpotStatus struct {
    Code       string `xml:"code"`
    UpdateTime string `xml:"updateTime"`
    Message    string `xml:"message"`
}

type StartInstanceResp Uses

type StartInstanceResp struct {
    RequestId    string                `xml:"requestId"`
    StateChanges []InstanceStateChange `xml:"instancesSet>item"`
}

Response to a StartInstances request.

See http://goo.gl/awKeF for more details.

type Status Uses

type Status struct {
    Status  string          `xml:"status"`
    Details []StatusDetails `xml:"details>item"`
}

type StatusDetails Uses

type StatusDetails struct {
    Name          string `xml:"name"`
    Status        string `xml:"status"`
    ImpairedSince string `xml:"impairedSince"`
}

type StopInstanceResp Uses

type StopInstanceResp struct {
    RequestId    string                `xml:"requestId"`
    StateChanges []InstanceStateChange `xml:"instancesSet>item"`
}

Response to a StopInstances request.

See http://goo.gl/436dJ for more details.

type Subnet Uses

type Subnet struct {
    SubnetId                string `xml:"subnetId"`
    State                   string `xml:"state"`
    VpcId                   string `xml:"vpcId"`
    CidrBlock               string `xml:"cidrBlock"`
    AvailableIpAddressCount int    `xml:"availableIpAddressCount"`
    AvailabilityZone        string `xml:"availabilityZone"`
    DefaultForAZ            bool   `xml:"defaultForAz"`
    MapPublicIpOnLaunch     bool   `xml:"mapPublicIpOnLaunch"`
    Tags                    []Tag  `xml:"tagSet>item"`
}

Subnet

type SubnetsResp Uses

type SubnetsResp struct {
    RequestId string   `xml:"requestId"`
    Subnets   []Subnet `xml:"subnetSet>item"`
}

Response to a DescribeSubnets request.

type Tag Uses

type Tag struct {
    Key   string `xml:"key"`
    Value string `xml:"value"`
}

ResourceTag represents key-value metadata used to classify and organize EC2 instances.

See http://goo.gl/bncl3 for more details

type TagsResp Uses

type TagsResp struct {
    RequestId string        `xml:"requestId"`
    Tags      []ResourceTag `xml:"tagSet>item"`
}

type TerminateInstancesResp Uses

type TerminateInstancesResp struct {
    RequestId    string                `xml:"requestId"`
    StateChanges []InstanceStateChange `xml:"instancesSet>item"`
}

Response to a TerminateInstances request.

See http://goo.gl/3BKHj for more details.

type UserSecurityGroup Uses

type UserSecurityGroup struct {
    Id      string `xml:"groupId"`
    Name    string `xml:"groupName"`
    OwnerId string `xml:"userId"`
}

UserSecurityGroup holds a security group and the owner of that group.

type VPC Uses

type VPC struct {
    VpcId           string `xml:"vpcId"`
    State           string `xml:"state"`
    CidrBlock       string `xml:"cidrBlock"`
    DHCPOptionsID   string `xml:"dhcpOptionsId"`
    InstanceTenancy string `xml:"instanceTenancy"`
    IsDefault       bool   `xml:"isDefault"`
    Tags            []Tag  `xml:"tagSet>item"`
}

VPC represents a single VPC.

type Volume Uses

type Volume struct {
    VolumeId    string             `xml:"volumeId"`
    Size        string             `xml:"size"`
    SnapshotId  string             `xml:"snapshotId"`
    AvailZone   string             `xml:"availabilityZone"`
    Status      string             `xml:"status"`
    Attachments []VolumeAttachment `xml:"attachmentSet>item"`
    VolumeType  string             `xml:"volumeType"`
    IOPS        int64              `xml:"iops"`
    Encrypted   bool               `xml:"encrypted"`
    Tags        []Tag              `xml:"tagSet>item"`
}

Volume is a single volume.

type VolumeAttachment Uses

type VolumeAttachment struct {
    VolumeId   string `xml:"volumeId"`
    InstanceId string `xml:"instanceId"`
    Device     string `xml:"device"`
    Status     string `xml:"status"`
}

type VolumesResp Uses

type VolumesResp struct {
    RequestId string   `xml:"requestId"`
    Volumes   []Volume `xml:"volumeSet>item"`
}

Response to a DescribeVolumes request

type VpcAttributeResp Uses

type VpcAttributeResp struct {
    RequestId          string `xml:"requestId"`
    VpcId              string `xml:"vpcId"`
    EnableDnsSupport   bool   `xml:"enableDnsSupport>value"`
    EnableDnsHostnames bool   `xml:"enableDnsHostnames>value"`
}

Response to a DescribeVpcAttribute request.

See http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/index.html?ApiReference-query-DescribeVpcAttribute.html for more details.

type VpcPeeringConnection Uses

type VpcPeeringConnection struct {
    AccepterVpcInfo        VpcPeeringConnectionVpcInfo     `xml:"accepterVpcInfo"`
    ExpirationTime         string                          `xml:"expirationTime"`
    RequesterVpcInfo       VpcPeeringConnectionVpcInfo     `xml:"requesterVpcInfo"`
    Status                 VpcPeeringConnectionStateReason `xml:"status"`
    Tags                   []Tag                           `xml:"tagSet>item"`
    VpcPeeringConnectionId string                          `xml:"vpcPeeringConnectionId"`
}

vpc peering

type VpcPeeringConnectionStateReason Uses

type VpcPeeringConnectionStateReason struct {
    Code    string `xml:"code"`
    Message string `xml:"message"`
}

type VpcPeeringConnectionVpcInfo Uses

type VpcPeeringConnectionVpcInfo struct {
    CidrBlock string `xml:"cidrBlock"`
    OwnerId   string `xml:"ownerId"`
    VpcId     string `xml:"vpcId"`
}

type VpcsResp Uses

type VpcsResp struct {
    RequestId string `xml:"requestId"`
    VPCs      []VPC  `xml:"vpcSet>item"`
}

Response to a DescribeVpcs request.

Directories

PathSynopsis
ec2testThe ec2test package implements a fake EC2 provider with the capability of inducing errors on any given operation, and retrospectively determining what operations have been carried out.

Package ec2 imports 16 packages (graph) and is imported by 203 packages. Updated 2016-07-23. Refresh now. Tools for package owners.