From 93c9a9af8c9a9f4f85ccffe70e50a3c48cd003b7 Mon Sep 17 00:00:00 2001 From: Tiger Sun Date: Mon, 23 Aug 2021 11:31:49 -0700 Subject: [PATCH 1/3] Changed FSPG RestartParameter.failoverMode from string to enum for API 2021-06-01, 2021-06-01-preview, and 2021-06-15-privatepreview --- .../preview/2021-06-01-preview/postgresql.json | 12 +++++++++++- .../2021-06-15-privatepreview/postgresql.json | 12 +++++++++++- .../stable/2021-06-01/postgresql.json | 12 +++++++++++- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/postgresql.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/postgresql.json index 566ba6bb956a..253af0941bb2 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/postgresql.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/postgresql.json @@ -2021,7 +2021,17 @@ }, "failoverMode": { "type": "string", - "description": "Failover mode." + "description": "Failover mode.", + "enum": [ + "PlannedFailover", + "ForcedFailover", + "PlannedSwitchover", + "ForcedSwitchover" + ], + "x-ms-enum": { + "name": "FailoverMode", + "modelAsString": true + } } }, "description": "Represents server restart parameters." diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-15-privatepreview/postgresql.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-15-privatepreview/postgresql.json index 5c6b70dd81ad..89dd34aa0680 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-15-privatepreview/postgresql.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-15-privatepreview/postgresql.json @@ -2044,7 +2044,17 @@ }, "failoverMode": { "type": "string", - "description": "Failover mode." + "description": "Failover mode.", + "enum": [ + "PlannedFailover", + "ForcedFailover", + "PlannedSwitchover", + "ForcedSwitchover" + ], + "x-ms-enum": { + "name": "FailoverMode", + "modelAsString": true + } } }, "description": "Represents server restart parameters." diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/postgresql.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/postgresql.json index 7771cb9a91ac..03b5b297e044 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/postgresql.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/postgresql.json @@ -2021,7 +2021,17 @@ }, "failoverMode": { "type": "string", - "description": "Failover mode." + "description": "Failover mode.", + "enum": [ + "PlannedFailover", + "ForcedFailover", + "PlannedSwitchover", + "ForcedSwitchover" + ], + "x-ms-enum": { + "name": "FailoverMode", + "modelAsString": true + } } }, "description": "Represents server restart parameters." From 51127e6593a2867939391619e032378d1e806168 Mon Sep 17 00:00:00 2001 From: Tiger Sun Date: Mon, 23 Aug 2021 11:50:22 -0700 Subject: [PATCH 2/3] Change enum first letter to lower case --- .../preview/2021-06-01-preview/postgresql.json | 8 ++++---- .../preview/2021-06-15-privatepreview/postgresql.json | 8 ++++---- .../stable/2021-06-01/postgresql.json | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/postgresql.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/postgresql.json index 253af0941bb2..e687114bccec 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/postgresql.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/postgresql.json @@ -2023,10 +2023,10 @@ "type": "string", "description": "Failover mode.", "enum": [ - "PlannedFailover", - "ForcedFailover", - "PlannedSwitchover", - "ForcedSwitchover" + "plannedFailover", + "forcedFailover", + "plannedSwitchover", + "forcedSwitchover" ], "x-ms-enum": { "name": "FailoverMode", diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-15-privatepreview/postgresql.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-15-privatepreview/postgresql.json index 89dd34aa0680..0ecde42ad635 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-15-privatepreview/postgresql.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-15-privatepreview/postgresql.json @@ -2046,10 +2046,10 @@ "type": "string", "description": "Failover mode.", "enum": [ - "PlannedFailover", - "ForcedFailover", - "PlannedSwitchover", - "ForcedSwitchover" + "plannedFailover", + "forcedFailover", + "plannedSwitchover", + "forcedSwitchover" ], "x-ms-enum": { "name": "FailoverMode", diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/postgresql.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/postgresql.json index 03b5b297e044..bc3820e43d7a 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/postgresql.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/postgresql.json @@ -2023,10 +2023,10 @@ "type": "string", "description": "Failover mode.", "enum": [ - "PlannedFailover", - "ForcedFailover", - "PlannedSwitchover", - "ForcedSwitchover" + "plannedFailover", + "forcedFailover", + "plannedSwitchover", + "forcedSwitchover" ], "x-ms-enum": { "name": "FailoverMode", From 0e5705126cb794d8f38a90d7cfea62c9793b88f4 Mon Sep 17 00:00:00 2001 From: Tiger Sun Date: Mon, 23 Aug 2021 11:58:51 -0700 Subject: [PATCH 3/3] Change to upper case --- .../examples/ServerRestartWithFailover.json | 2 +- .../preview/2021-06-01-preview/postgresql.json | 8 ++++---- .../examples/ServerRestartWithFailover.json | 2 +- .../preview/2021-06-15-privatepreview/postgresql.json | 8 ++++---- .../2021-06-01/examples/ServerRestartWithFailover.json | 2 +- .../stable/2021-06-01/postgresql.json | 8 ++++---- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/ServerRestartWithFailover.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/ServerRestartWithFailover.json index fdb11d0b1e70..1bd243151993 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/ServerRestartWithFailover.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/ServerRestartWithFailover.json @@ -6,7 +6,7 @@ "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", "parameters": { "restartWithFailover": true, - "failoverMode": "forcedFailover" + "failoverMode": "ForcedFailover" } }, "responses": { diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/postgresql.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/postgresql.json index e687114bccec..253af0941bb2 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/postgresql.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/postgresql.json @@ -2023,10 +2023,10 @@ "type": "string", "description": "Failover mode.", "enum": [ - "plannedFailover", - "forcedFailover", - "plannedSwitchover", - "forcedSwitchover" + "PlannedFailover", + "ForcedFailover", + "PlannedSwitchover", + "ForcedSwitchover" ], "x-ms-enum": { "name": "FailoverMode", diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-15-privatepreview/examples/ServerRestartWithFailover.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-15-privatepreview/examples/ServerRestartWithFailover.json index d928707a0575..c1fe54619905 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-15-privatepreview/examples/ServerRestartWithFailover.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-15-privatepreview/examples/ServerRestartWithFailover.json @@ -6,7 +6,7 @@ "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", "parameters": { "restartWithFailover": true, - "failoverMode": "forcedFailover" + "failoverMode": "ForcedFailover" } }, "responses": { diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-15-privatepreview/postgresql.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-15-privatepreview/postgresql.json index 0ecde42ad635..89dd34aa0680 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-15-privatepreview/postgresql.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-15-privatepreview/postgresql.json @@ -2046,10 +2046,10 @@ "type": "string", "description": "Failover mode.", "enum": [ - "plannedFailover", - "forcedFailover", - "plannedSwitchover", - "forcedSwitchover" + "PlannedFailover", + "ForcedFailover", + "PlannedSwitchover", + "ForcedSwitchover" ], "x-ms-enum": { "name": "FailoverMode", diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/examples/ServerRestartWithFailover.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/examples/ServerRestartWithFailover.json index f8f484379769..181ce503092d 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/examples/ServerRestartWithFailover.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/examples/ServerRestartWithFailover.json @@ -6,7 +6,7 @@ "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", "parameters": { "restartWithFailover": true, - "failoverMode": "forcedFailover" + "failoverMode": "ForcedFailover" } }, "responses": { diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/postgresql.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/postgresql.json index bc3820e43d7a..03b5b297e044 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/postgresql.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2021-06-01/postgresql.json @@ -2023,10 +2023,10 @@ "type": "string", "description": "Failover mode.", "enum": [ - "plannedFailover", - "forcedFailover", - "plannedSwitchover", - "forcedSwitchover" + "PlannedFailover", + "ForcedFailover", + "PlannedSwitchover", + "ForcedSwitchover" ], "x-ms-enum": { "name": "FailoverMode",