From 41b56b0dff766d175283d398f46d3c4a428f9db3 Mon Sep 17 00:00:00 2001 From: Gabriel Lobo Date: Fri, 20 Nov 2026 02:30:58 -0600 Subject: [PATCH] [HorizonDB] Add cluster failover command model Model the bodyless Clusters_Failover action for API 2026-10-01-preview, including standard selectors, default LRO waiting and no-wait support. ADO 5812512. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Commands/horizondb/cluster/_failover.md | 25 +++ Commands/horizondb/cluster/readme.md | 3 + .../2026-10-01-preview.json | 1 + .../2026-10-01-preview.xml | 205 ++++++++++++++++++ 4 files changed, 234 insertions(+) create mode 100644 Commands/horizondb/cluster/_failover.md create mode 100644 Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5ob3Jpem9uZGIvY2x1c3RlcnMve30vZmFpbG92ZXI=/2026-10-01-preview.json create mode 100644 Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5ob3Jpem9uZGIvY2x1c3RlcnMve30vZmFpbG92ZXI=/2026-10-01-preview.xml diff --git a/Commands/horizondb/cluster/_failover.md b/Commands/horizondb/cluster/_failover.md new file mode 100644 index 000000000..774ed0419 --- /dev/null +++ b/Commands/horizondb/cluster/_failover.md @@ -0,0 +1,25 @@ +# [Command] _horizondb cluster failover_ + +Trigger service-selected failover within the cluster's designated read-write pool. + +HorizonDB selects the replacement node using the same eligibility and node-selection rules as automatic failover. A target node or availability zone cannot be specified.\ +Waits for the operation to complete and returns the updated cluster. Use --no-wait to return after the service accepts the request.\ +The service returns 409 Conflict when the designated pool is not eligible for failover or another conflicting operation is in progress. + +## Versions + +### [2026-10-01-preview](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5ob3Jpem9uZGIvY2x1c3RlcnMve30vZmFpbG92ZXI=/2026-10-01-preview.xml) **Preview** + + + +#### examples + +- Fail over a HorizonDB cluster and wait for completion + ```bash + horizondb cluster failover --resource-group example-resource-group --name example-cluster + ``` + +- Submit a HorizonDB cluster failover without waiting + ```bash + horizondb cluster failover --resource-group example-resource-group --name example-cluster --no-wait + ``` diff --git a/Commands/horizondb/cluster/readme.md b/Commands/horizondb/cluster/readme.md index 83689b92b..c5a9ee82a 100644 --- a/Commands/horizondb/cluster/readme.md +++ b/Commands/horizondb/cluster/readme.md @@ -21,6 +21,9 @@ Manage HorizonDB Cluster - [delete](/Commands/horizondb/cluster/_delete.md) : Delete a HorizonDB cluster. +- [failover](/Commands/horizondb/cluster/_failover.md) +: Trigger service-selected failover within the cluster's designated read-write pool. + - [list](/Commands/horizondb/cluster/_list.md) : List HorizonDB clusters. diff --git a/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5ob3Jpem9uZGIvY2x1c3RlcnMve30vZmFpbG92ZXI=/2026-10-01-preview.json b/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5ob3Jpem9uZGIvY2x1c3RlcnMve30vZmFpbG92ZXI=/2026-10-01-preview.json new file mode 100644 index 000000000..1a533c2aa --- /dev/null +++ b/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5ob3Jpem9uZGIvY2x1c3RlcnMve30vZmFpbG92ZXI=/2026-10-01-preview.json @@ -0,0 +1 @@ +{"plane": "mgmt-plane", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.horizondb/clusters/{}/failover", "version": "2026-10-01-preview", "swagger": "mgmt-plane/horizondb/ResourceProviders/Microsoft.HorizonDb/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuSG9yaXpvbkRiL2NsdXN0ZXJzL3tjbHVzdGVyTmFtZX0vZmFpbG92ZXI=/V/MjAyNi0xMC0wMS1wcmV2aWV3"}], "commandGroups": [{"name": "horizondb cluster", "commands": [{"name": "failover", "version": "2026-10-01-preview", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.horizondb/clusters/{}/failover", "version": "2026-10-01-preview", "swagger": "mgmt-plane/horizondb/ResourceProviders/Microsoft.HorizonDb/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuSG9yaXpvbkRiL2NsdXN0ZXJzL3tjbHVzdGVyTmFtZX0vZmFpbG92ZXI=/V/MjAyNi0xMC0wMS1wcmV2aWV3"}], "argGroups": [{"name": "", "args": [{"type": "string", "var": "$Path.clusterName", "options": ["n", "name", "cluster-name"], "required": true, "idPart": "name", "help": {"short": "The name of the HorizonDB cluster."}, "format": {"pattern": "^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?$", "maxLength": 63, "minLength": 1}}, {"type": "ResourceGroupName", "var": "$Path.resourceGroupName", "options": ["g", "resource-group"], "required": true, "idPart": "resource_group"}, {"type": "SubscriptionId", "var": "$Path.subscriptionId", "options": ["subscription"], "required": true, "idPart": "subscription"}]}], "operations": [{"longRunning": {"finalStateVia": "location"}, "operationId": "Clusters_Failover", "http": {"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/failover", "request": {"method": "post", "path": {"params": [{"type": "string", "name": "clusterName", "arg": "$Path.clusterName", "required": true, "format": {"pattern": "^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?$", "maxLength": 63, "minLength": 1}}, {"type": "string", "name": "resourceGroupName", "arg": "$Path.resourceGroupName", "required": true, "format": {"maxLength": 90, "minLength": 1}}, {"type": "uuid", "name": "subscriptionId", "arg": "$Path.subscriptionId", "required": true}]}, "query": {"consts": [{"readOnly": true, "const": true, "default": {"value": "2026-10-01-preview"}, "type": "string", "name": "api-version", "required": true, "format": {"minLength": 1}}]}}, "responses": [{"statusCode": [200], "body": {"json": {"var": "$Instance", "schema": {"type": "object", "props": [{"readOnly": true, "type": "ResourceId", "name": "id", "format": {"template": "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.HorizonDb/clusters/{}"}}, {"type": "IdentityObject", "name": "identity", "props": [{"type": "string", "name": "type", "required": true, "enum": {"items": [{"value": "None"}, {"value": "UserAssigned"}]}}, {"type": "object", "name": "userAssignedIdentities", "additionalProps": {"item": {"nullable": true, "type": "object", "props": [{"readOnly": true, "type": "uuid", "name": "clientId"}, {"readOnly": true, "type": "uuid", "name": "principalId"}]}}}]}, {"type": "ResourceLocation", "name": "location", "required": true}, {"readOnly": true, "type": "string", "name": "name"}, {"type": "object", "name": "properties", "props": [{"type": "string", "name": "aiModelManagement", "enum": {"items": [{"value": "Disabled"}, {"value": "Enabled"}]}}, {"type": "object", "name": "backup", "props": [{"readOnly": true, "type": "dateTime", "name": "earliestRestorePointUtc", "format": {"protocol": "iso"}}, {"type": "string", "name": "geoRedundancy", "required": true, "enum": {"items": [{"value": "Disabled"}, {"value": "Enabled"}]}}, {"default": {"value": 7}, "type": "integer32", "name": "retentionDays", "format": {"maximum": 35, "minimum": 1}}]}, {"type": "string", "name": "creationMode", "enum": {"items": [{"value": "Create"}, {"value": "PointInTimeRestore"}]}}, {"type": "string", "name": "creationSourceClusterLocation"}, {"type": "ResourceId", "name": "creationSourceClusterResourceId"}, {"type": "object", "name": "dataEncryption", "props": [{"readOnly": true, "type": "string", "name": "primaryEncryptionKeyCurrentVersion"}, {"readOnly": true, "type": "string", "name": "primaryEncryptionKeyStatus", "enum": {"items": [{"value": "Invalid"}, {"value": "Valid"}]}}, {"type": "string", "name": "primaryKeyUri", "format": {"pattern": "^https://[A-Za-z0-9-]+[.]vault([.]azure[.]net|[.]usgovcloudapi[.]net|[.]azure[.]cn)/keys/[A-Za-z0-9-]+/?$"}}, {"type": "ResourceId", "name": "primaryUserAssignedIdentityId"}, {"type": "string", "name": "type", "enum": {"items": [{"value": "AzureKeyVault"}, {"value": "SystemManaged"}]}}]}, {"type": "object", "name": "network", "props": [{"default": {"value": "Disabled"}, "type": "string", "name": "publicAccess", "enum": {"items": [{"value": "Disabled"}, {"value": "Enabled"}]}}]}, {"type": "dateTime", "name": "pointInTimeUtc", "format": {"protocol": "iso"}}, {"type": "string", "name": "postgreSqlVersion", "enum": {"items": [{"value": "17"}, {"value": "18"}]}}, {"readOnly": true, "type": "string", "name": "provisioningState", "enum": {"items": [{"value": "Canceled"}, {"value": "Failed"}, {"value": "InProgress"}, {"value": "Provisioning"}, {"value": "Succeeded"}, {"value": "Updating"}]}}, {"readOnly": true, "type": "object", "name": "readWritePool", "props": [{"readOnly": true, "type": "ResourceId", "name": "designatedPoolResourceId"}]}, {"readOnly": true, "type": "string", "name": "state", "enum": {"items": [{"value": "Deleting"}, {"value": "Inaccessible"}, {"value": "Provisioning"}, {"value": "Ready"}, {"value": "Updating"}]}}]}, {"readOnly": true, "type": "object", "name": "systemData", "props": [{"type": "dateTime", "name": "createdAt", "format": {"protocol": "iso"}}, {"type": "string", "name": "createdBy"}, {"type": "string", "name": "createdByType", "enum": {"items": [{"value": "Application"}, {"value": "Key"}, {"value": "ManagedIdentity"}, {"value": "User"}]}}, {"type": "dateTime", "name": "lastModifiedAt", "format": {"protocol": "iso"}}, {"type": "string", "name": "lastModifiedBy"}, {"type": "string", "name": "lastModifiedByType", "enum": {"items": [{"value": "Application"}, {"value": "Key"}, {"value": "ManagedIdentity"}, {"value": "User"}]}}]}, {"type": "object", "name": "tags", "additionalProps": {"item": {"type": "string"}}}, {"readOnly": true, "type": "string", "name": "type"}]}}}}, {"statusCode": [202], "header": {"items": [{"name": "Azure-AsyncOperation"}, {"name": "Location"}, {"name": "Retry-After"}]}}, {"isError": true, "body": {"json": {"schema": {"type": "@MgmtErrorFormat"}}}}]}}], "outputs": [{"type": "object", "ref": "$Instance", "clientFlatten": true}]}]}]} \ No newline at end of file diff --git a/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5ob3Jpem9uZGIvY2x1c3RlcnMve30vZmFpbG92ZXI=/2026-10-01-preview.xml b/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5ob3Jpem9uZGIvY2x1c3RlcnMve30vZmFpbG92ZXI=/2026-10-01-preview.xml new file mode 100644 index 000000000..012ce3948 --- /dev/null +++ b/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5ob3Jpem9uZGIvY2x1c3RlcnMve30vZmFpbG92ZXI=/2026-10-01-preview.xml @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + + + + + +
+
+ +
+
+