(vpcID string)
| 281 | } |
| 282 | |
| 283 | func (c *Client) ListVPCSubnets(vpcID string) ([]string, error) { |
| 284 | params := &_ec2.DescribeSubnetsInput{ |
| 285 | Filters: []*_ec2.Filter{ |
| 286 | { |
| 287 | Name: _aws.String("vpc-id"), |
| 288 | Values: _aws.StringSlice([]string{vpcID}), |
| 289 | }, |
| 290 | }, |
| 291 | } |
| 292 | |
| 293 | res, err := c.svc.DescribeSubnets(params) |
| 294 | if err != nil { |
| 295 | return nil, err |
| 296 | } |
| 297 | |
| 298 | subnetIDs := []string{} |
| 299 | for _, s := range res.Subnets { |
| 300 | subnetIDs = append(subnetIDs, conv.S(s.SubnetId)) |
| 301 | } |
| 302 | |
| 303 | return subnetIDs, nil |
| 304 | } |
| 305 | |
| 306 | func (c *Client) RetrieveKeyPair(keyPairName string) (*_ec2.KeyPairInfo, error) { |
| 307 | params := &_ec2.DescribeKeyPairsInput{ |
no outgoing calls
no test coverage detected