Skip to content

Commit

Permalink
feat: auto-updated SDK (#90) add project configuration for maintenanc…
Browse files Browse the repository at this point in the history
…e window

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: kislerdm <13434797+kislerdm@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and kislerdm authored Nov 21, 2024
1 parent f81b05f commit e79674c
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
29 changes: 29 additions & 0 deletions openAPIDefinition.json
Original file line number Diff line number Diff line change
Expand Up @@ -5067,6 +5067,9 @@
"enable_logical_replication": {
"description": "Sets wal_level=logical for all compute endpoints in this project.\nAll active endpoints will be suspended.\nOnce enabled, logical replication cannot be disabled.\n",
"type": "boolean"
},
"maintenance_window": {
"$ref": "#/components/schemas/MaintenanceWindow"
}
}
},
Expand Down Expand Up @@ -5951,6 +5954,32 @@
}
}
},
"MaintenanceWindow": {
"description": "A maintenance window is a time period during which Neon may perform maintenance on the project's infrastructure.\nDuring this time, the project's compute endpoints may be unavailable and existing connections can be \ninterrupted.\n",
"type": "object",
"required": [
"weekdays",
"start_time",
"end_time"
],
"properties": {
"weekdays": {
"description": "A list of weekdays when the maintenance window is active.\nEncoded as ints, where 1 - Monday, and 7 - Sunday.\n",
"type": "array",
"items": {
"type": "integer"
}
},
"start_time": {
"description": "Start time of the maintenance window, in the format of \"HH:MM\". Uses UTC.\n",
"type": "string"
},
"end_time": {
"description": "End time of the maintenance window, in the format of \"HH:MM\". Uses UTC.\n",
"type": "string"
}
}
},
"EndpointCreateRequest": {
"type": "object",
"required": [
Expand Down
18 changes: 16 additions & 2 deletions sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -1717,6 +1717,19 @@ type ListSharedProjectsRespObj struct {
ProjectsResponse
}

// MaintenanceWindow A maintenance window is a time period during which Neon may perform maintenance on the project's infrastructure.
// During this time, the project's compute endpoints may be unavailable and existing connections can be
// interrupted.
type MaintenanceWindow struct {
// EndTime End time of the maintenance window, in the format of "HH:MM". Uses UTC.
EndTime string `json:"end_time"`
// StartTime Start time of the maintenance window, in the format of "HH:MM". Uses UTC.
StartTime string `json:"start_time"`
// Weekdays A list of weekdays when the maintenance window is active.
// Encoded as ints, where 1 - Monday, and 7 - Sunday.
Weekdays []int `json:"weekdays"`
}

type Member struct {
ID string `json:"id"`
JoinedAt *time.Time `json:"joined_at,omitempty"`
Expand Down Expand Up @@ -2104,8 +2117,9 @@ type ProjectSettingsData struct {
// EnableLogicalReplication Sets wal_level=logical for all compute endpoints in this project.
// All active endpoints will be suspended.
// Once enabled, logical replication cannot be disabled.
EnableLogicalReplication *bool `json:"enable_logical_replication,omitempty"`
Quota *ProjectQuota `json:"quota,omitempty"`
EnableLogicalReplication *bool `json:"enable_logical_replication,omitempty"`
MaintenanceWindow *MaintenanceWindow `json:"maintenance_window,omitempty"`
Quota *ProjectQuota `json:"quota,omitempty"`
}

type ProjectUpdateRequest struct {
Expand Down

0 comments on commit e79674c

Please sign in to comment.