crowdmob/goamz — pull request #88 by mattheath (2014-01-28 21:09:33+00:00)
Title: Ec2

Updates `ec2` with additional parameters on the `Instance` type, and make these match the Amazon API (rather than having custom names for fields and methods). Unfortunately this causes some backwards compatibility issues, including:

`ec2.Instances` method (which called _DescribeInstances_) called `ec2.DescribeInstances`
`ec2.InstancesResp` type (response from _DescribeInstances_) now called `ec2.DescribeInstancesResp`
`ec2.Instance.AvailZone` now called `AvailabilityZone`
`ec2.Instance.VirtType` now called `VirtualizationType`
`ec2.Instance.IamInstanceProfile` is now of type `ec2.IamInstanceProfile` rather than `string`

The `ec2.Instance` type now has all of the API parameters implemented, including:
```go
Reason string
StateReason InstanceStateReason
LaunchTime string
RootDeviceType string
RootDeviceName string
EbsOptimized bool
OwnerId string
Tenancy string
SecurityGroups []SecurityGroup
Architecture string
KernelId string
RamDiskId string
Platform string
ClientToken string
ProductCodes []ProductCode
```

Also methods for spot instance types:
```go
InstanceLifecycle string
SpotInstanceRequestId string

func (i Instance) isSpotInstance() bool {}
```

Added more advanced networking information which lists network interfaces, attachments, private IP assignments, and elastic IP attachments:

```go
NetworkInterfaces []InstanceNetworkInterface
SourceDestCheck bool
SriovNetSupport string
```

Probably a bit more work to be done on this, but thoughts would be appreciated.