Skip to content

Commit 5699547

Browse files
authored
feat(instance): add zone field in instance resources response (#331)
1 parent 1c73f37 commit 5699547

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

api/instance/v1/instance_sdk.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,8 @@ type Bootscript struct {
621621
//
622622
// Default value: x86_64
623623
Arch Arch `json:"arch"`
624+
// Zone the zone in which is the bootscript
625+
Zone scw.Zone `json:"zone"`
624626
}
625627

626628
type CreateIPResponse struct {
@@ -739,6 +741,8 @@ type IP struct {
739741
Server *ServerSummary `json:"server"`
740742

741743
Organization string `json:"organization"`
744+
745+
Zone scw.Zone `json:"zone"`
742746
}
743747

744748
type Image struct {
@@ -769,6 +773,8 @@ type Image struct {
769773
//
770774
// Default value: available
771775
State ImageState `json:"state"`
776+
777+
Zone scw.Zone `json:"zone"`
772778
}
773779

774780
type ListBootscriptsResponse struct {
@@ -863,6 +869,8 @@ type PlacementGroup struct {
863869
PolicyType PlacementGroupPolicyType `json:"policy_type"`
864870
// PolicyRespected returns true if the policy is respected, false otherwise
865871
PolicyRespected bool `json:"policy_respected"`
872+
// Zone the zone in which is the placement group
873+
Zone scw.Zone `json:"zone"`
866874
}
867875

868876
type PlacementGroupServer struct {
@@ -903,6 +911,8 @@ type SecurityGroup struct {
903911
Servers []*ServerSummary `json:"servers"`
904912
// Stateful true if the security group is stateful
905913
Stateful bool `json:"stateful"`
914+
// Zone the zone in which is the security group
915+
Zone scw.Zone `json:"zone"`
906916
}
907917

908918
type SecurityGroupRule struct {
@@ -929,6 +939,8 @@ type SecurityGroupRule struct {
929939
Position uint32 `json:"position"`
930940

931941
Editable bool `json:"editable"`
942+
943+
Zone scw.Zone `json:"zone"`
932944
}
933945

934946
type SecurityGroupSummary struct {
@@ -1003,6 +1015,8 @@ type Server struct {
10031015
Arch Arch `json:"arch"`
10041016
// PlacementGroup the server placement group
10051017
PlacementGroup *PlacementGroup `json:"placement_group"`
1018+
// Zone the zone in which is the server
1019+
Zone scw.Zone `json:"zone"`
10061020
}
10071021

10081022
type ServerActionResponse struct {
@@ -1132,6 +1146,8 @@ type Snapshot struct {
11321146
CreationDate time.Time `json:"creation_date"`
11331147

11341148
ModificationDate time.Time `json:"modification_date"`
1149+
1150+
Zone scw.Zone `json:"zone"`
11351151
}
11361152

11371153
type SnapshotBaseVolume struct {
@@ -1160,6 +1176,8 @@ type Task struct {
11601176
HrefFrom string `json:"href_from"`
11611177

11621178
HrefResult string `json:"href_result"`
1179+
// Zone the zone in which is the task
1180+
Zone scw.Zone `json:"zone"`
11631181
}
11641182

11651183
type UpdateIPResponse struct {
@@ -1204,6 +1222,8 @@ type Volume struct {
12041222
//
12051223
// Default value: available
12061224
State VolumeState `json:"state"`
1225+
// Zone the zone in which is the volume
1226+
Zone scw.Zone `json:"zone"`
12071227
}
12081228

12091229
type VolumeSummary struct {

0 commit comments

Comments
 (0)