LEFT | RIGHT |
(no file at all) | |
1 // | 1 // |
2 // goamz - Go packages to interact with the Amazon Web Services. | 2 // goamz - Go packages to interact with the Amazon Web Services. |
3 // | 3 // |
4 // https://wiki.ubuntu.com/goamz | 4 // https://wiki.ubuntu.com/goamz |
5 // | 5 // |
6 // Copyright (c) 2014 Canonical Ltd. | 6 // Copyright (c) 2014 Canonical Ltd. |
7 // | 7 // |
8 | 8 |
9 package ec2 | 9 package ec2 |
10 | 10 |
11 import ( | 11 import ( |
12 "fmt" | 12 "fmt" |
13 "strconv" | 13 "strconv" |
14 ) | 14 ) |
15 | 15 |
16 // NetworkInterfaceAttachment describes a network interface | 16 // NetworkInterfaceAttachment describes a network interface |
17 // attachment. | 17 // attachment. |
18 // | 18 // |
19 // See http://goo.gl/KtiKuV for more details. | 19 // See http://goo.gl/KtiKuV for more details. |
20 type NetworkInterfaceAttachment struct { | 20 type NetworkInterfaceAttachment struct { |
21 Id string `xml:"attachmentId"` | 21 Id string `xml:"attachmentId"` |
22 InstanceId string `xml:"instanceId"` | 22 InstanceId string `xml:"instanceId"` |
23 InstanceOwnerId string `xml:"instanceOwnerId"` | 23 InstanceOwnerId string `xml:"instanceOwnerId"` |
24 DeviceIndex int `xml:"deviceIndex"` | 24 DeviceIndex int `xml:"deviceIndex"` |
25 Status string `xml:"status"` | 25 Status string `xml:"status"` |
26 AttachTime string `xml:"attachTime"` | 26 AttachTime string `xml:"attachTime"` |
27 DeleteOnTermination bool `xml:"deleteOnTermination"` | 27 DeleteOnTermination bool `xml:"deleteOnTermination"` |
28 } | 28 } |
29 | |
30 const ( | |
31 // Common status values for network interfaces / attachments. | |
32 AvailableStatus = "available" | |
33 AttachingStatus = "attaching" | |
34 AttachedStatus = "attached" | |
35 PendingStatus = "pending" | |
36 InUseStatus = "in-use" | |
37 DetachingStatus = "detaching" | |
38 DetachedStatus = "detached" | |
39 ) | |
40 | 29 |
41 // PrivateIP describes a private IP address of a network interface. | 30 // PrivateIP describes a private IP address of a network interface. |
42 // | 31 // |
43 // See http://goo.gl/jtuQEJ for more details. | 32 // See http://goo.gl/jtuQEJ for more details. |
44 type PrivateIP struct { | 33 type PrivateIP struct { |
45 Address string `xml:"privateIpAddress"` | 34 Address string `xml:"privateIpAddress"` |
46 DNSName string `xml:"privateDnsName"` | 35 DNSName string `xml:"privateDnsName"` |
47 IsPrimary bool `xml:"primary"` | 36 IsPrimary bool `xml:"primary"` |
48 } | 37 } |
49 | 38 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 // Force is optional. | 203 // Force is optional. |
215 params["Force"] = "true" | 204 params["Force"] = "true" |
216 } | 205 } |
217 resp = &SimpleResp{} | 206 resp = &SimpleResp{} |
218 err = ec2.query(params, resp) | 207 err = ec2.query(params, resp) |
219 if err != nil { | 208 if err != nil { |
220 return nil, err | 209 return nil, err |
221 } | 210 } |
222 return resp, nil | 211 return resp, nil |
223 } | 212 } |
LEFT | RIGHT |