Skip to content

Commit 6038c53

Browse files
authored
feat(baremetal): add protected flag on servers (scaleway#2644)
1 parent b327ec9 commit 6038c53

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

api/baremetal/v1/baremetal_sdk.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1437,6 +1437,9 @@ type Server struct {
14371437

14381438
// RescueServer: configuration of rescue boot.
14391439
RescueServer *ServerRescueServer `json:"rescue_server"`
1440+
1441+
// Protected: if enabled, the server can not be deleted.
1442+
Protected bool `json:"protected"`
14401443
}
14411444

14421445
// Setting: setting.
@@ -1515,6 +1518,9 @@ type CreateServerRequest struct {
15151518

15161519
// OptionIDs: iDs of options to enable on server.
15171520
OptionIDs []string `json:"option_ids"`
1521+
1522+
// Protected: if enabled, the server can not be deleted.
1523+
Protected bool `json:"protected"`
15181524
}
15191525

15201526
// DeleteOptionServerRequest: delete option server request.
@@ -2126,6 +2132,9 @@ type UpdateServerRequest struct {
21262132

21272133
// Tags: tags associated with the server, not updated if null.
21282134
Tags *[]string `json:"tags,omitempty"`
2135+
2136+
// Protected: if enabled, the server can not be deleted.
2137+
Protected *bool `json:"protected,omitempty"`
21292138
}
21302139

21312140
// UpdateSettingRequest: update setting request.
@@ -2288,7 +2297,7 @@ func (s *API) CreateServer(req *CreateServerRequest, opts ...scw.RequestOption)
22882297
return &resp, nil
22892298
}
22902299

2291-
// UpdateServer: Update the server associated with the ID. You can update parameters such as the server's name, tags and description. Any parameters left null in the request body are not updated.
2300+
// UpdateServer: Update the server associated with the ID. You can update parameters such as the server's name, tags, description and protection flag. Any parameters left null in the request body are not updated.
22922301
func (s *API) UpdateServer(req *UpdateServerRequest, opts ...scw.RequestOption) (*Server, error) {
22932302
var err error
22942303

0 commit comments

Comments
 (0)