diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_available_region.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_available_region.py index 23b2f9530d4..0572b5f0fc9 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_available_region.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_available_region.py @@ -16,12 +16,15 @@ ) class AvailableRegion(AAZCommand): """List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. + + :example: ListAvailableClusters + az eventhubs cluster available-region """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/microsoft.eventhub/availableclusterregions", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.eventhub/availableclusterregions", "2026-07-01-preview"], ] } @@ -98,7 +101,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_create.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_create.py index 99b6097f7ad..2df9c74608e 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_create.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_create.py @@ -16,12 +16,15 @@ ) class Create(AAZCommand): """Create an instance of an Event Hubs Cluster. + + :example: ClusterPut + az eventhubs cluster create --resource-group myResourceGroup --cluster-name testCluster --location South Central US --sku Dedicated --capacity 1 --tags "{tag1:value1,tag2:value2}" """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}", "2026-07-01-preview"], ] } @@ -205,7 +208,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_delete.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_delete.py index 307ac3bb511..a3449ef1670 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_delete.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_delete.py @@ -17,12 +17,15 @@ ) class Delete(AAZCommand): """Delete an existing Event Hubs Cluster. This operation is idempotent. + + :example: ClusterDelete + az eventhubs cluster delete --resource-group myResourceGroup --cluster-name testCluster """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}", "2026-07-01-preview"], ] } @@ -144,7 +147,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_list.py index 748adc75b35..0fccd64509f 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_list.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_list.py @@ -16,13 +16,19 @@ ) class List(AAZCommand): """List the available Event Hubs Clusters within an ARM resource group + + :example: ClustersListBySubscription + az eventhubs cluster list + + :example: ClustersListByResourceGroup + az eventhubs cluster list --resource-group myResourceGroup """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/microsoft.eventhub/clusters", "2026-01-01"], - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.eventhub/clusters", "2026-07-01-preview"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters", "2026-07-01-preview"], ] } @@ -109,7 +115,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } @@ -286,7 +292,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_show.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_show.py index ae93d99b78a..4675b44232c 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_show.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_show.py @@ -16,12 +16,15 @@ ) class Show(AAZCommand): """Get the resource description of the specified Event Hubs Cluster. + + :example: ClusterGet + az eventhubs cluster show --resource-group myResourceGroup --cluster-name testCluster """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}", "2026-07-01-preview"], ] } @@ -121,7 +124,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_update.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_update.py index e7e82136a2b..0dd0c477dc0 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_update.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_update.py @@ -16,12 +16,15 @@ ) class Update(AAZCommand): """Update an instance of an Event Hubs Cluster. + + :example: ClusterPut + az eventhubs cluster update --resource-group myResourceGroup --cluster-name testCluster """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}", "2026-07-01-preview"], ] } @@ -92,7 +95,6 @@ def _build_arguments_schema(cls, *args, **kwargs): arg_group="Properties", help="Provisioning state of the Cluster.", ) - _args_schema.supports_scaling = AAZBoolArg( options=["--supports-scaling"], arg_group="Properties", @@ -204,7 +206,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } @@ -303,7 +305,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_wait.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_wait.py index bd33124adca..dfaf7494058 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_wait.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/_wait.py @@ -20,7 +20,7 @@ class Wait(AAZWaitCommand): _aaz_info = { "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}", "2026-07-01-preview"], ] } @@ -120,7 +120,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/namespace/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/namespace/_list.py index 5829813ca37..f5f4e038a89 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/namespace/_list.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/namespace/_list.py @@ -16,12 +16,15 @@ ) class List(AAZCommand): """List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. + + :example: ListNamespacesInCluster + az eventhubs cluster namespace list --resource-group myResourceGroup --cluster-name testCluster """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}/namespaces", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}/namespaces", "2026-07-01-preview"], ] } @@ -120,7 +123,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/quota_configuration/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/quota_configuration/__cmd_group.py new file mode 100644 index 00000000000..7298231e7a4 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/quota_configuration/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "eventhubs cluster quota-configuration", +) +class __CMDGroup(AAZCommandGroup): + """Manage quota and settings configuration of an Event Hubs Dedicated Cluster. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/quota_configuration/__init__.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/quota_configuration/__init__.py new file mode 100644 index 00000000000..97ec8f8a0c1 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/quota_configuration/__init__.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# 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 ._show import * +from ._update import * diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/quota_configuration/_show.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/quota_configuration/_show.py new file mode 100644 index 00000000000..9603fb49a32 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/quota_configuration/_show.py @@ -0,0 +1,172 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "eventhubs cluster quota-configuration show", +) +class Show(AAZCommand): + """Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas and settings imposed on the cluster. + + :example: ClustersQuotasConfigurationGet + az eventhubs cluster quota-configuration show --resource-group myResourceGroup --cluster-name testCluster + """ + + _aaz_info = { + "version": "2026-07-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}/quotaconfiguration/default", "2026-07-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return 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 Event Hubs Cluster.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ConfigurationGet(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, client_flatten=True) + return result + + class ConfigurationGet(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.EventHub/clusters/{clusterName}/quotaConfiguration/default", + **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-07-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.settings = AAZDictType() + + settings = cls._schema_on_200.settings + settings.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/quota_configuration/_update.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/quota_configuration/_update.py new file mode 100644 index 00000000000..e0fe28e23a1 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/quota_configuration/_update.py @@ -0,0 +1,207 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "eventhubs cluster quota-configuration update", +) +class Update(AAZCommand): + """Update all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings not specified in the request body unmodified. + + :example: ClustersQuotasConfigurationPatch + az eventhubs cluster quota-configuration update --resource-group ArunMonocle --cluster-name testCluster --settings "{eventhub-per-namespace-quota:20,namespaces-per-cluster-quota:200}" + """ + + _aaz_info = { + "version": "2026-07-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}/quotaconfiguration/default", "2026-07-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return 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 Event Hubs Cluster.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Parameters" + + _args_schema = cls._args_schema + _args_schema.settings = AAZDictArg( + options=["--settings"], + arg_group="Parameters", + help="All possible Cluster settings - a collection of key/value paired settings which apply to quotas and configurations imposed on the cluster.", + ) + + settings = cls._args_schema.settings + settings.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ConfigurationPatch(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, client_flatten=True) + return result + + class ConfigurationPatch(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, 201]: + return self.on_200_201(session) + if session.http_response.status_code in [202]: + return self.on_202(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/quotaConfiguration/default", + **self.url_parameters + ) + + @property + def method(self): + return "PATCH" + + @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-07-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("settings", AAZDictType, ".settings") + + settings = _builder.get(".settings") + if settings is not None: + settings.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.settings = AAZDictType() + + settings = cls._schema_on_200_201.settings + settings.Element = AAZStrType() + + return cls._schema_on_200_201 + + def on_202(self, session): + pass + + +class _UpdateHelper: + """Helper class for Update""" + + +__all__ = ["Update"] diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/__cmd_group.py new file mode 100644 index 00000000000..db8a7b32c46 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "eventhubs cluster upgrade-preference", +) +class __CMDGroup(AAZCommandGroup): + """Manage upgrade preferences of an Event Hubs Dedicated Cluster. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/__init__.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/__init__.py new file mode 100644 index 00000000000..ce1022a414e --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/__init__.py @@ -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 ._upgrade_now import * diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/_create.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/_create.py new file mode 100644 index 00000000000..825485f0ded --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/_create.py @@ -0,0 +1,375 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "eventhubs cluster upgrade-preference create", +) +class Create(AAZCommand): + """Create the upgrade preferences for an Event Hubs Dedicated cluster. + + :example: Create or update cluster upgrade preferences + az eventhubs cluster upgrade-preference create --resource-group contoso-rg --cluster-name contoso-cluster --exception-windows "[{action:Allow,date:2026-08-22,duration-minutes:480,start-time-of-day:PT4H}]" --maintenance-windows "[{day-of-week:Saturday,duration-minutes:480,start-time-of-day:PT2H},{day-of-week:Sunday,duration-minutes:480,start-time-of-day:PT2H}]" + """ + + _aaz_info = { + "version": "2026-07-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}/upgradepreferences/default", "2026-07-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return 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 Event Hubs Cluster.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.exception_windows = AAZListArg( + options=["--exception-windows"], + arg_group="Properties", + help="Date-specific exceptions to the recurring maintenance windows.", + ) + _args_schema.maintenance_windows = AAZListArg( + options=["--maintenance-windows"], + arg_group="Properties", + help="Recurring weekly maintenance windows in UTC. At least one window must be supplied when preferences are created or updated. A maximum of two windows can be configured, and their combined duration must be at least 16 hours per week.", + fmt=AAZListArgFormat( + max_length=2, + min_length=1, + ), + ) + + exception_windows = cls._args_schema.exception_windows + exception_windows.Element = AAZObjectArg() + + _element = cls._args_schema.exception_windows.Element + _element.action = AAZStrArg( + options=["action"], + help="Whether the exception blocks or allows upgrades.", + required=True, + enum={"Allow": "Allow", "Block": "Block"}, + ) + _element.date = AAZDateArg( + options=["date"], + help="The UTC date on which the exception starts.", + required=True, + ) + _element.duration_minutes = AAZIntArg( + options=["duration-minutes"], + help="The exception duration in minutes. Allow exceptions must be between 480 and 1440 minutes in 60-minute increments. Block exceptions must be 1440 minutes.", + required=True, + fmt=AAZIntArgFormat( + maximum=1440, + minimum=480, + ), + ) + _element.start_time_of_day = AAZDurationArg( + options=["start-time-of-day"], + help="The UTC time of day at which the exception starts, represented as an ISO 8601 duration since midnight.", + required=True, + ) + + maintenance_windows = cls._args_schema.maintenance_windows + maintenance_windows.Element = AAZObjectArg() + + _element = cls._args_schema.maintenance_windows.Element + _element.day_of_week = AAZStrArg( + options=["day-of-week"], + help="The UTC day of the week on which the maintenance window starts.", + required=True, + enum={"Friday": "Friday", "Monday": "Monday", "Saturday": "Saturday", "Sunday": "Sunday", "Thursday": "Thursday", "Tuesday": "Tuesday", "Wednesday": "Wednesday"}, + ) + _element.duration_minutes = AAZIntArg( + options=["duration-minutes"], + help="The maintenance window duration in minutes. The value must be between 480 and 1440 in 60-minute increments.", + required=True, + fmt=AAZIntArgFormat( + maximum=1440, + minimum=480, + ), + ) + _element.start_time_of_day = AAZDurationArg( + options=["start-time-of-day"], + help="The UTC time of day at which the maintenance window starts, represented as an ISO 8601 duration since midnight.", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.UpgradePreferencesOperationsCreateOrUpdate(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, client_flatten=True) + return result + + class UpgradePreferencesOperationsCreateOrUpdate(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.EventHub/clusters/{clusterName}/upgradePreferences/default", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @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-07-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("exceptionWindows", AAZListType, ".exception_windows") + properties.set_prop("maintenanceWindows", AAZListType, ".maintenance_windows") + + exception_windows = _builder.get(".properties.exceptionWindows") + if exception_windows is not None: + exception_windows.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.exceptionWindows[]") + if _elements is not None: + _elements.set_prop("action", AAZStrType, ".action", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("date", AAZStrType, ".date", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("durationMinutes", AAZIntType, ".duration_minutes", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("startTimeOfDay", AAZStrType, ".start_time_of_day", typ_kwargs={"flags": {"required": True}}) + + maintenance_windows = _builder.get(".properties.maintenanceWindows") + if maintenance_windows is not None: + maintenance_windows.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.maintenanceWindows[]") + if _elements is not None: + _elements.set_prop("dayOfWeek", AAZStrType, ".day_of_week", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("durationMinutes", AAZIntType, ".duration_minutes", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("startTimeOfDay", AAZStrType, ".start_time_of_day", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + 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.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.exception_windows = AAZListType( + serialized_name="exceptionWindows", + ) + properties.maintenance_windows = AAZListType( + serialized_name="maintenanceWindows", + ) + properties.upgrade_status = AAZObjectType( + serialized_name="upgradeStatus", + flags={"read_only": True}, + ) + + exception_windows = cls._schema_on_200.properties.exception_windows + exception_windows.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.exception_windows.Element + _element.action = AAZStrType( + flags={"required": True}, + ) + _element.date = AAZStrType( + flags={"required": True}, + ) + _element.duration_minutes = AAZIntType( + serialized_name="durationMinutes", + flags={"required": True}, + ) + _element.start_time_of_day = AAZStrType( + serialized_name="startTimeOfDay", + flags={"required": True}, + ) + + maintenance_windows = cls._schema_on_200.properties.maintenance_windows + maintenance_windows.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.maintenance_windows.Element + _element.day_of_week = AAZStrType( + serialized_name="dayOfWeek", + flags={"required": True}, + ) + _element.duration_minutes = AAZIntType( + serialized_name="durationMinutes", + flags={"required": True}, + ) + _element.start_time_of_day = AAZStrType( + serialized_name="startTimeOfDay", + flags={"required": True}, + ) + + upgrade_status = cls._schema_on_200.properties.upgrade_status + upgrade_status.completes_at = AAZStrType( + serialized_name="completesAt", + ) + upgrade_status.in_progress = AAZBoolType( + serialized_name="inProgress", + flags={"required": True}, + ) + upgrade_status.pending_upgrade = AAZBoolType( + serialized_name="pendingUpgrade", + flags={"required": True}, + ) + + system_data = cls._schema_on_200.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 _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/_show.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/_show.py new file mode 100644 index 00000000000..0b5fae0300e --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/_show.py @@ -0,0 +1,263 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "eventhubs cluster upgrade-preference show", +) +class Show(AAZCommand): + """Get the upgrade preferences for an Event Hubs Dedicated cluster. + + :example: Get cluster upgrade preferences + az eventhubs cluster upgrade-preference show --resource-group contoso-rg --cluster-name contoso-cluster + """ + + _aaz_info = { + "version": "2026-07-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}/upgradepreferences/default", "2026-07-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return 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 Event Hubs Cluster.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.UpgradePreferencesOperationsGet(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, client_flatten=True) + return result + + class UpgradePreferencesOperationsGet(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.EventHub/clusters/{clusterName}/upgradePreferences/default", + **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-07-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.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.exception_windows = AAZListType( + serialized_name="exceptionWindows", + ) + properties.maintenance_windows = AAZListType( + serialized_name="maintenanceWindows", + ) + properties.upgrade_status = AAZObjectType( + serialized_name="upgradeStatus", + flags={"read_only": True}, + ) + + exception_windows = cls._schema_on_200.properties.exception_windows + exception_windows.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.exception_windows.Element + _element.action = AAZStrType( + flags={"required": True}, + ) + _element.date = AAZStrType( + flags={"required": True}, + ) + _element.duration_minutes = AAZIntType( + serialized_name="durationMinutes", + flags={"required": True}, + ) + _element.start_time_of_day = AAZStrType( + serialized_name="startTimeOfDay", + flags={"required": True}, + ) + + maintenance_windows = cls._schema_on_200.properties.maintenance_windows + maintenance_windows.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.maintenance_windows.Element + _element.day_of_week = AAZStrType( + serialized_name="dayOfWeek", + flags={"required": True}, + ) + _element.duration_minutes = AAZIntType( + serialized_name="durationMinutes", + flags={"required": True}, + ) + _element.start_time_of_day = AAZStrType( + serialized_name="startTimeOfDay", + flags={"required": True}, + ) + + upgrade_status = cls._schema_on_200.properties.upgrade_status + upgrade_status.completes_at = AAZStrType( + serialized_name="completesAt", + ) + upgrade_status.in_progress = AAZBoolType( + serialized_name="inProgress", + flags={"required": True}, + ) + upgrade_status.pending_upgrade = AAZBoolType( + serialized_name="pendingUpgrade", + flags={"required": True}, + ) + + system_data = cls._schema_on_200.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 _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/_update.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/_update.py new file mode 100644 index 00000000000..f81dcbb8eb7 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/_update.py @@ -0,0 +1,515 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "eventhubs cluster upgrade-preference update", +) +class Update(AAZCommand): + """Update the upgrade preferences for an Event Hubs Dedicated cluster. + + :example: Create or update cluster upgrade preferences + az eventhubs cluster upgrade-preference update --resource-group contoso-rg --cluster-name contoso-cluster + """ + + _aaz_info = { + "version": "2026-07-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}/upgradepreferences/default", "2026-07-01-preview"], + ] + } + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return 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 Event Hubs Cluster.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.exception_windows = AAZListArg( + options=["--exception-windows"], + arg_group="Properties", + help="Date-specific exceptions to the recurring maintenance windows.", + nullable=True, + ) + _args_schema.maintenance_windows = AAZListArg( + options=["--maintenance-windows"], + arg_group="Properties", + help="Recurring weekly maintenance windows in UTC. At least one window must be supplied when preferences are created or updated. A maximum of two windows can be configured, and their combined duration must be at least 16 hours per week.", + nullable=True, + fmt=AAZListArgFormat( + max_length=2, + min_length=1, + ), + ) + + exception_windows = cls._args_schema.exception_windows + exception_windows.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.exception_windows.Element + _element.action = AAZStrArg( + options=["action"], + help="Whether the exception blocks or allows upgrades.", + enum={"Allow": "Allow", "Block": "Block"}, + ) + _element.date = AAZDateArg( + options=["date"], + help="The UTC date on which the exception starts.", + ) + _element.duration_minutes = AAZIntArg( + options=["duration-minutes"], + help="The exception duration in minutes. Allow exceptions must be between 480 and 1440 minutes in 60-minute increments. Block exceptions must be 1440 minutes.", + fmt=AAZIntArgFormat( + maximum=1440, + minimum=480, + ), + ) + _element.start_time_of_day = AAZDurationArg( + options=["start-time-of-day"], + help="The UTC time of day at which the exception starts, represented as an ISO 8601 duration since midnight.", + ) + + maintenance_windows = cls._args_schema.maintenance_windows + maintenance_windows.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.maintenance_windows.Element + _element.day_of_week = AAZStrArg( + options=["day-of-week"], + help="The UTC day of the week on which the maintenance window starts.", + enum={"Friday": "Friday", "Monday": "Monday", "Saturday": "Saturday", "Sunday": "Sunday", "Thursday": "Thursday", "Tuesday": "Tuesday", "Wednesday": "Wednesday"}, + ) + _element.duration_minutes = AAZIntArg( + options=["duration-minutes"], + help="The maintenance window duration in minutes. The value must be between 480 and 1440 in 60-minute increments.", + fmt=AAZIntArgFormat( + maximum=1440, + minimum=480, + ), + ) + _element.start_time_of_day = AAZDurationArg( + options=["start-time-of-day"], + help="The UTC time of day at which the maintenance window starts, represented as an ISO 8601 duration since midnight.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.UpgradePreferencesOperationsGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + self.UpgradePreferencesOperationsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class UpgradePreferencesOperationsGet(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.EventHub/clusters/{clusterName}/upgradePreferences/default", + **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-07-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() + _UpdateHelper._build_schema_upgrade_preferences_read(cls._schema_on_200) + + return cls._schema_on_200 + + class UpgradePreferencesOperationsCreateOrUpdate(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.EventHub/clusters/{clusterName}/upgradePreferences/default", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @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-07-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + 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() + _UpdateHelper._build_schema_upgrade_preferences_read(cls._schema_on_200) + + return cls._schema_on_200 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("exceptionWindows", AAZListType, ".exception_windows") + properties.set_prop("maintenanceWindows", AAZListType, ".maintenance_windows") + + exception_windows = _builder.get(".properties.exceptionWindows") + if exception_windows is not None: + exception_windows.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.exceptionWindows[]") + if _elements is not None: + _elements.set_prop("action", AAZStrType, ".action", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("date", AAZStrType, ".date", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("durationMinutes", AAZIntType, ".duration_minutes", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("startTimeOfDay", AAZStrType, ".start_time_of_day", typ_kwargs={"flags": {"required": True}}) + + maintenance_windows = _builder.get(".properties.maintenanceWindows") + if maintenance_windows is not None: + maintenance_windows.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.maintenanceWindows[]") + if _elements is not None: + _elements.set_prop("dayOfWeek", AAZStrType, ".day_of_week", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("durationMinutes", AAZIntType, ".duration_minutes", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("startTimeOfDay", AAZStrType, ".start_time_of_day", typ_kwargs={"flags": {"required": True}}) + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_upgrade_preferences_read = None + + @classmethod + def _build_schema_upgrade_preferences_read(cls, _schema): + if cls._schema_upgrade_preferences_read is not None: + _schema.id = cls._schema_upgrade_preferences_read.id + _schema.name = cls._schema_upgrade_preferences_read.name + _schema.properties = cls._schema_upgrade_preferences_read.properties + _schema.system_data = cls._schema_upgrade_preferences_read.system_data + _schema.type = cls._schema_upgrade_preferences_read.type + return + + cls._schema_upgrade_preferences_read = _schema_upgrade_preferences_read = AAZObjectType() + + upgrade_preferences_read = _schema_upgrade_preferences_read + upgrade_preferences_read.id = AAZStrType( + flags={"read_only": True}, + ) + upgrade_preferences_read.name = AAZStrType( + flags={"read_only": True}, + ) + upgrade_preferences_read.properties = AAZObjectType() + upgrade_preferences_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + upgrade_preferences_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_upgrade_preferences_read.properties + properties.exception_windows = AAZListType( + serialized_name="exceptionWindows", + ) + properties.maintenance_windows = AAZListType( + serialized_name="maintenanceWindows", + ) + properties.upgrade_status = AAZObjectType( + serialized_name="upgradeStatus", + flags={"read_only": True}, + ) + + exception_windows = _schema_upgrade_preferences_read.properties.exception_windows + exception_windows.Element = AAZObjectType() + + _element = _schema_upgrade_preferences_read.properties.exception_windows.Element + _element.action = AAZStrType( + flags={"required": True}, + ) + _element.date = AAZStrType( + flags={"required": True}, + ) + _element.duration_minutes = AAZIntType( + serialized_name="durationMinutes", + flags={"required": True}, + ) + _element.start_time_of_day = AAZStrType( + serialized_name="startTimeOfDay", + flags={"required": True}, + ) + + maintenance_windows = _schema_upgrade_preferences_read.properties.maintenance_windows + maintenance_windows.Element = AAZObjectType() + + _element = _schema_upgrade_preferences_read.properties.maintenance_windows.Element + _element.day_of_week = AAZStrType( + serialized_name="dayOfWeek", + flags={"required": True}, + ) + _element.duration_minutes = AAZIntType( + serialized_name="durationMinutes", + flags={"required": True}, + ) + _element.start_time_of_day = AAZStrType( + serialized_name="startTimeOfDay", + flags={"required": True}, + ) + + upgrade_status = _schema_upgrade_preferences_read.properties.upgrade_status + upgrade_status.completes_at = AAZStrType( + serialized_name="completesAt", + ) + upgrade_status.in_progress = AAZBoolType( + serialized_name="inProgress", + flags={"required": True}, + ) + upgrade_status.pending_upgrade = AAZBoolType( + serialized_name="pendingUpgrade", + flags={"required": True}, + ) + + system_data = _schema_upgrade_preferences_read.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", + ) + + _schema.id = cls._schema_upgrade_preferences_read.id + _schema.name = cls._schema_upgrade_preferences_read.name + _schema.properties = cls._schema_upgrade_preferences_read.properties + _schema.system_data = cls._schema_upgrade_preferences_read.system_data + _schema.type = cls._schema_upgrade_preferences_read.type + + +__all__ = ["Update"] diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/_upgrade_now.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/_upgrade_now.py new file mode 100644 index 00000000000..0076cdef9c0 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/cluster/upgrade_preference/_upgrade_now.py @@ -0,0 +1,268 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "eventhubs cluster upgrade-preference upgrade-now", +) +class UpgradeNow(AAZCommand): + """Starts an immediate eight-hour upgrade override when an upgrade is pending. + + :example: Start an upgrade immediately + az eventhubs cluster upgrade-preference upgrade-now --resource-group contoso-rg --cluster-name contoso-cluster + """ + + _aaz_info = { + "version": "2026-07-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/clusters/{}/upgradepreferences/default/upgradenow", "2026-07-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return 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 Event Hubs Cluster.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.UpgradePreferencesOperationsUpgradeNow(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, client_flatten=True) + return result + + class UpgradePreferencesOperationsUpgradeNow(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) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/upgradePreferences/default/upgradeNow", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @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-07-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.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.exception_windows = AAZListType( + serialized_name="exceptionWindows", + ) + properties.maintenance_windows = AAZListType( + serialized_name="maintenanceWindows", + ) + properties.upgrade_status = AAZObjectType( + serialized_name="upgradeStatus", + flags={"read_only": True}, + ) + + exception_windows = cls._schema_on_200.properties.exception_windows + exception_windows.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.exception_windows.Element + _element.action = AAZStrType( + flags={"required": True}, + ) + _element.date = AAZStrType( + flags={"required": True}, + ) + _element.duration_minutes = AAZIntType( + serialized_name="durationMinutes", + flags={"required": True}, + ) + _element.start_time_of_day = AAZStrType( + serialized_name="startTimeOfDay", + flags={"required": True}, + ) + + maintenance_windows = cls._schema_on_200.properties.maintenance_windows + maintenance_windows.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.maintenance_windows.Element + _element.day_of_week = AAZStrType( + serialized_name="dayOfWeek", + flags={"required": True}, + ) + _element.duration_minutes = AAZIntType( + serialized_name="durationMinutes", + flags={"required": True}, + ) + _element.start_time_of_day = AAZStrType( + serialized_name="startTimeOfDay", + flags={"required": True}, + ) + + upgrade_status = cls._schema_on_200.properties.upgrade_status + upgrade_status.completes_at = AAZStrType( + serialized_name="completesAt", + ) + upgrade_status.in_progress = AAZBoolType( + serialized_name="inProgress", + flags={"required": True}, + ) + upgrade_status.pending_upgrade = AAZBoolType( + serialized_name="pendingUpgrade", + flags={"required": True}, + ) + + system_data = cls._schema_on_200.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 + + def on_204(self, session): + pass + + +class _UpgradeNowHelper: + """Helper class for UpgradeNow""" + + +__all__ = ["UpgradeNow"] diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_create.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_create.py index 16a0c7aa69c..3798eb9a0d1 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_create.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_create.py @@ -16,12 +16,15 @@ ) class Create(AAZCommand): """Create a new Event Hub as a nested resource within a Namespace. + + :example: EHEventHubCreate + az eventhubs eventhub create --resource-group Default-NotificationHubs-AustraliaEast --namespace-name sdk-Namespace-5357 --event-hub-name sdk-EventHub-6547 --destination-name EventHubArchive.AzureBlockBlob --identity "{type:UserAssigned,user-assigned-identity:/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2}" --archive-name-format {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second} --blob-container container --storage-account /subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage --enable-capture True --encoding Avro --capture-interval 120 --capture-size-limit 10485763 --partition-count 4 --status Active --user-metadata key """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}", "2026-07-01-preview"], ] } @@ -184,7 +187,7 @@ def _build_arguments_schema(cls, *args, **kwargs): help="Enumerates the possible values for cleanup policy", enum={"Compact": "Compact", "Delete": "Delete", "DeleteOrCompact": "DeleteOrCompact"}, ) - _args_schema.min_compaction_lag_time_in_minutes = AAZIntArg( + _args_schema.min_compaction_lag_in_mins = AAZIntArg( options=["--min-lag", "--min-compaction-lag-in-mins"], arg_group="RetentionDescription", help="The minimum time a message will remain ineligible for compaction in the log. This value is used when cleanupPolicy is Compact or DeleteOrCompact.", @@ -270,7 +273,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } @@ -340,7 +343,7 @@ def content(self): retention_description = _builder.get(".properties.retentionDescription") if retention_description is not None: retention_description.set_prop("cleanupPolicy", AAZStrType, ".cleanup_policy") - retention_description.set_prop("minCompactionLagTimeInMinutes", AAZIntType, ".min_compaction_lag_time_in_minutes") + retention_description.set_prop("minCompactionLagTimeInMinutes", AAZIntType, ".min_compaction_lag_in_mins") retention_description.set_prop("retentionTimeInHours", AAZIntType, ".retention_time_in_hours") retention_description.set_prop("tombstoneRetentionTimeInHours", AAZIntType, ".tombstone_retention_time_in_hours") diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_delete.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_delete.py index 5b049439be2..c727cdd2938 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_delete.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_delete.py @@ -12,16 +12,19 @@ @register_command( - "eventhubs eventhub delete" + "eventhubs eventhub delete", ) class Delete(AAZCommand): """Delete an Event Hub from the specified Namespace and resource group. + + :example: EventHubDelete + az eventhubs eventhub delete --resource-group ArunMonocle --namespace-name sdk-Namespace-5357 --event-hub-name sdk-EventHub-6547 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}", "2026-07-01-preview"], ] } @@ -134,7 +137,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_list.py index 1fe1c9a6df0..9fabd014635 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_list.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_list.py @@ -16,12 +16,15 @@ ) class List(AAZCommand): """List all the Event Hubs in a Namespace. + + :example: EventHubsListAll + az eventhubs eventhub list --resource-group Default-NotificationHubs-AustraliaEast --namespace-name sdk-Namespace-5357 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs", "2026-07-01-preview"], ] } @@ -145,7 +148,7 @@ def query_parameters(self): "$top", self.ctx.args.top, ), **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_show.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_show.py index 06a5085cd6d..f172a255f9b 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_show.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_show.py @@ -16,12 +16,15 @@ ) class Show(AAZCommand): """Get an Event Hubs description for the specified Event Hub. + + :example: EventHubGet + az eventhubs eventhub show --resource-group Default-NotificationHubs-AustraliaEast --namespace-name sdk-Namespace-716 --event-hub-name sdk-EventHub-10 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}", "2026-07-01-preview"], ] } @@ -136,7 +139,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_update.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_update.py index 3797eb9fac1..1f4ea7f6a2e 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_update.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_update.py @@ -16,12 +16,15 @@ ) class Update(AAZCommand): """Update a new Event Hub as a nested resource within a Namespace. + + :example: EHEventHubCreate + az eventhubs eventhub update --resource-group Default-NotificationHubs-AustraliaEast --namespace-name sdk-Namespace-5357 --event-hub-name sdk-EventHub-6547 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}", "2026-07-01-preview"], ] } @@ -197,7 +200,7 @@ def _build_arguments_schema(cls, *args, **kwargs): nullable=True, enum={"Compact": "Compact", "Delete": "Delete", "DeleteOrCompact": "DeleteOrCompact"}, ) - _args_schema.min_compaction_lag_time_in_minutes = AAZIntArg( + _args_schema.min_compaction_lag_in_mins = AAZIntArg( options=["--min-lag", "--min-compaction-lag-in-mins"], arg_group="RetentionDescription", help="The minimum time a message will remain ineligible for compaction in the log. This value is used when cleanupPolicy is Compact or DeleteOrCompact.", @@ -299,7 +302,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } @@ -386,7 +389,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } @@ -488,7 +491,7 @@ def _update_instance(self, instance): retention_description = _builder.get(".properties.retentionDescription") if retention_description is not None: retention_description.set_prop("cleanupPolicy", AAZStrType, ".cleanup_policy") - retention_description.set_prop("minCompactionLagTimeInMinutes", AAZIntType, ".min_compaction_lag_time_in_minutes") + retention_description.set_prop("minCompactionLagTimeInMinutes", AAZIntType, ".min_compaction_lag_in_mins") retention_description.set_prop("retentionTimeInHours", AAZIntType, ".retention_time_in_hours") retention_description.set_prop("tombstoneRetentionTimeInHours", AAZIntType, ".tombstone_retention_time_in_hours") diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_create.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_create.py index 00a9ef43311..665ab28e8eb 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_create.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_create.py @@ -16,12 +16,15 @@ ) class Create(AAZCommand): """Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect. + + :example: EventHubAuthorizationRuleCreate + az eventhubs eventhub authorization-rule create --resource-group ArunMonocle --namespace-name sdk-Namespace-960 --eventhub-name sdk-EventHub-532 --authorization-rule-name sdk-Authrules-2513 --rights "[Listen,Send]" """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/authorizationrules/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/authorizationrules/{}", "2026-07-01-preview"], ] } @@ -160,7 +163,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_delete.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_delete.py index 6a6a2dc73cd..bdc75ddf629 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_delete.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_delete.py @@ -16,12 +16,15 @@ ) class Delete(AAZCommand): """Delete an Event Hub AuthorizationRule. + + :example: EventHubAuthorizationRuleDelete + az eventhubs eventhub authorization-rule delete --resource-group ArunMonocle --namespace-name sdk-Namespace-960 --eventhub-name sdk-EventHub-532 --authorization-rule-name sdk-Authrules-2513 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/authorizationrules/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/authorizationrules/{}", "2026-07-01-preview"], ] } @@ -147,7 +150,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_list.py index 15a1b1b7a47..c065bf45372 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_list.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_list.py @@ -16,12 +16,15 @@ ) class List(AAZCommand): """List the authorization rules for an Event Hub. + + :example: EventHubAuthorizationRuleListAll + az eventhubs eventhub authorization-rule list --resource-group ArunMonocle --namespace-name sdk-Namespace-960 --eventhub-name sdk-EventHub-532 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/authorizationrules", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/authorizationrules", "2026-07-01-preview"], ] } @@ -136,7 +139,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_show.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_show.py index 02e789289d5..b7eef9135d7 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_show.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_show.py @@ -16,12 +16,15 @@ ) class Show(AAZCommand): """Get an AuthorizationRule for an Event Hub by rule name. + + :example: EventHubAuthorizationRuleGet + az eventhubs eventhub authorization-rule show --resource-group ArunMonocle --namespace-name sdk-Namespace-960 --eventhub-name sdk-EventHub-532 --authorization-rule-name sdk-Authrules-2513 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/authorizationrules/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/authorizationrules/{}", "2026-07-01-preview"], ] } @@ -149,7 +152,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_update.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_update.py index e5f6b6ca91a..08b64d6618f 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_update.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/_update.py @@ -16,12 +16,15 @@ ) class Update(AAZCommand): """Update an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect. + + :example: EventHubAuthorizationRuleCreate + az eventhubs eventhub authorization-rule update --resource-group ArunMonocle --namespace-name sdk-Namespace-960 --eventhub-name sdk-EventHub-532 --authorization-rule-name sdk-Authrules-2513 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/authorizationrules/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/authorizationrules/{}", "2026-07-01-preview"], ] } @@ -179,7 +182,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } @@ -270,7 +273,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/keys/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/keys/_list.py index e5967b5292a..8fbb48f09f9 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/keys/_list.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/keys/_list.py @@ -16,12 +16,15 @@ ) class List(AAZCommand): """Gets the ACS and SAS connection strings for the Event Hub. + + :example: EventHubAuthorizationRuleListKey + az eventhubs eventhub authorization-rule keys list --resource-group ArunMonocle --namespace-name sdk-namespace-960 --eventhub-name sdk-EventHub-532 --authorization-rule-name sdk-Authrules-2513 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/authorizationrules/{}/listkeys", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/authorizationrules/{}/listkeys", "2026-07-01-preview"], ] } @@ -146,7 +149,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/keys/_renew.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/keys/_renew.py index f289de99b4c..f89e5747677 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/keys/_renew.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/authorization_rule/keys/_renew.py @@ -16,12 +16,15 @@ ) class Renew(AAZCommand): """Regenerates the ACS and SAS connection strings for the Event Hub. + + :example: EventHubAuthorizationRuleRegenerateKey + az eventhubs eventhub authorization-rule keys renew --resource-group ArunMonocle --namespace-name sdk-namespace-960 --eventhub-name sdk-EventHub-532 --authorization-rule-name sdk-Authrules-1534 --key PrimaryKey """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/authorizationrules/{}/regeneratekeys", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/authorizationrules/{}/regeneratekeys", "2026-07-01-preview"], ] } @@ -165,7 +168,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_create.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_create.py index 0adab594b90..cfdde7abb49 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_create.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_create.py @@ -16,12 +16,15 @@ ) class Create(AAZCommand): """Create an Event Hubs consumer group as a nested resource within a Namespace. + + :example: ConsumerGroupCreate + az eventhubs eventhub consumer-group create --resource-group ArunMonocle --namespace-name sdk-Namespace-2661 --eventhub-name sdk-EventHub-6681 --consumer-group-name sdk-ConsumerGroup-5563 --user-metadata New consumergroup """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/consumergroups/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/consumergroups/{}", "2026-07-01-preview"], ] } @@ -156,7 +159,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_delete.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_delete.py index f09cf491c3d..62c3446f6da 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_delete.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_delete.py @@ -16,12 +16,15 @@ ) class Delete(AAZCommand): """Delete a consumer group from the specified Event Hub and resource group. + + :example: ConsumerGroupDelete + az eventhubs eventhub consumer-group delete --resource-group ArunMonocle --namespace-name sdk-Namespace-2661 --eventhub-name sdk-EventHub-6681 --consumer-group-name sdk-ConsumerGroup-5563 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/consumergroups/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/consumergroups/{}", "2026-07-01-preview"], ] } @@ -148,7 +151,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_list.py index 4623cbe9c77..7855dbf3a99 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_list.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_list.py @@ -16,12 +16,15 @@ ) class List(AAZCommand): """List all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + + :example: ConsumerGroupsListAll + az eventhubs eventhub consumer-group list --resource-group ArunMonocle --namespace-name sdk-Namespace-2661 --eventhub-name sdk-EventHub-6681 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/consumergroups", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/consumergroups", "2026-07-01-preview"], ] } @@ -158,7 +161,7 @@ def query_parameters(self): "$top", self.ctx.args.top, ), **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_show.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_show.py index a0709c8b770..31b3882365b 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_show.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_show.py @@ -16,12 +16,15 @@ ) class Show(AAZCommand): """Get a description for the specified consumer group. + + :example: ConsumerGroupGet + az eventhubs eventhub consumer-group show --resource-group ArunMonocle --namespace-name sdk-Namespace-2661 --eventhub-name sdk-EventHub-6681 --consumer-group-name sdk-ConsumerGroup-5563 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/consumergroups/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/consumergroups/{}", "2026-07-01-preview"], ] } @@ -150,7 +153,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_update.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_update.py index a058cbf9ef5..4436c6346b9 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_update.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/consumer_group/_update.py @@ -16,12 +16,15 @@ ) class Update(AAZCommand): """Update an Event Hubs consumer group as a nested resource within a Namespace. + + :example: ConsumerGroupCreate + az eventhubs eventhub consumer-group update --resource-group ArunMonocle --namespace-name sdk-Namespace-2661 --eventhub-name sdk-EventHub-6681 --consumer-group-name sdk-ConsumerGroup-5563 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/consumergroups/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/consumergroups/{}", "2026-07-01-preview"], ] } @@ -175,7 +178,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } @@ -266,7 +269,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/__cmd_group.py new file mode 100644 index 00000000000..16a174b5f56 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "eventhubs eventhub fabric-shortcut", +) +class __CMDGroup(AAZCommandGroup): + """Manage Fabric Shortcut + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/__init__.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/__init__.py new file mode 100644 index 00000000000..5375fa7d444 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/__init__.py @@ -0,0 +1,18 @@ +# -------------------------------------------------------------------------------------------- +# 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 ._approve import * +from ._create import * +from ._delete import * +from ._list import * +from ._reject import * +from ._show import * +from ._update import * diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_approve.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_approve.py new file mode 100644 index 00000000000..1046f2b011e --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_approve.py @@ -0,0 +1,282 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "eventhubs eventhub fabric-shortcut approve", +) +class Approve(AAZCommand): + """Approves a Microsoft Fabric shortcut. + + :example: Approve a Fabric shortcut + az eventhubs eventhub fabric-shortcut approve --resource-group contoso-rg --namespace-name contoso-eventhub --event-hub-name orders --fabric-shortcut-name orders-shortcut + """ + + _aaz_info = { + "version": "2026-07-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/fabricshortcuts/{}/approve", "2026-07-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return 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.event_hub_name = AAZStrArg( + options=["--event-hub-name"], + help="The Event Hub name", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + max_length=256, + min_length=1, + ), + ) + _args_schema.fabric_shortcut_name = AAZStrArg( + options=["--fabric-shortcut-name"], + help="The Microsoft Fabric shortcut name.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + pattern="^.+$", + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="The Namespace name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$", + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FabricShortcutsApprove(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, client_flatten=True) + return result + + class FabricShortcutsApprove(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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/fabricShortcuts/{fabricShortcutName}/approve", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "eventHubName", self.ctx.args.event_hub_name, + required=True, + ), + **self.serialize_url_param( + "fabricShortcutName", self.ctx.args.fabric_shortcut_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_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-07-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.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.configuration = AAZObjectType( + flags={"required": True}, + ) + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.modified_at = AAZStrType( + serialized_name="modifiedAt", + flags={"read_only": True}, + ) + properties.shortcut_status = AAZStrType( + serialized_name="shortcutStatus", + ) + properties.shortcut_type = AAZStrType( + serialized_name="shortcutType", + ) + properties.status_description = AAZStrType( + serialized_name="statusDescription", + flags={"read_only": True}, + ) + + configuration = cls._schema_on_200.properties.configuration + configuration.artifact_id = AAZStrType( + serialized_name="artifactId", + flags={"required": True}, + ) + configuration.artifact_name = AAZStrType( + serialized_name="artifactName", + ) + configuration.log_analytics_resource_id = AAZStrType( + serialized_name="logAnalyticsResourceId", + ) + configuration.premium_capacity_id = AAZStrType( + serialized_name="premiumCapacityId", + ) + configuration.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"required": True}, + ) + configuration.workspace_id = AAZStrType( + serialized_name="workspaceId", + flags={"required": True}, + ) + configuration.workspace_name = AAZStrType( + serialized_name="workspaceName", + ) + + system_data = cls._schema_on_200.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 _ApproveHelper: + """Helper class for Approve""" + + +__all__ = ["Approve"] diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_create.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_create.py new file mode 100644 index 00000000000..350cc5089f3 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_create.py @@ -0,0 +1,363 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "eventhubs eventhub fabric-shortcut create", +) +class Create(AAZCommand): + """Create a Microsoft Fabric shortcut. + + :example: Create or update a Fabric shortcut + az eventhubs eventhub fabric-shortcut create --resource-group contoso-rg --namespace-name contoso-eventhub --event-hub-name orders --fabric-shortcut-name orders-shortcut --configuration "{artifact-id:33333333-3333-3333-3333-333333333333,artifact-name:orders-eventstream,premium-capacity-id:44444444-4444-4444-4444-444444444444,tenant-id:11111111-1111-1111-1111-111111111111,workspace-id:22222222-2222-2222-2222-222222222222,workspace-name:contoso-workspace}" --shortcut-status Pending --shortcut-type Entity + """ + + _aaz_info = { + "version": "2026-07-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/fabricshortcuts/{}", "2026-07-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return 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.event_hub_name = AAZStrArg( + options=["--event-hub-name"], + help="The Event Hub name", + required=True, + fmt=AAZStrArgFormat( + max_length=256, + min_length=1, + ), + ) + _args_schema.fabric_shortcut_name = AAZStrArg( + options=["-n", "--name", "--fabric-shortcut-name"], + help="The Microsoft Fabric shortcut name.", + required=True, + fmt=AAZStrArgFormat( + pattern="^.+$", + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="The Namespace name", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$", + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.configuration = AAZObjectArg( + options=["--configuration"], + arg_group="Properties", + help="Microsoft Fabric workspace and artifact configuration.", + ) + _args_schema.shortcut_status = AAZStrArg( + options=["--shortcut-status"], + arg_group="Properties", + help="The current shortcut status. Only Pending can be supplied on create or update.", + enum={"Approved": "Approved", "Pending": "Pending", "Rejected": "Rejected"}, + ) + _args_schema.shortcut_type = AAZStrArg( + options=["--shortcut-type"], + arg_group="Properties", + help="The type of the shortcut.", + enum={"Entity": "Entity", "Network": "Network"}, + ) + + configuration = cls._args_schema.configuration + configuration.artifact_id = AAZUuidArg( + options=["artifact-id"], + help="The Microsoft Fabric artifact ID.", + required=True, + ) + configuration.artifact_name = AAZStrArg( + options=["artifact-name"], + help="The Microsoft Fabric artifact name.", + ) + configuration.log_analytics_resource_id = AAZResourceIdArg( + options=["log-analytics-resource-id"], + help="The resource ID of the Log Analytics workspace.", + ) + configuration.premium_capacity_id = AAZStrArg( + options=["premium-capacity-id"], + help="The Microsoft Fabric premium capacity ID.", + ) + configuration.tenant_id = AAZUuidArg( + options=["tenant-id"], + help="The Microsoft Fabric tenant ID.", + required=True, + ) + configuration.workspace_id = AAZUuidArg( + options=["workspace-id"], + help="The Microsoft Fabric workspace ID.", + required=True, + ) + configuration.workspace_name = AAZStrArg( + options=["workspace-name"], + help="The Microsoft Fabric workspace name.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FabricShortcutsCreateOrUpdate(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, client_flatten=True) + return result + + class FabricShortcutsCreateOrUpdate(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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/fabricShortcuts/{fabricShortcutName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "eventHubName", self.ctx.args.event_hub_name, + required=True, + ), + **self.serialize_url_param( + "fabricShortcutName", self.ctx.args.fabric_shortcut_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_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-07-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("configuration", AAZObjectType, ".configuration", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("shortcutStatus", AAZStrType, ".shortcut_status") + properties.set_prop("shortcutType", AAZStrType, ".shortcut_type") + + configuration = _builder.get(".properties.configuration") + if configuration is not None: + configuration.set_prop("artifactId", AAZStrType, ".artifact_id", typ_kwargs={"flags": {"required": True}}) + configuration.set_prop("artifactName", AAZStrType, ".artifact_name") + configuration.set_prop("logAnalyticsResourceId", AAZStrType, ".log_analytics_resource_id") + configuration.set_prop("premiumCapacityId", AAZStrType, ".premium_capacity_id") + configuration.set_prop("tenantId", AAZStrType, ".tenant_id", typ_kwargs={"flags": {"required": True}}) + configuration.set_prop("workspaceId", AAZStrType, ".workspace_id", typ_kwargs={"flags": {"required": True}}) + configuration.set_prop("workspaceName", AAZStrType, ".workspace_name") + + return self.serialize_content(_content_value) + + 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.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.configuration = AAZObjectType( + flags={"required": True}, + ) + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.modified_at = AAZStrType( + serialized_name="modifiedAt", + flags={"read_only": True}, + ) + properties.shortcut_status = AAZStrType( + serialized_name="shortcutStatus", + ) + properties.shortcut_type = AAZStrType( + serialized_name="shortcutType", + ) + properties.status_description = AAZStrType( + serialized_name="statusDescription", + flags={"read_only": True}, + ) + + configuration = cls._schema_on_200.properties.configuration + configuration.artifact_id = AAZStrType( + serialized_name="artifactId", + flags={"required": True}, + ) + configuration.artifact_name = AAZStrType( + serialized_name="artifactName", + ) + configuration.log_analytics_resource_id = AAZStrType( + serialized_name="logAnalyticsResourceId", + ) + configuration.premium_capacity_id = AAZStrType( + serialized_name="premiumCapacityId", + ) + configuration.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"required": True}, + ) + configuration.workspace_id = AAZStrType( + serialized_name="workspaceId", + flags={"required": True}, + ) + configuration.workspace_name = AAZStrType( + serialized_name="workspaceName", + ) + + system_data = cls._schema_on_200.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 _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_delete.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_delete.py new file mode 100644 index 00000000000..a2d2be72db3 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_delete.py @@ -0,0 +1,166 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "eventhubs eventhub fabric-shortcut delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a Microsoft Fabric shortcut. + + :example: Delete a Fabric shortcut + az eventhubs eventhub fabric-shortcut delete --resource-group contoso-rg --namespace-name contoso-eventhub --event-hub-name orders --fabric-shortcut-name orders-shortcut + """ + + _aaz_info = { + "version": "2026-07-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/fabricshortcuts/{}", "2026-07-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _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.event_hub_name = AAZStrArg( + options=["--event-hub-name"], + help="The Event Hub name", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + max_length=256, + min_length=1, + ), + ) + _args_schema.fabric_shortcut_name = AAZStrArg( + options=["-n", "--name", "--fabric-shortcut-name"], + help="The Microsoft Fabric shortcut name.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + pattern="^.+$", + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="The Namespace name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$", + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FabricShortcutsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class FabricShortcutsDelete(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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/fabricShortcuts/{fabricShortcutName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "eventHubName", self.ctx.args.event_hub_name, + required=True, + ), + **self.serialize_url_param( + "fabricShortcutName", self.ctx.args.fabric_shortcut_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_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-07-01-preview", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_list.py new file mode 100644 index 00000000000..9e1c4915880 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_list.py @@ -0,0 +1,280 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "eventhubs eventhub fabric-shortcut list", +) +class List(AAZCommand): + """List Microsoft Fabric shortcuts for an Event Hub. + + :example: List Fabric shortcuts for an Event Hub + az eventhubs eventhub fabric-shortcut list --resource-group contoso-rg --namespace-name contoso-eventhub --event-hub-name orders + """ + + _aaz_info = { + "version": "2026-07-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/fabricshortcuts", "2026-07-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.event_hub_name = AAZStrArg( + options=["--event-hub-name"], + help="The Event Hub name", + required=True, + fmt=AAZStrArgFormat( + max_length=256, + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="The Namespace name", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$", + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FabricShortcutsListByEventHub(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 FabricShortcutsListByEventHub(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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/fabricShortcuts", + **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( + "eventHubName", self.ctx.args.event_hub_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_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-07-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.location = 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.configuration = AAZObjectType( + flags={"required": True}, + ) + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.modified_at = AAZStrType( + serialized_name="modifiedAt", + flags={"read_only": True}, + ) + properties.shortcut_status = AAZStrType( + serialized_name="shortcutStatus", + ) + properties.shortcut_type = AAZStrType( + serialized_name="shortcutType", + ) + properties.status_description = AAZStrType( + serialized_name="statusDescription", + flags={"read_only": True}, + ) + + configuration = cls._schema_on_200.value.Element.properties.configuration + configuration.artifact_id = AAZStrType( + serialized_name="artifactId", + flags={"required": True}, + ) + configuration.artifact_name = AAZStrType( + serialized_name="artifactName", + ) + configuration.log_analytics_resource_id = AAZStrType( + serialized_name="logAnalyticsResourceId", + ) + configuration.premium_capacity_id = AAZStrType( + serialized_name="premiumCapacityId", + ) + configuration.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"required": True}, + ) + configuration.workspace_id = AAZStrType( + serialized_name="workspaceId", + flags={"required": True}, + ) + configuration.workspace_name = AAZStrType( + serialized_name="workspaceName", + ) + + 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"] diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_reject.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_reject.py new file mode 100644 index 00000000000..f4b33ce31e6 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_reject.py @@ -0,0 +1,282 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "eventhubs eventhub fabric-shortcut reject", +) +class Reject(AAZCommand): + """Rejects a Microsoft Fabric shortcut. + + :example: Reject a Fabric shortcut + az eventhubs eventhub fabric-shortcut reject --resource-group contoso-rg --namespace-name contoso-eventhub --event-hub-name orders --fabric-shortcut-name orders-shortcut + """ + + _aaz_info = { + "version": "2026-07-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/fabricshortcuts/{}/reject", "2026-07-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return 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.event_hub_name = AAZStrArg( + options=["--event-hub-name"], + help="The Event Hub name", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + max_length=256, + min_length=1, + ), + ) + _args_schema.fabric_shortcut_name = AAZStrArg( + options=["--fabric-shortcut-name"], + help="The Microsoft Fabric shortcut name.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + pattern="^.+$", + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="The Namespace name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$", + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FabricShortcutsReject(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, client_flatten=True) + return result + + class FabricShortcutsReject(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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/fabricShortcuts/{fabricShortcutName}/reject", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "eventHubName", self.ctx.args.event_hub_name, + required=True, + ), + **self.serialize_url_param( + "fabricShortcutName", self.ctx.args.fabric_shortcut_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_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-07-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.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.configuration = AAZObjectType( + flags={"required": True}, + ) + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.modified_at = AAZStrType( + serialized_name="modifiedAt", + flags={"read_only": True}, + ) + properties.shortcut_status = AAZStrType( + serialized_name="shortcutStatus", + ) + properties.shortcut_type = AAZStrType( + serialized_name="shortcutType", + ) + properties.status_description = AAZStrType( + serialized_name="statusDescription", + flags={"read_only": True}, + ) + + configuration = cls._schema_on_200.properties.configuration + configuration.artifact_id = AAZStrType( + serialized_name="artifactId", + flags={"required": True}, + ) + configuration.artifact_name = AAZStrType( + serialized_name="artifactName", + ) + configuration.log_analytics_resource_id = AAZStrType( + serialized_name="logAnalyticsResourceId", + ) + configuration.premium_capacity_id = AAZStrType( + serialized_name="premiumCapacityId", + ) + configuration.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"required": True}, + ) + configuration.workspace_id = AAZStrType( + serialized_name="workspaceId", + flags={"required": True}, + ) + configuration.workspace_name = AAZStrType( + serialized_name="workspaceName", + ) + + system_data = cls._schema_on_200.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 _RejectHelper: + """Helper class for Reject""" + + +__all__ = ["Reject"] diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_show.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_show.py new file mode 100644 index 00000000000..0fe3cc46668 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_show.py @@ -0,0 +1,282 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "eventhubs eventhub fabric-shortcut show", +) +class Show(AAZCommand): + """Get a Microsoft Fabric shortcut. + + :example: Get a Fabric shortcut + az eventhubs eventhub fabric-shortcut show --resource-group contoso-rg --namespace-name contoso-eventhub --event-hub-name orders --fabric-shortcut-name orders-shortcut + """ + + _aaz_info = { + "version": "2026-07-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/fabricshortcuts/{}", "2026-07-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return 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.event_hub_name = AAZStrArg( + options=["--event-hub-name"], + help="The Event Hub name", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + max_length=256, + min_length=1, + ), + ) + _args_schema.fabric_shortcut_name = AAZStrArg( + options=["-n", "--name", "--fabric-shortcut-name"], + help="The Microsoft Fabric shortcut name.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + pattern="^.+$", + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="The Namespace name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$", + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FabricShortcutsGet(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, client_flatten=True) + return result + + class FabricShortcutsGet(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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/fabricShortcuts/{fabricShortcutName}", + **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( + "eventHubName", self.ctx.args.event_hub_name, + required=True, + ), + **self.serialize_url_param( + "fabricShortcutName", self.ctx.args.fabric_shortcut_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_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-07-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.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.configuration = AAZObjectType( + flags={"required": True}, + ) + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.modified_at = AAZStrType( + serialized_name="modifiedAt", + flags={"read_only": True}, + ) + properties.shortcut_status = AAZStrType( + serialized_name="shortcutStatus", + ) + properties.shortcut_type = AAZStrType( + serialized_name="shortcutType", + ) + properties.status_description = AAZStrType( + serialized_name="statusDescription", + flags={"read_only": True}, + ) + + configuration = cls._schema_on_200.properties.configuration + configuration.artifact_id = AAZStrType( + serialized_name="artifactId", + flags={"required": True}, + ) + configuration.artifact_name = AAZStrType( + serialized_name="artifactName", + ) + configuration.log_analytics_resource_id = AAZStrType( + serialized_name="logAnalyticsResourceId", + ) + configuration.premium_capacity_id = AAZStrType( + serialized_name="premiumCapacityId", + ) + configuration.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"required": True}, + ) + configuration.workspace_id = AAZStrType( + serialized_name="workspaceId", + flags={"required": True}, + ) + configuration.workspace_name = AAZStrType( + serialized_name="workspaceName", + ) + + system_data = cls._schema_on_200.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 _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_update.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_update.py new file mode 100644 index 00000000000..d617b29f9b9 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/fabric_shortcut/_update.py @@ -0,0 +1,519 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "eventhubs eventhub fabric-shortcut update", +) +class Update(AAZCommand): + """Update a Microsoft Fabric shortcut. + + :example: Create or update a Fabric shortcut + az eventhubs eventhub fabric-shortcut update --resource-group contoso-rg --namespace-name contoso-eventhub --event-hub-name orders --fabric-shortcut-name orders-shortcut + """ + + _aaz_info = { + "version": "2026-07-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/eventhubs/{}/fabricshortcuts/{}", "2026-07-01-preview"], + ] + } + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return 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.event_hub_name = AAZStrArg( + options=["--event-hub-name"], + help="The Event Hub name", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + max_length=256, + min_length=1, + ), + ) + _args_schema.fabric_shortcut_name = AAZStrArg( + options=["-n", "--name", "--fabric-shortcut-name"], + help="The Microsoft Fabric shortcut name.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + pattern="^.+$", + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="The Namespace name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$", + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.configuration = AAZObjectArg( + options=["--configuration"], + arg_group="Properties", + help="Microsoft Fabric workspace and artifact configuration.", + ) + _args_schema.shortcut_status = AAZStrArg( + options=["--shortcut-status"], + arg_group="Properties", + help="The current shortcut status. Only Pending can be supplied on create or update.", + nullable=True, + enum={"Approved": "Approved", "Pending": "Pending", "Rejected": "Rejected"}, + ) + _args_schema.shortcut_type = AAZStrArg( + options=["--shortcut-type"], + arg_group="Properties", + help="The type of the shortcut.", + nullable=True, + enum={"Entity": "Entity", "Network": "Network"}, + ) + + configuration = cls._args_schema.configuration + configuration.artifact_id = AAZUuidArg( + options=["artifact-id"], + help="The Microsoft Fabric artifact ID.", + ) + configuration.artifact_name = AAZStrArg( + options=["artifact-name"], + help="The Microsoft Fabric artifact name.", + nullable=True, + ) + configuration.log_analytics_resource_id = AAZResourceIdArg( + options=["log-analytics-resource-id"], + help="The resource ID of the Log Analytics workspace.", + nullable=True, + ) + configuration.premium_capacity_id = AAZStrArg( + options=["premium-capacity-id"], + help="The Microsoft Fabric premium capacity ID.", + nullable=True, + ) + configuration.tenant_id = AAZUuidArg( + options=["tenant-id"], + help="The Microsoft Fabric tenant ID.", + ) + configuration.workspace_id = AAZUuidArg( + options=["workspace-id"], + help="The Microsoft Fabric workspace ID.", + ) + configuration.workspace_name = AAZStrArg( + options=["workspace-name"], + help="The Microsoft Fabric workspace name.", + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FabricShortcutsGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + self.FabricShortcutsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class FabricShortcutsGet(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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/fabricShortcuts/{fabricShortcutName}", + **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( + "eventHubName", self.ctx.args.event_hub_name, + required=True, + ), + **self.serialize_url_param( + "fabricShortcutName", self.ctx.args.fabric_shortcut_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_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-07-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() + _UpdateHelper._build_schema_fabric_shortcut_read(cls._schema_on_200) + + return cls._schema_on_200 + + class FabricShortcutsCreateOrUpdate(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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/fabricShortcuts/{fabricShortcutName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "eventHubName", self.ctx.args.event_hub_name, + required=True, + ), + **self.serialize_url_param( + "fabricShortcutName", self.ctx.args.fabric_shortcut_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_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-07-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + 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() + _UpdateHelper._build_schema_fabric_shortcut_read(cls._schema_on_200) + + return cls._schema_on_200 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("configuration", AAZObjectType, ".configuration", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("shortcutStatus", AAZStrType, ".shortcut_status") + properties.set_prop("shortcutType", AAZStrType, ".shortcut_type") + + configuration = _builder.get(".properties.configuration") + if configuration is not None: + configuration.set_prop("artifactId", AAZStrType, ".artifact_id", typ_kwargs={"flags": {"required": True}}) + configuration.set_prop("artifactName", AAZStrType, ".artifact_name") + configuration.set_prop("logAnalyticsResourceId", AAZStrType, ".log_analytics_resource_id") + configuration.set_prop("premiumCapacityId", AAZStrType, ".premium_capacity_id") + configuration.set_prop("tenantId", AAZStrType, ".tenant_id", typ_kwargs={"flags": {"required": True}}) + configuration.set_prop("workspaceId", AAZStrType, ".workspace_id", typ_kwargs={"flags": {"required": True}}) + configuration.set_prop("workspaceName", AAZStrType, ".workspace_name") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_fabric_shortcut_read = None + + @classmethod + def _build_schema_fabric_shortcut_read(cls, _schema): + if cls._schema_fabric_shortcut_read is not None: + _schema.id = cls._schema_fabric_shortcut_read.id + _schema.location = cls._schema_fabric_shortcut_read.location + _schema.name = cls._schema_fabric_shortcut_read.name + _schema.properties = cls._schema_fabric_shortcut_read.properties + _schema.system_data = cls._schema_fabric_shortcut_read.system_data + _schema.type = cls._schema_fabric_shortcut_read.type + return + + cls._schema_fabric_shortcut_read = _schema_fabric_shortcut_read = AAZObjectType() + + fabric_shortcut_read = _schema_fabric_shortcut_read + fabric_shortcut_read.id = AAZStrType( + flags={"read_only": True}, + ) + fabric_shortcut_read.location = AAZStrType( + flags={"read_only": True}, + ) + fabric_shortcut_read.name = AAZStrType( + flags={"read_only": True}, + ) + fabric_shortcut_read.properties = AAZObjectType() + fabric_shortcut_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + fabric_shortcut_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_fabric_shortcut_read.properties + properties.configuration = AAZObjectType( + flags={"required": True}, + ) + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.modified_at = AAZStrType( + serialized_name="modifiedAt", + flags={"read_only": True}, + ) + properties.shortcut_status = AAZStrType( + serialized_name="shortcutStatus", + ) + properties.shortcut_type = AAZStrType( + serialized_name="shortcutType", + ) + properties.status_description = AAZStrType( + serialized_name="statusDescription", + flags={"read_only": True}, + ) + + configuration = _schema_fabric_shortcut_read.properties.configuration + configuration.artifact_id = AAZStrType( + serialized_name="artifactId", + flags={"required": True}, + ) + configuration.artifact_name = AAZStrType( + serialized_name="artifactName", + ) + configuration.log_analytics_resource_id = AAZStrType( + serialized_name="logAnalyticsResourceId", + ) + configuration.premium_capacity_id = AAZStrType( + serialized_name="premiumCapacityId", + ) + configuration.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"required": True}, + ) + configuration.workspace_id = AAZStrType( + serialized_name="workspaceId", + flags={"required": True}, + ) + configuration.workspace_name = AAZStrType( + serialized_name="workspaceName", + ) + + system_data = _schema_fabric_shortcut_read.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", + ) + + _schema.id = cls._schema_fabric_shortcut_read.id + _schema.location = cls._schema_fabric_shortcut_read.location + _schema.name = cls._schema_fabric_shortcut_read.name + _schema.properties = cls._schema_fabric_shortcut_read.properties + _schema.system_data = cls._schema_fabric_shortcut_read.system_data + _schema.type = cls._schema_fabric_shortcut_read.type + + +__all__ = ["Update"] diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_break_pair.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_break_pair.py index 1dffd144f7b..7e4022415d4 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_break_pair.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_break_pair.py @@ -16,12 +16,15 @@ ) class BreakPair(AAZCommand): """This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces + + :example: EHAliasBreakPairing + az eventhubs georecovery-alias break-pair --resource-group exampleResourceGroup --namespace-name sdk-Namespace-8859 --alias sdk-DisasterRecovery-3814 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/{}/breakpairing", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/{}/breakpairing", "2026-07-01-preview"], ] } @@ -132,7 +135,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_create.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_create.py index b85becc37c4..57140ae7632 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_create.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_create.py @@ -16,12 +16,15 @@ ) class Create(AAZCommand): """Create a new Alias(Disaster Recovery configuration) + + :example: EHAliasCreate + az eventhubs georecovery-alias create --resource-group exampleResourceGroup --namespace-name sdk-Namespace-8859 --alias sdk-DisasterRecovery-3814 --partner-namespace sdk-Namespace-37 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/{}", "2026-07-01-preview"], ] } @@ -148,7 +151,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_delete.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_delete.py index 0677d3be67e..0809c77278f 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_delete.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_delete.py @@ -16,12 +16,15 @@ ) class Delete(AAZCommand): """Delete an Alias(Disaster Recovery configuration) + + :example: EHAliasDelete + az eventhubs georecovery-alias delete --resource-group exampleResourceGroup --namespace-name sdk-Namespace-5849 --alias sdk-DisasterRecovery-3814 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/{}", "2026-07-01-preview"], ] } @@ -134,7 +137,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_exists.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_exists.py index cd9c09dc422..a410a4922cb 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_exists.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_exists.py @@ -16,12 +16,15 @@ ) class Exists(AAZCommand): """Check the give Namespace name availability. + + :example: NamespacesCheckNameAvailability + az eventhubs georecovery-alias exists --resource-group exampleResourceGroup --namespace-name sdk-Namespace-9080 --alias sdk-DisasterRecovery-9474 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/checknameavailability", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/checknameavailability", "2026-07-01-preview"], ] } @@ -132,7 +135,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_fail_over.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_fail_over.py index 428ca5c8974..115c0abb6e4 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_fail_over.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_fail_over.py @@ -16,12 +16,15 @@ ) class FailOver(AAZCommand): """Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace + + :example: EHAliasFailOver + az eventhubs georecovery-alias fail-over --resource-group exampleResourceGroup --namespace-name sdk-Namespace-8859 --alias sdk-DisasterRecovery-3814 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/{}/failover", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/{}/failover", "2026-07-01-preview"], ] } @@ -132,7 +135,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_list.py index 936d186fc7f..7e86ad04352 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_list.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_list.py @@ -16,12 +16,15 @@ ) class List(AAZCommand): """List all Alias(Disaster Recovery configurations) + + :example: EHAliasList + az eventhubs georecovery-alias list --resource-group exampleResourceGroup --namespace-name sdk-Namespace-8859 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs", "2026-07-01-preview"], ] } @@ -123,7 +126,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_show.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_show.py index 1e92a675e4d..69d1d66f70d 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_show.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/_show.py @@ -16,12 +16,15 @@ ) class Show(AAZCommand): """Get Alias(Disaster Recovery configuration) for primary or secondary namespace + + :example: EHAliasGet + az eventhubs georecovery-alias show --resource-group exampleResourceGroup --namespace-name sdk-Namespace-8859 --alias sdk-DisasterRecovery-3814 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/{}", "2026-07-01-preview"], ] } @@ -136,7 +139,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/authorization_rule/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/authorization_rule/_list.py index b158ec9b9fc..902d3f04bd1 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/authorization_rule/_list.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/authorization_rule/_list.py @@ -16,12 +16,15 @@ ) class List(AAZCommand): """List a list of authorization rules for a Namespace. + + :example: ListAuthorizationRules + az eventhubs georecovery-alias authorization-rule list --resource-group exampleResourceGroup --namespace-name sdk-Namespace-9080 --alias sdk-DisasterRecovery-4047 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/{}/authorizationrules", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/{}/authorizationrules", "2026-07-01-preview"], ] } @@ -136,7 +139,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/authorization_rule/_show.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/authorization_rule/_show.py index 73356ebf045..0f8106b8108 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/authorization_rule/_show.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/authorization_rule/_show.py @@ -16,12 +16,15 @@ ) class Show(AAZCommand): """Get an AuthorizationRule for a Namespace by rule name. + + :example: NameSpaceAuthorizationRuleGet + az eventhubs georecovery-alias authorization-rule show --resource-group exampleResourceGroup --namespace-name sdk-Namespace-9080 --alias sdk-DisasterRecovery-4879 --authorization-rule-name sdk-Authrules-4879 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/{}/authorizationrules/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/{}/authorizationrules/{}", "2026-07-01-preview"], ] } @@ -149,7 +152,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/authorization_rule/keys/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/authorization_rule/keys/_list.py index eb0cdcf44b9..a54827dfab4 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/authorization_rule/keys/_list.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/georecovery_alias/authorization_rule/keys/_list.py @@ -16,12 +16,15 @@ ) class List(AAZCommand): """Gets the primary and secondary connection strings for the Namespace. + + :example: NameSpaceAuthorizationRuleListKey + az eventhubs georecovery-alias authorization-rule keys list --resource-group exampleResourceGroup --namespace-name sdk-Namespace-2702 --alias sdk-DisasterRecovery-4047 --authorization-rule-name sdk-Authrules-1746 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/{}/authorizationrules/{}/listkeys", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/disasterrecoveryconfigs/{}/authorizationrules/{}/listkeys", "2026-07-01-preview"], ] } @@ -146,7 +149,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_create.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_create.py index 8d92a196595..56e8dda4800 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_create.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_create.py @@ -16,12 +16,15 @@ ) class Create(AAZCommand): """Create a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + + :example: NamespaceCreate + az eventhubs namespace create --resource-group ResurceGroupSample --namespace-name NamespaceSample --identity "{type:'SystemAssigned, UserAssigned',user-assigned-identities:{/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1:{},/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2:{}}}" --location East US --cluster-arm-id /subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/clusters/enc-test --encryption "{key-source:Microsoft.KeyVault,key-vault-properties:[{user-assigned-identity:/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1,key-name:Samplekey,key-vault-uri:'https://aprao-keyvault-user.vault-int.azure-int.net/'}]}" --geo-data-replication "{locations:[{location-name:eastus,role-type:Primary},{location-name:southcentralus,role-type:Secondary}],max-replication-lag-duration-in-seconds:300}" """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}", "2026-07-01-preview"], ] } @@ -56,6 +59,16 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "ConfidentialCompute" + + _args_schema = cls._args_schema + _args_schema.confidential_compute_mode = AAZStrArg( + options=["--mode", "--confidential-compute-mode"], + arg_group="ConfidentialCompute", + help="Setting to Enable or Disable Confidential Compute", + enum={"Disabled": "Disabled", "Enabled": "Enabled"}, + ) + # define Arg Group "Parameters" _args_schema = cls._args_schema @@ -408,7 +421,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_delete.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_delete.py index ee8b0cc8c3a..2dc521e5b90 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_delete.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_delete.py @@ -16,12 +16,15 @@ ) class Delete(AAZCommand): """Delete an existing namespace. This operation also removes all associated resources under the namespace. + + :example: NameSpaceDelete + az eventhubs namespace delete --resource-group ResurceGroupSample --namespace-name NamespaceSample """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}", "2026-07-01-preview"], ] } @@ -144,7 +147,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_exists.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_exists.py index 0128dcd4f91..58b7e312cd2 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_exists.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_exists.py @@ -16,12 +16,15 @@ ) class Exists(AAZCommand): """Check the give Namespace name availability. + + :example: NamespacesCheckNameAvailability + az eventhubs namespace exists --name sdk-Namespace-8458 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/microsoft.eventhub/checknameavailability", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.eventhub/checknameavailability", "2026-07-01-preview"], ] } @@ -108,7 +111,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_failover.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_failover.py index 3bd08901820..d47338747e3 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_failover.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_failover.py @@ -19,9 +19,9 @@ class Failover(AAZCommand): """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/failover", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/failover", "2026-07-01-preview"], ] } @@ -153,7 +153,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_list.py index 4ceb633e197..568119cdc16 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_list.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_list.py @@ -16,13 +16,19 @@ ) class List(AAZCommand): """List all the available Namespaces within a subscription, irrespective of the resource groups. + + :example: NamespacesListBySubscription + az eventhubs namespace list + + :example: NamespaceListByResourceGroup + az eventhubs namespace list --resource-group ResurceGroupSample """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/microsoft.eventhub/namespaces", "2026-01-01"], - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.eventhub/namespaces", "2026-07-01-preview"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces", "2026-07-01-preview"], ] } @@ -109,7 +115,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } @@ -429,7 +435,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_show.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_show.py index 48b647c9348..ecad9394583 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_show.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_show.py @@ -16,12 +16,15 @@ ) class Show(AAZCommand): """Get the description of the specified namespace. + + :example: NameSpaceGet + az eventhubs namespace show --resource-group ResurceGroupSample --namespace-name NamespaceSample """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}", "2026-07-01-preview"], ] } @@ -122,7 +125,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_update.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_update.py index 0b387b4a9ed..953c5913af9 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_update.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_update.py @@ -16,12 +16,15 @@ ) class Update(AAZCommand): """Update a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + + :example: NamespaceCreate + az eventhubs namespace update --resource-group ResurceGroupSample --namespace-name NamespaceSample """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}", "2026-07-01-preview"], ] } @@ -59,6 +62,17 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "ConfidentialCompute" + + _args_schema = cls._args_schema + _args_schema.confidential_compute_mode = AAZStrArg( + options=["--mode", "--confidential-compute-mode"], + arg_group="ConfidentialCompute", + help="Setting to Enable or Disable Confidential Compute", + nullable=True, + enum={"Disabled": "Disabled", "Enabled": "Enabled"}, + ) + # define Arg Group "GeoDataReplication" _args_schema = cls._args_schema @@ -432,7 +446,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } @@ -531,7 +545,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_wait.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_wait.py index b5c1a1898f3..3ed453f8964 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_wait.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/_wait.py @@ -20,7 +20,7 @@ class Wait(AAZWaitCommand): _aaz_info = { "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}", "2026-07-01-preview"], ] } @@ -121,7 +121,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_create.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_create.py index 3403232a48d..4c0333ee8e3 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_create.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_create.py @@ -16,12 +16,15 @@ ) class Create(AAZCommand): """Create an ApplicationGroup for a Namespace. + + :example: ApplicationGroupCreate + az eventhubs namespace application-group create --resource-group contosotest --namespace-name contoso-ua-test-eh-system-1 --application-group-name appGroup1 --client-app-group-identifier SASKeyName=KeyName --is-enabled True --policies "[{metricId:IncomingMessages,rateLimitThreshold:7912,throttling-policy:{name:ThrottlingPolicy1,metric-id:IncomingMessages,rate-limit-threshold:7912},name:ThrottlingPolicy1},{metricId:IncomingBytes,rateLimitThreshold:3951729,throttling-policy:{name:ThrottlingPolicy2,metric-id:IncomingBytes,rate-limit-threshold:3951729},name:ThrottlingPolicy2},{metricId:OutgoingBytes,rateLimitThreshold:245175,throttling-policy:{name:ThrottlingPolicy3,metric-id:OutgoingBytes,rate-limit-threshold:245175},name:ThrottlingPolicy3}]" """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/applicationgroups/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/applicationgroups/{}", "2026-07-01-preview"], ] } @@ -179,7 +182,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_delete.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_delete.py index 8cbd7d194bb..25384e6fdef 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_delete.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_delete.py @@ -16,12 +16,15 @@ ) class Delete(AAZCommand): """Delete an ApplicationGroup for a Namespace. + + :example: ApplicationGroupDelete + az eventhubs namespace application-group delete --resource-group contosotest --namespace-name contoso-ua-test-eh-system-1 --application-group-name appGroup1 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/applicationgroups/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/applicationgroups/{}", "2026-07-01-preview"], ] } @@ -134,7 +137,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_list.py index c06f3cd870d..82e11e873dd 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_list.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_list.py @@ -16,12 +16,15 @@ ) class List(AAZCommand): """List a list of application groups for a Namespace. + + :example: ListApplicationGroups + az eventhubs namespace application-group list --resource-group contosotest --namespace-name contoso-ua-test-eh-system-1 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/applicationgroups", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/applicationgroups", "2026-07-01-preview"], ] } @@ -123,7 +126,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_show.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_show.py index 6f392c18bfd..4f74008f85f 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_show.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_show.py @@ -16,12 +16,15 @@ ) class Show(AAZCommand): """Get an ApplicationGroup for a Namespace. + + :example: ApplicationGroupGet + az eventhubs namespace application-group show --resource-group contosotest --namespace-name contoso-ua-test-eh-system-1 --application-group-name appGroup1 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/applicationgroups/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/applicationgroups/{}", "2026-07-01-preview"], ] } @@ -136,7 +139,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_update.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_update.py index bc18ef28ffb..153031f973f 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_update.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/application_group/_update.py @@ -16,12 +16,15 @@ ) class Update(AAZCommand): """Update an ApplicationGroup for a Namespace. + + :example: ApplicationGroupCreate + az eventhubs namespace application-group update --resource-group contosotest --namespace-name contoso-ua-test-eh-system-1 --application-group-name appGroup1 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/applicationgroups/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/applicationgroups/{}", "2026-07-01-preview"], ] } @@ -192,7 +195,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } @@ -279,7 +282,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_create.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_create.py index 00c30823117..6110af20edb 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_create.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_create.py @@ -16,12 +16,15 @@ ) class Create(AAZCommand): """Create an AuthorizationRule for a Namespace. + + :example: NameSpaceAuthorizationRuleCreate + az eventhubs namespace authorization-rule create --resource-group ArunMonocle --namespace-name sdk-Namespace-2702 --authorization-rule-name sdk-Authrules-1746 --rights "[Listen,Send]" """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/authorizationrules/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/authorizationrules/{}", "2026-07-01-preview"], ] } @@ -147,7 +150,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_delete.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_delete.py index 6e0e700cc68..7c8b04c4e74 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_delete.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_delete.py @@ -16,12 +16,15 @@ ) class Delete(AAZCommand): """Delete an AuthorizationRule for a Namespace. + + :example: NameSpaceAuthorizationRuleDelete + az eventhubs namespace authorization-rule delete --resource-group ArunMonocle --namespace-name sdk-Namespace-8980 --authorization-rule-name sdk-Authrules-8929 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/authorizationrules/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/authorizationrules/{}", "2026-07-01-preview"], ] } @@ -133,7 +136,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_list.py index 5b949e66915..369c47e9de1 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_list.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_list.py @@ -16,12 +16,15 @@ ) class List(AAZCommand): """List a list of authorization rules for a Namespace. + + :example: ListAuthorizationRules + az eventhubs namespace authorization-rule list --resource-group ArunMonocle --namespace-name sdk-Namespace-2702 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/authorizationrules", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/authorizationrules", "2026-07-01-preview"], ] } @@ -123,7 +126,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_show.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_show.py index f462fcfb79c..f7ff94bd941 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_show.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_show.py @@ -16,12 +16,15 @@ ) class Show(AAZCommand): """Get an AuthorizationRule for a Namespace by rule name. + + :example: NameSpaceAuthorizationRuleGet + az eventhubs namespace authorization-rule show --resource-group ArunMonocle --namespace-name sdk-Namespace-2702 --authorization-rule-name sdk-Authrules-1746 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/authorizationrules/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/authorizationrules/{}", "2026-07-01-preview"], ] } @@ -135,7 +138,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_update.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_update.py index d8ad202693c..37aa34791af 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_update.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/_update.py @@ -16,12 +16,15 @@ ) class Update(AAZCommand): """Update an AuthorizationRule for a Namespace. + + :example: NameSpaceAuthorizationRuleCreate + az eventhubs namespace authorization-rule update --resource-group ArunMonocle --namespace-name sdk-Namespace-2702 --authorization-rule-name sdk-Authrules-1746 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/authorizationrules/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/authorizationrules/{}", "2026-07-01-preview"], ] } @@ -165,7 +168,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } @@ -252,7 +255,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/keys/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/keys/_list.py index 644702f9e9e..2b0a94d4b74 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/keys/_list.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/keys/_list.py @@ -16,12 +16,15 @@ ) class List(AAZCommand): """Gets the primary and secondary connection strings for the Namespace. + + :example: NameSpaceAuthorizationRuleListKey + az eventhubs namespace authorization-rule keys list --resource-group ArunMonocle --namespace-name sdk-Namespace-2702 --authorization-rule-name sdk-Authrules-1746 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/authorizationrules/{}/listkeys", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/authorizationrules/{}/listkeys", "2026-07-01-preview"], ] } @@ -133,7 +136,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/keys/_renew.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/keys/_renew.py index f151b3280c3..79433d8cfc8 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/keys/_renew.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/authorization_rule/keys/_renew.py @@ -16,12 +16,15 @@ ) class Renew(AAZCommand): """Regenerates the primary or secondary connection strings for the specified Namespace. + + :example: NameSpaceAuthorizationRuleRegenerateKey + az eventhubs namespace authorization-rule keys renew --resource-group ArunMonocle --namespace-name sdk-Namespace-8980 --authorization-rule-name sdk-Authrules-8929 --key PrimaryKey """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/authorizationrules/{}/regeneratekeys", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/authorizationrules/{}/regeneratekeys", "2026-07-01-preview"], ] } @@ -151,7 +154,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/network_rule_set/_create.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/network_rule_set/_create.py index 5257a0df0ae..fe397f9cef9 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/network_rule_set/_create.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/network_rule_set/_create.py @@ -16,12 +16,15 @@ ) class Create(AAZCommand): """Create NetworkRuleSet for a Namespace. + + :example: NameSpaceNetworkRuleSetCreate + az eventhubs namespace network-rule-set create --resource-group ResourceGroup --namespace-name sdk-Namespace-6019 --default-action Deny --ip-rules "[{action:Allow,ip-mask:1.1.1.1},{action:Allow,ip-mask:1.1.1.2},{action:Allow,ip-mask:1.1.1.3},{action:Allow,ip-mask:1.1.1.4},{action:Allow,ip-mask:1.1.1.5}]" --virtual-network-rules "[{ignore-missing-endpoint:True,subnet:/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2},{ignore-missing-endpoint:False,subnet:/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3},{ignore-missing-endpoint:False,subnet:/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6}]" """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/networkrulesets/default", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/networkrulesets/default", "2026-07-01-preview"], ] } @@ -180,7 +183,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/network_rule_set/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/network_rule_set/_list.py index d6a33d2d0d6..97d5a0a1851 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/network_rule_set/_list.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/network_rule_set/_list.py @@ -16,12 +16,15 @@ ) class List(AAZCommand): """List NetworkRuleSet for a Namespace. + + :example: NameSpaceNetworkRuleSetList + az eventhubs namespace network-rule-set list --resource-group ResourceGroup --namespace-name sdk-Namespace-6019 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/networkrulesets", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/networkrulesets", "2026-07-01-preview"], ] } @@ -123,7 +126,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/network_rule_set/_show.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/network_rule_set/_show.py index 6d574acde9c..d237355cc6b 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/network_rule_set/_show.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/network_rule_set/_show.py @@ -16,12 +16,15 @@ ) class Show(AAZCommand): """Get NetworkRuleSet for a Namespace. + + :example: NameSpaceNetworkRuleSetGet + az eventhubs namespace network-rule-set show --resource-group ResourceGroup --namespace-name sdk-Namespace-6019 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/networkrulesets/default", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/networkrulesets/default", "2026-07-01-preview"], ] } @@ -122,7 +125,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/network_rule_set/_update.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/network_rule_set/_update.py index 45ca8abb972..360a1ac7a63 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/network_rule_set/_update.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/network_rule_set/_update.py @@ -16,12 +16,15 @@ ) class Update(AAZCommand): """Update NetworkRuleSet for a Namespace. + + :example: NameSpaceNetworkRuleSetCreate + az eventhubs namespace network-rule-set update --resource-group ResourceGroup --namespace-name sdk-Namespace-6019 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/networkrulesets/default", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/networkrulesets/default", "2026-07-01-preview"], ] } @@ -208,7 +211,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } @@ -291,7 +294,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/nsp_configuration/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/nsp_configuration/_list.py index 9283681f6ce..ad4b7b4d021 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/nsp_configuration/_list.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/nsp_configuration/_list.py @@ -16,12 +16,15 @@ ) class List(AAZCommand): """List list of current NetworkSecurityPerimeterConfiguration for Namespace + + :example: NamspaceNetworkSecurityPerimeterConfigurationList + az eventhubs namespace nsp-configuration list --resource-group SDK-EventHub-4794 --namespace-name sdk-Namespace-5828 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/networksecurityperimeterconfigurations", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/networksecurityperimeterconfigurations", "2026-07-01-preview"], ] } @@ -121,7 +124,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/nsp_configuration/_show.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/nsp_configuration/_show.py index 3473eae72c4..195137487dc 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/nsp_configuration/_show.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/nsp_configuration/_show.py @@ -16,12 +16,15 @@ ) class Show(AAZCommand): """Get a NetworkSecurityPerimeterConfigurations resourceAssociationName + + :example: NetworkSecurityPerimeterConfigurationassociationProxyName + az eventhubs namespace nsp-configuration show --resource-group SDK-EventHub-4794 --namespace-name sdk-Namespace-5828 --resource-association-name resourceAssociation1 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/networksecurityperimeterconfigurations/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/networksecurityperimeterconfigurations/{}", "2026-07-01-preview"], ] } @@ -132,7 +135,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_create.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_create.py index 766b1806aeb..9e360cfc451 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_create.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_create.py @@ -16,12 +16,15 @@ ) class Create(AAZCommand): """Create PrivateEndpointConnections of service namespace. + + :example: NameSpacePrivateEndPointConnectionCreate + az eventhubs namespace private-endpoint-connection create --resource-group ArunMonocle --namespace-name sdk-Namespace-2924 --private-endpoint-connection-name privateEndpointConnectionName --private-endpoint "{id:/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-EventHub-8396/providers/Microsoft.Network/privateEndpoints/sdk-Namespace-2847}" --description testing --status Rejected --provisioning-state Succeeded """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/privateendpointconnections/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/privateendpointconnections/{}", "2026-07-01-preview"], ] } @@ -157,7 +160,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_delete.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_delete.py index ede676a6aed..c807310b422 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_delete.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_delete.py @@ -17,12 +17,15 @@ ) class Delete(AAZCommand): """Delete a Private Endpoint Connection. + + :example: NameSpacePrivateEndPointConnectionDelete + az eventhubs namespace private-endpoint-connection delete --resource-group ArunMonocle --namespace-name sdk-Namespace-3285 --private-endpoint-connection-name 928c44d5-b7c6-423b-b6fa-811e0c27b3e0 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/privateendpointconnections/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/privateendpointconnections/{}", "2026-07-01-preview"], ] } @@ -155,7 +158,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_list.py index 05d7054b623..79d0b2e14fb 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_list.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_list.py @@ -16,12 +16,15 @@ ) class List(AAZCommand): """List the available PrivateEndpointConnections within a namespace. + + :example: PrivateEndPointConnectionList + az eventhubs namespace private-endpoint-connection list --resource-group SDK-EventHub-4794 --namespace-name sdk-Namespace-5828 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/privateendpointconnections", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/privateendpointconnections", "2026-07-01-preview"], ] } @@ -123,7 +126,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_show.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_show.py index 3b19288ea25..be6b00ad9bb 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_show.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_show.py @@ -16,12 +16,15 @@ ) class Show(AAZCommand): """Get a description for the specified Private Endpoint Connection name. + + :example: NameSpacePrivateEndPointConnectionGet + az eventhubs namespace private-endpoint-connection show --resource-group SDK-EventHub-4794 --namespace-name sdk-Namespace-5828 --private-endpoint-connection-name privateEndpointConnectionName """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/privateendpointconnections/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/privateendpointconnections/{}", "2026-07-01-preview"], ] } @@ -132,7 +135,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_update.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_update.py index cdbcafd0b88..fd113864f51 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_update.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_update.py @@ -16,12 +16,15 @@ ) class Update(AAZCommand): """Update PrivateEndpointConnections of service namespace. + + :example: NameSpacePrivateEndPointConnectionCreate + az eventhubs namespace private-endpoint-connection update --resource-group ArunMonocle --namespace-name sdk-Namespace-2924 --private-endpoint-connection-name privateEndpointConnectionName """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/privateendpointconnections/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/privateendpointconnections/{}", "2026-07-01-preview"], ] } @@ -175,7 +178,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } @@ -264,7 +267,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_wait.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_wait.py index e9a83c8d14d..ef86ff6ae50 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_wait.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_endpoint_connection/_wait.py @@ -20,7 +20,7 @@ class Wait(AAZWaitCommand): _aaz_info = { "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/privateendpointconnections/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/privateendpointconnections/{}", "2026-07-01-preview"], ] } @@ -131,7 +131,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_link_resource/_show.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_link_resource/_show.py index 39cc5ea5545..57cfd3cfcc3 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_link_resource/_show.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/private_link_resource/_show.py @@ -16,12 +16,15 @@ ) class Show(AAZCommand): """List lists of resources that supports Privatelinks. + + :example: NameSpacePrivateLinkResourcesGet + az eventhubs namespace private-link-resource show --resource-group ArunMonocle --namespace-name sdk-Namespace-2924 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/privatelinkresources", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/privatelinkresources", "2026-07-01-preview"], ] } @@ -123,7 +126,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_create.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_create.py index a15999a435a..a4b896ffdff 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_create.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_create.py @@ -16,12 +16,15 @@ ) class Create(AAZCommand): """Create an EventHub schema group. + + :example: SchemaRegistryCreate + az eventhubs namespace schema-registry create --resource-group alitest --namespace-name ali-ua-test-eh-system-1 --schema-group-name testSchemaGroup1 --group-properties "{}" --schema-compatibility Forward --schema-type Avro """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/schemagroups/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/schemagroups/{}", "2026-07-01-preview"], ] } @@ -75,14 +78,14 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema.schema_compatibility = AAZStrArg( options=["--schema-compatibility"], arg_group="Properties", - enum={"Backward": "Backward", "Forward": "Forward", "None": "None"}, help="Compatibility of Schema.", + enum={"Backward": "Backward", "Forward": "Forward", "None": "None"}, ) _args_schema.schema_type = AAZStrArg( options=["--schema-type"], arg_group="Properties", - enum={"Avro": "Avro", "Json": "Json", "ProtoBuf": "ProtoBuf", "Unknown": "Unknown"}, help="Type of Schema.", + enum={"Avro": "Avro", "Json": "Json", "ProtoBuf": "ProtoBuf", "Unknown": "Unknown"}, ) group_properties = cls._args_schema.group_properties @@ -158,7 +161,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_delete.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_delete.py index ca0ee591746..5303ba9e481 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_delete.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_delete.py @@ -16,12 +16,15 @@ ) class Delete(AAZCommand): """Delete an EventHub schema group. + + :example: SchemaRegistryDelete + az eventhubs namespace schema-registry delete --resource-group alitest --namespace-name ali-ua-test-eh-system-1 --schema-group-name testSchemaGroup1 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/schemagroups/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/schemagroups/{}", "2026-07-01-preview"], ] } @@ -134,7 +137,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_list.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_list.py index 65ccf14f60d..e5357acdbe0 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_list.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_list.py @@ -16,12 +16,15 @@ ) class List(AAZCommand): """List all the Schema Groups in a Namespace. + + :example: SchemaRegistryListAll + az eventhubs namespace schema-registry list --resource-group alitest --namespace-name ali-ua-test-eh-system-1 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/schemagroups", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/schemagroups", "2026-07-01-preview"], ] } @@ -145,7 +148,7 @@ def query_parameters(self): "$top", self.ctx.args.top, ), **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_show.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_show.py index 4cc95dde07f..1cc68925301 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_show.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_show.py @@ -16,12 +16,15 @@ ) class Show(AAZCommand): """Get the details of an EventHub schema group. + + :example: SchemaRegistryGet + az eventhubs namespace schema-registry show --resource-group alitest --namespace-name ali-ua-test-eh-system-1 --schema-group-name testSchemaGroup1 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/schemagroups/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/schemagroups/{}", "2026-07-01-preview"], ] } @@ -136,7 +139,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_update.py b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_update.py index 87d10dde98c..e196de69efd 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_update.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/schema_registry/_update.py @@ -16,12 +16,15 @@ ) class Update(AAZCommand): """Update an EventHub schema group. + + :example: SchemaRegistryCreate + az eventhubs namespace schema-registry update --resource-group alitest --namespace-name ali-ua-test-eh-system-1 --schema-group-name testSchemaGroup1 """ _aaz_info = { - "version": "2026-01-01", + "version": "2026-07-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/schemagroups/{}", "2026-01-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.eventhub/namespaces/{}/schemagroups/{}", "2026-07-01-preview"], ] } @@ -80,16 +83,16 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema.schema_compatibility = AAZStrArg( options=["--schema-compatibility"], arg_group="Properties", + help="Compatibility of Schema.", nullable=True, enum={"Backward": "Backward", "Forward": "Forward", "None": "None"}, - help="Compatibility of Schema.", ) _args_schema.schema_type = AAZStrArg( options=["--schema-type"], arg_group="Properties", + help="Type of Schema.", nullable=True, enum={"Avro": "Avro", "Json": "Json", "ProtoBuf": "ProtoBuf", "Unknown": "Unknown"}, - help="Type of Schema.", ) group_properties = cls._args_schema.group_properties @@ -180,7 +183,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } @@ -267,7 +270,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2026-01-01", + "api-version", "2026-07-01-preview", required=True, ), } diff --git a/src/azure-cli/azure/cli/command_modules/eventhubs/operations/event_hub_entity.py b/src/azure-cli/azure/cli/command_modules/eventhubs/operations/event_hub_entity.py index a46b5b7f4e9..e20ef249d5f 100644 --- a/src/azure-cli/azure/cli/command_modules/eventhubs/operations/event_hub_entity.py +++ b/src/azure-cli/azure/cli/command_modules/eventhubs/operations/event_hub_entity.py @@ -35,7 +35,7 @@ def cli_eventhub_create(cmd, resource_group_name, namespace_name, event_hub_name }) if min_compaction_lag_in_mins: command_arg_dict.update({ - "min_compaction_lag_time_in_minutes": int(min_compaction_lag_in_mins) + "min_compaction_lag_in_mins": int(min_compaction_lag_in_mins) }) if partition_count: command_arg_dict.update({ @@ -120,7 +120,7 @@ def cli_eventhub_update(cmd, resource_group_name, namespace_name, event_hub_name }) if min_compaction_lag_in_mins: command_arg_dict.update({ - "min_compaction_lag_time_in_minutes": int(min_compaction_lag_in_mins) + "min_compaction_lag_in_mins": int(min_compaction_lag_in_mins) }) if partition_count: command_arg_dict.update({