@@ -75,35 +75,37 @@ type InstanceServiceHandler struct {
75
75
76
76
// Instance represents a VPS
77
77
type Instance struct {
78
- ID string `json:"id"`
79
- Os string `json:"os"`
80
- RAM int `json:"ram"`
81
- Disk int `json:"disk"`
82
- Plan string `json:"plan"`
83
- MainIP string `json:"main_ip"`
84
- VCPUCount int `json:"vcpu_count"`
85
- Region string `json:"region"`
86
- DefaultPassword string `json:"default_password,omitempty"`
87
- DateCreated string `json:"date_created"`
88
- Status string `json:"status"`
89
- AllowedBandwidth int `json:"allowed_bandwidth"`
90
- NetmaskV4 string `json:"netmask_v4"`
91
- GatewayV4 string `json:"gateway_v4"`
92
- PowerStatus string `json:"power_status"`
93
- ServerStatus string `json:"server_status"`
94
- V6Network string `json:"v6_network"`
95
- V6MainIP string `json:"v6_main_ip"`
96
- V6NetworkSize int `json:"v6_network_size"`
97
- Label string `json:"label"`
98
- InternalIP string `json:"internal_ip"`
99
- KVM string `json:"kvm"`
100
- Tag string `json:"tag"`
101
- OsID int `json:"os_id"`
102
- AppID int `json:"app_id"`
103
- ImageID string `json:"image_id"`
104
- FirewallGroupID string `json:"firewall_group_id"`
105
- Features []string `json:"features"`
106
- Hostname string `json:"hostname"`
78
+ ID string `json:"id"`
79
+ Os string `json:"os"`
80
+ RAM int `json:"ram"`
81
+ Disk int `json:"disk"`
82
+ Plan string `json:"plan"`
83
+ MainIP string `json:"main_ip"`
84
+ VCPUCount int `json:"vcpu_count"`
85
+ Region string `json:"region"`
86
+ DefaultPassword string `json:"default_password,omitempty"`
87
+ DateCreated string `json:"date_created"`
88
+ Status string `json:"status"`
89
+ AllowedBandwidth int `json:"allowed_bandwidth"`
90
+ NetmaskV4 string `json:"netmask_v4"`
91
+ GatewayV4 string `json:"gateway_v4"`
92
+ PowerStatus string `json:"power_status"`
93
+ ServerStatus string `json:"server_status"`
94
+ V6Network string `json:"v6_network"`
95
+ V6MainIP string `json:"v6_main_ip"`
96
+ V6NetworkSize int `json:"v6_network_size"`
97
+ Label string `json:"label"`
98
+ InternalIP string `json:"internal_ip"`
99
+ KVM string `json:"kvm"`
100
+ // Deprecated: Tag should no longer be used. Instead, use Tags.
101
+ Tag string `json:"tag"`
102
+ OsID int `json:"os_id"`
103
+ AppID int `json:"app_id"`
104
+ ImageID string `json:"image_id"`
105
+ FirewallGroupID string `json:"firewall_group_id"`
106
+ Features []string `json:"features"`
107
+ Hostname string `json:"hostname"`
108
+ Tags []string `json:"tags"`
107
109
}
108
110
109
111
type instanceBase struct {
@@ -229,20 +231,22 @@ type Upgrades struct {
229
231
230
232
// InstanceCreateReq struct used to create an instance.
231
233
type InstanceCreateReq struct {
232
- Region string `json:"region,omitempty"`
233
- Plan string `json:"plan,omitempty"`
234
- Label string `json:"label,omitempty"`
235
- Tag string `json:"tag,omitempty"`
236
- OsID int `json:"os_id,omitempty"`
237
- ISOID string `json:"iso_id,omitempty"`
238
- AppID int `json:"app_id,omitempty"`
239
- ImageID string `json:"image_id,omitempty"`
240
- FirewallGroupID string `json:"firewall_group_id,omitempty"`
241
- Hostname string `json:"hostname,omitempty"`
242
- IPXEChainURL string `json:"ipxe_chain_url,omitempty"`
243
- ScriptID string `json:"script_id,omitempty"`
244
- SnapshotID string `json:"snapshot_id,omitempty"`
245
- EnableIPv6 * bool `json:"enable_ipv6,omitempty"`
234
+ Region string `json:"region,omitempty"`
235
+ Plan string `json:"plan,omitempty"`
236
+ Label string `json:"label,omitempty"`
237
+ // Deprecated: Tag should no longer be used. Instead, use Tags.
238
+ Tag string `json:"tag,omitempty"`
239
+ Tags []string `json:"tags"`
240
+ OsID int `json:"os_id,omitempty"`
241
+ ISOID string `json:"iso_id,omitempty"`
242
+ AppID int `json:"app_id,omitempty"`
243
+ ImageID string `json:"image_id,omitempty"`
244
+ FirewallGroupID string `json:"firewall_group_id,omitempty"`
245
+ Hostname string `json:"hostname,omitempty"`
246
+ IPXEChainURL string `json:"ipxe_chain_url,omitempty"`
247
+ ScriptID string `json:"script_id,omitempty"`
248
+ SnapshotID string `json:"snapshot_id,omitempty"`
249
+ EnableIPv6 * bool `json:"enable_ipv6,omitempty"`
246
250
// Deprecated: EnablePrivateNetwork should no longer be used. Instead, use EnableVPC.
247
251
EnablePrivateNetwork * bool `json:"enable_private_network,omitempty"`
248
252
// Deprecated: AttachPrivateNetwork should no longer be used. Instead, use AttachVPC.
@@ -259,13 +263,15 @@ type InstanceCreateReq struct {
259
263
260
264
// InstanceUpdateReq struct used to update an instance.
261
265
type InstanceUpdateReq struct {
262
- Plan string `json:"plan,omitempty"`
263
- Label string `json:"label,omitempty"`
264
- Tag string `json:"tag,omitempty"`
265
- OsID int `json:"os_id,omitempty"`
266
- AppID int `json:"app_id,omitempty"`
267
- ImageID string `json:"image_id,omitempty"`
268
- EnableIPv6 * bool `json:"enable_ipv6,omitempty"`
266
+ Plan string `json:"plan,omitempty"`
267
+ Label string `json:"label,omitempty"`
268
+ // Deprecated: Tag should no longer be used. Instead, use Tags.
269
+ Tag string `json:"tag,omitempty"`
270
+ Tags []string `json:"tags"`
271
+ OsID int `json:"os_id,omitempty"`
272
+ AppID int `json:"app_id,omitempty"`
273
+ ImageID string `json:"image_id,omitempty"`
274
+ EnableIPv6 * bool `json:"enable_ipv6,omitempty"`
269
275
// Deprecated: EnablePrivateNetwork should no longer be used. Instead, use EnableVPC.
270
276
EnablePrivateNetwork * bool `json:"enable_private_network,omitempty"`
271
277
// Deprecated: AttachPrivateNetwork should no longer be used. Instead, use AttachVPC.
0 commit comments