From 35766579b43b9a912c71ba03b1f400241ba91178 Mon Sep 17 00:00:00 2001 From: Kshitija Murudi Date: Sun, 20 Sep 2026 21:14:22 -0700 Subject: [PATCH] Remove retired Agent Mesh extension Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- src/agentmesh/HISTORY.rst | 9 - src/agentmesh/README.md | 70 - src/agentmesh/azext_agentmesh/__init__.py | 42 - src/agentmesh/azext_agentmesh/_help.py | 11 - src/agentmesh/azext_agentmesh/_params.py | 13 - src/agentmesh/azext_agentmesh/aaz/__init__.py | 6 - .../azext_agentmesh/aaz/latest/__init__.py | 9 - .../aaz/latest/agentmesh/__cmd_group.py | 23 - .../aaz/latest/agentmesh/__init__.py | 11 - .../latest/agentmesh/fabric/__cmd_group.py | 23 - .../aaz/latest/agentmesh/fabric/__init__.py | 17 - .../aaz/latest/agentmesh/fabric/_create.py | 309 ---- .../aaz/latest/agentmesh/fabric/_delete.py | 166 -- .../aaz/latest/agentmesh/fabric/_list.py | 373 ----- .../aaz/latest/agentmesh/fabric/_show.py | 223 --- .../aaz/latest/agentmesh/fabric/_update.py | 270 ---- .../aaz/latest/agentmesh/fabric/_wait.py | 219 --- .../agentmesh/fabric/member/__cmd_group.py | 23 - .../agentmesh/fabric/member/__init__.py | 17 - .../latest/agentmesh/fabric/member/_create.py | 516 ------- .../latest/agentmesh/fabric/member/_delete.py | 179 --- .../latest/agentmesh/fabric/member/_list.py | 300 ---- .../latest/agentmesh/fabric/member/_show.py | 301 ---- .../latest/agentmesh/fabric/member/_update.py | 348 ----- .../latest/agentmesh/fabric/member/_wait.py | 297 ---- .../agentmesh/policy_group/__cmd_group.py | 23 - .../latest/agentmesh/policy_group/__init__.py | 17 - .../latest/agentmesh/policy_group/_create.py | 1332 ----------------- .../latest/agentmesh/policy_group/_delete.py | 166 -- .../latest/agentmesh/policy_group/_list.py | 953 ------------ .../latest/agentmesh/policy_group/_show.py | 513 ------- .../latest/agentmesh/policy_group/_update.py | 560 ------- .../latest/agentmesh/policy_group/_wait.py | 509 ------- .../azext_agentmesh/azext_metadata.json | 4 - src/agentmesh/azext_agentmesh/commands.py | 15 - src/agentmesh/azext_agentmesh/custom.py | 14 - .../azext_agentmesh/tests/__init__.py | 6 - .../azext_agentmesh/tests/latest/__init__.py | 6 - .../test_agentmesh_command_help.yaml | 44 - .../tests/latest/test_agentmesh.py | 172 --- src/agentmesh/linter_exclusions.yml | 5 - src/agentmesh/setup.cfg | 1 - src/agentmesh/setup.py | 51 - src/service_name.json | 5 - 44 files changed, 8171 deletions(-) delete mode 100644 src/agentmesh/HISTORY.rst delete mode 100644 src/agentmesh/README.md delete mode 100644 src/agentmesh/azext_agentmesh/__init__.py delete mode 100644 src/agentmesh/azext_agentmesh/_help.py delete mode 100644 src/agentmesh/azext_agentmesh/_params.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/__init__.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/__init__.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/__cmd_group.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/__init__.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/__cmd_group.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/__init__.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_create.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_delete.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_list.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_show.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_update.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_wait.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/__cmd_group.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/__init__.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_create.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_delete.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_list.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_show.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_update.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_wait.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/__cmd_group.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/__init__.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_create.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_delete.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_list.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_show.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_update.py delete mode 100644 src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_wait.py delete mode 100644 src/agentmesh/azext_agentmesh/azext_metadata.json delete mode 100644 src/agentmesh/azext_agentmesh/commands.py delete mode 100644 src/agentmesh/azext_agentmesh/custom.py delete mode 100644 src/agentmesh/azext_agentmesh/tests/__init__.py delete mode 100644 src/agentmesh/azext_agentmesh/tests/latest/__init__.py delete mode 100644 src/agentmesh/azext_agentmesh/tests/latest/recordings/test_agentmesh_command_help.yaml delete mode 100644 src/agentmesh/azext_agentmesh/tests/latest/test_agentmesh.py delete mode 100644 src/agentmesh/linter_exclusions.yml delete mode 100644 src/agentmesh/setup.cfg delete mode 100644 src/agentmesh/setup.py diff --git a/src/agentmesh/HISTORY.rst b/src/agentmesh/HISTORY.rst deleted file mode 100644 index 10c3d4b501d..00000000000 --- a/src/agentmesh/HISTORY.rst +++ /dev/null @@ -1,9 +0,0 @@ -.. :changelog: - -Release History -=============== - -1.0.0b1 -++++++ -* Initial preview release for Azure Agent Mesh using API version ``2026-07-21-preview``. -* Add fabric, fabric member, and policy group create, show, list, update, and delete commands. \ No newline at end of file diff --git a/src/agentmesh/README.md b/src/agentmesh/README.md deleted file mode 100644 index 789c5f145b4..00000000000 --- a/src/agentmesh/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# Azure CLI Agent Mesh Extension - -This extension manages Azure Agent Mesh fabrics, fabric members, and policy groups. -It uses the `Microsoft.NetworkSecurity` resource provider API version -`2026-07-21-preview`. - -## Install - -```bash -az extension add --name agentmesh -``` - -## Commands - -Each resource supports `create`, `show`, `list`, `update`, and `delete`. - -```bash -az agentmesh fabric --help -az agentmesh fabric member --help -az agentmesh policy-group --help -``` - -### Fabrics - -```bash -az agentmesh fabric create \ - --resource-group myResourceGroup \ - --name myFabric \ - --location eastus \ - --trust-domain contoso.agentfabric - -az agentmesh fabric update \ - --resource-group myResourceGroup \ - --name myFabric \ - --tags environment=production - -az agentmesh fabric list --resource-group myResourceGroup -``` - -### Fabric members - -```bash -az agentmesh fabric member create \ - --resource-group myResourceGroup \ - --fabric-name myFabric \ - --member-name myMember \ - --location eastus \ - --workload "{aci:{resource-id:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerInstance/containerGroups/myContainerGroup}}" - -az agentmesh fabric member show \ - --resource-group myResourceGroup \ - --fabric-name myFabric \ - --member-name myMember -``` - -### Policy groups - -```bash -az agentmesh policy-group create \ - --resource-group myResourceGroup \ - --name myPolicyGroup \ - --location eastus \ - --display-name "My policy group" \ - --priority 100 - -az agentmesh policy-group list --resource-group myResourceGroup -``` - -Long-running create, update, and delete operations support `--no-wait`. Use the -corresponding `wait` command to wait for provisioning to reach a target state. \ No newline at end of file diff --git a/src/agentmesh/azext_agentmesh/__init__.py b/src/agentmesh/azext_agentmesh/__init__.py deleted file mode 100644 index d5b149feef9..00000000000 --- a/src/agentmesh/azext_agentmesh/__init__.py +++ /dev/null @@ -1,42 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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 -# -------------------------------------------------------------------------------------------- - -from azure.cli.core import AzCommandsLoader -from azext_agentmesh._help import helps # pylint: disable=unused-import - - -class AgentmeshCommandsLoader(AzCommandsLoader): - - def __init__(self, cli_ctx=None): - from azure.cli.core.commands import CliCommandType - custom_command_type = CliCommandType( - operations_tmpl='azext_agentmesh.custom#{}') - super().__init__(cli_ctx=cli_ctx, - custom_command_type=custom_command_type) - - def load_command_table(self, args): - from azext_agentmesh.commands import load_command_table - from azure.cli.core.aaz import load_aaz_command_table - try: - from . import aaz - except ImportError: - aaz = None - if aaz: - load_aaz_command_table( - loader=self, - aaz_pkg_name=aaz.__name__, - args=args - ) - load_command_table(self, args) - return self.command_table - - def load_arguments(self, command): - from azext_agentmesh._params import load_arguments - load_arguments(self, command) - - -COMMAND_LOADER_CLS = AgentmeshCommandsLoader diff --git a/src/agentmesh/azext_agentmesh/_help.py b/src/agentmesh/azext_agentmesh/_help.py deleted file mode 100644 index 126d5d00714..00000000000 --- a/src/agentmesh/azext_agentmesh/_help.py +++ /dev/null @@ -1,11 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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: disable=line-too-long -# pylint: disable=too-many-lines - -from knack.help_files import helps # pylint: disable=unused-import diff --git a/src/agentmesh/azext_agentmesh/_params.py b/src/agentmesh/azext_agentmesh/_params.py deleted file mode 100644 index cfcec717c9c..00000000000 --- a/src/agentmesh/azext_agentmesh/_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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: disable=too-many-lines -# pylint: disable=too-many-statements - - -def load_arguments(self, _): # pylint: disable=unused-argument - pass diff --git a/src/agentmesh/azext_agentmesh/aaz/__init__.py b/src/agentmesh/azext_agentmesh/aaz/__init__.py deleted file mode 100644 index 5757aea3175..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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 -# -------------------------------------------------------------------------------------------- diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/__init__.py b/src/agentmesh/azext_agentmesh/aaz/latest/__init__.py deleted file mode 100644 index 7e832c711e8..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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 diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/__cmd_group.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/__cmd_group.py deleted file mode 100644 index c67bf0e3291..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/__cmd_group.py +++ /dev/null @@ -1,23 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh", -) -class __CMDGroup(AAZCommandGroup): - """Manage Azure Agent Mesh resources. - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/__init__.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/__init__.py deleted file mode 100644 index 5a9d61963d6..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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 * diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/__cmd_group.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/__cmd_group.py deleted file mode 100644 index b8eeff1ab7c..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/__cmd_group.py +++ /dev/null @@ -1,23 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh fabric", -) -class __CMDGroup(AAZCommandGroup): - """Manage Agent Mesh fabrics. - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/__init__.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/__init__.py deleted file mode 100644 index db73033039b..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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 ._delete import * -from ._list import * -from ._show import * -from ._update import * -from ._wait import * diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_create.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_create.py deleted file mode 100644 index 07a06870287..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_create.py +++ /dev/null @@ -1,309 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh fabric create", -) -class Create(AAZCommand): - """Create an Agent Mesh fabric - - :example: AgentFabrics_CreateOrUpdate - az agentmesh fabric create --resource-group rgnetworksecurity --name testAIFabric --default-policy-groups "[/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgnetworksecurity/providers/Microsoft.NetworkSecurity/policyGroups/testPolicyGroup]" --trust-domain contoso.agentfabric --tags "{}" --location eastus - """ - - _aaz_info = { - "version": "2026-07-21-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/agentfabrics/{}", "2026-07-21-preview"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(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.name = AAZStrArg( - options=["-n", "--name"], - help="The name of the AgentFabric", - required=True, - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - - # define Arg Group "Properties" - - _args_schema = cls._args_schema - _args_schema.default_policy_groups = AAZListArg( - options=["--default-policy-groups"], - arg_group="Properties", - help="The default policy groups to apply to all members of this fabric.", - ) - _args_schema.trust_domain = AAZStrArg( - options=["--trust-domain"], - arg_group="Properties", - help="The trust domain that scopes this fabric's member identities. It is the leading component of each member's identity, which takes the form `//`. Set at creation and immutable thereafter; when omitted, the shared default trust domain `microsoft.agentfabric` is used.", - fmt=AAZStrArgFormat( - pattern="^[a-z0-9]([a-z0-9.-]*[a-z0-9])?$", - max_length=253, - ), - ) - - default_policy_groups = cls._args_schema.default_policy_groups - default_policy_groups.Element = AAZResourceIdArg() - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="The geo-location where the resource lives", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Resource", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.AgentFabricsCreateOrUpdate(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 AgentFabricsCreateOrUpdate(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 [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200, 201]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkSecurity/agentFabrics/{agentFabricName}", - **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( - "agentFabricName", self.ctx.args.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-21-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("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) - _builder.set_prop("properties", AAZObjectType) - _builder.set_prop("tags", AAZDictType, ".tags") - - properties = _builder.get(".properties") - if properties is not None: - properties.set_prop("defaultPolicyGroups", AAZListType, ".default_policy_groups") - properties.set_prop("trustDomain", AAZStrType, ".trust_domain") - - default_policy_groups = _builder.get(".properties.defaultPolicyGroups") - if default_policy_groups is not None: - default_policy_groups.set_elements(AAZStrType, ".") - - tags = _builder.get(".tags") - if tags is not None: - tags.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.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.location = AAZStrType( - flags={"required": True}, - ) - _schema_on_200_201.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.properties = AAZObjectType() - _schema_on_200_201.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200_201.tags = AAZDictType() - _schema_on_200_201.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200_201.properties - properties.default_policy_groups = AAZListType( - serialized_name="defaultPolicyGroups", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.trust_domain = AAZStrType( - serialized_name="trustDomain", - ) - - default_policy_groups = cls._schema_on_200_201.properties.default_policy_groups - default_policy_groups.Element = AAZStrType() - - system_data = cls._schema_on_200_201.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", - ) - - tags = cls._schema_on_200_201.tags - tags.Element = AAZStrType() - - return cls._schema_on_200_201 - - -class _CreateHelper: - """Helper class for Create""" - - -__all__ = ["Create"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_delete.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_delete.py deleted file mode 100644 index 51ca27320c6..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_delete.py +++ /dev/null @@ -1,166 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh fabric delete", - confirmation="Are you sure you want to perform this operation?", -) -class Delete(AAZCommand): - """Delete an Agent Mesh fabric - - :example: AgentFabrics_Delete - az agentmesh fabric delete --resource-group rgnetworksecurity --name testAIFabric - """ - - _aaz_info = { - "version": "2026-07-21-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/agentfabrics/{}", "2026-07-21-preview"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, 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.name = AAZStrArg( - options=["-n", "--name"], - help="The name of the AgentFabric", - required=True, - id_part="name", - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.AgentFabricsDelete(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class AgentFabricsDelete(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 [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [204]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_204, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200, 201]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkSecurity/agentFabrics/{agentFabricName}", - **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( - "agentFabricName", self.ctx.args.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-21-preview", - required=True, - ), - } - return parameters - - def on_204(self, session): - pass - - def on_200_201(self, session): - pass - - -class _DeleteHelper: - """Helper class for Delete""" - - -__all__ = ["Delete"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_list.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_list.py deleted file mode 100644 index 9f58b5b21d2..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_list.py +++ /dev/null @@ -1,373 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh fabric list", -) -class List(AAZCommand): - """List Agent Mesh fabrics - - :example: AgentFabrics_ListBySubscription - az agentmesh fabric list - - :example: AgentFabrics_ListByResourceGroup - az agentmesh fabric list --resource-group rgnetworksecurity - """ - - _aaz_info = { - "version": "2026-07-21-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/microsoft.networksecurity/agentfabrics", "2026-07-21-preview"], - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/agentfabrics", "2026-07-21-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.resource_group = AAZResourceGroupNameArg() - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True - condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) - if condition_0: - self.AgentFabricsListBySubscription(ctx=self.ctx)() - if condition_1: - self.AgentFabricsListByResourceGroup(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 AgentFabricsListBySubscription(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}/providers/Microsoft.NetworkSecurity/agentFabrics", - **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( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2026-07-21-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={"required": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType() - _element.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _element.tags = AAZDictType() - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.value.Element.properties - properties.default_policy_groups = AAZListType( - serialized_name="defaultPolicyGroups", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.trust_domain = AAZStrType( - serialized_name="trustDomain", - ) - - default_policy_groups = cls._schema_on_200.value.Element.properties.default_policy_groups - default_policy_groups.Element = AAZStrType() - - 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", - ) - - tags = cls._schema_on_200.value.Element.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - class AgentFabricsListByResourceGroup(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.NetworkSecurity/agentFabrics", - **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( - "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-21-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={"required": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType() - _element.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _element.tags = AAZDictType() - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.value.Element.properties - properties.default_policy_groups = AAZListType( - serialized_name="defaultPolicyGroups", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.trust_domain = AAZStrType( - serialized_name="trustDomain", - ) - - default_policy_groups = cls._schema_on_200.value.Element.properties.default_policy_groups - default_policy_groups.Element = AAZStrType() - - 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", - ) - - tags = cls._schema_on_200.value.Element.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _ListHelper: - """Helper class for List""" - - -__all__ = ["List"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_show.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_show.py deleted file mode 100644 index 0956cef9aa7..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_show.py +++ /dev/null @@ -1,223 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh fabric show", -) -class Show(AAZCommand): - """Get an Agent Mesh fabric - - :example: AgentFabrics_Get - az agentmesh fabric show --resource-group rgnetworksecurity --name testAIFabric - """ - - _aaz_info = { - "version": "2026-07-21-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/agentfabrics/{}", "2026-07-21-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.name = AAZStrArg( - options=["-n", "--name"], - help="The name of the AgentFabric", - required=True, - id_part="name", - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.AgentFabricsGet(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 AgentFabricsGet(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.NetworkSecurity/agentFabrics/{agentFabricName}", - **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( - "agentFabricName", self.ctx.args.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-21-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={"required": 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.tags = AAZDictType() - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.default_policy_groups = AAZListType( - serialized_name="defaultPolicyGroups", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.trust_domain = AAZStrType( - serialized_name="trustDomain", - ) - - default_policy_groups = cls._schema_on_200.properties.default_policy_groups - default_policy_groups.Element = AAZStrType() - - 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", - ) - - tags = cls._schema_on_200.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _ShowHelper: - """Helper class for Show""" - - -__all__ = ["Show"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_update.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_update.py deleted file mode 100644 index cfc6bde9e83..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_update.py +++ /dev/null @@ -1,270 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh fabric update", -) -class Update(AAZCommand): - """Update an Agent Mesh fabric's tags - - :example: AgentFabrics_Update - az agentmesh fabric update --resource-group rgnetworksecurity --name testAIFabric --tags "{env:production}" - """ - - _aaz_info = { - "version": "2026-07-21-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/agentfabrics/{}", "2026-07-21-preview"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(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.name = AAZStrArg( - options=["-n", "--name"], - help="The name of the AgentFabric", - required=True, - id_part="name", - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - - # define Arg Group "Properties" - - _args_schema = cls._args_schema - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Properties", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.AgentFabricsUpdate(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 AgentFabricsUpdate(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 [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkSecurity/agentFabrics/{agentFabricName}", - **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( - "agentFabricName", self.ctx.args.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-21-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("tags", AAZDictType, ".tags") - - tags = _builder.get(".tags") - if tags is not None: - tags.set_elements(AAZStrType, ".") - - 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={"required": 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.tags = AAZDictType() - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.default_policy_groups = AAZListType( - serialized_name="defaultPolicyGroups", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.trust_domain = AAZStrType( - serialized_name="trustDomain", - ) - - default_policy_groups = cls._schema_on_200.properties.default_policy_groups - default_policy_groups.Element = AAZStrType() - - 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", - ) - - tags = cls._schema_on_200.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _UpdateHelper: - """Helper class for Update""" - - -__all__ = ["Update"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_wait.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_wait.py deleted file mode 100644 index 3e21749e3e0..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/_wait.py +++ /dev/null @@ -1,219 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh fabric wait", -) -class Wait(AAZWaitCommand): - """Place the CLI in a waiting state until a condition is met. - """ - - _aaz_info = { - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/agentfabrics/{}", "2026-07-21-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.name = AAZStrArg( - options=["-n", "--name"], - help="The name of the AgentFabric", - required=True, - id_part="name", - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.AgentFabricsGet(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=False) - return result - - class AgentFabricsGet(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.NetworkSecurity/agentFabrics/{agentFabricName}", - **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( - "agentFabricName", self.ctx.args.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-21-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={"required": 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.tags = AAZDictType() - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.default_policy_groups = AAZListType( - serialized_name="defaultPolicyGroups", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.trust_domain = AAZStrType( - serialized_name="trustDomain", - ) - - default_policy_groups = cls._schema_on_200.properties.default_policy_groups - default_policy_groups.Element = AAZStrType() - - 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", - ) - - tags = cls._schema_on_200.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _WaitHelper: - """Helper class for Wait""" - - -__all__ = ["Wait"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/__cmd_group.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/__cmd_group.py deleted file mode 100644 index 605104362fc..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/__cmd_group.py +++ /dev/null @@ -1,23 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh fabric member", -) -class __CMDGroup(AAZCommandGroup): - """Manage members of an Agent Mesh fabric. - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/__init__.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/__init__.py deleted file mode 100644 index db73033039b..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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 ._delete import * -from ._list import * -from ._show import * -from ._update import * -from ._wait import * diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_create.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_create.py deleted file mode 100644 index 132225126a9..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_create.py +++ /dev/null @@ -1,516 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh fabric member create", -) -class Create(AAZCommand): - """Create a member in an Agent Mesh fabric - - :example: Members_CreateOrUpdate - az agentmesh fabric member create --resource-group rgnetworksecurity --fabric-name testAIFabric --member-name testMember --location eastus --workload "{aci:{resource-id:/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgnetworksecurity/providers/Microsoft.ContainerInstance/containerGroups/testContainerGroup}}" - - :example: Members_CreateOrUpdate_AgentFabricSandbox - az agentmesh fabric member create --resource-group rgnetworksecurity --fabric-name testAIFabric --member-name sandboxMember --location eastus --workload "{agent-fabric-sandbox:{image:{uri:'contoso.azurecr.io/agents/sandbox:1.0.0',digest:'sha256:2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae',pull-policy:IfNotPresent},resources:{cpu:2,memory:4Gi,disk:20Gi},agent-identity:{tenant-id:72f988bf-86f1-41af-91ab-2d7cd011db47,agent-id:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee},endpoints:[{name:http,port:8080}],domain:sandbox-member.testaifabric.contoso.com}}" - """ - - _aaz_info = { - "version": "2026-07-21-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/agentfabrics/{}/members/{}", "2026-07-21-preview"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(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.fabric_name = AAZStrArg( - options=["--fabric-name"], - help="The name of the AgentFabric", - required=True, - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.member_name = AAZStrArg( - options=["--member-name"], - help="The name of the Member", - required=True, - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - - # define Arg Group "Properties" - - _args_schema = cls._args_schema - _args_schema.workload = AAZObjectArg( - options=["--workload"], - arg_group="Properties", - help="The workload configuration of the member. Set at creation and immutable thereafter; to change the workload, delete and recreate the member.", - ) - - workload = cls._args_schema.workload - workload.aci = AAZObjectArg( - options=["aci"], - ) - workload.agent_fabric_sandbox = AAZObjectArg( - options=["agent-fabric-sandbox"], - ) - - aci = cls._args_schema.workload.aci - aci.resource_id = AAZResourceIdArg( - options=["resource-id"], - help="The Azure Resource Manager resource ID of the Azure Container Instances (ACI) container group backing this member's sandbox.", - required=True, - ) - - agent_fabric_sandbox = cls._args_schema.workload.agent_fabric_sandbox - agent_fabric_sandbox.agent_identity = AAZObjectArg( - options=["agent-identity"], - help="The Entra agent identity associated with the workload.", - ) - agent_fabric_sandbox.domain = AAZStrArg( - options=["domain"], - help="The resolvable DNS name assigned to the workload.", - required=True, - ) - agent_fabric_sandbox.endpoints = AAZListArg( - options=["endpoints"], - help="The network endpoints exposed by the workload.", - ) - agent_fabric_sandbox.image = AAZObjectArg( - options=["image"], - help="The container image to run for the workload.", - required=True, - ) - agent_fabric_sandbox.resources = AAZObjectArg( - options=["resources"], - help="The compute resources allocated to the workload.", - required=True, - ) - - agent_identity = cls._args_schema.workload.agent_fabric_sandbox.agent_identity - agent_identity.agent_id = AAZStrArg( - options=["agent-id"], - help="The Entra agent ID representing the workload's identity.", - required=True, - ) - agent_identity.tenant_id = AAZStrArg( - options=["tenant-id"], - help="The Azure tenant ID that owns the agent identity.", - required=True, - ) - - endpoints = cls._args_schema.workload.agent_fabric_sandbox.endpoints - endpoints.Element = AAZObjectArg() - - _element = cls._args_schema.workload.agent_fabric_sandbox.endpoints.Element - _element.name = AAZStrArg( - options=["name"], - help="The name of the endpoint.", - required=True, - ) - _element.port = AAZIntArg( - options=["port"], - help="The port the endpoint listens on.", - required=True, - ) - - image = cls._args_schema.workload.agent_fabric_sandbox.image - image.digest = AAZStrArg( - options=["digest"], - help="The image content digest used to pin an exact image version.", - ) - image.pull_policy = AAZStrArg( - options=["pull-policy"], - help="The policy controlling when the image is pulled.", - enum={"Always": "Always", "IfNotPresent": "IfNotPresent"}, - ) - image.uri = AAZStrArg( - options=["uri"], - help="The image reference URI (e.g., registry/repository:tag).", - required=True, - ) - - resources = cls._args_schema.workload.agent_fabric_sandbox.resources - resources.cpu = AAZStrArg( - options=["cpu"], - help="The amount of CPU to allocate to the workload.", - required=True, - ) - resources.disk = AAZStrArg( - options=["disk"], - help="The amount of disk to allocate to the workload.", - ) - resources.memory = AAZStrArg( - options=["memory"], - help="The amount of memory to allocate to the workload.", - required=True, - ) - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="The geo-location where the resource lives", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Resource", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.MembersCreateOrUpdate(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 MembersCreateOrUpdate(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 [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200, 201]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkSecurity/agentFabrics/{agentFabricName}/members/{memberName}", - **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( - "agentFabricName", self.ctx.args.fabric_name, - required=True, - ), - **self.serialize_url_param( - "memberName", self.ctx.args.member_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-21-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("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) - _builder.set_prop("properties", AAZObjectType) - _builder.set_prop("tags", AAZDictType, ".tags") - - properties = _builder.get(".properties") - if properties is not None: - properties.set_prop("workload", AAZObjectType, ".workload") - - workload = _builder.get(".properties.workload") - if workload is not None: - workload.set_const("type", "ACI", AAZStrType, ".aci", typ_kwargs={"flags": {"required": True}}) - workload.set_const("type", "AgentFabricSandbox", AAZStrType, ".agent_fabric_sandbox", typ_kwargs={"flags": {"required": True}}) - workload.discriminate_by("type", "ACI") - workload.discriminate_by("type", "AgentFabricSandbox") - - disc_aci = _builder.get(".properties.workload{type:ACI}") - if disc_aci is not None: - disc_aci.set_prop("resourceId", AAZStrType, ".aci.resource_id", typ_kwargs={"flags": {"required": True}}) - - disc_agent_fabric_sandbox = _builder.get(".properties.workload{type:AgentFabricSandbox}") - if disc_agent_fabric_sandbox is not None: - disc_agent_fabric_sandbox.set_prop("agentIdentity", AAZObjectType, ".agent_fabric_sandbox.agent_identity") - disc_agent_fabric_sandbox.set_prop("domain", AAZStrType, ".agent_fabric_sandbox.domain", typ_kwargs={"flags": {"required": True}}) - disc_agent_fabric_sandbox.set_prop("endpoints", AAZListType, ".agent_fabric_sandbox.endpoints") - disc_agent_fabric_sandbox.set_prop("image", AAZObjectType, ".agent_fabric_sandbox.image", typ_kwargs={"flags": {"required": True}}) - disc_agent_fabric_sandbox.set_prop("resources", AAZObjectType, ".agent_fabric_sandbox.resources", typ_kwargs={"flags": {"required": True}}) - - agent_identity = _builder.get(".properties.workload{type:AgentFabricSandbox}.agentIdentity") - if agent_identity is not None: - agent_identity.set_prop("agentId", AAZStrType, ".agent_id", typ_kwargs={"flags": {"required": True}}) - agent_identity.set_prop("tenantId", AAZStrType, ".tenant_id", typ_kwargs={"flags": {"required": True}}) - - endpoints = _builder.get(".properties.workload{type:AgentFabricSandbox}.endpoints") - if endpoints is not None: - endpoints.set_elements(AAZObjectType, ".") - - _elements = _builder.get(".properties.workload{type:AgentFabricSandbox}.endpoints[]") - if _elements is not None: - _elements.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) - _elements.set_prop("port", AAZIntType, ".port", typ_kwargs={"flags": {"required": True}}) - - image = _builder.get(".properties.workload{type:AgentFabricSandbox}.image") - if image is not None: - image.set_prop("digest", AAZStrType, ".digest") - image.set_prop("pullPolicy", AAZStrType, ".pull_policy") - image.set_prop("uri", AAZStrType, ".uri", typ_kwargs={"flags": {"required": True}}) - - resources = _builder.get(".properties.workload{type:AgentFabricSandbox}.resources") - if resources is not None: - resources.set_prop("cpu", AAZStrType, ".cpu", typ_kwargs={"flags": {"required": True}}) - resources.set_prop("disk", AAZStrType, ".disk") - resources.set_prop("memory", AAZStrType, ".memory", typ_kwargs={"flags": {"required": True}}) - - tags = _builder.get(".tags") - if tags is not None: - tags.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.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.location = AAZStrType( - flags={"required": True}, - ) - _schema_on_200_201.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.properties = AAZObjectType() - _schema_on_200_201.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200_201.tags = AAZDictType() - _schema_on_200_201.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200_201.properties - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.spiffe_id = AAZStrType( - serialized_name="spiffeId", - flags={"read_only": True}, - ) - properties.workload = AAZObjectType() - - workload = cls._schema_on_200_201.properties.workload - workload.type = AAZStrType( - flags={"required": True}, - ) - workload.workload_id = AAZStrType( - serialized_name="workloadId", - flags={"read_only": True}, - ) - - disc_aci = cls._schema_on_200_201.properties.workload.discriminate_by("type", "ACI") - disc_aci.resource_id = AAZStrType( - serialized_name="resourceId", - flags={"required": True}, - ) - - disc_agent_fabric_sandbox = cls._schema_on_200_201.properties.workload.discriminate_by("type", "AgentFabricSandbox") - disc_agent_fabric_sandbox.agent_identity = AAZObjectType( - serialized_name="agentIdentity", - ) - disc_agent_fabric_sandbox.domain = AAZStrType( - flags={"required": True}, - ) - disc_agent_fabric_sandbox.endpoints = AAZListType() - disc_agent_fabric_sandbox.image = AAZObjectType( - flags={"required": True}, - ) - disc_agent_fabric_sandbox.resources = AAZObjectType( - flags={"required": True}, - ) - - agent_identity = cls._schema_on_200_201.properties.workload.discriminate_by("type", "AgentFabricSandbox").agent_identity - agent_identity.agent_id = AAZStrType( - serialized_name="agentId", - flags={"required": True}, - ) - agent_identity.tenant_id = AAZStrType( - serialized_name="tenantId", - flags={"required": True}, - ) - - endpoints = cls._schema_on_200_201.properties.workload.discriminate_by("type", "AgentFabricSandbox").endpoints - endpoints.Element = AAZObjectType() - - _element = cls._schema_on_200_201.properties.workload.discriminate_by("type", "AgentFabricSandbox").endpoints.Element - _element.name = AAZStrType( - flags={"required": True}, - ) - _element.port = AAZIntType( - flags={"required": True}, - ) - - image = cls._schema_on_200_201.properties.workload.discriminate_by("type", "AgentFabricSandbox").image - image.digest = AAZStrType() - image.pull_policy = AAZStrType( - serialized_name="pullPolicy", - ) - image.uri = AAZStrType( - flags={"required": True}, - ) - - resources = cls._schema_on_200_201.properties.workload.discriminate_by("type", "AgentFabricSandbox").resources - resources.cpu = AAZStrType( - flags={"required": True}, - ) - resources.disk = AAZStrType() - resources.memory = AAZStrType( - flags={"required": True}, - ) - - system_data = cls._schema_on_200_201.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", - ) - - tags = cls._schema_on_200_201.tags - tags.Element = AAZStrType() - - return cls._schema_on_200_201 - - -class _CreateHelper: - """Helper class for Create""" - - -__all__ = ["Create"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_delete.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_delete.py deleted file mode 100644 index 49302597e98..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_delete.py +++ /dev/null @@ -1,179 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh fabric member delete", - confirmation="Are you sure you want to perform this operation?", -) -class Delete(AAZCommand): - """Delete a member from an Agent Mesh fabric - - :example: Members_Delete - az agentmesh fabric member delete --resource-group rgnetworksecurity --fabric-name testAIFabric --member-name testMember - """ - - _aaz_info = { - "version": "2026-07-21-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/agentfabrics/{}/members/{}", "2026-07-21-preview"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, 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.fabric_name = AAZStrArg( - options=["--fabric-name"], - help="The name of the AgentFabric", - required=True, - id_part="name", - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.member_name = AAZStrArg( - options=["--member-name"], - help="The name of the Member", - required=True, - id_part="child_name_1", - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.MembersDelete(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class MembersDelete(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 [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [204]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_204, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200, 201]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkSecurity/agentFabrics/{agentFabricName}/members/{memberName}", - **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( - "agentFabricName", self.ctx.args.fabric_name, - required=True, - ), - **self.serialize_url_param( - "memberName", self.ctx.args.member_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-21-preview", - required=True, - ), - } - return parameters - - def on_204(self, session): - pass - - def on_200_201(self, session): - pass - - -class _DeleteHelper: - """Helper class for Delete""" - - -__all__ = ["Delete"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_list.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_list.py deleted file mode 100644 index 7839c3a8345..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_list.py +++ /dev/null @@ -1,300 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh fabric member list", -) -class List(AAZCommand): - """List members in an Agent Mesh fabric - - :example: Members_ListByParent - az agentmesh fabric member list --resource-group rgnetworksecurity --fabric-name testAIFabric - """ - - _aaz_info = { - "version": "2026-07-21-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/agentfabrics/{}/members", "2026-07-21-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.fabric_name = AAZStrArg( - options=["--fabric-name"], - help="The name of the AgentFabric", - required=True, - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.MembersListByParent(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 MembersListByParent(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.NetworkSecurity/agentFabrics/{agentFabricName}/members", - **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( - "agentFabricName", self.ctx.args.fabric_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-21-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={"required": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType() - _element.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _element.tags = AAZDictType() - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.value.Element.properties - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.spiffe_id = AAZStrType( - serialized_name="spiffeId", - flags={"read_only": True}, - ) - properties.workload = AAZObjectType() - - workload = cls._schema_on_200.value.Element.properties.workload - workload.type = AAZStrType( - flags={"required": True}, - ) - workload.workload_id = AAZStrType( - serialized_name="workloadId", - flags={"read_only": True}, - ) - - disc_aci = cls._schema_on_200.value.Element.properties.workload.discriminate_by("type", "ACI") - disc_aci.resource_id = AAZStrType( - serialized_name="resourceId", - flags={"required": True}, - ) - - disc_agent_fabric_sandbox = cls._schema_on_200.value.Element.properties.workload.discriminate_by("type", "AgentFabricSandbox") - disc_agent_fabric_sandbox.agent_identity = AAZObjectType( - serialized_name="agentIdentity", - ) - disc_agent_fabric_sandbox.domain = AAZStrType( - flags={"required": True}, - ) - disc_agent_fabric_sandbox.endpoints = AAZListType() - disc_agent_fabric_sandbox.image = AAZObjectType( - flags={"required": True}, - ) - disc_agent_fabric_sandbox.resources = AAZObjectType( - flags={"required": True}, - ) - - agent_identity = cls._schema_on_200.value.Element.properties.workload.discriminate_by("type", "AgentFabricSandbox").agent_identity - agent_identity.agent_id = AAZStrType( - serialized_name="agentId", - flags={"required": True}, - ) - agent_identity.tenant_id = AAZStrType( - serialized_name="tenantId", - flags={"required": True}, - ) - - endpoints = cls._schema_on_200.value.Element.properties.workload.discriminate_by("type", "AgentFabricSandbox").endpoints - endpoints.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.workload.discriminate_by("type", "AgentFabricSandbox").endpoints.Element - _element.name = AAZStrType( - flags={"required": True}, - ) - _element.port = AAZIntType( - flags={"required": True}, - ) - - image = cls._schema_on_200.value.Element.properties.workload.discriminate_by("type", "AgentFabricSandbox").image - image.digest = AAZStrType() - image.pull_policy = AAZStrType( - serialized_name="pullPolicy", - ) - image.uri = AAZStrType( - flags={"required": True}, - ) - - resources = cls._schema_on_200.value.Element.properties.workload.discriminate_by("type", "AgentFabricSandbox").resources - resources.cpu = AAZStrType( - flags={"required": True}, - ) - resources.disk = AAZStrType() - resources.memory = AAZStrType( - flags={"required": True}, - ) - - system_data = cls._schema_on_200.value.Element.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - tags = cls._schema_on_200.value.Element.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _ListHelper: - """Helper class for List""" - - -__all__ = ["List"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_show.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_show.py deleted file mode 100644 index b8be0d21474..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_show.py +++ /dev/null @@ -1,301 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh fabric member show", -) -class Show(AAZCommand): - """Get a member in an Agent Mesh fabric - - :example: Members_Get - az agentmesh fabric member show --resource-group rgnetworksecurity --fabric-name testAIFabric --member-name testMember - """ - - _aaz_info = { - "version": "2026-07-21-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/agentfabrics/{}/members/{}", "2026-07-21-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.fabric_name = AAZStrArg( - options=["--fabric-name"], - help="The name of the AgentFabric", - required=True, - id_part="name", - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.member_name = AAZStrArg( - options=["--member-name"], - help="The name of the Member", - required=True, - id_part="child_name_1", - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.MembersGet(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 MembersGet(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.NetworkSecurity/agentFabrics/{agentFabricName}/members/{memberName}", - **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( - "agentFabricName", self.ctx.args.fabric_name, - required=True, - ), - **self.serialize_url_param( - "memberName", self.ctx.args.member_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-21-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={"required": 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.tags = AAZDictType() - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.spiffe_id = AAZStrType( - serialized_name="spiffeId", - flags={"read_only": True}, - ) - properties.workload = AAZObjectType() - - workload = cls._schema_on_200.properties.workload - workload.type = AAZStrType( - flags={"required": True}, - ) - workload.workload_id = AAZStrType( - serialized_name="workloadId", - flags={"read_only": True}, - ) - - disc_aci = cls._schema_on_200.properties.workload.discriminate_by("type", "ACI") - disc_aci.resource_id = AAZStrType( - serialized_name="resourceId", - flags={"required": True}, - ) - - disc_agent_fabric_sandbox = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox") - disc_agent_fabric_sandbox.agent_identity = AAZObjectType( - serialized_name="agentIdentity", - ) - disc_agent_fabric_sandbox.domain = AAZStrType( - flags={"required": True}, - ) - disc_agent_fabric_sandbox.endpoints = AAZListType() - disc_agent_fabric_sandbox.image = AAZObjectType( - flags={"required": True}, - ) - disc_agent_fabric_sandbox.resources = AAZObjectType( - flags={"required": True}, - ) - - agent_identity = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox").agent_identity - agent_identity.agent_id = AAZStrType( - serialized_name="agentId", - flags={"required": True}, - ) - agent_identity.tenant_id = AAZStrType( - serialized_name="tenantId", - flags={"required": True}, - ) - - endpoints = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox").endpoints - endpoints.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox").endpoints.Element - _element.name = AAZStrType( - flags={"required": True}, - ) - _element.port = AAZIntType( - flags={"required": True}, - ) - - image = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox").image - image.digest = AAZStrType() - image.pull_policy = AAZStrType( - serialized_name="pullPolicy", - ) - image.uri = AAZStrType( - flags={"required": True}, - ) - - resources = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox").resources - resources.cpu = AAZStrType( - flags={"required": True}, - ) - resources.disk = AAZStrType() - resources.memory = AAZStrType( - 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", - ) - - tags = cls._schema_on_200.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _ShowHelper: - """Helper class for Show""" - - -__all__ = ["Show"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_update.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_update.py deleted file mode 100644 index ca7deac0548..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_update.py +++ /dev/null @@ -1,348 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh fabric member update", -) -class Update(AAZCommand): - """Update an Agent Mesh fabric member's tags - - :example: Members_Update - az agentmesh fabric member update --resource-group rgnetworksecurity --fabric-name testAIFabric --member-name testMember --tags "{environment:production}" - """ - - _aaz_info = { - "version": "2026-07-21-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/agentfabrics/{}/members/{}", "2026-07-21-preview"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(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.fabric_name = AAZStrArg( - options=["--fabric-name"], - help="The name of the AgentFabric", - required=True, - id_part="name", - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.member_name = AAZStrArg( - options=["--member-name"], - help="The name of the Member", - required=True, - id_part="child_name_1", - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - - # define Arg Group "Properties" - - _args_schema = cls._args_schema - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Properties", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.MembersUpdate(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 MembersUpdate(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 [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkSecurity/agentFabrics/{agentFabricName}/members/{memberName}", - **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( - "agentFabricName", self.ctx.args.fabric_name, - required=True, - ), - **self.serialize_url_param( - "memberName", self.ctx.args.member_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-21-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("tags", AAZDictType, ".tags") - - tags = _builder.get(".tags") - if tags is not None: - tags.set_elements(AAZStrType, ".") - - 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={"required": 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.tags = AAZDictType() - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.spiffe_id = AAZStrType( - serialized_name="spiffeId", - flags={"read_only": True}, - ) - properties.workload = AAZObjectType() - - workload = cls._schema_on_200.properties.workload - workload.type = AAZStrType( - flags={"required": True}, - ) - workload.workload_id = AAZStrType( - serialized_name="workloadId", - flags={"read_only": True}, - ) - - disc_aci = cls._schema_on_200.properties.workload.discriminate_by("type", "ACI") - disc_aci.resource_id = AAZStrType( - serialized_name="resourceId", - flags={"required": True}, - ) - - disc_agent_fabric_sandbox = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox") - disc_agent_fabric_sandbox.agent_identity = AAZObjectType( - serialized_name="agentIdentity", - ) - disc_agent_fabric_sandbox.domain = AAZStrType( - flags={"required": True}, - ) - disc_agent_fabric_sandbox.endpoints = AAZListType() - disc_agent_fabric_sandbox.image = AAZObjectType( - flags={"required": True}, - ) - disc_agent_fabric_sandbox.resources = AAZObjectType( - flags={"required": True}, - ) - - agent_identity = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox").agent_identity - agent_identity.agent_id = AAZStrType( - serialized_name="agentId", - flags={"required": True}, - ) - agent_identity.tenant_id = AAZStrType( - serialized_name="tenantId", - flags={"required": True}, - ) - - endpoints = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox").endpoints - endpoints.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox").endpoints.Element - _element.name = AAZStrType( - flags={"required": True}, - ) - _element.port = AAZIntType( - flags={"required": True}, - ) - - image = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox").image - image.digest = AAZStrType() - image.pull_policy = AAZStrType( - serialized_name="pullPolicy", - ) - image.uri = AAZStrType( - flags={"required": True}, - ) - - resources = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox").resources - resources.cpu = AAZStrType( - flags={"required": True}, - ) - resources.disk = AAZStrType() - resources.memory = AAZStrType( - 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", - ) - - tags = cls._schema_on_200.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _UpdateHelper: - """Helper class for Update""" - - -__all__ = ["Update"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_wait.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_wait.py deleted file mode 100644 index 21cb09dd8a0..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/fabric/member/_wait.py +++ /dev/null @@ -1,297 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh fabric member wait", -) -class Wait(AAZWaitCommand): - """Place the CLI in a waiting state until a condition is met. - """ - - _aaz_info = { - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/agentfabrics/{}/members/{}", "2026-07-21-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.fabric_name = AAZStrArg( - options=["--fabric-name"], - help="The name of the AgentFabric", - required=True, - id_part="name", - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.member_name = AAZStrArg( - options=["--member-name"], - help="The name of the Member", - required=True, - id_part="child_name_1", - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.MembersGet(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=False) - return result - - class MembersGet(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.NetworkSecurity/agentFabrics/{agentFabricName}/members/{memberName}", - **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( - "agentFabricName", self.ctx.args.fabric_name, - required=True, - ), - **self.serialize_url_param( - "memberName", self.ctx.args.member_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-21-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={"required": 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.tags = AAZDictType() - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.spiffe_id = AAZStrType( - serialized_name="spiffeId", - flags={"read_only": True}, - ) - properties.workload = AAZObjectType() - - workload = cls._schema_on_200.properties.workload - workload.type = AAZStrType( - flags={"required": True}, - ) - workload.workload_id = AAZStrType( - serialized_name="workloadId", - flags={"read_only": True}, - ) - - disc_aci = cls._schema_on_200.properties.workload.discriminate_by("type", "ACI") - disc_aci.resource_id = AAZStrType( - serialized_name="resourceId", - flags={"required": True}, - ) - - disc_agent_fabric_sandbox = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox") - disc_agent_fabric_sandbox.agent_identity = AAZObjectType( - serialized_name="agentIdentity", - ) - disc_agent_fabric_sandbox.domain = AAZStrType( - flags={"required": True}, - ) - disc_agent_fabric_sandbox.endpoints = AAZListType() - disc_agent_fabric_sandbox.image = AAZObjectType( - flags={"required": True}, - ) - disc_agent_fabric_sandbox.resources = AAZObjectType( - flags={"required": True}, - ) - - agent_identity = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox").agent_identity - agent_identity.agent_id = AAZStrType( - serialized_name="agentId", - flags={"required": True}, - ) - agent_identity.tenant_id = AAZStrType( - serialized_name="tenantId", - flags={"required": True}, - ) - - endpoints = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox").endpoints - endpoints.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox").endpoints.Element - _element.name = AAZStrType( - flags={"required": True}, - ) - _element.port = AAZIntType( - flags={"required": True}, - ) - - image = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox").image - image.digest = AAZStrType() - image.pull_policy = AAZStrType( - serialized_name="pullPolicy", - ) - image.uri = AAZStrType( - flags={"required": True}, - ) - - resources = cls._schema_on_200.properties.workload.discriminate_by("type", "AgentFabricSandbox").resources - resources.cpu = AAZStrType( - flags={"required": True}, - ) - resources.disk = AAZStrType() - resources.memory = AAZStrType( - 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", - ) - - tags = cls._schema_on_200.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _WaitHelper: - """Helper class for Wait""" - - -__all__ = ["Wait"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/__cmd_group.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/__cmd_group.py deleted file mode 100644 index 81a3e9225f8..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/__cmd_group.py +++ /dev/null @@ -1,23 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh policy-group", -) -class __CMDGroup(AAZCommandGroup): - """Manage Agent Mesh policy groups. - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/__init__.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/__init__.py deleted file mode 100644 index db73033039b..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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 ._delete import * -from ._list import * -from ._show import * -from ._update import * -from ._wait import * diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_create.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_create.py deleted file mode 100644 index 0a5eb2bfbdb..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_create.py +++ /dev/null @@ -1,1332 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh policy-group create", -) -class Create(AAZCommand): - """Create an Agent Mesh policy group - - :example: PolicyGroups_CreateOrUpdate - az agentmesh policy-group create --resource-group rgnetworksecurity --name testPolicyGroup --location eastus --tags "{env:test}" --display-name "Test Policy Group" --description "A policy group for testing" --priority 100 --network-security-policies "[{fqdn-filtering:{name:allowOutbound,priority:10,direction:Outbound,ports:[443,80],source:{workload-id-patterns:{patterns:[workload1,workload2]}},destination:{fqdns:{fqdns:[example.com,contoso.com]}}}}]" - - :example: PolicyGroups_CreateOrUpdate_ContentInspection - az agentmesh policy-group create --resource-group rgnetworksecurity --name contentInspectionGroup --location eastus --tags "{env:test}" --display-name "Content Inspection Policy Group" --description "A policy group demonstrating content inspection policies" --priority 100 --network-security-policies "[{content-inspection:{source:{workload-id-patterns:{patterns:['spiffe://contoso.com/ns/default/sa/*']}},prompt-injection-protection:{sensitivity:High,prompt-locations:['$.messages[*].content','$.input'],response-locations:['$.choices[*].message.content'],on-detection:BlockAndAlert}}}]" - - :example: PolicyGroups_CreateOrUpdate_Mcp - az agentmesh policy-group create --resource-group rgnetworksecurity --name mcpPolicyGroup --location eastus --tags "{env:test}" --display-name "MCP Policy Group" --description "A policy group demonstrating MCP server policies" --priority 100 --network-security-policies "[{mcp:{default-action:Deny,source:{workload-id-patterns:{patterns:['spiffe://contoso.com/ns/default/sa/*']}},destination:{workload-id-patterns:{patterns:['spiffe://contoso.com/ns/mcp/sa/*']}},rules:[{action:Allow,tools:[search,fetch]},{action:Deny,tools:[deleteFile]}]}},{mcp:{default-action:Allow,source:{workload-id-patterns:{patterns:['spiffe://contoso.com/ns/default/sa/*']}},destination:{fqdns:{fqdns:[mcp.contoso.com]}},rules:[{action:Deny,tools:[executeShell,writeFile]}]}},{mcp:{default-action:Deny,source:{workload-id-patterns:{patterns:['spiffe://contoso.com/ns/default/sa/*']}},destination:{address-prefixes:{prefixes:[10.0.0.0/24]}},rules:[{action:Allow,tools:[listResources,readResource]}]}}]" - - :example: PolicyGroups_CreateOrUpdate_TlsInspection - az agentmesh policy-group create --resource-group rgnetworksecurity --name tlsInspectionPolicyGroup --location eastus --tags "{env:test}" --display-name "TLS Inspection Policy Group" --description "A policy group demonstrating TLS inspection policies" --priority 100 --network-security-policies "[{tls-inspection:{source:{workload-id-patterns:{patterns:['spiffe://contoso.com/ns/default/sa/*']}},certificate:{azure-managed-ca:{}}}}]" - - :example: PolicyGroups_CreateOrUpdate_UrlFiltering - az agentmesh policy-group create --resource-group rgnetworksecurity --name urlFilteringPolicyGroup --location eastus --tags "{env:test}" --display-name "URL Filtering Policy Group" --description "A policy group demonstrating URL filtering" --priority 100 --network-security-policies "[{url-filtering:{default-action:Deny,source:{address-prefixes:{prefixes:[10.0.0.0/24]}},destination:{fqdns:{fqdns:[api.contoso.com]}},rules:[{name:allowProductApi,priority:10,hostname:api.contoso.com,method:GET,paths:['/v1/products','/v1/products/*'],action:Allow},{name:denyAdmin,priority:20,paths:['/admin/*'],action:Deny}]}}]" - """ - - _aaz_info = { - "version": "2026-07-21-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/policygroups/{}", "2026-07-21-preview"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(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.name = AAZStrArg( - options=["-n", "--name"], - help="The name of the PolicyGroup", - required=True, - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - - # define Arg Group "Properties" - - _args_schema = cls._args_schema - _args_schema.description = AAZStrArg( - options=["--description"], - arg_group="Properties", - help="The description of the policy group.", - ) - _args_schema.display_name = AAZStrArg( - options=["--display-name"], - arg_group="Properties", - help="The display name of the policy group.", - ) - _args_schema.network_security_policies = AAZListArg( - options=["--network-security-policies"], - arg_group="Properties", - help="The list of network security policies.", - ) - _args_schema.priority = AAZIntArg( - options=["--priority"], - arg_group="Properties", - help="The priority of the policy group.", - ) - - network_security_policies = cls._args_schema.network_security_policies - network_security_policies.Element = AAZObjectArg() - - _element = cls._args_schema.network_security_policies.Element - _element.content_inspection = AAZObjectArg( - options=["content-inspection"], - ) - _element.fqdn_filtering = AAZObjectArg( - options=["fqdn-filtering"], - ) - _element.mcp = AAZObjectArg( - options=["mcp"], - ) - _element.tls_inspection = AAZObjectArg( - options=["tls-inspection"], - ) - _element.url_filtering = AAZObjectArg( - options=["url-filtering"], - ) - - content_inspection = cls._args_schema.network_security_policies.Element.content_inspection - content_inspection.prompt_injection_protection = AAZObjectArg( - options=["prompt-injection-protection"], - help="The prompt injection protection configuration.", - ) - content_inspection.source = AAZObjectArg( - options=["source"], - help="The source details for the policy.", - required=True, - ) - - prompt_injection_protection = cls._args_schema.network_security_policies.Element.content_inspection.prompt_injection_protection - prompt_injection_protection.on_detection = AAZStrArg( - options=["on-detection"], - help="The action to take when prompt injection is detected.", - required=True, - enum={"Alert": "Alert", "BlockAndAlert": "BlockAndAlert", "Sanitize": "Sanitize"}, - ) - prompt_injection_protection.prompt_locations = AAZListArg( - options=["prompt-locations"], - help="The JSONPath expressions selecting the parts of the request body to scan for prompt injection.", - ) - prompt_injection_protection.response_locations = AAZListArg( - options=["response-locations"], - help="The JSONPath expressions selecting the parts of the response body to scan for prompt injection.", - ) - prompt_injection_protection.sensitivity = AAZStrArg( - options=["sensitivity"], - help="The sensitivity level of prompt injection detection.", - enum={"High": "High", "Low": "Low", "Medium": "Medium"}, - ) - - prompt_locations = cls._args_schema.network_security_policies.Element.content_inspection.prompt_injection_protection.prompt_locations - prompt_locations.Element = AAZStrArg() - - response_locations = cls._args_schema.network_security_policies.Element.content_inspection.prompt_injection_protection.response_locations - response_locations.Element = AAZStrArg() - - source = cls._args_schema.network_security_policies.Element.content_inspection.source - source.address_prefixes = AAZObjectArg( - options=["address-prefixes"], - ) - source.workload_id_patterns = AAZObjectArg( - options=["workload-id-patterns"], - ) - - address_prefixes = cls._args_schema.network_security_policies.Element.content_inspection.source.address_prefixes - address_prefixes.prefixes = AAZListArg( - options=["prefixes"], - help="The IP address prefixes, in CIDR notation, that identify the source(s).", - required=True, - ) - - prefixes = cls._args_schema.network_security_policies.Element.content_inspection.source.address_prefixes.prefixes - prefixes.Element = AAZStrArg() - - workload_id_patterns = cls._args_schema.network_security_policies.Element.content_inspection.source.workload_id_patterns - workload_id_patterns.patterns = AAZListArg( - options=["patterns"], - help="The workload ID patterns that identify the source(s).", - required=True, - ) - - patterns = cls._args_schema.network_security_policies.Element.content_inspection.source.workload_id_patterns.patterns - patterns.Element = AAZStrArg() - - fqdn_filtering = cls._args_schema.network_security_policies.Element.fqdn_filtering - fqdn_filtering.destination = AAZObjectArg( - options=["destination"], - help="The destination details for the policy.", - ) - fqdn_filtering.direction = AAZStrArg( - options=["direction"], - help="The direction of traffic for the policy.", - enum={"Both": "Both", "Inbound": "Inbound", "Outbound": "Outbound"}, - ) - fqdn_filtering.name = AAZStrArg( - options=["name"], - help="The name of the policy.", - ) - fqdn_filtering.ports = AAZListArg( - options=["ports"], - help="The ports for the policy.", - ) - fqdn_filtering.priority = AAZIntArg( - options=["priority"], - help="The priority of the policy.", - ) - fqdn_filtering.source = AAZObjectArg( - options=["source"], - help="The source details for the policy.", - required=True, - ) - - destination = cls._args_schema.network_security_policies.Element.fqdn_filtering.destination - destination.fqdns = AAZObjectArg( - options=["fqdns"], - ) - - fqdns = cls._args_schema.network_security_policies.Element.fqdn_filtering.destination.fqdns - fqdns.fqdns = AAZListArg( - options=["fqdns"], - help="The fully qualified domain names that identify the destination(s).", - required=True, - ) - - fqdns = cls._args_schema.network_security_policies.Element.fqdn_filtering.destination.fqdns.fqdns - fqdns.Element = AAZStrArg() - - ports = cls._args_schema.network_security_policies.Element.fqdn_filtering.ports - ports.Element = AAZIntArg() - - source = cls._args_schema.network_security_policies.Element.fqdn_filtering.source - source.address_prefixes = AAZObjectArg( - options=["address-prefixes"], - ) - source.workload_id_patterns = AAZObjectArg( - options=["workload-id-patterns"], - ) - - address_prefixes = cls._args_schema.network_security_policies.Element.fqdn_filtering.source.address_prefixes - address_prefixes.prefixes = AAZListArg( - options=["prefixes"], - help="The IP address prefixes, in CIDR notation, that identify the source(s).", - required=True, - ) - - prefixes = cls._args_schema.network_security_policies.Element.fqdn_filtering.source.address_prefixes.prefixes - prefixes.Element = AAZStrArg() - - workload_id_patterns = cls._args_schema.network_security_policies.Element.fqdn_filtering.source.workload_id_patterns - workload_id_patterns.patterns = AAZListArg( - options=["patterns"], - help="The workload ID patterns that identify the source(s).", - required=True, - ) - - patterns = cls._args_schema.network_security_policies.Element.fqdn_filtering.source.workload_id_patterns.patterns - patterns.Element = AAZStrArg() - - mcp = cls._args_schema.network_security_policies.Element.mcp - mcp.default_action = AAZStrArg( - options=["default-action"], - help="The default action to take when no rule in the policy matches.", - required=True, - enum={"Allow": "Allow", "Deny": "Deny"}, - ) - mcp.destination = AAZObjectArg( - options=["destination"], - help="The MCP server(s) that this policy applies to.", - required=True, - ) - mcp.rules = AAZListArg( - options=["rules"], - help="The list of MCP rules.", - required=True, - ) - mcp.source = AAZObjectArg( - options=["source"], - help="The source(s) that this policy applies to.", - required=True, - ) - - destination = cls._args_schema.network_security_policies.Element.mcp.destination - destination.address_prefixes = AAZObjectArg( - options=["address-prefixes"], - ) - destination.fqdns = AAZObjectArg( - options=["fqdns"], - ) - destination.workload_id_patterns = AAZObjectArg( - options=["workload-id-patterns"], - ) - - address_prefixes = cls._args_schema.network_security_policies.Element.mcp.destination.address_prefixes - address_prefixes.prefixes = AAZListArg( - options=["prefixes"], - help="The IP address prefixes, in CIDR notation, that identify the destination(s).", - required=True, - ) - - prefixes = cls._args_schema.network_security_policies.Element.mcp.destination.address_prefixes.prefixes - prefixes.Element = AAZStrArg() - - fqdns = cls._args_schema.network_security_policies.Element.mcp.destination.fqdns - fqdns.fqdns = AAZListArg( - options=["fqdns"], - help="The fully qualified domain names that identify the destination(s).", - required=True, - ) - - fqdns = cls._args_schema.network_security_policies.Element.mcp.destination.fqdns.fqdns - fqdns.Element = AAZStrArg() - - workload_id_patterns = cls._args_schema.network_security_policies.Element.mcp.destination.workload_id_patterns - workload_id_patterns.patterns = AAZListArg( - options=["patterns"], - help="The workload ID patterns that identify the destination(s).", - required=True, - ) - - patterns = cls._args_schema.network_security_policies.Element.mcp.destination.workload_id_patterns.patterns - patterns.Element = AAZStrArg() - - rules = cls._args_schema.network_security_policies.Element.mcp.rules - rules.Element = AAZObjectArg() - - _element = cls._args_schema.network_security_policies.Element.mcp.rules.Element - _element.action = AAZStrArg( - options=["action"], - help="The action to take for the specified MCP tools.", - required=True, - enum={"Allow": "Allow", "Deny": "Deny"}, - ) - _element.tools = AAZListArg( - options=["tools"], - help="The MCP tool names that the rule applies to.", - required=True, - ) - - tools = cls._args_schema.network_security_policies.Element.mcp.rules.Element.tools - tools.Element = AAZStrArg() - - source = cls._args_schema.network_security_policies.Element.mcp.source - source.address_prefixes = AAZObjectArg( - options=["address-prefixes"], - ) - source.workload_id_patterns = AAZObjectArg( - options=["workload-id-patterns"], - ) - - address_prefixes = cls._args_schema.network_security_policies.Element.mcp.source.address_prefixes - address_prefixes.prefixes = AAZListArg( - options=["prefixes"], - help="The IP address prefixes, in CIDR notation, that identify the source(s).", - required=True, - ) - - prefixes = cls._args_schema.network_security_policies.Element.mcp.source.address_prefixes.prefixes - prefixes.Element = AAZStrArg() - - workload_id_patterns = cls._args_schema.network_security_policies.Element.mcp.source.workload_id_patterns - workload_id_patterns.patterns = AAZListArg( - options=["patterns"], - help="The workload ID patterns that identify the source(s).", - required=True, - ) - - patterns = cls._args_schema.network_security_policies.Element.mcp.source.workload_id_patterns.patterns - patterns.Element = AAZStrArg() - - tls_inspection = cls._args_schema.network_security_policies.Element.tls_inspection - tls_inspection.certificate = AAZObjectArg( - options=["certificate"], - help="The certificate configuration used for TLS inspection.", - required=True, - ) - tls_inspection.source = AAZObjectArg( - options=["source"], - help="The source details for the policy.", - required=True, - ) - - certificate = cls._args_schema.network_security_policies.Element.tls_inspection.certificate - certificate.azure_managed_ca = AAZObjectArg( - options=["azure-managed-ca"], - blank={}, - ) - - source = cls._args_schema.network_security_policies.Element.tls_inspection.source - source.workload_id_patterns = AAZObjectArg( - options=["workload-id-patterns"], - ) - - workload_id_patterns = cls._args_schema.network_security_policies.Element.tls_inspection.source.workload_id_patterns - workload_id_patterns.patterns = AAZListArg( - options=["patterns"], - help="The workload ID patterns that identify the source(s).", - required=True, - ) - - patterns = cls._args_schema.network_security_policies.Element.tls_inspection.source.workload_id_patterns.patterns - patterns.Element = AAZStrArg() - - url_filtering = cls._args_schema.network_security_policies.Element.url_filtering - url_filtering.default_action = AAZStrArg( - options=["default-action"], - help="The default action to take when no rule in the policy matches.", - required=True, - enum={"Allow": "Allow", "Deny": "Deny"}, - ) - url_filtering.destination = AAZObjectArg( - options=["destination"], - help="The destination details for the policy.", - ) - url_filtering.rules = AAZListArg( - options=["rules"], - help="The list of URL filtering rules.", - required=True, - ) - url_filtering.source = AAZObjectArg( - options=["source"], - help="The source details for the policy.", - required=True, - ) - - destination = cls._args_schema.network_security_policies.Element.url_filtering.destination - destination.address_prefixes = AAZObjectArg( - options=["address-prefixes"], - ) - destination.fqdns = AAZObjectArg( - options=["fqdns"], - ) - destination.workload_id_patterns = AAZObjectArg( - options=["workload-id-patterns"], - ) - - address_prefixes = cls._args_schema.network_security_policies.Element.url_filtering.destination.address_prefixes - address_prefixes.prefixes = AAZListArg( - options=["prefixes"], - help="The IP address prefixes, in CIDR notation, that identify the destination(s).", - required=True, - ) - - prefixes = cls._args_schema.network_security_policies.Element.url_filtering.destination.address_prefixes.prefixes - prefixes.Element = AAZStrArg() - - fqdns = cls._args_schema.network_security_policies.Element.url_filtering.destination.fqdns - fqdns.fqdns = AAZListArg( - options=["fqdns"], - help="The fully qualified domain names that identify the destination(s).", - required=True, - ) - - fqdns = cls._args_schema.network_security_policies.Element.url_filtering.destination.fqdns.fqdns - fqdns.Element = AAZStrArg() - - workload_id_patterns = cls._args_schema.network_security_policies.Element.url_filtering.destination.workload_id_patterns - workload_id_patterns.patterns = AAZListArg( - options=["patterns"], - help="The workload ID patterns that identify the destination(s).", - required=True, - ) - - patterns = cls._args_schema.network_security_policies.Element.url_filtering.destination.workload_id_patterns.patterns - patterns.Element = AAZStrArg() - - rules = cls._args_schema.network_security_policies.Element.url_filtering.rules - rules.Element = AAZObjectArg() - - _element = cls._args_schema.network_security_policies.Element.url_filtering.rules.Element - _element.action = AAZStrArg( - options=["action"], - help="The action to take when the rule matches.", - required=True, - enum={"Allow": "Allow", "Deny": "Deny"}, - ) - _element.hostname = AAZStrArg( - options=["hostname"], - help="The hostname matched by the rule. If omitted, the rule matches any hostname.", - ) - _element.method = AAZStrArg( - options=["method"], - help="The HTTP method matched by the rule. If omitted, the rule matches any method.", - enum={"DELETE": "DELETE", "GET": "GET", "HEAD": "HEAD", "OPTIONS": "OPTIONS", "PATCH": "PATCH", "POST": "POST", "PUT": "PUT"}, - ) - _element.name = AAZStrArg( - options=["name"], - help="The name of the rule.", - required=True, - ) - _element.paths = AAZListArg( - options=["paths"], - help="The URL paths matched by the rule. If omitted, the rule matches any path.", - ) - _element.priority = AAZIntArg( - options=["priority"], - help="The priority of the rule. Rules are evaluated in ascending priority order.", - required=True, - ) - - paths = cls._args_schema.network_security_policies.Element.url_filtering.rules.Element.paths - paths.Element = AAZStrArg() - - source = cls._args_schema.network_security_policies.Element.url_filtering.source - source.address_prefixes = AAZObjectArg( - options=["address-prefixes"], - ) - source.workload_id_patterns = AAZObjectArg( - options=["workload-id-patterns"], - ) - - address_prefixes = cls._args_schema.network_security_policies.Element.url_filtering.source.address_prefixes - address_prefixes.prefixes = AAZListArg( - options=["prefixes"], - help="The IP address prefixes, in CIDR notation, that identify the source(s).", - required=True, - ) - - prefixes = cls._args_schema.network_security_policies.Element.url_filtering.source.address_prefixes.prefixes - prefixes.Element = AAZStrArg() - - workload_id_patterns = cls._args_schema.network_security_policies.Element.url_filtering.source.workload_id_patterns - workload_id_patterns.patterns = AAZListArg( - options=["patterns"], - help="The workload ID patterns that identify the source(s).", - required=True, - ) - - patterns = cls._args_schema.network_security_policies.Element.url_filtering.source.workload_id_patterns.patterns - patterns.Element = AAZStrArg() - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="The geo-location where the resource lives", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Resource", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.PolicyGroupsCreateOrUpdate(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 PolicyGroupsCreateOrUpdate(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 [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200, 201]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkSecurity/policyGroups/{policyGroupName}", - **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( - "policyGroupName", self.ctx.args.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-21-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("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) - _builder.set_prop("properties", AAZObjectType) - _builder.set_prop("tags", AAZDictType, ".tags") - - properties = _builder.get(".properties") - if properties is not None: - properties.set_prop("description", AAZStrType, ".description") - properties.set_prop("displayName", AAZStrType, ".display_name") - properties.set_prop("networkSecurityPolicies", AAZListType, ".network_security_policies") - properties.set_prop("priority", AAZIntType, ".priority") - - network_security_policies = _builder.get(".properties.networkSecurityPolicies") - if network_security_policies is not None: - network_security_policies.set_elements(AAZObjectType, ".") - - _elements = _builder.get(".properties.networkSecurityPolicies[]") - if _elements is not None: - _elements.set_const("type", "ContentInspection", AAZStrType, ".content_inspection", typ_kwargs={"flags": {"required": True}}) - _elements.set_const("type", "FqdnFiltering", AAZStrType, ".fqdn_filtering", typ_kwargs={"flags": {"required": True}}) - _elements.set_const("type", "Mcp", AAZStrType, ".mcp", typ_kwargs={"flags": {"required": True}}) - _elements.set_const("type", "TlsInspection", AAZStrType, ".tls_inspection", typ_kwargs={"flags": {"required": True}}) - _elements.set_const("type", "UrlFiltering", AAZStrType, ".url_filtering", typ_kwargs={"flags": {"required": True}}) - _elements.discriminate_by("type", "ContentInspection") - _elements.discriminate_by("type", "FqdnFiltering") - _elements.discriminate_by("type", "Mcp") - _elements.discriminate_by("type", "TlsInspection") - _elements.discriminate_by("type", "UrlFiltering") - - disc_content_inspection = _builder.get(".properties.networkSecurityPolicies[]{type:ContentInspection}") - if disc_content_inspection is not None: - disc_content_inspection.set_prop("promptInjectionProtection", AAZObjectType, ".content_inspection.prompt_injection_protection") - disc_content_inspection.set_prop("source", AAZObjectType, ".content_inspection.source", typ_kwargs={"flags": {"required": True}}) - - prompt_injection_protection = _builder.get(".properties.networkSecurityPolicies[]{type:ContentInspection}.promptInjectionProtection") - if prompt_injection_protection is not None: - prompt_injection_protection.set_prop("onDetection", AAZStrType, ".on_detection", typ_kwargs={"flags": {"required": True}}) - prompt_injection_protection.set_prop("promptLocations", AAZListType, ".prompt_locations") - prompt_injection_protection.set_prop("responseLocations", AAZListType, ".response_locations") - prompt_injection_protection.set_prop("sensitivity", AAZStrType, ".sensitivity") - - prompt_locations = _builder.get(".properties.networkSecurityPolicies[]{type:ContentInspection}.promptInjectionProtection.promptLocations") - if prompt_locations is not None: - prompt_locations.set_elements(AAZStrType, ".") - - response_locations = _builder.get(".properties.networkSecurityPolicies[]{type:ContentInspection}.promptInjectionProtection.responseLocations") - if response_locations is not None: - response_locations.set_elements(AAZStrType, ".") - - source = _builder.get(".properties.networkSecurityPolicies[]{type:ContentInspection}.source") - if source is not None: - source.set_const("type", "AddressPrefixes", AAZStrType, ".address_prefixes", typ_kwargs={"flags": {"required": True}}) - source.set_const("type", "WorkloadIdPatterns", AAZStrType, ".workload_id_patterns", typ_kwargs={"flags": {"required": True}}) - source.discriminate_by("type", "AddressPrefixes") - source.discriminate_by("type", "WorkloadIdPatterns") - - disc_address_prefixes = _builder.get(".properties.networkSecurityPolicies[]{type:ContentInspection}.source{type:AddressPrefixes}") - if disc_address_prefixes is not None: - disc_address_prefixes.set_prop("prefixes", AAZListType, ".address_prefixes.prefixes", typ_kwargs={"flags": {"required": True}}) - - prefixes = _builder.get(".properties.networkSecurityPolicies[]{type:ContentInspection}.source{type:AddressPrefixes}.prefixes") - if prefixes is not None: - prefixes.set_elements(AAZStrType, ".") - - disc_workload_id_patterns = _builder.get(".properties.networkSecurityPolicies[]{type:ContentInspection}.source{type:WorkloadIdPatterns}") - if disc_workload_id_patterns is not None: - disc_workload_id_patterns.set_prop("patterns", AAZListType, ".workload_id_patterns.patterns", typ_kwargs={"flags": {"required": True}}) - - patterns = _builder.get(".properties.networkSecurityPolicies[]{type:ContentInspection}.source{type:WorkloadIdPatterns}.patterns") - if patterns is not None: - patterns.set_elements(AAZStrType, ".") - - disc_fqdn_filtering = _builder.get(".properties.networkSecurityPolicies[]{type:FqdnFiltering}") - if disc_fqdn_filtering is not None: - disc_fqdn_filtering.set_prop("destination", AAZObjectType, ".fqdn_filtering.destination") - disc_fqdn_filtering.set_prop("direction", AAZStrType, ".fqdn_filtering.direction") - disc_fqdn_filtering.set_prop("name", AAZStrType, ".fqdn_filtering.name") - disc_fqdn_filtering.set_prop("ports", AAZListType, ".fqdn_filtering.ports") - disc_fqdn_filtering.set_prop("priority", AAZIntType, ".fqdn_filtering.priority") - disc_fqdn_filtering.set_prop("source", AAZObjectType, ".fqdn_filtering.source", typ_kwargs={"flags": {"required": True}}) - - destination = _builder.get(".properties.networkSecurityPolicies[]{type:FqdnFiltering}.destination") - if destination is not None: - destination.set_const("type", "Fqdns", AAZStrType, ".fqdns", typ_kwargs={"flags": {"required": True}}) - destination.discriminate_by("type", "Fqdns") - - disc_fqdns = _builder.get(".properties.networkSecurityPolicies[]{type:FqdnFiltering}.destination{type:Fqdns}") - if disc_fqdns is not None: - disc_fqdns.set_prop("fqdns", AAZListType, ".fqdns.fqdns", typ_kwargs={"flags": {"required": True}}) - - fqdns = _builder.get(".properties.networkSecurityPolicies[]{type:FqdnFiltering}.destination{type:Fqdns}.fqdns") - if fqdns is not None: - fqdns.set_elements(AAZStrType, ".") - - ports = _builder.get(".properties.networkSecurityPolicies[]{type:FqdnFiltering}.ports") - if ports is not None: - ports.set_elements(AAZIntType, ".") - - source = _builder.get(".properties.networkSecurityPolicies[]{type:FqdnFiltering}.source") - if source is not None: - source.set_const("type", "AddressPrefixes", AAZStrType, ".address_prefixes", typ_kwargs={"flags": {"required": True}}) - source.set_const("type", "WorkloadIdPatterns", AAZStrType, ".workload_id_patterns", typ_kwargs={"flags": {"required": True}}) - source.discriminate_by("type", "AddressPrefixes") - source.discriminate_by("type", "WorkloadIdPatterns") - - disc_address_prefixes = _builder.get(".properties.networkSecurityPolicies[]{type:FqdnFiltering}.source{type:AddressPrefixes}") - if disc_address_prefixes is not None: - disc_address_prefixes.set_prop("prefixes", AAZListType, ".address_prefixes.prefixes", typ_kwargs={"flags": {"required": True}}) - - prefixes = _builder.get(".properties.networkSecurityPolicies[]{type:FqdnFiltering}.source{type:AddressPrefixes}.prefixes") - if prefixes is not None: - prefixes.set_elements(AAZStrType, ".") - - disc_workload_id_patterns = _builder.get(".properties.networkSecurityPolicies[]{type:FqdnFiltering}.source{type:WorkloadIdPatterns}") - if disc_workload_id_patterns is not None: - disc_workload_id_patterns.set_prop("patterns", AAZListType, ".workload_id_patterns.patterns", typ_kwargs={"flags": {"required": True}}) - - patterns = _builder.get(".properties.networkSecurityPolicies[]{type:FqdnFiltering}.source{type:WorkloadIdPatterns}.patterns") - if patterns is not None: - patterns.set_elements(AAZStrType, ".") - - disc_mcp = _builder.get(".properties.networkSecurityPolicies[]{type:Mcp}") - if disc_mcp is not None: - disc_mcp.set_prop("defaultAction", AAZStrType, ".mcp.default_action", typ_kwargs={"flags": {"required": True}}) - disc_mcp.set_prop("destination", AAZObjectType, ".mcp.destination", typ_kwargs={"flags": {"required": True}}) - disc_mcp.set_prop("rules", AAZListType, ".mcp.rules", typ_kwargs={"flags": {"required": True}}) - disc_mcp.set_prop("source", AAZObjectType, ".mcp.source", typ_kwargs={"flags": {"required": True}}) - - destination = _builder.get(".properties.networkSecurityPolicies[]{type:Mcp}.destination") - if destination is not None: - destination.set_const("type", "AddressPrefixes", AAZStrType, ".address_prefixes", typ_kwargs={"flags": {"required": True}}) - destination.set_const("type", "Fqdns", AAZStrType, ".fqdns", typ_kwargs={"flags": {"required": True}}) - destination.set_const("type", "WorkloadIdPatterns", AAZStrType, ".workload_id_patterns", typ_kwargs={"flags": {"required": True}}) - destination.discriminate_by("type", "AddressPrefixes") - destination.discriminate_by("type", "Fqdns") - destination.discriminate_by("type", "WorkloadIdPatterns") - - disc_address_prefixes = _builder.get(".properties.networkSecurityPolicies[]{type:Mcp}.destination{type:AddressPrefixes}") - if disc_address_prefixes is not None: - disc_address_prefixes.set_prop("prefixes", AAZListType, ".address_prefixes.prefixes", typ_kwargs={"flags": {"required": True}}) - - prefixes = _builder.get(".properties.networkSecurityPolicies[]{type:Mcp}.destination{type:AddressPrefixes}.prefixes") - if prefixes is not None: - prefixes.set_elements(AAZStrType, ".") - - disc_fqdns = _builder.get(".properties.networkSecurityPolicies[]{type:Mcp}.destination{type:Fqdns}") - if disc_fqdns is not None: - disc_fqdns.set_prop("fqdns", AAZListType, ".fqdns.fqdns", typ_kwargs={"flags": {"required": True}}) - - fqdns = _builder.get(".properties.networkSecurityPolicies[]{type:Mcp}.destination{type:Fqdns}.fqdns") - if fqdns is not None: - fqdns.set_elements(AAZStrType, ".") - - disc_workload_id_patterns = _builder.get(".properties.networkSecurityPolicies[]{type:Mcp}.destination{type:WorkloadIdPatterns}") - if disc_workload_id_patterns is not None: - disc_workload_id_patterns.set_prop("patterns", AAZListType, ".workload_id_patterns.patterns", typ_kwargs={"flags": {"required": True}}) - - patterns = _builder.get(".properties.networkSecurityPolicies[]{type:Mcp}.destination{type:WorkloadIdPatterns}.patterns") - if patterns is not None: - patterns.set_elements(AAZStrType, ".") - - rules = _builder.get(".properties.networkSecurityPolicies[]{type:Mcp}.rules") - if rules is not None: - rules.set_elements(AAZObjectType, ".") - - _elements = _builder.get(".properties.networkSecurityPolicies[]{type:Mcp}.rules[]") - if _elements is not None: - _elements.set_prop("action", AAZStrType, ".action", typ_kwargs={"flags": {"required": True}}) - _elements.set_prop("tools", AAZListType, ".tools", typ_kwargs={"flags": {"required": True}}) - - tools = _builder.get(".properties.networkSecurityPolicies[]{type:Mcp}.rules[].tools") - if tools is not None: - tools.set_elements(AAZStrType, ".") - - source = _builder.get(".properties.networkSecurityPolicies[]{type:Mcp}.source") - if source is not None: - source.set_const("type", "AddressPrefixes", AAZStrType, ".address_prefixes", typ_kwargs={"flags": {"required": True}}) - source.set_const("type", "WorkloadIdPatterns", AAZStrType, ".workload_id_patterns", typ_kwargs={"flags": {"required": True}}) - source.discriminate_by("type", "AddressPrefixes") - source.discriminate_by("type", "WorkloadIdPatterns") - - disc_address_prefixes = _builder.get(".properties.networkSecurityPolicies[]{type:Mcp}.source{type:AddressPrefixes}") - if disc_address_prefixes is not None: - disc_address_prefixes.set_prop("prefixes", AAZListType, ".address_prefixes.prefixes", typ_kwargs={"flags": {"required": True}}) - - prefixes = _builder.get(".properties.networkSecurityPolicies[]{type:Mcp}.source{type:AddressPrefixes}.prefixes") - if prefixes is not None: - prefixes.set_elements(AAZStrType, ".") - - disc_workload_id_patterns = _builder.get(".properties.networkSecurityPolicies[]{type:Mcp}.source{type:WorkloadIdPatterns}") - if disc_workload_id_patterns is not None: - disc_workload_id_patterns.set_prop("patterns", AAZListType, ".workload_id_patterns.patterns", typ_kwargs={"flags": {"required": True}}) - - patterns = _builder.get(".properties.networkSecurityPolicies[]{type:Mcp}.source{type:WorkloadIdPatterns}.patterns") - if patterns is not None: - patterns.set_elements(AAZStrType, ".") - - disc_tls_inspection = _builder.get(".properties.networkSecurityPolicies[]{type:TlsInspection}") - if disc_tls_inspection is not None: - disc_tls_inspection.set_prop("certificate", AAZObjectType, ".tls_inspection.certificate", typ_kwargs={"flags": {"required": True}}) - disc_tls_inspection.set_prop("source", AAZObjectType, ".tls_inspection.source", typ_kwargs={"flags": {"required": True}}) - - certificate = _builder.get(".properties.networkSecurityPolicies[]{type:TlsInspection}.certificate") - if certificate is not None: - certificate.set_const("mode", "AzureManagedCA", AAZStrType, ".azure_managed_ca", typ_kwargs={"flags": {"required": True}}) - certificate.discriminate_by("mode", "AzureManagedCA") - - source = _builder.get(".properties.networkSecurityPolicies[]{type:TlsInspection}.source") - if source is not None: - source.set_const("type", "WorkloadIdPatterns", AAZStrType, ".workload_id_patterns", typ_kwargs={"flags": {"required": True}}) - source.discriminate_by("type", "WorkloadIdPatterns") - - disc_workload_id_patterns = _builder.get(".properties.networkSecurityPolicies[]{type:TlsInspection}.source{type:WorkloadIdPatterns}") - if disc_workload_id_patterns is not None: - disc_workload_id_patterns.set_prop("patterns", AAZListType, ".workload_id_patterns.patterns", typ_kwargs={"flags": {"required": True}}) - - patterns = _builder.get(".properties.networkSecurityPolicies[]{type:TlsInspection}.source{type:WorkloadIdPatterns}.patterns") - if patterns is not None: - patterns.set_elements(AAZStrType, ".") - - disc_url_filtering = _builder.get(".properties.networkSecurityPolicies[]{type:UrlFiltering}") - if disc_url_filtering is not None: - disc_url_filtering.set_prop("defaultAction", AAZStrType, ".url_filtering.default_action", typ_kwargs={"flags": {"required": True}}) - disc_url_filtering.set_prop("destination", AAZObjectType, ".url_filtering.destination") - disc_url_filtering.set_prop("rules", AAZListType, ".url_filtering.rules", typ_kwargs={"flags": {"required": True}}) - disc_url_filtering.set_prop("source", AAZObjectType, ".url_filtering.source", typ_kwargs={"flags": {"required": True}}) - - destination = _builder.get(".properties.networkSecurityPolicies[]{type:UrlFiltering}.destination") - if destination is not None: - destination.set_const("type", "AddressPrefixes", AAZStrType, ".address_prefixes", typ_kwargs={"flags": {"required": True}}) - destination.set_const("type", "Fqdns", AAZStrType, ".fqdns", typ_kwargs={"flags": {"required": True}}) - destination.set_const("type", "WorkloadIdPatterns", AAZStrType, ".workload_id_patterns", typ_kwargs={"flags": {"required": True}}) - destination.discriminate_by("type", "AddressPrefixes") - destination.discriminate_by("type", "Fqdns") - destination.discriminate_by("type", "WorkloadIdPatterns") - - disc_address_prefixes = _builder.get(".properties.networkSecurityPolicies[]{type:UrlFiltering}.destination{type:AddressPrefixes}") - if disc_address_prefixes is not None: - disc_address_prefixes.set_prop("prefixes", AAZListType, ".address_prefixes.prefixes", typ_kwargs={"flags": {"required": True}}) - - prefixes = _builder.get(".properties.networkSecurityPolicies[]{type:UrlFiltering}.destination{type:AddressPrefixes}.prefixes") - if prefixes is not None: - prefixes.set_elements(AAZStrType, ".") - - disc_fqdns = _builder.get(".properties.networkSecurityPolicies[]{type:UrlFiltering}.destination{type:Fqdns}") - if disc_fqdns is not None: - disc_fqdns.set_prop("fqdns", AAZListType, ".fqdns.fqdns", typ_kwargs={"flags": {"required": True}}) - - fqdns = _builder.get(".properties.networkSecurityPolicies[]{type:UrlFiltering}.destination{type:Fqdns}.fqdns") - if fqdns is not None: - fqdns.set_elements(AAZStrType, ".") - - disc_workload_id_patterns = _builder.get(".properties.networkSecurityPolicies[]{type:UrlFiltering}.destination{type:WorkloadIdPatterns}") - if disc_workload_id_patterns is not None: - disc_workload_id_patterns.set_prop("patterns", AAZListType, ".workload_id_patterns.patterns", typ_kwargs={"flags": {"required": True}}) - - patterns = _builder.get(".properties.networkSecurityPolicies[]{type:UrlFiltering}.destination{type:WorkloadIdPatterns}.patterns") - if patterns is not None: - patterns.set_elements(AAZStrType, ".") - - rules = _builder.get(".properties.networkSecurityPolicies[]{type:UrlFiltering}.rules") - if rules is not None: - rules.set_elements(AAZObjectType, ".") - - _elements = _builder.get(".properties.networkSecurityPolicies[]{type:UrlFiltering}.rules[]") - if _elements is not None: - _elements.set_prop("action", AAZStrType, ".action", typ_kwargs={"flags": {"required": True}}) - _elements.set_prop("hostname", AAZStrType, ".hostname") - _elements.set_prop("method", AAZStrType, ".method") - _elements.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) - _elements.set_prop("paths", AAZListType, ".paths") - _elements.set_prop("priority", AAZIntType, ".priority", typ_kwargs={"flags": {"required": True}}) - - paths = _builder.get(".properties.networkSecurityPolicies[]{type:UrlFiltering}.rules[].paths") - if paths is not None: - paths.set_elements(AAZStrType, ".") - - source = _builder.get(".properties.networkSecurityPolicies[]{type:UrlFiltering}.source") - if source is not None: - source.set_const("type", "AddressPrefixes", AAZStrType, ".address_prefixes", typ_kwargs={"flags": {"required": True}}) - source.set_const("type", "WorkloadIdPatterns", AAZStrType, ".workload_id_patterns", typ_kwargs={"flags": {"required": True}}) - source.discriminate_by("type", "AddressPrefixes") - source.discriminate_by("type", "WorkloadIdPatterns") - - disc_address_prefixes = _builder.get(".properties.networkSecurityPolicies[]{type:UrlFiltering}.source{type:AddressPrefixes}") - if disc_address_prefixes is not None: - disc_address_prefixes.set_prop("prefixes", AAZListType, ".address_prefixes.prefixes", typ_kwargs={"flags": {"required": True}}) - - prefixes = _builder.get(".properties.networkSecurityPolicies[]{type:UrlFiltering}.source{type:AddressPrefixes}.prefixes") - if prefixes is not None: - prefixes.set_elements(AAZStrType, ".") - - disc_workload_id_patterns = _builder.get(".properties.networkSecurityPolicies[]{type:UrlFiltering}.source{type:WorkloadIdPatterns}") - if disc_workload_id_patterns is not None: - disc_workload_id_patterns.set_prop("patterns", AAZListType, ".workload_id_patterns.patterns", typ_kwargs={"flags": {"required": True}}) - - patterns = _builder.get(".properties.networkSecurityPolicies[]{type:UrlFiltering}.source{type:WorkloadIdPatterns}.patterns") - if patterns is not None: - patterns.set_elements(AAZStrType, ".") - - tags = _builder.get(".tags") - if tags is not None: - tags.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.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.location = AAZStrType( - flags={"required": True}, - ) - _schema_on_200_201.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.properties = AAZObjectType() - _schema_on_200_201.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200_201.tags = AAZDictType() - _schema_on_200_201.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200_201.properties - properties.description = AAZStrType() - properties.display_name = AAZStrType( - serialized_name="displayName", - ) - properties.network_security_policies = AAZListType( - serialized_name="networkSecurityPolicies", - ) - properties.priority = AAZIntType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - network_security_policies = cls._schema_on_200_201.properties.network_security_policies - network_security_policies.Element = AAZObjectType() - - _element = cls._schema_on_200_201.properties.network_security_policies.Element - _element.type = AAZStrType( - flags={"required": True}, - ) - - disc_content_inspection = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection") - disc_content_inspection.prompt_injection_protection = AAZObjectType( - serialized_name="promptInjectionProtection", - ) - disc_content_inspection.source = AAZObjectType( - flags={"required": True}, - ) - - prompt_injection_protection = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection - prompt_injection_protection.on_detection = AAZStrType( - serialized_name="onDetection", - flags={"required": True}, - ) - prompt_injection_protection.prompt_locations = AAZListType( - serialized_name="promptLocations", - ) - prompt_injection_protection.response_locations = AAZListType( - serialized_name="responseLocations", - ) - prompt_injection_protection.sensitivity = AAZStrType() - - prompt_locations = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection.prompt_locations - prompt_locations.Element = AAZStrType() - - response_locations = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection.response_locations - response_locations.Element = AAZStrType() - - source = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_fqdn_filtering = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering") - disc_fqdn_filtering.destination = AAZObjectType() - disc_fqdn_filtering.direction = AAZStrType() - disc_fqdn_filtering.name = AAZStrType() - disc_fqdn_filtering.ports = AAZListType() - disc_fqdn_filtering.priority = AAZIntType() - disc_fqdn_filtering.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_fqdns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - ports = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").ports - ports.Element = AAZIntType() - - source = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_mcp = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "Mcp") - disc_mcp.default_action = AAZStrType( - serialized_name="defaultAction", - flags={"required": True}, - ) - disc_mcp.destination = AAZObjectType( - flags={"required": True}, - ) - disc_mcp.rules = AAZListType( - flags={"required": True}, - ) - disc_mcp.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_fqdns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - rules = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules - rules.Element = AAZObjectType() - - _element = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules.Element - _element.action = AAZStrType( - flags={"required": True}, - ) - _element.tools = AAZListType( - flags={"required": True}, - ) - - tools = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules.Element.tools - tools.Element = AAZStrType() - - source = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_tls_inspection = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection") - disc_tls_inspection.certificate = AAZObjectType( - flags={"required": True}, - ) - disc_tls_inspection.source = AAZObjectType( - flags={"required": True}, - ) - - certificate = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").certificate - certificate.mode = AAZStrType( - flags={"required": True}, - ) - - source = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_workload_id_patterns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_url_filtering = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering") - disc_url_filtering.default_action = AAZStrType( - serialized_name="defaultAction", - flags={"required": True}, - ) - disc_url_filtering.destination = AAZObjectType() - disc_url_filtering.rules = AAZListType( - flags={"required": True}, - ) - disc_url_filtering.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_fqdns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - rules = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules - rules.Element = AAZObjectType() - - _element = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules.Element - _element.action = AAZStrType( - flags={"required": True}, - ) - _element.hostname = AAZStrType() - _element.method = AAZStrType() - _element.name = AAZStrType( - flags={"required": True}, - ) - _element.paths = AAZListType() - _element.priority = AAZIntType( - flags={"required": True}, - ) - - paths = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules.Element.paths - paths.Element = AAZStrType() - - source = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200_201.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - system_data = cls._schema_on_200_201.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", - ) - - tags = cls._schema_on_200_201.tags - tags.Element = AAZStrType() - - return cls._schema_on_200_201 - - -class _CreateHelper: - """Helper class for Create""" - - -__all__ = ["Create"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_delete.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_delete.py deleted file mode 100644 index 9eb7b495e5f..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_delete.py +++ /dev/null @@ -1,166 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh policy-group delete", - confirmation="Are you sure you want to perform this operation?", -) -class Delete(AAZCommand): - """Delete an Agent Mesh policy group - - :example: PolicyGroups_Delete - az agentmesh policy-group delete --resource-group rgnetworksecurity --name testPolicyGroup - """ - - _aaz_info = { - "version": "2026-07-21-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/policygroups/{}", "2026-07-21-preview"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, 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.name = AAZStrArg( - options=["-n", "--name"], - help="The name of the PolicyGroup", - required=True, - id_part="name", - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.PolicyGroupsDelete(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class PolicyGroupsDelete(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 [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [204]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_204, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200, 201]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkSecurity/policyGroups/{policyGroupName}", - **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( - "policyGroupName", self.ctx.args.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-21-preview", - required=True, - ), - } - return parameters - - def on_204(self, session): - pass - - def on_200_201(self, session): - pass - - -class _DeleteHelper: - """Helper class for Delete""" - - -__all__ = ["Delete"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_list.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_list.py deleted file mode 100644 index a8ade384dd0..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_list.py +++ /dev/null @@ -1,953 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh policy-group list", -) -class List(AAZCommand): - """List Agent Mesh policy groups - - :example: PolicyGroups_ListBySubscription - az agentmesh policy-group list - - :example: PolicyGroups_ListByResourceGroup - az agentmesh policy-group list --resource-group rgnetworksecurity - """ - - _aaz_info = { - "version": "2026-07-21-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/microsoft.networksecurity/policygroups", "2026-07-21-preview"], - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/policygroups", "2026-07-21-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.resource_group = AAZResourceGroupNameArg() - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True - condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) - if condition_0: - self.PolicyGroupsListBySubscription(ctx=self.ctx)() - if condition_1: - self.PolicyGroupsListByResourceGroup(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 PolicyGroupsListBySubscription(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}/providers/Microsoft.NetworkSecurity/policyGroups", - **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( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2026-07-21-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={"required": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType() - _element.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _element.tags = AAZDictType() - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.value.Element.properties - properties.description = AAZStrType() - properties.display_name = AAZStrType( - serialized_name="displayName", - ) - properties.network_security_policies = AAZListType( - serialized_name="networkSecurityPolicies", - ) - properties.priority = AAZIntType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - network_security_policies = cls._schema_on_200.value.Element.properties.network_security_policies - network_security_policies.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.network_security_policies.Element - _element.type = AAZStrType( - flags={"required": True}, - ) - - disc_content_inspection = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection") - disc_content_inspection.prompt_injection_protection = AAZObjectType( - serialized_name="promptInjectionProtection", - ) - disc_content_inspection.source = AAZObjectType( - flags={"required": True}, - ) - - prompt_injection_protection = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection - prompt_injection_protection.on_detection = AAZStrType( - serialized_name="onDetection", - flags={"required": True}, - ) - prompt_injection_protection.prompt_locations = AAZListType( - serialized_name="promptLocations", - ) - prompt_injection_protection.response_locations = AAZListType( - serialized_name="responseLocations", - ) - prompt_injection_protection.sensitivity = AAZStrType() - - prompt_locations = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection.prompt_locations - prompt_locations.Element = AAZStrType() - - response_locations = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection.response_locations - response_locations.Element = AAZStrType() - - source = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_fqdn_filtering = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering") - disc_fqdn_filtering.destination = AAZObjectType() - disc_fqdn_filtering.direction = AAZStrType() - disc_fqdn_filtering.name = AAZStrType() - disc_fqdn_filtering.ports = AAZListType() - disc_fqdn_filtering.priority = AAZIntType() - disc_fqdn_filtering.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_fqdns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - ports = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").ports - ports.Element = AAZIntType() - - source = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_mcp = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp") - disc_mcp.default_action = AAZStrType( - serialized_name="defaultAction", - flags={"required": True}, - ) - disc_mcp.destination = AAZObjectType( - flags={"required": True}, - ) - disc_mcp.rules = AAZListType( - flags={"required": True}, - ) - disc_mcp.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_fqdns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - rules = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules - rules.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules.Element - _element.action = AAZStrType( - flags={"required": True}, - ) - _element.tools = AAZListType( - flags={"required": True}, - ) - - tools = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules.Element.tools - tools.Element = AAZStrType() - - source = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_tls_inspection = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection") - disc_tls_inspection.certificate = AAZObjectType( - flags={"required": True}, - ) - disc_tls_inspection.source = AAZObjectType( - flags={"required": True}, - ) - - certificate = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").certificate - certificate.mode = AAZStrType( - flags={"required": True}, - ) - - source = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_workload_id_patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_url_filtering = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering") - disc_url_filtering.default_action = AAZStrType( - serialized_name="defaultAction", - flags={"required": True}, - ) - disc_url_filtering.destination = AAZObjectType() - disc_url_filtering.rules = AAZListType( - flags={"required": True}, - ) - disc_url_filtering.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_fqdns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - rules = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules - rules.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules.Element - _element.action = AAZStrType( - flags={"required": True}, - ) - _element.hostname = AAZStrType() - _element.method = AAZStrType() - _element.name = AAZStrType( - flags={"required": True}, - ) - _element.paths = AAZListType() - _element.priority = AAZIntType( - flags={"required": True}, - ) - - paths = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules.Element.paths - paths.Element = AAZStrType() - - source = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - 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", - ) - - tags = cls._schema_on_200.value.Element.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - class PolicyGroupsListByResourceGroup(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.NetworkSecurity/policyGroups", - **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( - "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-21-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={"required": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType() - _element.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _element.tags = AAZDictType() - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.value.Element.properties - properties.description = AAZStrType() - properties.display_name = AAZStrType( - serialized_name="displayName", - ) - properties.network_security_policies = AAZListType( - serialized_name="networkSecurityPolicies", - ) - properties.priority = AAZIntType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - network_security_policies = cls._schema_on_200.value.Element.properties.network_security_policies - network_security_policies.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.network_security_policies.Element - _element.type = AAZStrType( - flags={"required": True}, - ) - - disc_content_inspection = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection") - disc_content_inspection.prompt_injection_protection = AAZObjectType( - serialized_name="promptInjectionProtection", - ) - disc_content_inspection.source = AAZObjectType( - flags={"required": True}, - ) - - prompt_injection_protection = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection - prompt_injection_protection.on_detection = AAZStrType( - serialized_name="onDetection", - flags={"required": True}, - ) - prompt_injection_protection.prompt_locations = AAZListType( - serialized_name="promptLocations", - ) - prompt_injection_protection.response_locations = AAZListType( - serialized_name="responseLocations", - ) - prompt_injection_protection.sensitivity = AAZStrType() - - prompt_locations = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection.prompt_locations - prompt_locations.Element = AAZStrType() - - response_locations = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection.response_locations - response_locations.Element = AAZStrType() - - source = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_fqdn_filtering = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering") - disc_fqdn_filtering.destination = AAZObjectType() - disc_fqdn_filtering.direction = AAZStrType() - disc_fqdn_filtering.name = AAZStrType() - disc_fqdn_filtering.ports = AAZListType() - disc_fqdn_filtering.priority = AAZIntType() - disc_fqdn_filtering.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_fqdns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - ports = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").ports - ports.Element = AAZIntType() - - source = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_mcp = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp") - disc_mcp.default_action = AAZStrType( - serialized_name="defaultAction", - flags={"required": True}, - ) - disc_mcp.destination = AAZObjectType( - flags={"required": True}, - ) - disc_mcp.rules = AAZListType( - flags={"required": True}, - ) - disc_mcp.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_fqdns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - rules = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules - rules.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules.Element - _element.action = AAZStrType( - flags={"required": True}, - ) - _element.tools = AAZListType( - flags={"required": True}, - ) - - tools = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules.Element.tools - tools.Element = AAZStrType() - - source = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_tls_inspection = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection") - disc_tls_inspection.certificate = AAZObjectType( - flags={"required": True}, - ) - disc_tls_inspection.source = AAZObjectType( - flags={"required": True}, - ) - - certificate = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").certificate - certificate.mode = AAZStrType( - flags={"required": True}, - ) - - source = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_workload_id_patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_url_filtering = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering") - disc_url_filtering.default_action = AAZStrType( - serialized_name="defaultAction", - flags={"required": True}, - ) - disc_url_filtering.destination = AAZObjectType() - disc_url_filtering.rules = AAZListType( - flags={"required": True}, - ) - disc_url_filtering.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_fqdns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - rules = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules - rules.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules.Element - _element.action = AAZStrType( - flags={"required": True}, - ) - _element.hostname = AAZStrType() - _element.method = AAZStrType() - _element.name = AAZStrType( - flags={"required": True}, - ) - _element.paths = AAZListType() - _element.priority = AAZIntType( - flags={"required": True}, - ) - - paths = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules.Element.paths - paths.Element = AAZStrType() - - source = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.value.Element.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - 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", - ) - - tags = cls._schema_on_200.value.Element.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _ListHelper: - """Helper class for List""" - - -__all__ = ["List"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_show.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_show.py deleted file mode 100644 index 6321cd317e9..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_show.py +++ /dev/null @@ -1,513 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh policy-group show", -) -class Show(AAZCommand): - """Get an Agent Mesh policy group - - :example: PolicyGroups_Get - az agentmesh policy-group show --resource-group rgnetworksecurity --name testPolicyGroup - """ - - _aaz_info = { - "version": "2026-07-21-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/policygroups/{}", "2026-07-21-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.name = AAZStrArg( - options=["-n", "--name"], - help="The name of the PolicyGroup", - required=True, - id_part="name", - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.PolicyGroupsGet(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 PolicyGroupsGet(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.NetworkSecurity/policyGroups/{policyGroupName}", - **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( - "policyGroupName", self.ctx.args.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-21-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={"required": 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.tags = AAZDictType() - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.description = AAZStrType() - properties.display_name = AAZStrType( - serialized_name="displayName", - ) - properties.network_security_policies = AAZListType( - serialized_name="networkSecurityPolicies", - ) - properties.priority = AAZIntType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - network_security_policies = cls._schema_on_200.properties.network_security_policies - network_security_policies.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.network_security_policies.Element - _element.type = AAZStrType( - flags={"required": True}, - ) - - disc_content_inspection = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection") - disc_content_inspection.prompt_injection_protection = AAZObjectType( - serialized_name="promptInjectionProtection", - ) - disc_content_inspection.source = AAZObjectType( - flags={"required": True}, - ) - - prompt_injection_protection = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection - prompt_injection_protection.on_detection = AAZStrType( - serialized_name="onDetection", - flags={"required": True}, - ) - prompt_injection_protection.prompt_locations = AAZListType( - serialized_name="promptLocations", - ) - prompt_injection_protection.response_locations = AAZListType( - serialized_name="responseLocations", - ) - prompt_injection_protection.sensitivity = AAZStrType() - - prompt_locations = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection.prompt_locations - prompt_locations.Element = AAZStrType() - - response_locations = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection.response_locations - response_locations.Element = AAZStrType() - - source = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_fqdn_filtering = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering") - disc_fqdn_filtering.destination = AAZObjectType() - disc_fqdn_filtering.direction = AAZStrType() - disc_fqdn_filtering.name = AAZStrType() - disc_fqdn_filtering.ports = AAZListType() - disc_fqdn_filtering.priority = AAZIntType() - disc_fqdn_filtering.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - ports = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").ports - ports.Element = AAZIntType() - - source = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_mcp = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp") - disc_mcp.default_action = AAZStrType( - serialized_name="defaultAction", - flags={"required": True}, - ) - disc_mcp.destination = AAZObjectType( - flags={"required": True}, - ) - disc_mcp.rules = AAZListType( - flags={"required": True}, - ) - disc_mcp.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - rules = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules - rules.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules.Element - _element.action = AAZStrType( - flags={"required": True}, - ) - _element.tools = AAZListType( - flags={"required": True}, - ) - - tools = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules.Element.tools - tools.Element = AAZStrType() - - source = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_tls_inspection = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection") - disc_tls_inspection.certificate = AAZObjectType( - flags={"required": True}, - ) - disc_tls_inspection.source = AAZObjectType( - flags={"required": True}, - ) - - certificate = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").certificate - certificate.mode = AAZStrType( - flags={"required": True}, - ) - - source = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_url_filtering = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering") - disc_url_filtering.default_action = AAZStrType( - serialized_name="defaultAction", - flags={"required": True}, - ) - disc_url_filtering.destination = AAZObjectType() - disc_url_filtering.rules = AAZListType( - flags={"required": True}, - ) - disc_url_filtering.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - rules = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules - rules.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules.Element - _element.action = AAZStrType( - flags={"required": True}, - ) - _element.hostname = AAZStrType() - _element.method = AAZStrType() - _element.name = AAZStrType( - flags={"required": True}, - ) - _element.paths = AAZListType() - _element.priority = AAZIntType( - flags={"required": True}, - ) - - paths = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules.Element.paths - paths.Element = AAZStrType() - - source = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - 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", - ) - - tags = cls._schema_on_200.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _ShowHelper: - """Helper class for Show""" - - -__all__ = ["Show"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_update.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_update.py deleted file mode 100644 index 1a2ff9bc593..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_update.py +++ /dev/null @@ -1,560 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh policy-group update", -) -class Update(AAZCommand): - """Update an Agent Mesh policy group's tags - - :example: PolicyGroups_Update - az agentmesh policy-group update --resource-group rgnetworksecurity --name testPolicyGroup --tags "{env:production}" - """ - - _aaz_info = { - "version": "2026-07-21-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/policygroups/{}", "2026-07-21-preview"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(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.name = AAZStrArg( - options=["-n", "--name"], - help="The name of the PolicyGroup", - required=True, - id_part="name", - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - - # define Arg Group "Properties" - - _args_schema = cls._args_schema - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Properties", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.PolicyGroupsUpdate(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 PolicyGroupsUpdate(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 [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkSecurity/policyGroups/{policyGroupName}", - **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( - "policyGroupName", self.ctx.args.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-21-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("tags", AAZDictType, ".tags") - - tags = _builder.get(".tags") - if tags is not None: - tags.set_elements(AAZStrType, ".") - - 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={"required": 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.tags = AAZDictType() - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.description = AAZStrType() - properties.display_name = AAZStrType( - serialized_name="displayName", - ) - properties.network_security_policies = AAZListType( - serialized_name="networkSecurityPolicies", - ) - properties.priority = AAZIntType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - network_security_policies = cls._schema_on_200.properties.network_security_policies - network_security_policies.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.network_security_policies.Element - _element.type = AAZStrType( - flags={"required": True}, - ) - - disc_content_inspection = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection") - disc_content_inspection.prompt_injection_protection = AAZObjectType( - serialized_name="promptInjectionProtection", - ) - disc_content_inspection.source = AAZObjectType( - flags={"required": True}, - ) - - prompt_injection_protection = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection - prompt_injection_protection.on_detection = AAZStrType( - serialized_name="onDetection", - flags={"required": True}, - ) - prompt_injection_protection.prompt_locations = AAZListType( - serialized_name="promptLocations", - ) - prompt_injection_protection.response_locations = AAZListType( - serialized_name="responseLocations", - ) - prompt_injection_protection.sensitivity = AAZStrType() - - prompt_locations = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection.prompt_locations - prompt_locations.Element = AAZStrType() - - response_locations = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection.response_locations - response_locations.Element = AAZStrType() - - source = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_fqdn_filtering = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering") - disc_fqdn_filtering.destination = AAZObjectType() - disc_fqdn_filtering.direction = AAZStrType() - disc_fqdn_filtering.name = AAZStrType() - disc_fqdn_filtering.ports = AAZListType() - disc_fqdn_filtering.priority = AAZIntType() - disc_fqdn_filtering.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - ports = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").ports - ports.Element = AAZIntType() - - source = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_mcp = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp") - disc_mcp.default_action = AAZStrType( - serialized_name="defaultAction", - flags={"required": True}, - ) - disc_mcp.destination = AAZObjectType( - flags={"required": True}, - ) - disc_mcp.rules = AAZListType( - flags={"required": True}, - ) - disc_mcp.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - rules = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules - rules.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules.Element - _element.action = AAZStrType( - flags={"required": True}, - ) - _element.tools = AAZListType( - flags={"required": True}, - ) - - tools = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules.Element.tools - tools.Element = AAZStrType() - - source = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_tls_inspection = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection") - disc_tls_inspection.certificate = AAZObjectType( - flags={"required": True}, - ) - disc_tls_inspection.source = AAZObjectType( - flags={"required": True}, - ) - - certificate = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").certificate - certificate.mode = AAZStrType( - flags={"required": True}, - ) - - source = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_url_filtering = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering") - disc_url_filtering.default_action = AAZStrType( - serialized_name="defaultAction", - flags={"required": True}, - ) - disc_url_filtering.destination = AAZObjectType() - disc_url_filtering.rules = AAZListType( - flags={"required": True}, - ) - disc_url_filtering.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - rules = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules - rules.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules.Element - _element.action = AAZStrType( - flags={"required": True}, - ) - _element.hostname = AAZStrType() - _element.method = AAZStrType() - _element.name = AAZStrType( - flags={"required": True}, - ) - _element.paths = AAZListType() - _element.priority = AAZIntType( - flags={"required": True}, - ) - - paths = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules.Element.paths - paths.Element = AAZStrType() - - source = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - 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", - ) - - tags = cls._schema_on_200.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _UpdateHelper: - """Helper class for Update""" - - -__all__ = ["Update"] diff --git a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_wait.py b/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_wait.py deleted file mode 100644 index b816d17a0c5..00000000000 --- a/src/agentmesh/azext_agentmesh/aaz/latest/agentmesh/policy_group/_wait.py +++ /dev/null @@ -1,509 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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( - "agentmesh policy-group wait", -) -class Wait(AAZWaitCommand): - """Place the CLI in a waiting state until a condition is met. - """ - - _aaz_info = { - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networksecurity/policygroups/{}", "2026-07-21-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.name = AAZStrArg( - options=["-n", "--name"], - help="The name of the PolicyGroup", - required=True, - id_part="name", - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9-]{3,24}$", - ), - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.PolicyGroupsGet(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=False) - return result - - class PolicyGroupsGet(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.NetworkSecurity/policyGroups/{policyGroupName}", - **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( - "policyGroupName", self.ctx.args.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-21-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={"required": 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.tags = AAZDictType() - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.description = AAZStrType() - properties.display_name = AAZStrType( - serialized_name="displayName", - ) - properties.network_security_policies = AAZListType( - serialized_name="networkSecurityPolicies", - ) - properties.priority = AAZIntType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - network_security_policies = cls._schema_on_200.properties.network_security_policies - network_security_policies.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.network_security_policies.Element - _element.type = AAZStrType( - flags={"required": True}, - ) - - disc_content_inspection = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection") - disc_content_inspection.prompt_injection_protection = AAZObjectType( - serialized_name="promptInjectionProtection", - ) - disc_content_inspection.source = AAZObjectType( - flags={"required": True}, - ) - - prompt_injection_protection = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection - prompt_injection_protection.on_detection = AAZStrType( - serialized_name="onDetection", - flags={"required": True}, - ) - prompt_injection_protection.prompt_locations = AAZListType( - serialized_name="promptLocations", - ) - prompt_injection_protection.response_locations = AAZListType( - serialized_name="responseLocations", - ) - prompt_injection_protection.sensitivity = AAZStrType() - - prompt_locations = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection.prompt_locations - prompt_locations.Element = AAZStrType() - - response_locations = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").prompt_injection_protection.response_locations - response_locations.Element = AAZStrType() - - source = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "ContentInspection").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_fqdn_filtering = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering") - disc_fqdn_filtering.destination = AAZObjectType() - disc_fqdn_filtering.direction = AAZStrType() - disc_fqdn_filtering.name = AAZStrType() - disc_fqdn_filtering.ports = AAZListType() - disc_fqdn_filtering.priority = AAZIntType() - disc_fqdn_filtering.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - ports = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").ports - ports.Element = AAZIntType() - - source = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "FqdnFiltering").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_mcp = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp") - disc_mcp.default_action = AAZStrType( - serialized_name="defaultAction", - flags={"required": True}, - ) - disc_mcp.destination = AAZObjectType( - flags={"required": True}, - ) - disc_mcp.rules = AAZListType( - flags={"required": True}, - ) - disc_mcp.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").destination.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - rules = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules - rules.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules.Element - _element.action = AAZStrType( - flags={"required": True}, - ) - _element.tools = AAZListType( - flags={"required": True}, - ) - - tools = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").rules.Element.tools - tools.Element = AAZStrType() - - source = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "Mcp").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_tls_inspection = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection") - disc_tls_inspection.certificate = AAZObjectType( - flags={"required": True}, - ) - disc_tls_inspection.source = AAZObjectType( - flags={"required": True}, - ) - - certificate = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").certificate - certificate.mode = AAZStrType( - flags={"required": True}, - ) - - source = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "TlsInspection").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - disc_url_filtering = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering") - disc_url_filtering.default_action = AAZStrType( - serialized_name="defaultAction", - flags={"required": True}, - ) - disc_url_filtering.destination = AAZObjectType() - disc_url_filtering.rules = AAZListType( - flags={"required": True}, - ) - disc_url_filtering.source = AAZObjectType( - flags={"required": True}, - ) - - destination = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination - destination.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "Fqdns") - disc_fqdns.fqdns = AAZListType( - flags={"required": True}, - ) - - fqdns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "Fqdns").fqdns - fqdns.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").destination.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - rules = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules - rules.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules.Element - _element.action = AAZStrType( - flags={"required": True}, - ) - _element.hostname = AAZStrType() - _element.method = AAZStrType() - _element.name = AAZStrType( - flags={"required": True}, - ) - _element.paths = AAZListType() - _element.priority = AAZIntType( - flags={"required": True}, - ) - - paths = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").rules.Element.paths - paths.Element = AAZStrType() - - source = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source - source.type = AAZStrType( - flags={"required": True}, - ) - - disc_address_prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "AddressPrefixes") - disc_address_prefixes.prefixes = AAZListType( - flags={"required": True}, - ) - - prefixes = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "AddressPrefixes").prefixes - prefixes.Element = AAZStrType() - - disc_workload_id_patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "WorkloadIdPatterns") - disc_workload_id_patterns.patterns = AAZListType( - flags={"required": True}, - ) - - patterns = cls._schema_on_200.properties.network_security_policies.Element.discriminate_by("type", "UrlFiltering").source.discriminate_by("type", "WorkloadIdPatterns").patterns - patterns.Element = AAZStrType() - - 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", - ) - - tags = cls._schema_on_200.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _WaitHelper: - """Helper class for Wait""" - - -__all__ = ["Wait"] diff --git a/src/agentmesh/azext_agentmesh/azext_metadata.json b/src/agentmesh/azext_agentmesh/azext_metadata.json deleted file mode 100644 index 71889bb136b..00000000000 --- a/src/agentmesh/azext_agentmesh/azext_metadata.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "azext.isPreview": true, - "azext.minCliCoreVersion": "2.75.0" -} \ No newline at end of file diff --git a/src/agentmesh/azext_agentmesh/commands.py b/src/agentmesh/azext_agentmesh/commands.py deleted file mode 100644 index b0d842e4993..00000000000 --- a/src/agentmesh/azext_agentmesh/commands.py +++ /dev/null @@ -1,15 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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: disable=too-many-lines -# pylint: disable=too-many-statements - -# from azure.cli.core.commands import CliCommandType - - -def load_command_table(self, _): # pylint: disable=unused-argument - pass diff --git a/src/agentmesh/azext_agentmesh/custom.py b/src/agentmesh/azext_agentmesh/custom.py deleted file mode 100644 index 86df1e48ef5..00000000000 --- a/src/agentmesh/azext_agentmesh/custom.py +++ /dev/null @@ -1,14 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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: disable=too-many-lines -# pylint: disable=too-many-statements - -from knack.log import get_logger - - -logger = get_logger(__name__) diff --git a/src/agentmesh/azext_agentmesh/tests/__init__.py b/src/agentmesh/azext_agentmesh/tests/__init__.py deleted file mode 100644 index 5757aea3175..00000000000 --- a/src/agentmesh/azext_agentmesh/tests/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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 -# -------------------------------------------------------------------------------------------- diff --git a/src/agentmesh/azext_agentmesh/tests/latest/__init__.py b/src/agentmesh/azext_agentmesh/tests/latest/__init__.py deleted file mode 100644 index 5757aea3175..00000000000 --- a/src/agentmesh/azext_agentmesh/tests/latest/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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 -# -------------------------------------------------------------------------------------------- diff --git a/src/agentmesh/azext_agentmesh/tests/latest/recordings/test_agentmesh_command_help.yaml b/src/agentmesh/azext_agentmesh/tests/latest/recordings/test_agentmesh_command_help.yaml deleted file mode 100644 index 591dc7c3b1a..00000000000 --- a/src/agentmesh/azext_agentmesh/tests/latest/recordings/test_agentmesh_command_help.yaml +++ /dev/null @@ -1,44 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.33.0 - method: GET - uri: https://aka.ms/azExtCmdTree - response: - body: - string: '' - headers: - cache-control: - - max-age=0, no-cache, no-store - connection: - - keep-alive - content-length: - - '0' - date: - - Tue, 15 Sep 2026 22:07:43 GMT - expires: - - Tue, 15 Sep 2026 22:07:43 GMT - location: - - https://azurecliextensionsync.blob.core.windows.net/cmd-index/extensionCommandTree.json - pragma: - - no-cache - request-context: - - appId=cid-v1:d94c0f68-64bf-4036-8409-a0e761bb7ee1 - server: - - Kestrel - strict-transport-security: - - max-age=31536000 ; includeSubDomains - x-response-cache-status: - - 'True' - status: - code: 301 - message: Moved Permanently -version: 1 diff --git a/src/agentmesh/azext_agentmesh/tests/latest/test_agentmesh.py b/src/agentmesh/azext_agentmesh/tests/latest/test_agentmesh.py deleted file mode 100644 index 8a9a42c3bc0..00000000000 --- a/src/agentmesh/azext_agentmesh/tests/latest/test_agentmesh.py +++ /dev/null @@ -1,172 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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 -# -------------------------------------------------------------------------------------------- - -import importlib -import unittest -from unittest.mock import MagicMock - -from azure.cli.testsdk import ScenarioTest - - -COMMANDS = ( - ("agentmesh fabric create", "azext_agentmesh.aaz.latest.agentmesh.fabric._create", "Create"), - ("agentmesh fabric show", "azext_agentmesh.aaz.latest.agentmesh.fabric._show", "Show"), - ("agentmesh fabric list", "azext_agentmesh.aaz.latest.agentmesh.fabric._list", "List"), - ("agentmesh fabric update", "azext_agentmesh.aaz.latest.agentmesh.fabric._update", "Update"), - ("agentmesh fabric delete", "azext_agentmesh.aaz.latest.agentmesh.fabric._delete", "Delete"), - ( - "agentmesh fabric member create", - "azext_agentmesh.aaz.latest.agentmesh.fabric.member._create", - "Create", - ), - ( - "agentmesh fabric member show", - "azext_agentmesh.aaz.latest.agentmesh.fabric.member._show", - "Show", - ), - ( - "agentmesh fabric member list", - "azext_agentmesh.aaz.latest.agentmesh.fabric.member._list", - "List", - ), - ( - "agentmesh fabric member update", - "azext_agentmesh.aaz.latest.agentmesh.fabric.member._update", - "Update", - ), - ( - "agentmesh fabric member delete", - "azext_agentmesh.aaz.latest.agentmesh.fabric.member._delete", - "Delete", - ), - ( - "agentmesh policy-group create", - "azext_agentmesh.aaz.latest.agentmesh.policy_group._create", - "Create", - ), - ( - "agentmesh policy-group show", - "azext_agentmesh.aaz.latest.agentmesh.policy_group._show", - "Show", - ), - ( - "agentmesh policy-group list", - "azext_agentmesh.aaz.latest.agentmesh.policy_group._list", - "List", - ), - ( - "agentmesh policy-group update", - "azext_agentmesh.aaz.latest.agentmesh.policy_group._update", - "Update", - ), - ( - "agentmesh policy-group delete", - "azext_agentmesh.aaz.latest.agentmesh.policy_group._delete", - "Delete", - ), -) - -HELP_ONLY_COMMANDS = ( - "agentmesh fabric wait", - "agentmesh fabric member wait", - "agentmesh policy-group wait", -) - -REQUEST_SHAPES = ( - ( - "azext_agentmesh.aaz.latest.agentmesh.fabric._create", - "Create", - "AgentFabricsCreateOrUpdate", - "PUT", - ), - ( - "azext_agentmesh.aaz.latest.agentmesh.fabric._update", - "Update", - "AgentFabricsUpdate", - "PATCH", - ), - ( - "azext_agentmesh.aaz.latest.agentmesh.fabric._delete", - "Delete", - "AgentFabricsDelete", - "DELETE", - ), - ( - "azext_agentmesh.aaz.latest.agentmesh.fabric.member._create", - "Create", - "MembersCreateOrUpdate", - "PUT", - ), - ( - "azext_agentmesh.aaz.latest.agentmesh.fabric.member._update", - "Update", - "MembersUpdate", - "PATCH", - ), - ( - "azext_agentmesh.aaz.latest.agentmesh.fabric.member._delete", - "Delete", - "MembersDelete", - "DELETE", - ), - ( - "azext_agentmesh.aaz.latest.agentmesh.policy_group._create", - "Create", - "PolicyGroupsCreateOrUpdate", - "PUT", - ), - ( - "azext_agentmesh.aaz.latest.agentmesh.policy_group._update", - "Update", - "PolicyGroupsUpdate", - "PATCH", - ), - ( - "azext_agentmesh.aaz.latest.agentmesh.policy_group._delete", - "Delete", - "PolicyGroupsDelete", - "DELETE", - ), -) - - -class AgentmeshScenario(ScenarioTest): - - def test_agentmesh_command_help(self): - commands = ( - "agentmesh", - "agentmesh fabric", - "agentmesh fabric member", - "agentmesh policy-group", - *(command for command, _, _ in COMMANDS), - *HELP_ONLY_COMMANDS, - ) - for command in commands: - try: - self.cmd(f"az {command} --help") - except SystemExit as ex: - self.assertEqual(ex.code, 0, f"{command} help failed") - - -class AgentmeshGeneratedCommandTest(unittest.TestCase): - - def test_all_commands_have_generated_examples(self): - for command, module_name, class_name in COMMANDS: - command_class = getattr(importlib.import_module(module_name), class_name) - self.assertIn(":example:", command_class.__doc__, command) - self.assertIn(f"az {command}", command_class.__doc__, command) - - def test_lro_request_shapes(self): - for module_name, class_name, operation_name, method in REQUEST_SHAPES: - command_class = getattr(importlib.import_module(module_name), class_name) - operation_class = getattr(command_class, operation_name) - operation = operation_class(ctx=MagicMock()) - self.assertEqual(operation.method, method) - self.assertEqual( - operation.query_parameters, - {"api-version": "2026-07-21-preview"}, - ) diff --git a/src/agentmesh/linter_exclusions.yml b/src/agentmesh/linter_exclusions.yml deleted file mode 100644 index 245f8957d2b..00000000000 --- a/src/agentmesh/linter_exclusions.yml +++ /dev/null @@ -1,5 +0,0 @@ -agentmesh policy-group create: - parameters: - network_security_policies: - rule_exclusions: - - option_length_too_long diff --git a/src/agentmesh/setup.cfg b/src/agentmesh/setup.cfg deleted file mode 100644 index 2fdd96e5d39..00000000000 --- a/src/agentmesh/setup.cfg +++ /dev/null @@ -1 +0,0 @@ -#setup.cfg \ No newline at end of file diff --git a/src/agentmesh/setup.py b/src/agentmesh/setup.py deleted file mode 100644 index 48c1f55ba8d..00000000000 --- a/src/agentmesh/setup.py +++ /dev/null @@ -1,51 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# 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 -# -------------------------------------------------------------------------------------------- - -from codecs import open -from setuptools import setup, find_packages - - -# HISTORY.rst entry. -VERSION = '1.0.0b1' - -# The full list of classifiers is available at -# https://pypi.python.org/pypi?%3Aaction=list_classifiers -CLASSIFIERS = [ - 'Development Status :: 4 - Beta', - 'Intended Audience :: Developers', - 'Intended Audience :: System Administrators', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Programming Language :: Python :: 3.13', - 'License :: OSI Approved :: MIT License', -] - -DEPENDENCIES = [] - -with open('README.md', 'r', encoding='utf-8') as f: - README = f.read() -with open('HISTORY.rst', 'r', encoding='utf-8') as f: - HISTORY = f.read() - -setup( - name='agentmesh', - version=VERSION, - description='Microsoft Azure Command-Line Tools Agent Mesh Extension.', - long_description=README + '\n\n' + HISTORY, - license='MIT', - author='Microsoft Corporation', - author_email='azpycli@microsoft.com', - url='https://github.com/Azure/azure-cli-extensions/tree/main/src/agentmesh', - classifiers=CLASSIFIERS, - packages=find_packages(exclude=["tests"]), - package_data={'azext_agentmesh': ['azext_metadata.json']}, - install_requires=DEPENDENCIES -) diff --git a/src/service_name.json b/src/service_name.json index 4d70787d3cb..690baff2766 100644 --- a/src/service_name.json +++ b/src/service_name.json @@ -24,11 +24,6 @@ "AzureServiceName": "Azure Front Door", "URL": "https://learn.microsoft.com/azure/frontdoor" }, - { - "Command": "az agentmesh", - "AzureServiceName": "Azure Agent Mesh", - "URL": "" - }, { "Command": "az ai-examples", "AzureServiceName": "AI Examples",