Skip to content

Commit d4b1d2c

Browse files
authored
Update example for Replica Switchover in PostgreSQL (#44102)
* update example * update patch model * Trigger PR update * Update description to be general for new property
1 parent 5bfc5b6 commit d4b1d2c

6 files changed

Lines changed: 34 additions & 4 deletions

File tree

specification/postgresql/DBforPostgreSQL.Management/examples/2026-04-01-preview/ServersPromoteReplicaAsForcedSwitchover.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"replica": {
77
"promoteMode": "Switchover",
88
"promoteOption": "Forced"
9-
}
9+
},
10+
"sourceServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver"
1011
}
1112
},
1213
"resourceGroupName": "exampleresourcegroup",

specification/postgresql/DBforPostgreSQL.Management/examples/2026-04-01-preview/ServersPromoteReplicaAsPlannedSwitchover.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"replica": {
77
"promoteMode": "Switchover",
88
"promoteOption": "Planned"
9-
}
9+
},
10+
"sourceServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver"
1011
}
1112
},
1213
"resourceGroupName": "exampleresourcegroup",

specification/postgresql/DBforPostgreSQL.Management/models.tsp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3424,6 +3424,17 @@ model ServerPropertiesForPatch {
34243424
@visibility(Lifecycle.Update)
34253425
createMode?: CreateModeForPatch;
34263426

3427+
/**
3428+
* Identifier of the server to be used as the source of the new server.
3429+
*/
3430+
@added(Versions.v2026_04_01)
3431+
@visibility(Lifecycle.Update)
3432+
sourceServerResourceId?: armResourceIdentifier<[
3433+
{
3434+
type: "Microsoft.DBforPostgreSQL/flexibleServers";
3435+
}
3436+
]>;
3437+
34273438
/**
34283439
* Role of the server in a replication set.
34293440
*/

specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2026-04-01-preview/examples/ServersPromoteReplicaAsForcedSwitchover.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"replica": {
77
"promoteMode": "Switchover",
88
"promoteOption": "Forced"
9-
}
9+
},
10+
"sourceServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver"
1011
}
1112
},
1213
"resourceGroupName": "exampleresourcegroup",

specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2026-04-01-preview/examples/ServersPromoteReplicaAsPlannedSwitchover.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"replica": {
77
"promoteMode": "Switchover",
88
"promoteOption": "Planned"
9-
}
9+
},
10+
"sourceServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver"
1011
}
1112
},
1213
"resourceGroupName": "exampleresourcegroup",

specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2026-04-01-preview/openapi.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9588,6 +9588,21 @@
95889588
"update"
95899589
]
95909590
},
9591+
"sourceServerResourceId": {
9592+
"type": "string",
9593+
"format": "arm-id",
9594+
"description": "Identifier of the server to be used as the source of the new server.",
9595+
"x-ms-mutability": [
9596+
"update"
9597+
],
9598+
"x-ms-arm-id-details": {
9599+
"allowedResources": [
9600+
{
9601+
"type": "Microsoft.DBforPostgreSQL/flexibleServers"
9602+
}
9603+
]
9604+
}
9605+
},
95919606
"replicationRole": {
95929607
"$ref": "#/definitions/ReplicationRole",
95939608
"description": "Role of the server in a replication set."

0 commit comments

Comments
 (0)