@@ -16,6 +16,7 @@ const (
16
16
databaseResizePath = databaseBasePath + "/%s/resize"
17
17
databaseMigratePath = databaseBasePath + "/%s/migrate"
18
18
databaseMaintenancePath = databaseBasePath + "/%s/maintenance"
19
+ databaseUpdateInstallationPath = databaseBasePath + "/%s/install_update"
19
20
databaseBackupsPath = databaseBasePath + "/%s/backups"
20
21
databaseUsersPath = databaseBasePath + "/%s/users"
21
22
databaseUserPath = databaseBasePath + "/%s/users/%s"
@@ -120,6 +121,7 @@ type DatabasesService interface {
120
121
Resize (context.Context , string , * DatabaseResizeRequest ) (* Response , error )
121
122
Migrate (context.Context , string , * DatabaseMigrateRequest ) (* Response , error )
122
123
UpdateMaintenance (context.Context , string , * DatabaseUpdateMaintenanceRequest ) (* Response , error )
124
+ InstallUpdate (context.Context , string ) (* Response , error )
123
125
ListBackups (context.Context , string , * ListOptions ) ([]DatabaseBackup , * Response , error )
124
126
GetUser (context.Context , string , string ) (* DatabaseUser , * Response , error )
125
127
ListUsers (context.Context , string , * ListOptions ) ([]DatabaseUser , * Response , error )
@@ -940,6 +942,20 @@ func (svc *DatabasesServiceOp) UpdateMaintenance(ctx context.Context, databaseID
940
942
return resp , nil
941
943
}
942
944
945
+ // InstallUpdate starts installation of updates
946
+ func (svc * DatabasesServiceOp ) InstallUpdate (ctx context.Context , databaseID string ) (* Response , error ) {
947
+ path := fmt .Sprintf (databaseUpdateInstallationPath , databaseID )
948
+ req , err := svc .client .NewRequest (ctx , http .MethodPut , path , nil )
949
+ if err != nil {
950
+ return nil , err
951
+ }
952
+ resp , err := svc .client .Do (ctx , req , nil )
953
+ if err != nil {
954
+ return resp , err
955
+ }
956
+ return resp , nil
957
+ }
958
+
943
959
// ListBackups returns a list of the current backups of a database
944
960
func (svc * DatabasesServiceOp ) ListBackups (ctx context.Context , databaseID string , opts * ListOptions ) ([]DatabaseBackup , * Response , error ) {
945
961
path := fmt .Sprintf (databaseBackupsPath , databaseID )
0 commit comments