Skip to content
Closed
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
5 changes: 5 additions & 0 deletions src/horizondb/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Release History
===============

1.0.0b10
++++++++
* Add ``az horizondb cluster authentication list`` and ``authentication password``
commands to show, configure, update, and wait for cluster password authentication.

1.0.0b9
+++++++
* Update the management API to ``2026-10-01-preview`` with PostgreSQL 17 and 18 support.
Expand Down
24 changes: 24 additions & 0 deletions src/horizondb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,30 @@ For example, scale the pool's vCores:
az horizondb cluster pool update --resource-group example-resource-group --cluster-name example-cluster --name example-pool --v-cores 4
```

## Manage cluster authentication

List the cluster's service-created authentication methods, then inspect the password method:

```powershell
az horizondb cluster authentication list -g example-resource-group --cluster-name example-cluster
az horizondb cluster authentication password show -g example-resource-group --cluster-name example-cluster
```

For initial setup, use `password create` with `--state Enabled` and the administrator login.
Pass `--admin-password` (alias `--administrator-login-password`) **without a value** in a terminal to enter and confirm
the password without echo. An inline password can appear in shell history, process arguments,
or CLI debug logs. Passwords are never returned by these commands.

```powershell
az horizondb cluster authentication password create -g example-resource-group --cluster-name example-cluster --state Enabled --administrator-login exampleadmin --admin-password
az horizondb cluster authentication password update -g example-resource-group --cluster-name example-cluster --admin-password --no-wait
az horizondb cluster authentication password wait -g example-resource-group --cluster-name example-cluster --updated
```

`password update` changes only the supplied settings. Use `--state Disabled` alone
to disable password authentication, or `--state Enabled` with a password to
re-enable the method and reset the password. Both create and update accept `--no-wait`.

## Manage parameter groups

Create a parameter group for the cluster's PostgreSQL version, then associate
Expand Down
3 changes: 3 additions & 0 deletions src/horizondb/azext_horizondb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ def load_command_table(self, args):
args=args
)
from .aaz.latest.horizondb.cluster.custom import ClusterCreate, ClusterUpdate
from .aaz.latest.horizondb.cluster.authentication.password.custom import PasswordCreate, PasswordUpdate
from .aaz.latest.horizondb.cluster.custom_restore import ClusterRestore
from .aaz.latest.horizondb.cluster.pool.custom import PoolCreate, PoolUpdate
from .aaz.latest.horizondb.cluster.private_link_resource.custom import PrivateLinkResourceShow
self.command_table['horizondb cluster create'] = ClusterCreate(loader=self)
self.command_table['horizondb cluster restore'] = ClusterRestore(loader=self)
self.command_table['horizondb cluster update'] = ClusterUpdate(loader=self)
self.command_table['horizondb cluster authentication password create'] = PasswordCreate(loader=self)
self.command_table['horizondb cluster authentication password update'] = PasswordUpdate(loader=self)
self.command_table['horizondb cluster pool create'] = PoolCreate(loader=self)
self.command_table['horizondb cluster pool update'] = PoolUpdate(loader=self)
self.command_table['horizondb cluster private-link-resource show'] = PrivateLinkResourceShow(loader=self)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command_group(
"horizondb cluster authentication",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage authentication methods for a HorizonDB cluster.
"""
pass


__all__ = ["__CMDGroup"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
from ._list import *
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command(
"horizondb cluster authentication list",
is_preview=True,
)
class List(AAZCommand):
"""List authentication methods for a HorizonDB cluster.

:example: List cluster authentication methods
az horizondb cluster authentication list --resource-group example-resource-group --cluster-name example-cluster
"""

_aaz_info = {
"version": "2026-10-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.horizondb/clusters/{}/authentications", "2026-10-01-preview"],
]
}

AZ_SUPPORT_PAGINATION = True

def _handler(self, command_args):
super()._handler(command_args)
return self.build_paging(self._execute_operations, self._output)

_args_schema = None

@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)

# define Arg Group ""

_args_schema = cls._args_schema
_args_schema.cluster_name = AAZStrArg(
options=["--cluster-name"],
help="The name of the HorizonDB cluster.",
required=True,
fmt=AAZStrArgFormat(
pattern="^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?$",
max_length=63,
min_length=1,
),
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
return cls._args_schema

def _execute_operations(self):
self.pre_operations()
self.AuthenticationsList(ctx=self.ctx)()
self.post_operations()

@register_callback
def pre_operations(self):
pass

@register_callback
def post_operations(self):
pass

def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True)
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
return result, next_link

class AuthenticationsList(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"

def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)

return self.on_error(session.http_response)

@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/authentications",
**self.url_parameters
)

@property
def method(self):
return "GET"

@property
def error_format(self):
return "MgmtErrorFormat"

@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"clusterName", self.ctx.args.cluster_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters

@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2026-10-01-preview",
required=True,
),
}
return parameters

@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters

def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)

_schema_on_200 = None

@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200

cls._schema_on_200 = AAZObjectType()

_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)

value = cls._schema_on_200.value
value.Element = AAZObjectType()

_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)

properties = cls._schema_on_200.value.Element.properties
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.state = AAZStrType(
flags={"read_only": True},
)

system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)

return cls._schema_on_200


class _ListHelper:
"""Helper class for List"""


__all__ = ["List"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command_group(
"horizondb cluster authentication password",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage password authentication settings for a HorizonDB cluster.
"""
pass


__all__ = ["__CMDGroup"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
from ._create import *
from ._show import *
from ._update import *
from ._wait import *
Loading
Loading