Skip to content

Commit 28dc6fb

Browse files
authored
feat(webhosting): edit method to allow user creation (scaleway#2357)
1 parent 0d220e0 commit 28dc6fb

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

api/webhosting/v1/webhosting_sdk.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,13 @@ type PlatformControlPanel struct {
731731
URLs *PlatformControlPanelURLs `json:"urls"`
732732
}
733733

734+
// CreateDatabaseRequestUser: create database request user.
735+
type CreateDatabaseRequestUser struct {
736+
Username string `json:"username"`
737+
738+
Password string `json:"password"`
739+
}
740+
734741
// CreateHostingRequestDomainConfiguration: create hosting request domain configuration.
735742
type CreateHostingRequestDomainConfiguration struct {
736743
UpdateNameservers bool `json:"update_nameservers"`
@@ -1028,6 +1035,14 @@ type DatabaseAPICreateDatabaseRequest struct {
10281035

10291036
// DatabaseName: name of the database to be created.
10301037
DatabaseName string `json:"database_name"`
1038+
1039+
// NewUser: (Optional) Username and password to create a user and link to the database.
1040+
// Precisely one of NewUser, ExistingUsername must be set.
1041+
NewUser *CreateDatabaseRequestUser `json:"new_user,omitempty"`
1042+
1043+
// ExistingUsername: (Optional) Username to link an existing user to the database.
1044+
// Precisely one of NewUser, ExistingUsername must be set.
1045+
ExistingUsername *string `json:"existing_username,omitempty"`
10311046
}
10321047

10331048
// DatabaseAPICreateDatabaseUserRequest: database api create database user request.

0 commit comments

Comments
 (0)