Skip to content

Commit e1e0d6a

Browse files
authored
feat(instance): add support for fields in metadata (scaleway#2717)
1 parent 1fc1191 commit e1e0d6a

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

api/instance/v1/instance_metadata_sdk.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,36 @@ type Metadata struct {
171171
CreationDate string `json:"creation_date,omitempty"`
172172
Zone string `json:"zone,omitempty"`
173173
} `json:"private_nics,omitempty"`
174+
MACAddress string `json:"mac_address,omitempty"`
175+
EndOfService bool `json:"end_of_service,omitempty"`
176+
Protected bool `json:"protected,omitempty"`
177+
SecurityGroup struct {
178+
ID string `json:"id,omitempty"`
179+
Name string `json:"name,omitempty"`
180+
} `json:"security_group,omitempty"`
181+
State string `json:"state,omitempty"`
182+
Arch string `json:"arch,omitempty"`
183+
AllowedActions []string `json:"allowed_actions,omitempty"`
184+
FileSystems []struct {
185+
FileSystemID string `json:"filesystem_id,omitempty"`
186+
State string `json:"state,omitempty"`
187+
}
188+
CreatedAt string `json:"creation_date,omitempty"`
189+
UpdatedAt string `json:"modification_date,omitempty"`
190+
Zone string `json:"zone,omitempty"`
191+
EnableIPv6 bool `json:"enable_ipv6,omitempty"`
192+
DynamicIPRequired bool `json:"dynamic_ip_required,omitempty"`
193+
PlacementGroup struct {
194+
ID string `json:"id,omitempty"`
195+
Name string `json:"name,omitempty"`
196+
Organization string `json:"organization,omitempty"`
197+
Project string `json:"project,omitempty"`
198+
PolicyMode string `json:"policy_mode,omitempty"`
199+
PolicyType string `json:"policy_type,omitempty"`
200+
PolicyRespected bool `json:"policy_respected,omitempty"`
201+
Tags []string `json:"tags,omitempty"`
202+
Zone string `json:"zone,omitempty"`
203+
} `json:"placement_group,omitempty"`
174204
}
175205

176206
// ListUserData returns the metadata available from the server

0 commit comments

Comments
 (0)