Skip to content

Commit

Permalink
feat(dbaas): add labels support
Browse files Browse the repository at this point in the history
  • Loading branch information
kangasta committed Jul 22, 2024
1 parent 4b754c2 commit 7a728de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ See updating [Changelog example here](https://keepachangelog.com/en/1.0.0/)
### Added

- router: add `type` field to static routes
- managed databases: add support for labels.

## [8.6.2]

Expand Down
1 change: 1 addition & 0 deletions upcloud/managed_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ type ManagedDatabase struct {
Backups []ManagedDatabaseBackup `json:"backups,omitempty"`
Components []ManagedDatabaseComponent `json:"components,omitempty"`
CreateTime time.Time `json:"create_time,omitempty"`
Labels []Label `json:"labels,omitempty"`
Maintenance ManagedDatabaseMaintenanceTime `json:"maintenance,omitempty"`
Name string `json:"name,omitempty"`
Networks []ManagedDatabaseNetwork `json:"networks,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions upcloud/request/managed_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func (c *CloneManagedDatabaseRequest) RequestURL() string {
// CreateManagedDatabaseRequest represents a request to create a new managed database instance
type CreateManagedDatabaseRequest struct {
HostNamePrefix string `json:"hostname_prefix"`
Labels []upcloud.Label `json:"labels,omitempty"`
Maintenance ManagedDatabaseMaintenanceTimeRequest `json:"maintenance,omitempty"`
Networks []upcloud.ManagedDatabaseNetwork `json:"networks,omitempty"`
Plan string `json:"plan"`
Expand Down Expand Up @@ -421,6 +422,7 @@ func (m *ManagedDatabasePropertiesRequest) GetPublicAccess() bool {

// ModifyManagedDatabaseRequest represents a request to modify an existing managed database instance
type ModifyManagedDatabaseRequest struct {
Labels *[]upcloud.Label `json:"labels,omitempty"`
Maintenance ManagedDatabaseMaintenanceTimeRequest `json:"maintenance"`
Networks *[]upcloud.ManagedDatabaseNetwork `json:"networks,omitempty"`
Plan string `json:"plan,omitempty"`
Expand Down

0 comments on commit 7a728de

Please sign in to comment.