Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Commands/horizondb/cluster/_failover.md
Original file line number Diff line number Diff line change
@@ -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**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.horizondb/clusters/{}/failover 2026-10-01-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
```
3 changes: 3 additions & 0 deletions Commands/horizondb/cluster/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
@@ -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}]}]}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
<?xml version='1.0' encoding='utf-8'?>
<CodeGen plane="mgmt-plane">
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.horizondb/clusters/{}/failover" version="2026-10-01-preview" swagger="mgmt-plane/horizondb/ResourceProviders/Microsoft.HorizonDb/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuSG9yaXpvbkRiL2NsdXN0ZXJzL3tjbHVzdGVyTmFtZX0vZmFpbG92ZXI=/V/MjAyNi0xMC0wMS1wcmV2aWV3"/>
<commandGroup name="horizondb cluster">
<command name="failover" version="2026-10-01-preview">
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.horizondb/clusters/{}/failover" version="2026-10-01-preview" swagger="mgmt-plane/horizondb/ResourceProviders/Microsoft.HorizonDb/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuSG9yaXpvbkRiL2NsdXN0ZXJzL3tjbHVzdGVyTmFtZX0vZmFpbG92ZXI=/V/MjAyNi0xMC0wMS1wcmV2aWV3"/>
<argGroup name="">
<arg type="string" var="$Path.clusterName" options="cluster-name name n" 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"/>
</arg>
<arg type="ResourceGroupName" var="$Path.resourceGroupName" options="resource-group g" required="True" idPart="resource_group"/>
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription" required="True" idPart="subscription"/>
</argGroup>
<operation operationId="Clusters_Failover">
<longRunning finalStateVia="location"/>
<http path="/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/failover">
<request method="post">
<path>
<param type="string" name="clusterName" arg="$Path.clusterName" required="True">
<format pattern="^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?$" maxLength="63" minLength="1"/>
</param>
<param type="string" name="resourceGroupName" arg="$Path.resourceGroupName" required="True">
<format maxLength="90" minLength="1"/>
</param>
<param type="uuid" name="subscriptionId" arg="$Path.subscriptionId" required="True"/>
</path>
<query>
<const readOnly="True" const="True" type="string" name="api-version" required="True">
<default value="&quot;2026-10-01-preview&quot;"/>
<format minLength="1"/>
</const>
</query>
</request>
<response statusCode="200">
<body>
<json var="$Instance">
<schema type="object">
<prop readOnly="True" type="ResourceId" name="id">
<format template="/subscriptions/{}/resourceGroups/{}/providers/Microsoft.HorizonDb/clusters/{}"/>
</prop>
<prop type="IdentityObject" name="identity">
<prop type="string" name="type" required="True">
<enum>
<item value="&quot;None&quot;"/>
<item value="&quot;UserAssigned&quot;"/>
</enum>
</prop>
<prop type="object" name="userAssignedIdentities">
<additionalProp>
<item nullable="True" type="object">
<prop readOnly="True" type="uuid" name="clientId"/>
<prop readOnly="True" type="uuid" name="principalId"/>
</item>
</additionalProp>
</prop>
</prop>
<prop type="ResourceLocation" name="location" required="True"/>
<prop readOnly="True" type="string" name="name"/>
<prop type="object" name="properties">
<prop type="string" name="aiModelManagement">
<enum>
<item value="&quot;Disabled&quot;"/>
<item value="&quot;Enabled&quot;"/>
</enum>
</prop>
<prop type="object" name="backup">
<prop readOnly="True" type="dateTime" name="earliestRestorePointUtc">
<format protocol="iso"/>
</prop>
<prop type="string" name="geoRedundancy" required="True">
<enum>
<item value="&quot;Disabled&quot;"/>
<item value="&quot;Enabled&quot;"/>
</enum>
</prop>
<prop type="integer32" name="retentionDays">
<default value="7"/>
<format maximum="35" minimum="1"/>
</prop>
</prop>
<prop type="string" name="creationMode">
<enum>
<item value="&quot;Create&quot;"/>
<item value="&quot;PointInTimeRestore&quot;"/>
</enum>
</prop>
<prop type="string" name="creationSourceClusterLocation"/>
<prop type="ResourceId" name="creationSourceClusterResourceId"/>
<prop type="object" name="dataEncryption">
<prop readOnly="True" type="string" name="primaryEncryptionKeyCurrentVersion"/>
<prop readOnly="True" type="string" name="primaryEncryptionKeyStatus">
<enum>
<item value="&quot;Invalid&quot;"/>
<item value="&quot;Valid&quot;"/>
</enum>
</prop>
<prop type="string" name="primaryKeyUri">
<format pattern="^https://[A-Za-z0-9-]+[.]vault([.]azure[.]net|[.]usgovcloudapi[.]net|[.]azure[.]cn)/keys/[A-Za-z0-9-]+/?$"/>
</prop>
<prop type="ResourceId" name="primaryUserAssignedIdentityId"/>
<prop type="string" name="type">
<enum>
<item value="&quot;AzureKeyVault&quot;"/>
<item value="&quot;SystemManaged&quot;"/>
</enum>
</prop>
</prop>
<prop type="object" name="network">
<prop type="string" name="publicAccess">
<default value="&quot;Disabled&quot;"/>
<enum>
<item value="&quot;Disabled&quot;"/>
<item value="&quot;Enabled&quot;"/>
</enum>
</prop>
</prop>
<prop type="dateTime" name="pointInTimeUtc">
<format protocol="iso"/>
</prop>
<prop type="string" name="postgreSqlVersion">
<enum>
<item value="&quot;17&quot;"/>
<item value="&quot;18&quot;"/>
</enum>
</prop>
<prop readOnly="True" type="string" name="provisioningState">
<enum>
<item value="&quot;Canceled&quot;"/>
<item value="&quot;Failed&quot;"/>
<item value="&quot;InProgress&quot;"/>
<item value="&quot;Provisioning&quot;"/>
<item value="&quot;Succeeded&quot;"/>
<item value="&quot;Updating&quot;"/>
</enum>
</prop>
<prop readOnly="True" type="object" name="readWritePool">
<prop readOnly="True" type="ResourceId" name="designatedPoolResourceId"/>
</prop>
<prop readOnly="True" type="string" name="state">
<enum>
<item value="&quot;Deleting&quot;"/>
<item value="&quot;Inaccessible&quot;"/>
<item value="&quot;Provisioning&quot;"/>
<item value="&quot;Ready&quot;"/>
<item value="&quot;Updating&quot;"/>
</enum>
</prop>
</prop>
<prop readOnly="True" type="object" name="systemData">
<prop type="dateTime" name="createdAt">
<format protocol="iso"/>
</prop>
<prop type="string" name="createdBy"/>
<prop type="string" name="createdByType">
<enum>
<item value="&quot;Application&quot;"/>
<item value="&quot;Key&quot;"/>
<item value="&quot;ManagedIdentity&quot;"/>
<item value="&quot;User&quot;"/>
</enum>
</prop>
<prop type="dateTime" name="lastModifiedAt">
<format protocol="iso"/>
</prop>
<prop type="string" name="lastModifiedBy"/>
<prop type="string" name="lastModifiedByType">
<enum>
<item value="&quot;Application&quot;"/>
<item value="&quot;Key&quot;"/>
<item value="&quot;ManagedIdentity&quot;"/>
<item value="&quot;User&quot;"/>
</enum>
</prop>
</prop>
<prop type="object" name="tags">
<additionalProp>
<item type="string"/>
</additionalProp>
</prop>
<prop readOnly="True" type="string" name="type"/>
</schema>
</json>
</body>
</response>
<response statusCode="202">
<header>
<item name="Azure-AsyncOperation"/>
<item name="Location"/>
<item name="Retry-After"/>
</header>
</response>
<response isError="True">
<body>
<json>
<schema type="@MgmtErrorFormat"/>
</json>
</body>
</response>
</http>
</operation>
<output type="object" ref="$Instance" clientFlatten="True"/>
</command>
</commandGroup>
</CodeGen>
Loading