diff --git a/src/azure-cli-core/azure/cli/core/profiles/_shared.py b/src/azure-cli-core/azure/cli/core/profiles/_shared.py index 67a902ff675..14925af17fe 100644 --- a/src/azure-cli-core/azure/cli/core/profiles/_shared.py +++ b/src/azure-cli-core/azure/cli/core/profiles/_shared.py @@ -111,7 +111,6 @@ class ResourceType(Enum): # pylint: disable=too-few-public-methods MGMT_POLICYINSIGHTS = ('azure.mgmt.policyinsights', None) MGMT_RDBMS = ('azure.mgmt.rdbms', None) MGMT_REDIS = ('azure.mgmt.redis', None) - MGMT_RELAY = ('azure.mgmt.relay', None) MGMT_SEARCH = ('azure.mgmt.search', None) MGMT_SERVICEFABRIC = ('azure.mgmt.servicefabric', None) MGMT_SIGNALR = ('azure.mgmt.signalr', None) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/__cmd_group.py new file mode 100644 index 00000000000..1bfceac32f9 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/__cmd_group.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------------------------- +# 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 * + + +class __CMDGroup(AAZCommandGroup): + """Manage Azure Relay Service namespaces, WCF relays, hybrid connections, and rules. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/__init__.py b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# 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/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/__cmd_group.py new file mode 100644 index 00000000000..9aa73519395 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/__cmd_group.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------------------------- +# 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 * + + +class __CMDGroup(AAZCommandGroup): + """Manage Azure Relay Service Hybrid Connection and Authorization Rule. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/__init__.py b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/__init__.py new file mode 100644 index 00000000000..28d5f355813 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/__init__.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._show import * diff --git a/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/_show.py b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/_show.py new file mode 100644 index 00000000000..bb4373a0476 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/_show.py @@ -0,0 +1,210 @@ +# -------------------------------------------------------------------------------------------- +# 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 * + + +class Show(AAZCommand): + """Shows the Relay Service Hybrid Connection Details. + + :example: Shows the Hybrid Connection details. + az relay hyco show --resource-group myresourcegroup --namespace-name mynamespace --name myhyco + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/hybridconnections/{}", "2017-04-01"], + ] + } + + 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="Name of Hybrid Connection.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HybridConnectionsGet(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 HybridConnectionsGet(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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "hybridConnectionName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.listener_count = AAZIntType( + serialized_name="listenerCount", + flags={"read_only": True}, + ) + properties.requires_client_authorization = AAZBoolType( + serialized_name="requiresClientAuthorization", + ) + properties.updated_at = AAZStrType( + serialized_name="updatedAt", + flags={"read_only": True}, + ) + properties.user_metadata = AAZStrType( + serialized_name="userMetadata", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/__cmd_group.py new file mode 100644 index 00000000000..14d97caa935 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/__cmd_group.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------------------------- +# 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 * + + +class __CMDGroup(AAZCommandGroup): + """Manage Azure Relay Service Hybrid Connection Authorization Rule. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/__init__.py b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/__init__.py new file mode 100644 index 00000000000..354c26eabeb --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/__init__.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._list import * diff --git a/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/_create.py b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/_create.py new file mode 100644 index 00000000000..45aa464d0a3 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/_create.py @@ -0,0 +1,243 @@ +# -------------------------------------------------------------------------------------------- +# 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 * + + +class Create(AAZCommand): + """Create Authorization Rule for given Relay Service Hybrid Connection. + + :example: Create Authorization Rule for given Relay Service Hybrid Connection + az relay hyco authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule --rights Send Listen + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/hybridconnections/{}/authorizationrules/{}", "2017-04-01"], + ] + } + + 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="Name of Hybrid Connection Authorization Rule.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.hybrid_connection_name = AAZStrArg( + options=["--hybrid-connection-name"], + help="Name of Hybrid Connection.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.rights = AAZListArg( + options=["--rights"], + help="Space-separated list of Authorization rule rights. Allowed values: Listen, Manage, Send.", + required=True, + fmt=AAZListArgFormat( + unique=True, + ), + ) + + rights = cls._args_schema.rights + rights.Element = AAZStrArg( + enum={"Listen": "Listen", "Manage": "Manage", "Send": "Send"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HybridConnectionsCreateOrUpdateAuthorizationRule(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 HybridConnectionsCreateOrUpdateAuthorizationRule(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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "hybridConnectionName", self.ctx.args.hybrid_connection_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("rights", AAZListType, ".rights", typ_kwargs={"flags": {"required": True}}) + + rights = _builder.get(".properties.rights") + if rights is not None: + rights.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.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.rights = AAZListType( + flags={"required": True}, + ) + + rights = cls._schema_on_200.properties.rights + rights.Element = AAZStrType() + + return cls._schema_on_200 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/_list.py b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/_list.py new file mode 100644 index 00000000000..5ffb60e1991 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/_list.py @@ -0,0 +1,207 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class List(AAZCommand): + """Shows list of Authorization Rule by Relay Service Hybrid Connection. + + :example: shows list of Authorization Rule by Relay Service Hybrid Connection + az relay hyco authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/hybridconnections/{}/authorizationrules", "2017-04-01"], + ] + } + + 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.hybrid_connection_name = AAZStrArg( + options=["--hybrid-connection-name"], + help="Name of Hybrid Connection.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HybridConnectionsListAuthorizationRules(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 HybridConnectionsListAuthorizationRules(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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "hybridConnectionName", self.ctx.args.hybrid_connection_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + 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() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.rights = AAZListType( + flags={"required": True}, + ) + + rights = cls._schema_on_200.value.Element.properties.rights + rights.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/keys/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/keys/__cmd_group.py new file mode 100644 index 00000000000..f5d68ff9821 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/keys/__cmd_group.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------------------------- +# 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 * + + +class __CMDGroup(AAZCommandGroup): + """Manage Azure Authorization Rule keys for Relay Service Hybrid Connection. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/keys/__init__.py b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/keys/__init__.py new file mode 100644 index 00000000000..d63ae5a6fc9 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/keys/__init__.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * diff --git a/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/keys/_list.py b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/keys/_list.py new file mode 100644 index 00000000000..9528e3d0466 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/hyco/authorization_rule/keys/_list.py @@ -0,0 +1,206 @@ +# -------------------------------------------------------------------------------------------- +# 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 * + + +class List(AAZCommand): + """List the keys and connection strings of Authorization Rule for Relay Service Hybrid Connection. + + :example: List the keys and connection strings of Authorization Rule for Relay Service Hybrid Connection. + az relay hyco authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule + + :example: List the keys and connection strings of Authorization Rule for Relay Service Hybrid Connection (autogenerated) + az relay hyco authorization-rule keys list --hybrid-connection-name myhyco --name myauthorule --namespace-name mynamespace --resource-group myresourcegroup --subscription MySubscription + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/hybridconnections/{}/authorizationrules/{}/listkeys", "2017-04-01"], + ] + } + + 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="Name of Hybrid Connection Authorization Rule.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.hybrid_connection_name = AAZStrArg( + options=["--hybrid-connection-name"], + help="Name of Hybrid Connection.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HybridConnectionsListKeys(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 HybridConnectionsListKeys(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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/listKeys", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "hybridConnectionName", self.ctx.args.hybrid_connection_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + 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.key_name = AAZStrType( + serialized_name="keyName", + ) + _schema_on_200.primary_connection_string = AAZStrType( + serialized_name="primaryConnectionString", + ) + _schema_on_200.primary_key = AAZStrType( + serialized_name="primaryKey", + ) + _schema_on_200.secondary_connection_string = AAZStrType( + serialized_name="secondaryConnectionString", + ) + _schema_on_200.secondary_key = AAZStrType( + serialized_name="secondaryKey", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/namespace/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/namespace/__cmd_group.py new file mode 100644 index 00000000000..70602977fe4 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/namespace/__cmd_group.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------------------------- +# 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 * + + +class __CMDGroup(AAZCommandGroup): + """Manage Azure Relay Service Namespace. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/namespace/__init__.py b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/namespace/__init__.py new file mode 100644 index 00000000000..d63ae5a6fc9 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/namespace/__init__.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * diff --git a/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/namespace/_list.py b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/namespace/_list.py new file mode 100644 index 00000000000..bb41b53eaa8 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/aaz/latest/relay/namespace/_list.py @@ -0,0 +1,350 @@ +# -------------------------------------------------------------------------------------------- +# 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 * + + +class List(AAZCommand): + """List the Relay Service Namespaces. + + :example: Get the Relay Service Namespaces by resource group + az relay namespace list --resource-group myresourcegroup + + :example: Get the Relay Service Namespaces by Subscription. + az relay namespace list + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.relay/namespaces", "2017-04-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces", "2017-04-01"], + ] + } + + 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.args.resource_group) and has_value(self.ctx.subscription_id) + condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + if condition_0: + self.NamespacesListByResourceGroup(ctx=self.ctx)() + if condition_1: + self.NamespacesList(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 NamespacesListByResourceGroup(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.Relay/namespaces", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @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", "2017-04-01", + 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() + + 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( + flags={"client_flatten": True}, + ) + _element.sku = AAZObjectType() + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.metric_id = AAZStrType( + serialized_name="metricId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.service_bus_endpoint = AAZStrType( + serialized_name="serviceBusEndpoint", + flags={"read_only": True}, + ) + properties.updated_at = AAZStrType( + serialized_name="updatedAt", + flags={"read_only": True}, + ) + + sku = cls._schema_on_200.value.Element.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.tier = AAZStrType() + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class NamespacesList(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.Relay/namespaces", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @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", "2017-04-01", + 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() + + 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( + flags={"client_flatten": True}, + ) + _element.sku = AAZObjectType() + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.metric_id = AAZStrType( + serialized_name="metricId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.service_bus_endpoint = AAZStrType( + serialized_name="serviceBusEndpoint", + flags={"read_only": True}, + ) + properties.updated_at = AAZStrType( + serialized_name="updatedAt", + flags={"read_only": True}, + ) + + sku = cls._schema_on_200.value.Element.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.tier = AAZStrType() + + 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/azure-cli/azure/cli/command_modules/appservice/custom.py b/src/azure-cli/azure/cli/command_modules/appservice/custom.py index b31fb8ab849..720fb873ba0 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/custom.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/custom.py @@ -35,9 +35,7 @@ from azure.mgmt.storage import StorageManagementClient from azure.mgmt.applicationinsights import ApplicationInsightsManagementClient -from azure.mgmt.relay.models import AccessRights from azure.mgmt.web.models import KeyInfo -from azure.cli.command_modules.relay._client_factory import hycos_mgmt_client_factory, namespaces_mgmt_client_factory from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.cli.core.commands import LongRunningOperation @@ -84,6 +82,10 @@ from .aaz.latest.network.vnet import List as VNetList, Show as VNetShow from .aaz.latest.network.vnet.subnet import Show as SubnetShow, Update as SubnetUpdate +from .aaz.latest.relay.hyco import Show as HyCoShow +from .aaz.latest.relay.hyco.authorization_rule import List as HycoAuthoList, Create as HycoAuthoCreate +from .aaz.latest.relay.hyco.authorization_rule.keys import List as HycoAuthoKeysList +from .aaz.latest.relay.namespace import List as NamespaceList logger = get_logger(__name__) @@ -4216,14 +4218,12 @@ def add_hc(cmd, name, resource_group_name, namespace, hybrid_connection, slot=No HybridConnection = cmd.get_models('HybridConnection') web_client = web_client_factory(cmd.cli_ctx) - hy_co_client = hycos_mgmt_client_factory(cmd.cli_ctx, cmd.cli_ctx) - namespace_client = namespaces_mgmt_client_factory(cmd.cli_ctx, cmd.cli_ctx) hy_co_id = '' - for n in namespace_client.list(): - logger.warning(n.name) - if n.name == namespace: - hy_co_id = n.id + for n in NamespaceList(cli_ctx=cmd.cli_ctx)(command_args={}): + logger.warning(n['name']) + if n['name'] == namespace: + hy_co_id = n['id'] if hy_co_id == '': raise ResourceNotFoundError('Azure Service Bus Relay namespace {} was not found.'.format(namespace)) @@ -4237,26 +4237,33 @@ def add_hc(cmd, name, resource_group_name, namespace, hybrid_connection, slot=No i = i + 1 # calling the relay API to get information about the hybrid connection - hy_co = hy_co_client.get(hy_co_resource_group, namespace, hybrid_connection) + hy_co = HyCoShow(cli_ctx=cmd.cli_ctx)(command_args={"resource_group": hy_co_resource_group, + "namespace_name": namespace, + "name": hybrid_connection}) # if the hybrid connection does not have a default sender authorization # rule, create it - hy_co_rules = hy_co_client.list_authorization_rules(hy_co_resource_group, namespace, hybrid_connection) + hy_co_rules = HycoAuthoList(cli_ctx=cmd.cli_ctx)(command_args={"resource_group": hy_co_resource_group, + "namespace_name": namespace, + "hybrid_connection_name": hybrid_connection}) has_default_sender_key = False for r in hy_co_rules: - if r.name.lower() == "defaultsender": - for z in r.rights: - if z == z.send: + if r['name'].lower() == "defaultsender": + for z in r['rights']: + if z[0].lower() == 'send' and len(z) == 1: has_default_sender_key = True if not has_default_sender_key: - rights = [AccessRights.send] - hy_co_client.create_or_update_authorization_rule(hy_co_resource_group, namespace, hybrid_connection, - "defaultSender", rights) - - hy_co_keys = hy_co_client.list_keys(hy_co_resource_group, namespace, hybrid_connection, "defaultSender") - hy_co_info = hy_co.id - hy_co_metadata = ast.literal_eval(hy_co.user_metadata) + rights = ["Send"] + args = {"resource_group": hy_co_resource_group, "namespace_name": namespace, + "hybrid_connection_name": hybrid_connection, "name": "defaultSender", "rights": rights} + HycoAuthoCreate(cli_ctx=cmd.cli_ctx)(command_args=args) + hy_co_keys = HycoAuthoKeysList(cli_ctx=cmd.cli_ctx)(command_args={"resource_group": hy_co_resource_group, + "namespace_name": namespace, + "hybrid_connection_name": hybrid_connection, + "name": "defaultSender"}) + hy_co_info = hy_co['id'] + hy_co_metadata = ast.literal_eval(hy_co['userMetadata']) hy_co_hostname = '' for x in hy_co_metadata: if x["key"] == "endpoint": @@ -4276,7 +4283,7 @@ def add_hc(cmd, name, resource_group_name, namespace, hybrid_connection, slot=No hostname=hostname, port=port, send_key_name="defaultSender", - send_key_value=hy_co_keys.primary_key, + send_key_value=hy_co_keys['primaryKey'], service_bus_suffix=".servicebus.windows.net") if slot is None: @@ -4315,26 +4322,34 @@ def set_hc_key(cmd, plan, resource_group_name, namespace, hybrid_connection, key resource_group_strings = split_uri[1].split('/') relay_resource_group = resource_group_strings[0] - hy_co_client = hycos_mgmt_client_factory(cmd.cli_ctx, cmd.cli_ctx) # calling the relay function to obtain information about the hc in question - hy_co = hy_co_client.get(relay_resource_group, namespace, hybrid_connection) + hy_co = HyCoShow(cli_ctx=cmd.cli_ctx)(command_args={"resource_group": relay_resource_group, + "namespace_name": namespace, + "name": hybrid_connection}) # if the hybrid connection does not have a default sender authorization # rule, create it - hy_co_rules = hy_co_client.list_authorization_rules(relay_resource_group, namespace, hybrid_connection) + hy_co_rules = HycoAuthoList(cli_ctx=cmd.cli_ctx)(command_args={"resource_group": relay_resource_group, + "namespace_name": namespace, + "hybrid_connection_name": hybrid_connection}) + has_default_sender_key = False for r in hy_co_rules: - if r.name.lower() == "defaultsender": - for z in r.rights: - if z == z.send: + if r['name'].lower() == "defaultsender": + for z in r['rights']: + if z[0].lower() == 'send' and len(z) == 1: has_default_sender_key = True if not has_default_sender_key: - rights = [AccessRights.send] - hy_co_client.create_or_update_authorization_rule(relay_resource_group, namespace, hybrid_connection, - "defaultSender", rights) - - hy_co_keys = hy_co_client.list_keys(relay_resource_group, namespace, hybrid_connection, "defaultSender") + rights = ["Send"] + args = {"resource_group": relay_resource_group, "namespace_name": namespace, + "hybrid_connection_name": hybrid_connection, "name": "defaultSender", "rights": rights} + HycoAuthoCreate(cli_ctx=cmd.cli_ctx)(command_args=args) + + hy_co_keys = HycoAuthoKeysList(cli_ctx=cmd.cli_ctx)(command_args={"resource_group": relay_resource_group, + "namespace_name": namespace, + "hybrid_connection_name": hybrid_connection, + "name": "defaultSender"}) hy_co_metadata = ast.literal_eval(hy_co.user_metadata) hy_co_hostname = 0 for x in hy_co_metadata: @@ -4347,9 +4362,9 @@ def set_hc_key(cmd, plan, resource_group_name, namespace, hybrid_connection, key key = "empty" if key_type.lower() == "primary": - key = hy_co_keys.primary_key + key = hy_co_keys['primaryKey'] elif key_type.lower() == "secondary": - key = hy_co_keys.secondary_key + key = hy_co_keys['secondaryKey'] # enures input is correct if key == "empty": logger.warning("Key type is invalid - must be primary or secondary") diff --git a/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_hybridconnectionE2E.yaml b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_hybridconnectionE2E.yaml index 9a466122337..d9117bab6ed 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_hybridconnectionE2E.yaml +++ b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_hybridconnectionE2E.yaml @@ -13,28 +13,29 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2022-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westeurope","tags":{"product":"azurecli","cause":"automation","date":"2023-02-07T14:37:32Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westeurope","tags":{"product":"azurecli","cause":"automation","test":"test_webapp_hybridconnectionE2E","date":"2023-08-24T06:15:16Z","module":"appservice"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '314' + - '377' content-type: - application/json; charset=utf-8 date: - - Tue, 07 Feb 2023 14:37:33 GMT + - Thu, 24 Aug 2023 06:15:21 GMT expires: - '-1' pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding x-content-type-options: - nosniff status: @@ -60,25 +61,24 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/hcplan000003?api-version=2022-03-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/hcplan000003","name":"hcplan000003","type":"Microsoft.Web/serverfarms","kind":"app","location":"westeurope","properties":{"serverFarmId":722,"name":"hcplan000003","sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1},"workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"clitest.rg000001-WestEuropewebspace","subscription":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":0,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"West - Europe","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"app","resourceGroup":"clitest.rg000001","reserved":false,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-am2-653_722","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/hcplan000003","name":"hcplan000003","type":"Microsoft.Web/serverfarms","kind":"app","location":"westeurope","properties":{"serverFarmId":9581,"name":"hcplan000003","sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1},"workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"clitest.rg000001-WestEuropewebspace","subscription":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":0,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"West + Europe","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"app","resourceGroup":"clitest.rg000001","reserved":false,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-am2-741_9581","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}' headers: cache-control: - no-cache content-length: - - '1477' + - '1479' content-type: - application/json date: - - Tue, 07 Feb 2023 14:37:41 GMT + - Thu, 24 Aug 2023 06:15:37 GMT etag: - - '"1D93B01BAEC6180"' + - '"1D9D65264A675B5"' expires: - '-1' pragma: @@ -116,24 +116,23 @@ interactions: ParameterSetName: - -g -n --plan User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/hcplan000003?api-version=2022-03-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/hcplan000003","name":"hcplan000003","type":"Microsoft.Web/serverfarms","kind":"app","location":"West - Europe","properties":{"serverFarmId":722,"name":"hcplan000003","workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"clitest.rg000001-WestEuropewebspace","subscription":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":10,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"West - Europe","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"app","resourceGroup":"clitest.rg000001","reserved":false,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-am2-653_722","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}' + Europe","properties":{"serverFarmId":9581,"name":"hcplan000003","workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"clitest.rg000001-WestEuropewebspace","subscription":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":10,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"West + Europe","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"app","resourceGroup":"clitest.rg000001","reserved":false,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-am2-741_9581","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}' headers: cache-control: - no-cache content-length: - - '1403' + - '1405' content-type: - application/json date: - - Tue, 07 Feb 2023 14:37:41 GMT + - Thu, 24 Aug 2023 06:15:39 GMT expires: - '-1' pragma: @@ -173,8 +172,7 @@ interactions: ParameterSetName: - -g -n --plan User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/checknameavailability?api-version=2022-03-01 response: @@ -188,7 +186,7 @@ interactions: content-type: - application/json date: - - Tue, 07 Feb 2023 14:37:42 GMT + - Thu, 24 Aug 2023 06:15:40 GMT expires: - '-1' pragma: @@ -224,8 +222,7 @@ interactions: ParameterSetName: - -g -n --plan User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/providers/Microsoft.Web/webAppStacks?api-version=2022-03-01 response: @@ -247,7 +244,7 @@ interactions: LTS","value":"lts","minorVersions":[{"displayText":"Node LTS","value":"lts","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"NODE|lts","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":true},"gitHubActionSettings":{"isSupported":true}}}}]},{"displayText":"Node 18","value":"18","minorVersions":[{"displayText":"Node 18 LTS","value":"18-lts","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"NODE|18-lts","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":true},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"18.x"}},"windowsRuntimeSettings":{"runtimeVersion":"~18","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"18.x"}}}}]},{"displayText":"Node 16","value":"16","minorVersions":[{"displayText":"Node 16 LTS","value":"16-lts","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"NODE|16-lts","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":true},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"16.x"},"endOfLifeDate":"2024-04-30T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"~16","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"16.x"},"endOfLifeDate":"2024-04-30T00:00:00Z"}}}]},{"displayText":"Node - 14","value":"14","minorVersions":[{"displayText":"Node 14 LTS","value":"14-lts","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"NODE|14-lts","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":true},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"14.x"},"endOfLifeDate":"2023-04-30T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"~14","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"14.x"},"endOfLifeDate":"2023-04-30T00:00:00Z"}}}]},{"displayText":"Node + 14","value":"14","minorVersions":[{"displayText":"Node 14 LTS","value":"14-lts","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"NODE|14-lts","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":true},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"14.x"},"endOfLifeDate":"2023-04-30T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"~14","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"14.x"},"endOfLifeDate":"2023-04-30T00:00:00Z"}}}]},{"displayText":"Node 12","value":"12","minorVersions":[{"displayText":"Node 12 LTS","value":"12-lts","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"NODE|12-lts","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":true},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"12.x"},"endOfLifeDate":"2022-04-01T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"12.13.0","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":true},"gitHubActionSettings":{"isSupported":true},"endOfLifeDate":"2022-04-01T00:00:00Z"}}},{"displayText":"Node 12.9","value":"12.9","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"NODE|12.9","isDeprecated":true,"remoteDebuggingSupported":true,"appInsightsSettings":{"isSupported":true,"isDefaultOff":true},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"12.x"},"endOfLifeDate":"2022-04-01T00:00:00Z"}}}]},{"displayText":"Node 10","value":"10","minorVersions":[{"displayText":"Node 10 LTS","value":"10-LTS","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"NODE|10-lts","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":true},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"10.x"},"endOfLifeDate":"2021-04-01T00:00:00Z"}}},{"displayText":"Node @@ -286,19 +283,19 @@ interactions: 3.10","value":"3.10","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"PYTHON|3.10","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"3.10"},"isHidden":false,"isEarlyAccess":false}}},{"displayText":"Python 3.9","value":"3.9","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"PYTHON|3.9","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"3.9"},"isHidden":false}}},{"displayText":"Python 3.8","value":"3.8","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"PYTHON|3.8","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"3.8"}}}},{"displayText":"Python - 3.7","value":"3.7","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"PYTHON|3.7","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"3.7"}}}},{"displayText":"Python + 3.7","value":"3.7","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"PYTHON|3.7","remoteDebuggingSupported":false,"isDeprecated":true,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"3.7"}}}},{"displayText":"Python 3.6","value":"3.6","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"PYTHON|3.6","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"3.6"}},"windowsRuntimeSettings":{"runtimeVersion":"3.4.0","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"3.6"}}}}]},{"displayText":"Python 2","value":"2","minorVersions":[{"displayText":"Python 2.7","value":"2.7","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"PYTHON|2.7","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"2.7"},"endOfLifeDate":"2020-02-01T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"2.7.3","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"2.7"},"endOfLifeDate":"2020-02-01T00:00:00Z"}}}]}]}},{"id":null,"name":"php","type":"Microsoft.Web/webAppStacks?stackOsType=All","properties":{"displayText":"PHP","value":"php","preferredOs":"linux","majorVersions":[{"displayText":"PHP - 8","value":"8","minorVersions":[{"displayText":"PHP 8.2","value":"8.2","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"PHP|8.2","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"8.2","notSupportedInCreates":true},"endOfLifeDate":"2025-11-30T00:00:00Z"}}},{"displayText":"PHP - 8.1","value":"8.1","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"PHP|8.1","isHidden":false,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"8.1","notSupportedInCreates":true},"endOfLifeDate":"2024-11-30T00:00:00Z"}}},{"displayText":"PHP - 8.0","value":"8.0","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"PHP|8.0","isHidden":false,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"8.0","notSupportedInCreates":true},"endOfLifeDate":"2023-11-30T00:00:00Z"}}}]},{"displayText":"PHP + 8","value":"8","minorVersions":[{"displayText":"PHP 8.2","value":"8.2","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"PHP|8.2","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"8.2"},"endOfLifeDate":"2025-11-30T00:00:00Z"}}},{"displayText":"PHP + 8.1","value":"8.1","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"PHP|8.1","isHidden":false,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"8.1"},"endOfLifeDate":"2024-11-30T00:00:00Z"}}},{"displayText":"PHP + 8.0","value":"8.0","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"PHP|8.0","isHidden":false,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"8.0"},"endOfLifeDate":"2023-11-30T00:00:00Z"}}}]},{"displayText":"PHP 7","value":"7","minorVersions":[{"displayText":"PHP 7.4","value":"7.4","stackSettings":{"windowsRuntimeSettings":{"runtimeVersion":"7.4","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"7.4","notSupportedInCreates":true},"isDeprecated":true,"endOfLifeDate":"2022-11-30T00:00:00Z"},"linuxRuntimeSettings":{"runtimeVersion":"PHP|7.4","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"7.4","notSupportedInCreates":true},"isDeprecated":true,"endOfLifeDate":"2022-11-30T00:00:00Z"}}},{"displayText":"PHP 7.3","value":"7.3","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"PHP|7.3","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"7.3","notSupportedInCreates":true},"endOfLifeDate":"2021-12-06T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"7.3","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"7.3","notSupportedInCreates":true},"endOfLifeDate":"2021-12-06T00:00:00Z"}}},{"displayText":"PHP 7.2","value":"7.2","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"PHP|7.2","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false},"endOfLifeDate":"2020-11-30T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"7.2","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true},"endOfLifeDate":"2020-11-30T00:00:00Z"}}},{"displayText":"PHP 7.1","value":"7.1","stackSettings":{"windowsRuntimeSettings":{"runtimeVersion":"7.1","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false},"endOfLifeDate":"2020-02-01T00:00:00Z"}}},{"displayText":"7.0","value":"7.0","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"PHP|7.0","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false},"endOfLifeDate":"2020-02-01T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"7.0","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false},"endOfLifeDate":"2020-02-01T00:00:00Z"}}}]},{"displayText":"PHP 5","value":"5","minorVersions":[{"displayText":"PHP 5.6","value":"5.6","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"PHP|5.6","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false},"endOfLifeDate":"2021-02-01T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"5.6","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false},"endOfLifeDate":"2021-02-01T00:00:00Z"}}}]}]}},{"id":null,"name":"ruby","type":"Microsoft.Web/webAppStacks?stackOsType=All","properties":{"displayText":"Ruby","value":"ruby","preferredOs":"linux","majorVersions":[{"displayText":"Ruby - 2","value":"2","minorVersions":[{"displayText":"Ruby 2.7","value":"2.7","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"RUBY|2.7","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false},"endOfLifeDate":"2023-03-31T00:00:00Z"}}},{"displayText":"Ruby - 2.7.3","value":"2.7.3","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"RUBY|2.7.3","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false},"isHidden":true,"endOfLifeDate":"2023-03-31T00:00:00Z"}}},{"displayText":"Ruby + 2","value":"2","minorVersions":[{"displayText":"Ruby 2.7","value":"2.7","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"RUBY|2.7","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false},"endOfLifeDate":"2023-03-31T00:00:00Z"}}},{"displayText":"Ruby + 2.7.3","value":"2.7.3","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"RUBY|2.7.3","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false},"isHidden":true,"endOfLifeDate":"2023-03-31T00:00:00Z"}}},{"displayText":"Ruby 2.6","value":"2.6","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"RUBY|2.6","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false},"endOfLifeDate":"2022-03-31T00:00:00Z"}}},{"displayText":"Ruby 2.6.2","value":"2.6.2","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"RUBY|2.6.2","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false},"endOfLifeDate":"2022-03-31T00:00:00Z"}}},{"displayText":"Ruby 2.5","value":"2.5","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"RUBY|2.5","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false},"endOfLifeDate":"2021-03-31T00:00:00Z"}}},{"displayText":"Ruby @@ -309,9 +306,11 @@ interactions: 2.3.8","value":"2.3.8","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"RUBY|2.3.8","isDeprecated":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false},"endOfLifeDate":"2019-03-31T00:00:00Z"}}},{"displayText":"Ruby 2.3.3","value":"2.3.3","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"RUBY|2.3.3","remoteDebuggingSupported":false,"isDeprecated":true,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false},"endOfLifeDate":"2019-03-31T00:00:00Z"}}}]}]}},{"id":null,"name":"java","type":"Microsoft.Web/webAppStacks?stackOsType=All","properties":{"displayText":"Java","value":"java","preferredOs":"linux","majorVersions":[{"displayText":"Java 17","value":"17","minorVersions":[{"displayText":"Java 17","value":"17.0","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"","isAutoUpdate":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"17"},"endOfLifeDate":"2031-09-01T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"17","isAutoUpdate":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"17"},"endOfLifeDate":"2031-09-01T00:00:00Z"}}},{"displayText":"Java + 17.0.3","value":"17.0.3","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"17"},"endOfLifeDate":"2031-09-01T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"17.0.3","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"17"},"endOfLifeDate":"2031-09-01T00:00:00Z"}}},{"displayText":"Java 17.0.2","value":"17.0.2","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"17"},"endOfLifeDate":"2031-09-01T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"17.0.2","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"17"},"endOfLifeDate":"2031-09-01T00:00:00Z"}}},{"displayText":"Java 17.0.1","value":"17.0.1","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"17"},"endOfLifeDate":"2031-09-01T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"17.0.1","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"17"},"endOfLifeDate":"2031-09-01T00:00:00Z"}}}]},{"displayText":"Java 11","value":"11","minorVersions":[{"displayText":"Java 11","value":"11.0","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"","isAutoUpdate":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"11"},"endOfLifeDate":"2026-09-01T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"11","isAutoUpdate":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"11"},"endOfLifeDate":"2026-09-01T00:00:00Z"}}},{"displayText":"Java + 11.0.15","value":"11.0.15","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"11"},"endOfLifeDate":"2026-09-01T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"11.0.15","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"11"},"endOfLifeDate":"2026-09-01T00:00:00Z"}}},{"displayText":"Java 11.0.14","value":"11.0.14","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"11"},"endOfLifeDate":"2026-09-01T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"11.0.14","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"11"},"endOfLifeDate":"2026-09-01T00:00:00Z"}}},{"displayText":"Java 11.0.13","value":"11.0.13","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"11"},"endOfLifeDate":"2026-09-01T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"11.0.13","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"11"},"endOfLifeDate":"2026-09-01T00:00:00Z"}}},{"displayText":"Java 11.0.12","value":"11.0.12","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"11"},"endOfLifeDate":"2026-09-01T00:00:00Z"},"windowsRuntimeSettings":{"runtimeVersion":"11.0.12","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":true,"isDefaultOff":false},"gitHubActionSettings":{"isSupported":true,"supportedVersion":"11"},"endOfLifeDate":"2026-09-01T00:00:00Z"}}},{"displayText":"Java @@ -362,8 +361,10 @@ interactions: Containers","value":"javacontainers","majorVersions":[{"displayText":"Java SE (Embedded Web Server)","value":"javase","minorVersions":[{"displayText":"Java SE (Embedded Web Server)","value":"SE","stackSettings":{"windowsContainerSettings":{"javaContainer":"JAVA","javaContainerVersion":"SE","isAutoUpdate":true},"linuxContainerSettings":{"java17Runtime":"JAVA|17-java17","java11Runtime":"JAVA|11-java11","java8Runtime":"JAVA|8-jre8","isAutoUpdate":true}}},{"displayText":"Java + SE 17.0.3","value":"17.0.3","stackSettings":{"linuxContainerSettings":{"java17Runtime":"JAVA|17.0.3"}}},{"displayText":"Java SE 17.0.2","value":"17.0.2","stackSettings":{"linuxContainerSettings":{"java17Runtime":"JAVA|17.0.2"}}},{"displayText":"Java SE 17.0.1","value":"17.0.1","stackSettings":{"linuxContainerSettings":{"java17Runtime":"JAVA|17.0.1"}}},{"displayText":"Java + SE 11.0.15","value":"11.0.15","stackSettings":{"linuxContainerSettings":{"java11Runtime":"JAVA|11.0.15"}}},{"displayText":"Java SE 11.0.14","value":"11.0.14","stackSettings":{"linuxContainerSettings":{"java11Runtime":"JAVA|11.0.14"}}},{"displayText":"Java SE 11.0.13","value":"11.0.13","stackSettings":{"linuxContainerSettings":{"java11Runtime":"JAVA|11.0.13"}}},{"displayText":"Java SE 11.0.12","value":"11.0.12","stackSettings":{"linuxContainerSettings":{"java11Runtime":"JAVA|11.0.12"}}},{"displayText":"Java @@ -383,19 +384,23 @@ interactions: SE 8u232","value":"1.8.232","stackSettings":{"linuxContainerSettings":{"java8Runtime":"JAVA|8u232"}}}]},{"displayText":"Red Hat JBoss EAP 7","value":"jbosseap","minorVersions":[{"displayText":"Red Hat JBoss EAP 7","value":"7","stackSettings":{"linuxContainerSettings":{"java8Runtime":"JBOSSEAP|7-java8","java11Runtime":"JBOSSEAP|7-java11","isAutoUpdate":true}}},{"displayText":"Red + Hat JBoss EAP 7.4.5","value":"7.4.5","stackSettings":{"linuxContainerSettings":{"java8Runtime":"JBOSSEAP|7.4.5-java8","java11Runtime":"JBOSSEAP|7.4.5-java11"}}},{"displayText":"Red Hat JBoss EAP 7.4.2","value":"7.4.2","stackSettings":{"linuxContainerSettings":{"java8Runtime":"JBOSSEAP|7.4.2-java8","java11Runtime":"JBOSSEAP|7.4.2-java11"}}},{"displayText":"Red Hat JBoss EAP 7.4.1","value":"7.4.1","stackSettings":{"linuxContainerSettings":{"java8Runtime":"JBOSSEAP|7.4.1-java8","java11Runtime":"JBOSSEAP|7.4.1-java11"}}},{"displayText":"Red Hat JBoss EAP 7.4.0","value":"7.4.0","stackSettings":{"linuxContainerSettings":{"java8Runtime":"JBOSSEAP|7.4.0-java8","java11Runtime":"JBOSSEAP|7.4.0-java11"}}},{"displayText":"Red + Hat JBoss EAP 7.3.10","value":"7.3.10","stackSettings":{"linuxContainerSettings":{"java8Runtime":"JBOSSEAP|7.3.10-java8","java11Runtime":"JBOSSEAP|7.3.10-java11"}}},{"displayText":"Red Hat JBoss EAP 7.3.9","value":"7.3.9","stackSettings":{"linuxContainerSettings":{"java8Runtime":"JBOSSEAP|7.3.9-java8","java11Runtime":"JBOSSEAP|7.3.9-java11"}}},{"displayText":"Red Hat JBoss EAP 7.3","value":"7.3","stackSettings":{"linuxContainerSettings":{"java8Runtime":"JBOSSEAP|7.3-java8","java11Runtime":"JBOSSEAP|7.3-java11","isAutoUpdate":true,"isHidden":true}}},{"displayText":"Red Hat JBoss EAP 7.4","value":"7.4","stackSettings":{"linuxContainerSettings":{"java8Runtime":"JBOSSEAP|7.4-java8","java11Runtime":"JBOSSEAP|7.4-java11","isAutoUpdate":true,"isHidden":true}}},{"displayText":"JBoss EAP 7.2","value":"7.2.0","stackSettings":{"linuxContainerSettings":{"java8Runtime":"JBOSSEAP|7.2-java8","isDeprecated":true}}}]},{"displayText":"Apache Tomcat 10.0","value":"tomcat10.0","minorVersions":[{"displayText":"Apache Tomcat 10.0","value":"10.0","stackSettings":{"windowsContainerSettings":{"javaContainer":"TOMCAT","javaContainerVersion":"10.0","isAutoUpdate":true},"linuxContainerSettings":{"java17Runtime":"TOMCAT|10.0-java17","java11Runtime":"TOMCAT|10.0-java11","java8Runtime":"TOMCAT|10.0-jre8","isAutoUpdate":true}}},{"displayText":"Apache + Tomcat 10.0.21","value":"10.0.21","stackSettings":{"windowsContainerSettings":{"javaContainer":"TOMCAT","javaContainerVersion":"10.0.21"},"linuxContainerSettings":{"java8Runtime":"TOMCAT|10.0.21-java8","java11Runtime":"TOMCAT|10.0.21-java11","java17Runtime":"TOMCAT|10.0.21-java17"}}},{"displayText":"Apache Tomcat 10.0.20","value":"10.0.20","stackSettings":{"windowsContainerSettings":{"javaContainer":"TOMCAT","javaContainerVersion":"10.0.20"},"linuxContainerSettings":{"java8Runtime":"TOMCAT|10.0.20-java8","java11Runtime":"TOMCAT|10.0.20-java11","java17Runtime":"TOMCAT|10.0.20-java17"}}},{"displayText":"Apache Tomcat 10.0.12","value":"10.0.12","stackSettings":{"windowsContainerSettings":{"javaContainer":"TOMCAT","javaContainerVersion":"10.0.12"},"linuxContainerSettings":{"java8Runtime":"TOMCAT|10.0.12-java8","java11Runtime":"TOMCAT|10.0.12-java11","java17Runtime":"TOMCAT|10.0.12-java17"}}}]},{"displayText":"Apache Tomcat 9.0","value":"tomcat9.0","minorVersions":[{"displayText":"Apache Tomcat 9.0","value":"9.0","stackSettings":{"windowsContainerSettings":{"javaContainer":"TOMCAT","javaContainerVersion":"9.0","isAutoUpdate":true},"linuxContainerSettings":{"java17Runtime":"TOMCAT|9.0-java17","java11Runtime":"TOMCAT|9.0-java11","java8Runtime":"TOMCAT|9.0-jre8","isAutoUpdate":true}}},{"displayText":"Apache + Tomcat 9.0.63","value":"9.0.63","stackSettings":{"windowsContainerSettings":{"javaContainer":"TOMCAT","javaContainerVersion":"9.0.63"},"linuxContainerSettings":{"java8Runtime":"TOMCAT|9.0.63-java8","java11Runtime":"TOMCAT|9.0.63-java11","java17Runtime":"TOMCAT|9.0.63-java17"}}},{"displayText":"Apache Tomcat 9.0.62","value":"9.0.62","stackSettings":{"windowsContainerSettings":{"javaContainer":"TOMCAT","javaContainerVersion":"9.0.62"},"linuxContainerSettings":{"java8Runtime":"TOMCAT|9.0.62-java8","java11Runtime":"TOMCAT|9.0.62-java11","java17Runtime":"TOMCAT|9.0.62-java17"}}},{"displayText":"Apache Tomcat 9.0.54","value":"9.0.54","stackSettings":{"windowsContainerSettings":{"javaContainer":"TOMCAT","javaContainerVersion":"9.0.54"},"linuxContainerSettings":{"java8Runtime":"TOMCAT|9.0.54-java8","java11Runtime":"TOMCAT|9.0.54-java11","java17Runtime":"TOMCAT|9.0.54-java17"}}},{"displayText":"Apache Tomcat 9.0.52","value":"9.0.52","stackSettings":{"windowsContainerSettings":{"javaContainer":"TOMCAT","javaContainerVersion":"9.0.52"},"linuxContainerSettings":{"java8Runtime":"TOMCAT|9.0.52-java8","java11Runtime":"TOMCAT|9.0.52-java11"}}},{"displayText":"Apache @@ -414,6 +419,7 @@ interactions: Tomcat 9.0.0","value":"9.0.0","stackSettings":{"windowsContainerSettings":{"javaContainer":"TOMCAT","javaContainerVersion":"9.0.0"}}}]},{"displayText":"Apache Tomcat 8.5","value":"tomcat8.5","minorVersions":[{"displayText":"Apache Tomcat 8.5","value":"8.5","stackSettings":{"windowsContainerSettings":{"javaContainer":"TOMCAT","javaContainerVersion":"8.5","isAutoUpdate":true},"linuxContainerSettings":{"java11Runtime":"TOMCAT|8.5-java11","java8Runtime":"TOMCAT|8.5-jre8","isAutoUpdate":true}}},{"displayText":"Apache + Tomcat 8.5.79","value":"8.5.79","stackSettings":{"linuxContainerSettings":{"java8Runtime":"TOMCAT|8.5.79-java8","java11Runtime":"TOMCAT|8.5.79-java11"},"windowsContainerSettings":{"javaContainer":"TOMCAT","javaContainerVersion":"8.5.79"}}},{"displayText":"Apache Tomcat 8.5.78","value":"8.5.78","stackSettings":{"linuxContainerSettings":{"java8Runtime":"TOMCAT|8.5.78-java8","java11Runtime":"TOMCAT|8.5.78-java11"},"windowsContainerSettings":{"javaContainer":"TOMCAT","javaContainerVersion":"8.5.78"}}},{"displayText":"Apache Tomcat 8.5.72","value":"8.5.72","stackSettings":{"linuxContainerSettings":{"java8Runtime":"TOMCAT|8.5.72-java8","java11Runtime":"TOMCAT|8.5.72-java11"},"windowsContainerSettings":{"javaContainer":"TOMCAT","javaContainerVersion":"8.5.72"}}},{"displayText":"Apache Tomcat 8.5.69","value":"8.5.69","stackSettings":{"linuxContainerSettings":{"java8Runtime":"TOMCAT|8.5.69-java8","java11Runtime":"TOMCAT|8.5.69-java11"},"windowsContainerSettings":{"javaContainer":"TOMCAT","javaContainerVersion":"8.5.69"}}},{"displayText":"Apache @@ -453,16 +459,16 @@ interactions: (Static Content)","value":"1","minorVersions":[{"displayText":"HTML (Static Content)","value":"1.0","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"STATICSITE|1.0","isHidden":true,"remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false}}}}]}]}},{"id":null,"name":"go","type":"Microsoft.Web/webAppStacks?stackOsType=All","properties":{"displayText":"Go","value":"go","preferredOs":"linux","majorVersions":[{"displayText":"Go 1","value":"go1","minorVersions":[{"displayText":"Go 1.19 (Experimental)","value":"go1.19","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"GO|1.19","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":true},"isHidden":false,"isEarlyAccess":false}}},{"displayText":"Go - 1.18 (Experimental)","value":"go1.18","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"GO|1.18","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false},"isHidden":false,"isEarlyAccess":false}}}]}]}}],"nextLink":null,"id":null}' + 1.18 (Experimental)","value":"go1.18","stackSettings":{"linuxRuntimeSettings":{"runtimeVersion":"GO|1.18","remoteDebuggingSupported":false,"appInsightsSettings":{"isSupported":false},"gitHubActionSettings":{"isSupported":false},"isHidden":false,"isEarlyAccess":false,"isDeprecated":true}}}]}]}}],"nextLink":null,"id":null}' headers: cache-control: - no-cache content-length: - - '72373' + - '75043' content-type: - application/json date: - - Tue, 07 Feb 2023 14:37:43 GMT + - Thu, 24 Aug 2023 06:15:43 GMT expires: - '-1' pragma: @@ -487,7 +493,7 @@ interactions: - request: body: '{"location": "West Europe", "properties": {"serverFarmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/hcplan000003", "reserved": false, "isXenon": false, "hyperV": false, "siteConfig": {"netFrameworkVersion": - "v4.6", "appSettings": [{"name": "WEBSITE_NODE_DEFAULT_VERSION", "value": "~14"}], + "v4.6", "appSettings": [{"name": "WEBSITE_NODE_DEFAULT_VERSION", "value": "~16"}], "alwaysOn": true, "localMySqlEnabled": false, "http20Enabled": true}, "scmSiteAlsoStopped": false, "httpsOnly": false}}' headers: @@ -506,27 +512,26 @@ interactions: ParameterSetName: - -g -n --plan User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/hcwebapp000002?api-version=2022-03-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/hcwebapp000002","name":"hcwebapp000002","type":"Microsoft.Web/sites","kind":"app","location":"West - Europe","properties":{"name":"hcwebapp000002","state":"Running","hostNames":["hcwebapp000002.azurewebsites.net"],"webSpace":"clitest.rg000001-WestEuropewebspace","selfLink":"https://waws-prod-am2-653.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/clitest.rg000001-WestEuropewebspace/sites/hcwebapp000002","repositorySiteName":"hcwebapp000002","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"enabledHostNames":["hcwebapp000002.azurewebsites.net","hcwebapp000002.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[{"name":"LinuxFxVersion","value":""},{"name":"WindowsFxVersion","value":null}],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"hcwebapp000002.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"hcwebapp000002.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/hcplan000003","reserved":false,"isXenon":false,"hyperV":false,"lastModifiedTimeUtc":"2023-02-07T14:37:49.69","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","dnsConfiguration":{},"vnetRouteAllEnabled":false,"containerAllocationSubnet":null,"useContainerLocalhostBindings":null,"vnetImagePullEnabled":false,"vnetContentShareEnabled":false,"siteConfig":{"numberOfWorkers":1,"defaultDocuments":null,"netFrameworkVersion":null,"phpVersion":null,"pythonVersion":null,"nodeVersion":null,"powerShellVersion":null,"linuxFxVersion":"","windowsFxVersion":null,"windowsConfiguredStacks":null,"requestTracingEnabled":null,"remoteDebuggingEnabled":null,"remoteDebuggingVersion":null,"httpLoggingEnabled":null,"azureMonitorLogCategories":null,"acrUseManagedIdentityCreds":false,"acrUserManagedIdentityID":null,"logsDirectorySizeLimit":null,"detailedErrorLoggingEnabled":null,"publishingUsername":null,"publishingPassword":null,"appSettings":null,"metadata":null,"connectionStrings":null,"machineKey":null,"handlerMappings":null,"documentRoot":null,"scmType":null,"use32BitWorkerProcess":null,"webSocketsEnabled":null,"alwaysOn":false,"javaVersion":null,"javaContainer":null,"javaContainerVersion":null,"appCommandLine":null,"managedPipelineMode":null,"virtualApplications":null,"winAuthAdminState":null,"winAuthTenantState":null,"customAppPoolIdentityAdminState":null,"customAppPoolIdentityTenantState":null,"runtimeADUser":null,"runtimeADUserPassword":null,"loadBalancing":null,"routingRules":null,"experiments":null,"limits":null,"autoHealEnabled":null,"autoHealRules":null,"tracingOptions":null,"vnetName":null,"vnetRouteAllEnabled":null,"vnetPrivatePortsCount":null,"publicNetworkAccess":null,"cors":null,"push":null,"apiDefinition":null,"apiManagementConfig":null,"autoSwapSlotName":null,"localMySqlEnabled":null,"managedServiceIdentityId":null,"xManagedServiceIdentityId":null,"keyVaultReferenceIdentity":null,"ipSecurityRestrictions":[{"ipAddress":"Any","action":"Allow","priority":2147483647,"name":"Allow + Europe","properties":{"name":"hcwebapp000002","state":"Running","hostNames":["hcwebapp000002.azurewebsites.net"],"webSpace":"clitest.rg000001-WestEuropewebspace","selfLink":"https://waws-prod-am2-741.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/clitest.rg000001-WestEuropewebspace/sites/hcwebapp000002","repositorySiteName":"hcwebapp000002","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"enabledHostNames":["hcwebapp000002.azurewebsites.net","hcwebapp000002.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[{"name":"LinuxFxVersion","value":""},{"name":"WindowsFxVersion","value":null}],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"hcwebapp000002.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"hcwebapp000002.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/hcplan000003","reserved":false,"isXenon":false,"hyperV":false,"lastModifiedTimeUtc":"2023-08-24T06:15:48.67","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","dnsConfiguration":{},"vnetRouteAllEnabled":false,"containerAllocationSubnet":null,"useContainerLocalhostBindings":null,"vnetImagePullEnabled":false,"vnetContentShareEnabled":false,"siteConfig":{"numberOfWorkers":1,"defaultDocuments":null,"netFrameworkVersion":null,"phpVersion":null,"pythonVersion":null,"nodeVersion":null,"powerShellVersion":null,"linuxFxVersion":"","windowsFxVersion":null,"windowsConfiguredStacks":null,"requestTracingEnabled":null,"remoteDebuggingEnabled":null,"remoteDebuggingVersion":null,"httpLoggingEnabled":null,"azureMonitorLogCategories":null,"acrUseManagedIdentityCreds":false,"acrUserManagedIdentityID":null,"logsDirectorySizeLimit":null,"detailedErrorLoggingEnabled":null,"publishingUsername":null,"publishingPassword":null,"appSettings":null,"metadata":null,"connectionStrings":null,"machineKey":null,"handlerMappings":null,"documentRoot":null,"scmType":null,"use32BitWorkerProcess":null,"webSocketsEnabled":null,"alwaysOn":false,"javaVersion":null,"javaContainer":null,"javaContainerVersion":null,"appCommandLine":null,"managedPipelineMode":null,"virtualApplications":null,"winAuthAdminState":null,"winAuthTenantState":null,"customAppPoolIdentityAdminState":null,"customAppPoolIdentityTenantState":null,"runtimeADUser":null,"runtimeADUserPassword":null,"loadBalancing":null,"routingRules":null,"experiments":null,"limits":null,"autoHealEnabled":null,"autoHealRules":null,"tracingOptions":null,"vnetName":null,"vnetRouteAllEnabled":null,"vnetPrivatePortsCount":null,"publicNetworkAccess":null,"cors":null,"push":null,"apiDefinition":null,"apiManagementConfig":null,"autoSwapSlotName":null,"localMySqlEnabled":null,"managedServiceIdentityId":null,"xManagedServiceIdentityId":null,"keyVaultReferenceIdentity":null,"ipSecurityRestrictions":[{"ipAddress":"Any","action":"Allow","priority":2147483647,"name":"Allow all","description":"Allow all access"}],"ipSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictions":[{"ipAddress":"Any","action":"Allow","priority":2147483647,"name":"Allow - all","description":"Allow all access"}],"scmIpSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictionsUseMain":null,"http20Enabled":false,"minTlsVersion":null,"minTlsCipherSuite":null,"supportedTlsCipherSuites":null,"scmMinTlsVersion":null,"ftpsState":null,"preWarmedInstanceCount":null,"functionAppScaleLimit":null,"elasticWebAppScaleLimit":0,"healthCheckPath":null,"fileChangeAuditEnabled":null,"functionsRuntimeScaleMonitoringEnabled":null,"websiteTimeZone":null,"minimumElasticInstanceCount":0,"azureStorageAccounts":null,"http20ProxyFlag":null,"sitePort":null,"antivirusScanEnabled":null,"storageType":null},"deploymentId":"hcwebapp000002","slotName":null,"trafficManagerHostNames":null,"sku":"Standard","scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"clientAffinityEnabled":true,"clientCertEnabled":false,"clientCertMode":"Required","clientCertExclusionPaths":null,"hostNamesDisabled":false,"domainVerificationIdentifiers":null,"customDomainVerificationId":"253001F2FCF5A7B1CD759EB861E9BB1596370BE27E47A991F72184277B3D12F2","kind":"app","inboundIpAddress":"20.105.216.5","possibleInboundIpAddresses":"20.105.216.5","ftpUsername":"hcwebapp000002\\$hcwebapp000002","ftpsHostName":"ftps://waws-prod-am2-653.ftp.azurewebsites.windows.net/site/wwwroot","outboundIpAddresses":"20.23.78.230,20.13.96.13,20.13.100.118,20.13.101.63,20.13.102.185,20.13.102.195,20.105.216.5","possibleOutboundIpAddresses":"20.23.78.230,20.13.96.13,20.13.100.118,20.13.101.63,20.13.102.185,20.13.102.195,20.13.102.204,20.13.102.206,20.13.102.222,20.13.102.235,20.13.102.255,20.13.103.1,20.13.103.6,20.13.103.13,20.13.103.24,20.23.79.191,20.13.103.28,20.13.103.30,20.13.103.50,20.13.103.54,20.13.103.77,20.13.103.89,20.13.103.97,20.13.103.102,20.13.102.153,20.13.103.132,20.13.99.107,20.13.102.105,20.23.78.212,20.13.99.19,20.105.216.5","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-am2-653","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"clitest.rg000001","defaultHostName":"hcwebapp000002.azurewebsites.net","slotSwapStatus":null,"httpsOnly":false,"redundancyMode":"None","inProgressOperationId":null,"geoDistributions":null,"privateEndpointConnections":null,"publicNetworkAccess":null,"buildVersion":null,"targetBuildVersion":null,"migrationState":null,"eligibleLogCategories":"AppServiceAppLogs,AppServiceAuditLogs,AppServiceConsoleLogs,AppServiceHTTPLogs,AppServiceIPSecAuditLogs,AppServicePlatformLogs,ScanLogs","storageAccountRequired":false,"virtualNetworkSubnetId":null,"keyVaultReferenceIdentity":"SystemAssigned","defaultHostNameScope":"Global","privateLinkIdentifiers":null}}' + all","description":"Allow all access"}],"scmIpSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictionsUseMain":null,"http20Enabled":false,"minTlsVersion":null,"minTlsCipherSuite":null,"supportedTlsCipherSuites":null,"scmMinTlsVersion":null,"ftpsState":null,"preWarmedInstanceCount":null,"functionAppScaleLimit":null,"elasticWebAppScaleLimit":0,"healthCheckPath":null,"fileChangeAuditEnabled":null,"functionsRuntimeScaleMonitoringEnabled":null,"websiteTimeZone":null,"minimumElasticInstanceCount":0,"azureStorageAccounts":null,"http20ProxyFlag":null,"sitePort":null,"antivirusScanEnabled":null,"storageType":null},"deploymentId":"hcwebapp000002","slotName":null,"trafficManagerHostNames":null,"sku":"Standard","scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"clientAffinityEnabled":true,"clientCertEnabled":false,"clientCertMode":"Required","clientCertExclusionPaths":null,"hostNamesDisabled":false,"vnetBackupRestoreEnabled":false,"domainVerificationIdentifiers":null,"customDomainVerificationId":"253001F2FCF5A7B1CD759EB861E9BB1596370BE27E47A991F72184277B3D12F2","kind":"app","managedEnvironmentId":null,"inboundIpAddress":"20.105.224.36","possibleInboundIpAddresses":"20.105.224.36","ftpUsername":"hcwebapp000002\\$hcwebapp000002","ftpsHostName":"ftps://waws-prod-am2-741.ftp.azurewebsites.windows.net/site/wwwroot","outboundIpAddresses":"20.160.245.202,20.160.246.245,20.160.244.110,20.160.244.189,98.64.212.131,20.160.244.223,20.160.246.43,20.229.249.165,4.175.48.53,20.160.243.72,20.160.246.146,20.160.246.177,20.160.247.31,20.160.247.37,20.160.247.55,20.160.247.91,20.160.247.124,20.160.247.129,20.105.224.36","possibleOutboundIpAddresses":"20.160.245.202,20.160.246.245,20.160.244.110,20.160.244.189,98.64.212.131,20.160.244.223,20.160.246.43,20.229.249.165,4.175.48.53,20.160.243.72,20.160.246.146,20.160.246.177,20.160.247.31,20.160.247.37,20.160.247.55,20.160.247.91,20.160.247.124,20.160.247.129,20.229.251.130,20.229.251.145,20.8.252.48,98.64.213.17,98.64.213.28,20.160.240.228,20.160.240.229,20.160.243.74,20.160.243.75,4.175.48.60,20.160.243.173,20.160.242.72,20.160.243.231,20.160.244.251,20.160.245.196,20.160.245.255,20.8.253.127,20.160.243.30,20.160.246.43,20.229.249.165,4.175.48.53,20.160.243.72,20.160.246.146,20.160.246.177,20.160.247.31,20.160.247.37,20.160.247.55,20.160.247.91,20.160.247.124,20.160.247.129,20.160.247.152,20.160.247.205,20.160.246.27,20.160.246.207,20.160.247.250,4.175.48.16,20.105.224.36","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-am2-741","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"clitest.rg000001","defaultHostName":"hcwebapp000002.azurewebsites.net","slotSwapStatus":null,"httpsOnly":false,"endToEndEncryptionEnabled":false,"redundancyMode":"None","inProgressOperationId":null,"geoDistributions":null,"privateEndpointConnections":null,"publicNetworkAccess":null,"buildVersion":null,"targetBuildVersion":null,"migrationState":null,"eligibleLogCategories":"AppServiceAppLogs,AppServiceAuditLogs,AppServiceConsoleLogs,AppServiceHTTPLogs,AppServiceIPSecAuditLogs,AppServicePlatformLogs,ScanLogs","inFlightFeatures":null,"storageAccountRequired":false,"virtualNetworkSubnetId":null,"keyVaultReferenceIdentity":"SystemAssigned","defaultHostNameScope":"Global","privateLinkIdentifiers":null}}' headers: cache-control: - no-cache content-length: - - '6697' + - '7431' content-type: - application/json date: - - Tue, 07 Feb 2023 14:38:23 GMT + - Thu, 24 Aug 2023 06:16:08 GMT etag: - - '"1D93B01C1301460"' + - '"1D9D6526D29EC6B"' expires: - '-1' pragma: @@ -568,25 +573,24 @@ interactions: ParameterSetName: - -g -n --plan User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/hcwebapp000002/publishxml?api-version=2022-03-01 response: body: string: @@ -594,11 +598,11 @@ interactions: cache-control: - no-cache content-length: - - '1537' + - '1538' content-type: - application/xml date: - - Tue, 07 Feb 2023 14:38:23 GMT + - Thu, 24 Aug 2023 06:16:10 GMT expires: - '-1' pragma: @@ -632,22 +636,21 @@ interactions: ParameterSetName: - -g --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2022-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westeurope","tags":{"product":"azurecli","cause":"automation","date":"2023-02-07T14:37:32Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westeurope","tags":{"product":"azurecli","cause":"automation","test":"test_webapp_hybridconnectionE2E","date":"2023-08-24T06:15:16Z","module":"appservice"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '314' + - '377' content-type: - application/json; charset=utf-8 date: - - Tue, 07 Feb 2023 14:38:23 GMT + - Thu, 24 Aug 2023 06:16:11 GMT expires: - '-1' pragma: @@ -675,21 +678,17 @@ interactions: Content-Length: - '26' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -g --name User-Agent: - - python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) msrest/0.7.1 - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 msrest_azure/0.6.4 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.45.0 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004","name":"hcnamespace000004","type":"Microsoft.Relay/Namespaces","location":"West - Europe","tags":{},"properties":{"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:hcnamespace000004","createdAt":"2023-02-07T14:38:28.42Z","updatedAt":"2023-02-07T14:38:28.42Z","serviceBusEndpoint":"https://hcnamespace000004.servicebus.windows.net:443/","status":"Activating"}}' + Europe","tags":{},"properties":{"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:hcnamespace000004","createdAt":"2023-08-24T06:16:15.52Z","updatedAt":"2023-08-24T06:16:15.52Z","serviceBusEndpoint":"https://hcnamespace000004.servicebus.windows.net:443/","status":"Activating"}}' headers: cache-control: - no-cache @@ -698,7 +697,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 07 Feb 2023 14:38:28 GMT + - Thu, 24 Aug 2023 06:16:16 GMT expires: - '-1' pragma: @@ -725,29 +724,23 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - relay namespace create Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -g --name User-Agent: - - python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) msrest/0.7.1 - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 msrest_azure/0.6.4 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.45.0 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004","name":"hcnamespace000004","type":"Microsoft.Relay/Namespaces","location":"West - Europe","tags":{},"properties":{"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:hcnamespace000004","createdAt":"2023-02-07T14:38:28.42Z","updatedAt":"2023-02-07T14:38:28.42Z","serviceBusEndpoint":"https://hcnamespace000004.servicebus.windows.net:443/","status":"Activating"}}' + Europe","tags":{},"properties":{"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:hcnamespace000004","createdAt":"2023-08-24T06:16:15.52Z","updatedAt":"2023-08-24T06:16:15.52Z","serviceBusEndpoint":"https://hcnamespace000004.servicebus.windows.net:443/","status":"Activating"}}' headers: cache-control: - no-cache @@ -756,7 +749,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 07 Feb 2023 14:38:58 GMT + - Thu, 24 Aug 2023 06:16:16 GMT expires: - '-1' pragma: @@ -781,38 +774,82 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - relay namespace create Connection: - keep-alive - Content-Type: + ParameterSetName: + - -g --name + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004?api-version=2017-04-01 + response: + body: + string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004","name":"hcnamespace000004","type":"Microsoft.Relay/Namespaces","location":"West + Europe","tags":{},"properties":{"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:hcnamespace000004","createdAt":"2023-08-24T06:16:15.52Z","updatedAt":"2023-08-24T06:16:15.52Z","serviceBusEndpoint":"https://hcnamespace000004.servicebus.windows.net:443/","status":"Activating"}}' + headers: + cache-control: + - no-cache + content-length: + - '577' + content-type: - application/json; charset=utf-8 + date: + - Thu, 24 Aug 2023 06:16:47 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Service-Bus-Resource-Provider/CH3 + - Microsoft-HTTPAPI/2.0 + server-sb: + - Service-Bus-Resource-Provider/CH3 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - relay namespace create + Connection: + - keep-alive ParameterSetName: - -g --name User-Agent: - - python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) msrest/0.7.1 - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 msrest_azure/0.6.4 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.45.0 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004","name":"hcnamespace000004","type":"Microsoft.Relay/Namespaces","location":"West - Europe","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:hcnamespace000004","createdAt":"2023-02-07T14:38:28.42Z","updatedAt":"2023-02-07T14:39:13.043Z","serviceBusEndpoint":"https://hcnamespace000004.servicebus.windows.net:443/","status":"Active"}}' + Europe","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:hcnamespace000004","createdAt":"2023-08-24T06:16:15.52Z","updatedAt":"2023-08-24T06:17:01.32Z","serviceBusEndpoint":"https://hcnamespace000004.servicebus.windows.net:443/","status":"Active"}}' headers: cache-control: - no-cache content-length: - - '576' + - '575' content-type: - application/json; charset=utf-8 date: - - Tue, 07 Feb 2023 14:39:28 GMT + - Thu, 24 Aug 2023 06:17:17 GMT expires: - '-1' pragma: @@ -847,20 +884,16 @@ interactions: Content-Length: - '83' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -g --namespace-name --name --user-metadata User-Agent: - - python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) msrest/0.7.1 - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 msrest_azure/0.6.4 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.45.0 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridConnections/hcname000005?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridconnections/hcname000005","name":"hcname000005","type":"Microsoft.Relay/namespaces/hybridconnections","location":"westeurope","properties":{"createdAt":"2023-02-07T14:39:31.9321695Z","updatedAt":"2023-02-07T14:39:31.9321695Z","listenerCount":0,"requiresClientAuthorization":true,"userMetadata":"[{\"key\":\"endpoint\",\"value\":\"vmsq1:80\"}]"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridconnections/hcname000005","name":"hcname000005","type":"Microsoft.Relay/namespaces/hybridconnections","location":"westeurope","properties":{"createdAt":"2023-08-24T06:17:22.3877933Z","updatedAt":"2023-08-24T06:17:22.3877933Z","listenerCount":0,"requiresClientAuthorization":true,"userMetadata":"[{\"key\":\"endpoint\",\"value\":\"vmsq1:80\"}]"}}' headers: cache-control: - no-cache @@ -869,7 +902,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 07 Feb 2023 14:39:31 GMT + - Thu, 24 Aug 2023 06:17:22 GMT expires: - '-1' pragma: @@ -885,7 +918,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1193' status: code: 200 message: OK @@ -900,40 +933,34 @@ interactions: - webapp hybrid-connection add Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -g -n --namespace --hybrid-connection User-Agent: - - python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) msrest/0.7.1 - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 msrest_azure/0.6.4 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.45.0 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Relay/namespaces?api-version=2017-04-01 response: body: string: '{"value":[{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004","name":"hcnamespace000004","type":"Microsoft.Relay/Namespaces","location":"West - Europe","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:hcnamespace000004","createdAt":"2023-02-07T14:38:28.42Z","updatedAt":"2023-02-07T14:39:13.043Z","serviceBusEndpoint":"https://hcnamespace000004.servicebus.windows.net:443/","status":"Active"}}]}' + Europe","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:hcnamespace000004","createdAt":"2023-08-24T06:16:15.52Z","updatedAt":"2023-08-24T06:17:01.32Z","serviceBusEndpoint":"https://hcnamespace000004.servicebus.windows.net:443/","status":"Active"}}]}' headers: cache-control: - no-cache content-length: - - '588' + - '587' content-type: - application/json; charset=utf-8 date: - - Tue, 07 Feb 2023 14:39:32 GMT + - Thu, 24 Aug 2023 06:17:23 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -958,21 +985,15 @@ interactions: - webapp hybrid-connection add Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -g -n --namespace --hybrid-connection User-Agent: - - python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) msrest/0.7.1 - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 msrest_azure/0.6.4 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.45.0 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridConnections/hcname000005?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridconnections/hcname000005","name":"hcname000005","type":"Microsoft.Relay/namespaces/hybridconnections","location":"westeurope","properties":{"createdAt":"2023-02-07T14:39:31.9321695Z","updatedAt":"2023-02-07T14:39:31.9321695Z","listenerCount":0,"requiresClientAuthorization":true,"userMetadata":"[{\"key\":\"endpoint\",\"value\":\"vmsq1:80\"}]"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridconnections/hcname000005","name":"hcname000005","type":"Microsoft.Relay/namespaces/hybridconnections","location":"westeurope","properties":{"createdAt":"2023-08-24T06:17:22.3877933Z","updatedAt":"2023-08-24T06:17:22.3877933Z","listenerCount":0,"requiresClientAuthorization":true,"userMetadata":"[{\"key\":\"endpoint\",\"value\":\"vmsq1:80\"}]"}}' headers: cache-control: - no-cache @@ -981,7 +1002,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 07 Feb 2023 14:39:32 GMT + - Thu, 24 Aug 2023 06:17:25 GMT expires: - '-1' pragma: @@ -1010,16 +1031,10 @@ interactions: - webapp hybrid-connection add Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -g -n --namespace --hybrid-connection User-Agent: - - python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) msrest/0.7.1 - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 msrest_azure/0.6.4 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.45.0 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridConnections/hcname000005/authorizationRules?api-version=2017-04-01 response: @@ -1033,7 +1048,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 07 Feb 2023 14:39:33 GMT + - Thu, 24 Aug 2023 06:17:28 GMT expires: - '-1' pragma: @@ -1065,15 +1080,11 @@ interactions: Content-Length: - '36' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -g -n --namespace --hybrid-connection User-Agent: - - python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) msrest/0.7.1 - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 msrest_azure/0.6.4 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.45.0 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridConnections/hcname000005/authorizationRules/defaultSender?api-version=2017-04-01 response: @@ -1087,7 +1098,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 07 Feb 2023 14:39:33 GMT + - Thu, 24 Aug 2023 06:17:29 GMT expires: - '-1' pragma: @@ -1103,7 +1114,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1192' status: code: 200 message: OK @@ -1120,21 +1131,15 @@ interactions: - keep-alive Content-Length: - '0' - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -g -n --namespace --hybrid-connection User-Agent: - - python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) msrest/0.7.1 - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 msrest_azure/0.6.4 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.45.0 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridConnections/hcname000005/authorizationRules/defaultSender/listKeys?api-version=2017-04-01 response: body: - string: '{"primaryConnectionString":"Endpoint=sb://hcnamespace000004.servicebus.windows.net/;SharedAccessKeyName=defaultSender;SharedAccessKey=kloZWy+0o2doXo7ilKZrHmwqo7fJ0NUXp78x47VCbPU=;EntityPath=hcname000005","secondaryConnectionString":"Endpoint=sb://hcnamespace000004.servicebus.windows.net/;SharedAccessKeyName=defaultSender;SharedAccessKey=35sKnfaI4ZzOP6NOchPk23B4eilXzEbifwXa+RPy5mc=;EntityPath=hcname000005","primaryKey":"kloZWy+0o2doXo7ilKZrHmwqo7fJ0NUXp78x47VCbPU=","secondaryKey":"35sKnfaI4ZzOP6NOchPk23B4eilXzEbifwXa+RPy5mc=","keyName":"defaultSender"}' + string: '{"primaryConnectionString":"Endpoint=sb://hcnamespace000004.servicebus.windows.net/;SharedAccessKeyName=defaultSender;SharedAccessKey=8uopsw/Ed+rUayJZFnDB3hl/Q2vNzxLFA+ARmCRhWiU=;EntityPath=hcname000005","secondaryConnectionString":"Endpoint=sb://hcnamespace000004.servicebus.windows.net/;SharedAccessKeyName=defaultSender;SharedAccessKey=Apl7ak2dDJlX5vX9I47nyYvLBSLEjpUke+ARmGpDLlg=;EntityPath=hcname000005","primaryKey":"8uopsw/Ed+rUayJZFnDB3hl/Q2vNzxLFA+ARmCRhWiU=","secondaryKey":"Apl7ak2dDJlX5vX9I47nyYvLBSLEjpUke+ARmGpDLlg=","keyName":"defaultSender"}' headers: cache-control: - no-cache @@ -1143,7 +1148,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 07 Feb 2023 14:39:34 GMT + - Thu, 24 Aug 2023 06:17:32 GMT expires: - '-1' pragma: @@ -1167,7 +1172,7 @@ interactions: body: '{"properties": {"serviceBusNamespace": "hcnamespace000004", "relayName": "hcname000005", "relayArmUri": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridconnections/hcname000005", "hostname": "vmsq1", "port": 80, "sendKeyName": "defaultSender", "sendKeyValue": - "kloZWy+0o2doXo7ilKZrHmwqo7fJ0NUXp78x47VCbPU=", "serviceBusSuffix": ".servicebus.windows.net"}}' + "8uopsw/Ed+rUayJZFnDB3hl/Q2vNzxLFA+ARmCRhWiU=", "serviceBusSuffix": ".servicebus.windows.net"}}' headers: Accept: - application/json @@ -1184,8 +1189,7 @@ interactions: ParameterSetName: - -g -n --namespace --hybrid-connection User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/hcwebapp000002/hybridConnectionNamespaces/hcnamespace000004/relays/hcname000005?api-version=2022-03-01 response: @@ -1200,7 +1204,7 @@ interactions: content-type: - application/json date: - - Tue, 07 Feb 2023 14:39:35 GMT + - Thu, 24 Aug 2023 06:17:35 GMT expires: - '-1' pragma: @@ -1238,8 +1242,7 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/hcwebapp000002/hybridConnectionRelays?api-version=2022-03-01 response: @@ -1254,7 +1257,7 @@ interactions: content-type: - application/json date: - - Tue, 07 Feb 2023 14:39:51 GMT + - Thu, 24 Aug 2023 06:17:38 GMT expires: - '-1' pragma: @@ -1290,25 +1293,24 @@ interactions: ParameterSetName: - -g -n --slot User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/hcwebapp000002?api-version=2022-03-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/hcwebapp000002","name":"hcwebapp000002","type":"Microsoft.Web/sites","kind":"app","location":"West - Europe","properties":{"name":"hcwebapp000002","state":"Running","hostNames":["hcwebapp000002.azurewebsites.net"],"webSpace":"clitest.rg000001-WestEuropewebspace","selfLink":"https://waws-prod-am2-653.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/clitest.rg000001-WestEuropewebspace/sites/hcwebapp000002","repositorySiteName":"hcwebapp000002","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"enabledHostNames":["hcwebapp000002.azurewebsites.net","hcwebapp000002.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[{"name":"LinuxFxVersion","value":""},{"name":"WindowsFxVersion","value":null}],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"hcwebapp000002.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"hcwebapp000002.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/hcplan000003","reserved":false,"isXenon":false,"hyperV":false,"lastModifiedTimeUtc":"2023-02-07T14:39:36.1366667","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","dnsConfiguration":{},"vnetRouteAllEnabled":false,"containerAllocationSubnet":null,"useContainerLocalhostBindings":null,"vnetImagePullEnabled":false,"vnetContentShareEnabled":false,"siteConfig":{"numberOfWorkers":1,"defaultDocuments":null,"netFrameworkVersion":null,"phpVersion":null,"pythonVersion":null,"nodeVersion":null,"powerShellVersion":null,"linuxFxVersion":"","windowsFxVersion":null,"windowsConfiguredStacks":null,"requestTracingEnabled":null,"remoteDebuggingEnabled":null,"remoteDebuggingVersion":null,"httpLoggingEnabled":null,"azureMonitorLogCategories":null,"acrUseManagedIdentityCreds":false,"acrUserManagedIdentityID":null,"logsDirectorySizeLimit":null,"detailedErrorLoggingEnabled":null,"publishingUsername":null,"publishingPassword":null,"appSettings":null,"metadata":null,"connectionStrings":null,"machineKey":null,"handlerMappings":null,"documentRoot":null,"scmType":null,"use32BitWorkerProcess":null,"webSocketsEnabled":null,"alwaysOn":true,"javaVersion":null,"javaContainer":null,"javaContainerVersion":null,"appCommandLine":null,"managedPipelineMode":null,"virtualApplications":null,"winAuthAdminState":null,"winAuthTenantState":null,"customAppPoolIdentityAdminState":null,"customAppPoolIdentityTenantState":null,"runtimeADUser":null,"runtimeADUserPassword":null,"loadBalancing":null,"routingRules":null,"experiments":null,"limits":null,"autoHealEnabled":null,"autoHealRules":null,"tracingOptions":null,"vnetName":null,"vnetRouteAllEnabled":null,"vnetPrivatePortsCount":null,"publicNetworkAccess":null,"cors":null,"push":null,"apiDefinition":null,"apiManagementConfig":null,"autoSwapSlotName":null,"localMySqlEnabled":null,"managedServiceIdentityId":null,"xManagedServiceIdentityId":null,"keyVaultReferenceIdentity":null,"ipSecurityRestrictions":null,"ipSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictions":null,"scmIpSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictionsUseMain":null,"http20Enabled":true,"minTlsVersion":null,"minTlsCipherSuite":null,"supportedTlsCipherSuites":null,"scmMinTlsVersion":null,"ftpsState":null,"preWarmedInstanceCount":null,"functionAppScaleLimit":0,"elasticWebAppScaleLimit":null,"healthCheckPath":null,"fileChangeAuditEnabled":null,"functionsRuntimeScaleMonitoringEnabled":null,"websiteTimeZone":null,"minimumElasticInstanceCount":0,"azureStorageAccounts":null,"http20ProxyFlag":null,"sitePort":null,"antivirusScanEnabled":null,"storageType":null},"deploymentId":"hcwebapp000002","slotName":null,"trafficManagerHostNames":null,"sku":"Standard","scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"clientAffinityEnabled":true,"clientCertEnabled":false,"clientCertMode":"Required","clientCertExclusionPaths":null,"hostNamesDisabled":false,"domainVerificationIdentifiers":null,"customDomainVerificationId":"253001F2FCF5A7B1CD759EB861E9BB1596370BE27E47A991F72184277B3D12F2","kind":"app","inboundIpAddress":"20.105.216.5","possibleInboundIpAddresses":"20.105.216.5","ftpUsername":"hcwebapp000002\\$hcwebapp000002","ftpsHostName":"ftps://waws-prod-am2-653.ftp.azurewebsites.windows.net/site/wwwroot","outboundIpAddresses":"20.23.78.230,20.13.96.13,20.13.100.118,20.13.101.63,20.13.102.185,20.13.102.195,20.105.216.5","possibleOutboundIpAddresses":"20.23.78.230,20.13.96.13,20.13.100.118,20.13.101.63,20.13.102.185,20.13.102.195,20.13.102.204,20.13.102.206,20.13.102.222,20.13.102.235,20.13.102.255,20.13.103.1,20.13.103.6,20.13.103.13,20.13.103.24,20.23.79.191,20.13.103.28,20.13.103.30,20.13.103.50,20.13.103.54,20.13.103.77,20.13.103.89,20.13.103.97,20.13.103.102,20.13.102.153,20.13.103.132,20.13.99.107,20.13.102.105,20.23.78.212,20.13.99.19,20.105.216.5","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-am2-653","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"clitest.rg000001","defaultHostName":"hcwebapp000002.azurewebsites.net","slotSwapStatus":null,"httpsOnly":false,"redundancyMode":"None","inProgressOperationId":null,"geoDistributions":null,"privateEndpointConnections":[],"publicNetworkAccess":null,"buildVersion":null,"targetBuildVersion":null,"migrationState":null,"eligibleLogCategories":"AppServiceAppLogs,AppServiceAuditLogs,AppServiceConsoleLogs,AppServiceHTTPLogs,AppServiceIPSecAuditLogs,AppServicePlatformLogs,ScanLogs","storageAccountRequired":false,"virtualNetworkSubnetId":null,"keyVaultReferenceIdentity":"SystemAssigned","defaultHostNameScope":"Global","privateLinkIdentifiers":null}}' + Europe","properties":{"name":"hcwebapp000002","state":"Running","hostNames":["hcwebapp000002.azurewebsites.net"],"webSpace":"clitest.rg000001-WestEuropewebspace","selfLink":"https://waws-prod-am2-741.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/clitest.rg000001-WestEuropewebspace/sites/hcwebapp000002","repositorySiteName":"hcwebapp000002","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"enabledHostNames":["hcwebapp000002.azurewebsites.net","hcwebapp000002.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[{"name":"LinuxFxVersion","value":""},{"name":"WindowsFxVersion","value":null}],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"hcwebapp000002.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"hcwebapp000002.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/hcplan000003","reserved":false,"isXenon":false,"hyperV":false,"lastModifiedTimeUtc":"2023-08-24T06:17:35.51","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","dnsConfiguration":{},"vnetRouteAllEnabled":false,"containerAllocationSubnet":null,"useContainerLocalhostBindings":null,"vnetImagePullEnabled":false,"vnetContentShareEnabled":false,"siteConfig":{"numberOfWorkers":1,"defaultDocuments":null,"netFrameworkVersion":null,"phpVersion":null,"pythonVersion":null,"nodeVersion":null,"powerShellVersion":null,"linuxFxVersion":"","windowsFxVersion":null,"windowsConfiguredStacks":null,"requestTracingEnabled":null,"remoteDebuggingEnabled":null,"remoteDebuggingVersion":null,"httpLoggingEnabled":null,"azureMonitorLogCategories":null,"acrUseManagedIdentityCreds":false,"acrUserManagedIdentityID":null,"logsDirectorySizeLimit":null,"detailedErrorLoggingEnabled":null,"publishingUsername":null,"publishingPassword":null,"appSettings":null,"metadata":null,"connectionStrings":null,"machineKey":null,"handlerMappings":null,"documentRoot":null,"scmType":null,"use32BitWorkerProcess":null,"webSocketsEnabled":null,"alwaysOn":true,"javaVersion":null,"javaContainer":null,"javaContainerVersion":null,"appCommandLine":null,"managedPipelineMode":null,"virtualApplications":null,"winAuthAdminState":null,"winAuthTenantState":null,"customAppPoolIdentityAdminState":null,"customAppPoolIdentityTenantState":null,"runtimeADUser":null,"runtimeADUserPassword":null,"loadBalancing":null,"routingRules":null,"experiments":null,"limits":null,"autoHealEnabled":null,"autoHealRules":null,"tracingOptions":null,"vnetName":null,"vnetRouteAllEnabled":null,"vnetPrivatePortsCount":null,"publicNetworkAccess":null,"cors":null,"push":null,"apiDefinition":null,"apiManagementConfig":null,"autoSwapSlotName":null,"localMySqlEnabled":null,"managedServiceIdentityId":null,"xManagedServiceIdentityId":null,"keyVaultReferenceIdentity":null,"ipSecurityRestrictions":null,"ipSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictions":null,"scmIpSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictionsUseMain":null,"http20Enabled":true,"minTlsVersion":null,"minTlsCipherSuite":null,"supportedTlsCipherSuites":null,"scmMinTlsVersion":null,"ftpsState":null,"preWarmedInstanceCount":null,"functionAppScaleLimit":0,"elasticWebAppScaleLimit":null,"healthCheckPath":null,"fileChangeAuditEnabled":null,"functionsRuntimeScaleMonitoringEnabled":null,"websiteTimeZone":null,"minimumElasticInstanceCount":0,"azureStorageAccounts":null,"http20ProxyFlag":null,"sitePort":null,"antivirusScanEnabled":null,"storageType":null},"deploymentId":"hcwebapp000002","slotName":null,"trafficManagerHostNames":null,"sku":"Standard","scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"clientAffinityEnabled":true,"clientCertEnabled":false,"clientCertMode":"Required","clientCertExclusionPaths":null,"hostNamesDisabled":false,"vnetBackupRestoreEnabled":false,"domainVerificationIdentifiers":null,"customDomainVerificationId":"253001F2FCF5A7B1CD759EB861E9BB1596370BE27E47A991F72184277B3D12F2","kind":"app","managedEnvironmentId":null,"inboundIpAddress":"20.105.224.36","possibleInboundIpAddresses":"20.105.224.36","ftpUsername":"hcwebapp000002\\$hcwebapp000002","ftpsHostName":"ftps://waws-prod-am2-741.ftp.azurewebsites.windows.net/site/wwwroot","outboundIpAddresses":"20.160.245.202,20.160.246.245,20.160.244.110,20.160.244.189,98.64.212.131,20.160.244.223,20.160.246.43,20.229.249.165,4.175.48.53,20.160.243.72,20.160.246.146,20.160.246.177,20.160.247.31,20.160.247.37,20.160.247.55,20.160.247.91,20.160.247.124,20.160.247.129,20.105.224.36","possibleOutboundIpAddresses":"20.160.245.202,20.160.246.245,20.160.244.110,20.160.244.189,98.64.212.131,20.160.244.223,20.160.246.43,20.229.249.165,4.175.48.53,20.160.243.72,20.160.246.146,20.160.246.177,20.160.247.31,20.160.247.37,20.160.247.55,20.160.247.91,20.160.247.124,20.160.247.129,20.229.251.130,20.229.251.145,20.8.252.48,98.64.213.17,98.64.213.28,20.160.240.228,20.160.240.229,20.160.243.74,20.160.243.75,4.175.48.60,20.160.243.173,20.160.242.72,20.160.243.231,20.160.244.251,20.160.245.196,20.160.245.255,20.8.253.127,20.160.243.30,20.160.246.43,20.229.249.165,4.175.48.53,20.160.243.72,20.160.246.146,20.160.246.177,20.160.247.31,20.160.247.37,20.160.247.55,20.160.247.91,20.160.247.124,20.160.247.129,20.160.247.152,20.160.247.205,20.160.246.27,20.160.246.207,20.160.247.250,4.175.48.16,20.105.224.36","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-am2-741","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"clitest.rg000001","defaultHostName":"hcwebapp000002.azurewebsites.net","slotSwapStatus":null,"httpsOnly":false,"endToEndEncryptionEnabled":false,"redundancyMode":"None","inProgressOperationId":null,"geoDistributions":null,"privateEndpointConnections":[],"publicNetworkAccess":null,"buildVersion":null,"targetBuildVersion":null,"migrationState":null,"eligibleLogCategories":"AppServiceAppLogs,AppServiceAuditLogs,AppServiceConsoleLogs,AppServiceHTTPLogs,AppServiceIPSecAuditLogs,AppServicePlatformLogs,ScanLogs","inFlightFeatures":[],"storageAccountRequired":false,"virtualNetworkSubnetId":null,"keyVaultReferenceIdentity":"SystemAssigned","defaultHostNameScope":"Global","privateLinkIdentifiers":null}}' headers: cache-control: - no-cache content-length: - - '6482' + - '7209' content-type: - application/json date: - - Tue, 07 Feb 2023 14:39:52 GMT + - Thu, 24 Aug 2023 06:17:41 GMT etag: - - '"1D93B0200131E8B"' + - '"1D9D652AC92BB60"' expires: - '-1' pragma: @@ -1344,8 +1346,7 @@ interactions: ParameterSetName: - -g -n --slot User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/hcwebapp000002/config/web?api-version=2022-03-01 response: @@ -1353,16 +1354,16 @@ interactions: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/hcwebapp000002/config/web","name":"hcwebapp000002","type":"Microsoft.Web/sites/config","location":"West Europe","properties":{"numberOfWorkers":1,"defaultDocuments":["Default.htm","Default.html","Default.asp","index.htm","index.html","iisstart.htm","default.aspx","index.php","hostingstart.html"],"netFrameworkVersion":"v4.0","phpVersion":"5.6","pythonVersion":"","nodeVersion":"","powerShellVersion":"","linuxFxVersion":"","windowsFxVersion":null,"windowsConfiguredStacks":[],"requestTracingEnabled":false,"remoteDebuggingEnabled":false,"remoteDebuggingVersion":null,"httpLoggingEnabled":false,"azureMonitorLogCategories":null,"acrUseManagedIdentityCreds":false,"acrUserManagedIdentityID":null,"logsDirectorySizeLimit":35,"detailedErrorLoggingEnabled":false,"publishingUsername":"$hcwebapp000002","publishingPassword":null,"appSettings":null,"metadata":null,"connectionStrings":null,"machineKey":null,"handlerMappings":null,"documentRoot":null,"scmType":"None","use32BitWorkerProcess":true,"webSocketsEnabled":false,"alwaysOn":true,"javaVersion":null,"javaContainer":null,"javaContainerVersion":null,"appCommandLine":"","managedPipelineMode":"Integrated","virtualApplications":[{"virtualPath":"/","physicalPath":"site\\wwwroot","preloadEnabled":true,"virtualDirectories":null}],"winAuthAdminState":0,"winAuthTenantState":0,"customAppPoolIdentityAdminState":false,"customAppPoolIdentityTenantState":false,"runtimeADUser":null,"runtimeADUserPassword":null,"loadBalancing":"LeastRequests","routingRules":[],"experiments":{"rampUpRules":[]},"limits":null,"autoHealEnabled":false,"autoHealRules":null,"tracingOptions":null,"vnetName":"","vnetRouteAllEnabled":false,"vnetPrivatePortsCount":0,"publicNetworkAccess":null,"siteAuthEnabled":false,"siteAuthSettings":{"enabled":null,"unauthenticatedClientAction":null,"tokenStoreEnabled":null,"allowedExternalRedirectUrls":null,"defaultProvider":null,"clientId":null,"clientSecret":null,"clientSecretSettingName":null,"clientSecretCertificateThumbprint":null,"issuer":null,"allowedAudiences":null,"additionalLoginParams":null,"isAadAutoProvisioned":false,"aadClaimsAuthorization":null,"googleClientId":null,"googleClientSecret":null,"googleClientSecretSettingName":null,"googleOAuthScopes":null,"facebookAppId":null,"facebookAppSecret":null,"facebookAppSecretSettingName":null,"facebookOAuthScopes":null,"gitHubClientId":null,"gitHubClientSecret":null,"gitHubClientSecretSettingName":null,"gitHubOAuthScopes":null,"twitterConsumerKey":null,"twitterConsumerSecret":null,"twitterConsumerSecretSettingName":null,"microsoftAccountClientId":null,"microsoftAccountClientSecret":null,"microsoftAccountClientSecretSettingName":null,"microsoftAccountOAuthScopes":null,"configVersion":null},"cors":null,"push":null,"apiDefinition":null,"apiManagementConfig":null,"autoSwapSlotName":null,"localMySqlEnabled":false,"managedServiceIdentityId":null,"xManagedServiceIdentityId":null,"keyVaultReferenceIdentity":null,"ipSecurityRestrictions":[{"ipAddress":"Any","action":"Allow","priority":2147483647,"name":"Allow all","description":"Allow all access"}],"ipSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictions":[{"ipAddress":"Any","action":"Allow","priority":2147483647,"name":"Allow - all","description":"Allow all access"}],"scmIpSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictionsUseMain":false,"http20Enabled":true,"minTlsVersion":"1.2","minTlsCipherSuite":null,"supportedTlsCipherSuites":null,"scmMinTlsVersion":"1.2","ftpsState":"AllAllowed","preWarmedInstanceCount":0,"functionAppScaleLimit":null,"elasticWebAppScaleLimit":0,"healthCheckPath":null,"fileChangeAuditEnabled":false,"functionsRuntimeScaleMonitoringEnabled":false,"websiteTimeZone":null,"minimumElasticInstanceCount":0,"azureStorageAccounts":{},"http20ProxyFlag":0,"sitePort":null,"antivirusScanEnabled":false,"storageType":"StorageVolume"}}' + all","description":"Allow all access"}],"scmIpSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictionsUseMain":false,"http20Enabled":true,"minTlsVersion":"1.2","minTlsCipherSuite":null,"supportedTlsCipherSuites":null,"scmMinTlsVersion":"1.2","ftpsState":"FtpsOnly","preWarmedInstanceCount":0,"functionAppScaleLimit":null,"elasticWebAppScaleLimit":0,"healthCheckPath":null,"fileChangeAuditEnabled":false,"functionsRuntimeScaleMonitoringEnabled":false,"websiteTimeZone":null,"minimumElasticInstanceCount":0,"azureStorageAccounts":{},"http20ProxyFlag":0,"sitePort":null,"antivirusScanEnabled":false,"storageType":"StorageVolume"}}' headers: cache-control: - no-cache content-length: - - '3983' + - '3981' content-type: - application/json date: - - Tue, 07 Feb 2023 14:39:53 GMT + - Thu, 24 Aug 2023 06:17:43 GMT expires: - '-1' pragma: @@ -1405,27 +1406,26 @@ interactions: ParameterSetName: - -g -n --slot User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/hcwebapp000002/slots/hcwebapp000002-stage?api-version=2022-03-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/hcwebapp000002/slots/hcwebapp000002-stage","name":"hcwebapp000002/hcwebapp000002-stage","type":"Microsoft.Web/sites/slots","kind":"app","location":"West - Europe","properties":{"name":"hcwebapp000002(hcwebapp000002-stage)","state":"Running","hostNames":["hcwebapp000002-hcwebapp000002-stage.azurewebsites.net"],"webSpace":"clitest.rg000001-WestEuropewebspace","selfLink":"https://waws-prod-am2-653.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/clitest.rg000001-WestEuropewebspace/sites/hcwebapp000002","repositorySiteName":"hcwebapp000002","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"enabledHostNames":["hcwebapp000002-hcwebapp000002-stage.azurewebsites.net","hcwebapp000002-hcwebapp000002-stage.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[{"name":"LinuxFxVersion","value":""},{"name":"WindowsFxVersion","value":null}],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"hcwebapp000002-hcwebapp000002-stage.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"hcwebapp000002-hcwebapp000002-stage.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/hcplan000003","reserved":false,"isXenon":false,"hyperV":false,"lastModifiedTimeUtc":"2023-02-07T14:40:00.9566667","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","dnsConfiguration":{},"vnetRouteAllEnabled":false,"containerAllocationSubnet":null,"useContainerLocalhostBindings":null,"vnetImagePullEnabled":false,"vnetContentShareEnabled":false,"siteConfig":{"numberOfWorkers":1,"defaultDocuments":null,"netFrameworkVersion":null,"phpVersion":null,"pythonVersion":null,"nodeVersion":null,"powerShellVersion":null,"linuxFxVersion":"","windowsFxVersion":null,"windowsConfiguredStacks":null,"requestTracingEnabled":null,"remoteDebuggingEnabled":null,"remoteDebuggingVersion":null,"httpLoggingEnabled":null,"azureMonitorLogCategories":null,"acrUseManagedIdentityCreds":false,"acrUserManagedIdentityID":null,"logsDirectorySizeLimit":null,"detailedErrorLoggingEnabled":null,"publishingUsername":null,"publishingPassword":null,"appSettings":null,"metadata":null,"connectionStrings":null,"machineKey":null,"handlerMappings":null,"documentRoot":null,"scmType":null,"use32BitWorkerProcess":null,"webSocketsEnabled":null,"alwaysOn":false,"javaVersion":null,"javaContainer":null,"javaContainerVersion":null,"appCommandLine":null,"managedPipelineMode":null,"virtualApplications":null,"winAuthAdminState":null,"winAuthTenantState":null,"customAppPoolIdentityAdminState":null,"customAppPoolIdentityTenantState":null,"runtimeADUser":null,"runtimeADUserPassword":null,"loadBalancing":null,"routingRules":null,"experiments":null,"limits":null,"autoHealEnabled":null,"autoHealRules":null,"tracingOptions":null,"vnetName":null,"vnetRouteAllEnabled":null,"vnetPrivatePortsCount":null,"publicNetworkAccess":null,"cors":null,"push":null,"apiDefinition":null,"apiManagementConfig":null,"autoSwapSlotName":null,"localMySqlEnabled":null,"managedServiceIdentityId":null,"xManagedServiceIdentityId":null,"keyVaultReferenceIdentity":null,"ipSecurityRestrictions":[{"ipAddress":"Any","action":"Allow","priority":2147483647,"name":"Allow + Europe","properties":{"name":"hcwebapp000002(hcwebapp000002-stage)","state":"Running","hostNames":["hcwebapp000002-hcwebapp000002-stage.azurewebsites.net"],"webSpace":"clitest.rg000001-WestEuropewebspace","selfLink":"https://waws-prod-am2-741.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/clitest.rg000001-WestEuropewebspace/sites/hcwebapp000002","repositorySiteName":"hcwebapp000002","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"enabledHostNames":["hcwebapp000002-hcwebapp000002-stage.azurewebsites.net","hcwebapp000002-hcwebapp000002-stage.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[{"name":"LinuxFxVersion","value":""},{"name":"WindowsFxVersion","value":null}],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"hcwebapp000002-hcwebapp000002-stage.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"hcwebapp000002-hcwebapp000002-stage.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/hcplan000003","reserved":false,"isXenon":false,"hyperV":false,"lastModifiedTimeUtc":"2023-08-24T06:17:52.91","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","dnsConfiguration":{},"vnetRouteAllEnabled":false,"containerAllocationSubnet":null,"useContainerLocalhostBindings":null,"vnetImagePullEnabled":false,"vnetContentShareEnabled":false,"siteConfig":{"numberOfWorkers":1,"defaultDocuments":null,"netFrameworkVersion":null,"phpVersion":null,"pythonVersion":null,"nodeVersion":null,"powerShellVersion":null,"linuxFxVersion":"","windowsFxVersion":null,"windowsConfiguredStacks":null,"requestTracingEnabled":null,"remoteDebuggingEnabled":null,"remoteDebuggingVersion":null,"httpLoggingEnabled":null,"azureMonitorLogCategories":null,"acrUseManagedIdentityCreds":false,"acrUserManagedIdentityID":null,"logsDirectorySizeLimit":null,"detailedErrorLoggingEnabled":null,"publishingUsername":null,"publishingPassword":null,"appSettings":null,"metadata":null,"connectionStrings":null,"machineKey":null,"handlerMappings":null,"documentRoot":null,"scmType":null,"use32BitWorkerProcess":null,"webSocketsEnabled":null,"alwaysOn":false,"javaVersion":null,"javaContainer":null,"javaContainerVersion":null,"appCommandLine":null,"managedPipelineMode":null,"virtualApplications":null,"winAuthAdminState":null,"winAuthTenantState":null,"customAppPoolIdentityAdminState":null,"customAppPoolIdentityTenantState":null,"runtimeADUser":null,"runtimeADUserPassword":null,"loadBalancing":null,"routingRules":null,"experiments":null,"limits":null,"autoHealEnabled":null,"autoHealRules":null,"tracingOptions":null,"vnetName":null,"vnetRouteAllEnabled":null,"vnetPrivatePortsCount":null,"publicNetworkAccess":null,"cors":null,"push":null,"apiDefinition":null,"apiManagementConfig":null,"autoSwapSlotName":null,"localMySqlEnabled":null,"managedServiceIdentityId":null,"xManagedServiceIdentityId":null,"keyVaultReferenceIdentity":null,"ipSecurityRestrictions":[{"ipAddress":"Any","action":"Allow","priority":2147483647,"name":"Allow all","description":"Allow all access"}],"ipSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictions":[{"ipAddress":"Any","action":"Allow","priority":2147483647,"name":"Allow - all","description":"Allow all access"}],"scmIpSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictionsUseMain":null,"http20Enabled":false,"minTlsVersion":null,"minTlsCipherSuite":null,"supportedTlsCipherSuites":null,"scmMinTlsVersion":null,"ftpsState":null,"preWarmedInstanceCount":null,"functionAppScaleLimit":null,"elasticWebAppScaleLimit":0,"healthCheckPath":null,"fileChangeAuditEnabled":null,"functionsRuntimeScaleMonitoringEnabled":null,"websiteTimeZone":null,"minimumElasticInstanceCount":0,"azureStorageAccounts":null,"http20ProxyFlag":null,"sitePort":null,"antivirusScanEnabled":null,"storageType":null},"deploymentId":"hcwebapp000002__4ba5","slotName":null,"trafficManagerHostNames":null,"sku":"Standard","scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"clientAffinityEnabled":true,"clientCertEnabled":false,"clientCertMode":"Required","clientCertExclusionPaths":null,"hostNamesDisabled":false,"domainVerificationIdentifiers":null,"customDomainVerificationId":"253001F2FCF5A7B1CD759EB861E9BB1596370BE27E47A991F72184277B3D12F2","kind":"app","inboundIpAddress":"20.105.216.5","possibleInboundIpAddresses":"20.105.216.5","ftpUsername":"hcwebapp000002__hcwebapp000002-stage\\$hcwebapp000002__hcwebapp000002-stage","ftpsHostName":"ftps://waws-prod-am2-653.ftp.azurewebsites.windows.net/site/wwwroot","outboundIpAddresses":"20.23.78.230,20.13.96.13,20.13.100.118,20.13.101.63,20.13.102.185,20.13.102.195,20.105.216.5","possibleOutboundIpAddresses":"20.23.78.230,20.13.96.13,20.13.100.118,20.13.101.63,20.13.102.185,20.13.102.195,20.13.102.204,20.13.102.206,20.13.102.222,20.13.102.235,20.13.102.255,20.13.103.1,20.13.103.6,20.13.103.13,20.13.103.24,20.23.79.191,20.13.103.28,20.13.103.30,20.13.103.50,20.13.103.54,20.13.103.77,20.13.103.89,20.13.103.97,20.13.103.102,20.13.102.153,20.13.103.132,20.13.99.107,20.13.102.105,20.23.78.212,20.13.99.19,20.105.216.5","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-am2-653","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"clitest.rg000001","defaultHostName":"hcwebapp000002-hcwebapp000002-stage.azurewebsites.net","slotSwapStatus":null,"httpsOnly":false,"redundancyMode":"None","inProgressOperationId":null,"geoDistributions":null,"privateEndpointConnections":null,"publicNetworkAccess":null,"buildVersion":null,"targetBuildVersion":null,"migrationState":null,"eligibleLogCategories":"AppServiceAppLogs,AppServiceAuditLogs,AppServiceConsoleLogs,AppServiceHTTPLogs,AppServiceIPSecAuditLogs,AppServicePlatformLogs,ScanLogs","storageAccountRequired":false,"virtualNetworkSubnetId":null,"keyVaultReferenceIdentity":"SystemAssigned","defaultHostNameScope":"Global","privateLinkIdentifiers":null}}' + all","description":"Allow all access"}],"scmIpSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictionsUseMain":null,"http20Enabled":false,"minTlsVersion":null,"minTlsCipherSuite":null,"supportedTlsCipherSuites":null,"scmMinTlsVersion":null,"ftpsState":null,"preWarmedInstanceCount":null,"functionAppScaleLimit":null,"elasticWebAppScaleLimit":0,"healthCheckPath":null,"fileChangeAuditEnabled":null,"functionsRuntimeScaleMonitoringEnabled":null,"websiteTimeZone":null,"minimumElasticInstanceCount":0,"azureStorageAccounts":null,"http20ProxyFlag":null,"sitePort":null,"antivirusScanEnabled":null,"storageType":null},"deploymentId":"hcwebapp000002__dd53","slotName":null,"trafficManagerHostNames":null,"sku":"Standard","scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"clientAffinityEnabled":true,"clientCertEnabled":false,"clientCertMode":"Required","clientCertExclusionPaths":null,"hostNamesDisabled":false,"vnetBackupRestoreEnabled":false,"domainVerificationIdentifiers":null,"customDomainVerificationId":"253001F2FCF5A7B1CD759EB861E9BB1596370BE27E47A991F72184277B3D12F2","kind":"app","managedEnvironmentId":null,"inboundIpAddress":"20.105.224.36","possibleInboundIpAddresses":"20.105.224.36","ftpUsername":"hcwebapp000002__hcwebapp000002-stage\\$hcwebapp000002__hcwebapp000002-stage","ftpsHostName":"ftps://waws-prod-am2-741.ftp.azurewebsites.windows.net/site/wwwroot","outboundIpAddresses":"20.160.245.202,20.160.246.245,20.160.244.110,20.160.244.189,98.64.212.131,20.160.244.223,20.160.246.43,20.229.249.165,4.175.48.53,20.160.243.72,20.160.246.146,20.160.246.177,20.160.247.31,20.160.247.37,20.160.247.55,20.160.247.91,20.160.247.124,20.160.247.129,20.105.224.36","possibleOutboundIpAddresses":"20.160.245.202,20.160.246.245,20.160.244.110,20.160.244.189,98.64.212.131,20.160.244.223,20.160.246.43,20.229.249.165,4.175.48.53,20.160.243.72,20.160.246.146,20.160.246.177,20.160.247.31,20.160.247.37,20.160.247.55,20.160.247.91,20.160.247.124,20.160.247.129,20.229.251.130,20.229.251.145,20.8.252.48,98.64.213.17,98.64.213.28,20.160.240.228,20.160.240.229,20.160.243.74,20.160.243.75,4.175.48.60,20.160.243.173,20.160.242.72,20.160.243.231,20.160.244.251,20.160.245.196,20.160.245.255,20.8.253.127,20.160.243.30,20.160.246.43,20.229.249.165,4.175.48.53,20.160.243.72,20.160.246.146,20.160.246.177,20.160.247.31,20.160.247.37,20.160.247.55,20.160.247.91,20.160.247.124,20.160.247.129,20.160.247.152,20.160.247.205,20.160.246.27,20.160.246.207,20.160.247.250,4.175.48.16,20.105.224.36","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-am2-741","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"clitest.rg000001","defaultHostName":"hcwebapp000002-hcwebapp000002-stage.azurewebsites.net","slotSwapStatus":null,"httpsOnly":false,"endToEndEncryptionEnabled":false,"redundancyMode":"None","inProgressOperationId":null,"geoDistributions":null,"privateEndpointConnections":null,"publicNetworkAccess":null,"buildVersion":null,"targetBuildVersion":null,"migrationState":null,"eligibleLogCategories":"AppServiceAppLogs,AppServiceAuditLogs,AppServiceConsoleLogs,AppServiceHTTPLogs,AppServiceIPSecAuditLogs,AppServicePlatformLogs,ScanLogs","inFlightFeatures":null,"storageAccountRequired":false,"virtualNetworkSubnetId":null,"keyVaultReferenceIdentity":"SystemAssigned","defaultHostNameScope":"Global","privateLinkIdentifiers":null}}' headers: cache-control: - no-cache content-length: - - '6954' + - '7683' content-type: - application/json date: - - Tue, 07 Feb 2023 14:40:20 GMT + - Thu, 24 Aug 2023 06:18:12 GMT etag: - - '"1D93B0200131E8B"' + - '"1D9D652AC92BB60"' expires: - '-1' pragma: @@ -1460,40 +1460,34 @@ interactions: - webapp hybrid-connection add Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -g -n --namespace --hybrid-connection --slot User-Agent: - - python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) msrest/0.7.1 - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 msrest_azure/0.6.4 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.45.0 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Relay/namespaces?api-version=2017-04-01 response: body: string: '{"value":[{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004","name":"hcnamespace000004","type":"Microsoft.Relay/Namespaces","location":"West - Europe","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:hcnamespace000004","createdAt":"2023-02-07T14:38:28.42Z","updatedAt":"2023-02-07T14:39:13.043Z","serviceBusEndpoint":"https://hcnamespace000004.servicebus.windows.net:443/","status":"Active"}}]}' + Europe","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:hcnamespace000004","createdAt":"2023-08-24T06:16:15.52Z","updatedAt":"2023-08-24T06:17:01.32Z","serviceBusEndpoint":"https://hcnamespace000004.servicebus.windows.net:443/","status":"Active"}}]}' headers: cache-control: - no-cache content-length: - - '588' + - '587' content-type: - application/json; charset=utf-8 date: - - Tue, 07 Feb 2023 14:40:20 GMT + - Thu, 24 Aug 2023 06:18:13 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/CH3 + - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/CH3 + - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -1518,21 +1512,15 @@ interactions: - webapp hybrid-connection add Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -g -n --namespace --hybrid-connection --slot User-Agent: - - python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) msrest/0.7.1 - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 msrest_azure/0.6.4 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.45.0 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridConnections/hcname000005?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridconnections/hcname000005","name":"hcname000005","type":"Microsoft.Relay/namespaces/hybridconnections","location":"westeurope","properties":{"createdAt":"2023-02-07T14:39:31.9321695Z","updatedAt":"2023-02-07T14:39:34.2714624Z","listenerCount":0,"requiresClientAuthorization":true,"userMetadata":"[{\"key\":\"endpoint\",\"value\":\"vmsq1:80\"}]"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridconnections/hcname000005","name":"hcname000005","type":"Microsoft.Relay/namespaces/hybridconnections","location":"westeurope","properties":{"createdAt":"2023-08-24T06:17:22.3877933Z","updatedAt":"2023-08-24T06:17:29.7488206Z","listenerCount":0,"requiresClientAuthorization":true,"userMetadata":"[{\"key\":\"endpoint\",\"value\":\"vmsq1:80\"}]"}}' headers: cache-control: - no-cache @@ -1541,7 +1529,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 07 Feb 2023 14:40:21 GMT + - Thu, 24 Aug 2023 06:18:14 GMT expires: - '-1' pragma: @@ -1570,16 +1558,10 @@ interactions: - webapp hybrid-connection add Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -g -n --namespace --hybrid-connection --slot User-Agent: - - python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) msrest/0.7.1 - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 msrest_azure/0.6.4 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.45.0 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridConnections/hcname000005/authorizationRules?api-version=2017-04-01 response: @@ -1593,7 +1575,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 07 Feb 2023 14:40:22 GMT + - Thu, 24 Aug 2023 06:18:18 GMT expires: - '-1' pragma: @@ -1612,7 +1594,7 @@ interactions: code: 200 message: OK - request: - body: null + body: '{"properties": {"rights": ["Send"]}}' headers: Accept: - application/json @@ -1623,22 +1605,68 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '36' Content-Type: + - application/json + ParameterSetName: + - -g -n --namespace --hybrid-connection --slot + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridConnections/hcname000005/authorizationRules/defaultSender?api-version=2017-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridConnections/hcname000005/authorizationRules/defaultSender","name":"defaultSender","type":"Microsoft.Relay/namespaces/hybridconnections/authorizationrules","properties":{"rights":["Send"]}}' + headers: + cache-control: + - no-cache + content-length: + - '340' + content-type: - application/json; charset=utf-8 + date: + - Thu, 24 Aug 2023 06:18:20 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp hybrid-connection add + Connection: + - keep-alive + Content-Length: + - '0' ParameterSetName: - -g -n --namespace --hybrid-connection --slot User-Agent: - - python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) msrest/0.7.1 - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 msrest_azure/0.6.4 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.45.0 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridConnections/hcname000005/authorizationRules/defaultSender/listKeys?api-version=2017-04-01 response: body: - string: '{"primaryConnectionString":"Endpoint=sb://hcnamespace000004.servicebus.windows.net/;SharedAccessKeyName=defaultSender;SharedAccessKey=kloZWy+0o2doXo7ilKZrHmwqo7fJ0NUXp78x47VCbPU=;EntityPath=hcname000005","secondaryConnectionString":"Endpoint=sb://hcnamespace000004.servicebus.windows.net/;SharedAccessKeyName=defaultSender;SharedAccessKey=35sKnfaI4ZzOP6NOchPk23B4eilXzEbifwXa+RPy5mc=;EntityPath=hcname000005","primaryKey":"kloZWy+0o2doXo7ilKZrHmwqo7fJ0NUXp78x47VCbPU=","secondaryKey":"35sKnfaI4ZzOP6NOchPk23B4eilXzEbifwXa+RPy5mc=","keyName":"defaultSender"}' + string: '{"primaryConnectionString":"Endpoint=sb://hcnamespace000004.servicebus.windows.net/;SharedAccessKeyName=defaultSender;SharedAccessKey=8uopsw/Ed+rUayJZFnDB3hl/Q2vNzxLFA+ARmCRhWiU=;EntityPath=hcname000005","secondaryConnectionString":"Endpoint=sb://hcnamespace000004.servicebus.windows.net/;SharedAccessKeyName=defaultSender;SharedAccessKey=Apl7ak2dDJlX5vX9I47nyYvLBSLEjpUke+ARmGpDLlg=;EntityPath=hcname000005","primaryKey":"8uopsw/Ed+rUayJZFnDB3hl/Q2vNzxLFA+ARmCRhWiU=","secondaryKey":"Apl7ak2dDJlX5vX9I47nyYvLBSLEjpUke+ARmGpDLlg=","keyName":"defaultSender"}' headers: cache-control: - no-cache @@ -1647,7 +1675,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 07 Feb 2023 14:40:23 GMT + - Thu, 24 Aug 2023 06:18:23 GMT expires: - '-1' pragma: @@ -1671,7 +1699,7 @@ interactions: body: '{"properties": {"serviceBusNamespace": "hcnamespace000004", "relayName": "hcname000005", "relayArmUri": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Relay/namespaces/hcnamespace000004/hybridconnections/hcname000005", "hostname": "vmsq1", "port": 80, "sendKeyName": "defaultSender", "sendKeyValue": - "kloZWy+0o2doXo7ilKZrHmwqo7fJ0NUXp78x47VCbPU=", "serviceBusSuffix": ".servicebus.windows.net"}}' + "8uopsw/Ed+rUayJZFnDB3hl/Q2vNzxLFA+ARmCRhWiU=", "serviceBusSuffix": ".servicebus.windows.net"}}' headers: Accept: - application/json @@ -1688,8 +1716,7 @@ interactions: ParameterSetName: - -g -n --namespace --hybrid-connection --slot User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/hcwebapp000002/slots/hcwebapp000002-stage/hybridConnectionNamespaces/hcnamespace000004/relays/hcname000005?api-version=2022-03-01 response: @@ -1704,7 +1731,7 @@ interactions: content-type: - application/json date: - - Tue, 07 Feb 2023 14:40:24 GMT + - Thu, 24 Aug 2023 06:18:26 GMT expires: - '-1' pragma: @@ -1713,12 +1740,16 @@ interactions: - Microsoft-IIS/10.0 strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-aspnet-version: - 4.0.30319 x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1197' x-powered-by: - ASP.NET status: @@ -1738,8 +1769,7 @@ interactions: ParameterSetName: - -g -n --slot User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/hcwebapp000002/slots/hcwebapp000002-stage/hybridConnectionRelays?api-version=2022-03-01 response: @@ -1754,7 +1784,7 @@ interactions: content-type: - application/json date: - - Tue, 07 Feb 2023 14:40:25 GMT + - Thu, 24 Aug 2023 06:18:29 GMT expires: - '-1' pragma: @@ -1792,8 +1822,7 @@ interactions: ParameterSetName: - -g -n --namespace --hybrid-connection User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/hcwebapp000002/hybridConnectionNamespaces/hcnamespace000004/relays/hcname000005?api-version=2022-03-01 response: @@ -1805,7 +1834,7 @@ interactions: content-length: - '0' date: - - Tue, 07 Feb 2023 14:40:26 GMT + - Thu, 24 Aug 2023 06:18:30 GMT expires: - '-1' pragma: @@ -1839,8 +1868,7 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/hcwebapp000002/hybridConnectionRelays?api-version=2022-03-01 response: @@ -1854,7 +1882,7 @@ interactions: content-type: - application/json date: - - Tue, 07 Feb 2023 14:40:27 GMT + - Thu, 24 Aug 2023 06:18:33 GMT expires: - '-1' pragma: @@ -1863,6 +1891,10 @@ interactions: - Microsoft-IIS/10.0 strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-aspnet-version: - 4.0.30319 x-content-type-options: @@ -1888,8 +1920,7 @@ interactions: ParameterSetName: - -g -n --namespace --hybrid-connection --slot User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/hcwebapp000002/slots/hcwebapp000002-stage/hybridConnectionNamespaces/hcnamespace000004/relays/hcname000005?api-version=2022-03-01 response: @@ -1901,7 +1932,7 @@ interactions: content-length: - '0' date: - - Tue, 07 Feb 2023 14:40:28 GMT + - Thu, 24 Aug 2023 06:18:34 GMT expires: - '-1' pragma: @@ -1935,8 +1966,7 @@ interactions: ParameterSetName: - -g -n --slot User-Agent: - - AZURECLI/2.45.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.10.9 (Linux-5.15.0-1031-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/sites/hcwebapp000002/slots/hcwebapp000002-stage/hybridConnectionRelays?api-version=2022-03-01 response: @@ -1950,7 +1980,7 @@ interactions: content-type: - application/json date: - - Tue, 07 Feb 2023 14:40:30 GMT + - Thu, 24 Aug 2023 06:18:37 GMT expires: - '-1' pragma: @@ -1959,6 +1989,10 @@ interactions: - Microsoft-IIS/10.0 strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-aspnet-version: - 4.0.30319 x-content-type-options: diff --git a/src/azure-cli/azure/cli/command_modules/relay/__init__.py b/src/azure-cli/azure/cli/command_modules/relay/__init__.py index f52be918682..d1109cbc960 100644 --- a/src/azure-cli/azure/cli/command_modules/relay/__init__.py +++ b/src/azure-cli/azure/cli/command_modules/relay/__init__.py @@ -14,20 +14,29 @@ class RelayCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType - from azure.cli.core.profiles import ResourceType relay_custom = CliCommandType(operations_tmpl='azure.cli.command_modules.relay.custom#{}') super(RelayCommandsLoader, self).__init__( - cli_ctx=cli_ctx, custom_command_type=relay_custom, - resource_type=ResourceType.MGMT_RELAY) + cli_ctx=cli_ctx, custom_command_type=relay_custom) def load_command_table(self, args): from azure.cli.command_modules.relay.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 azure.cli.command_modules.relay._params import load_arguments_sb - load_arguments_sb(self, command) + from azure.cli.command_modules.relay._params import load_arguments + load_arguments(self, command) COMMAND_LOADER_CLS = RelayCommandsLoader diff --git a/src/azure-cli/azure/cli/command_modules/relay/_client_factory.py b/src/azure-cli/azure/cli/command_modules/relay/_client_factory.py deleted file mode 100644 index da73da8d2c6..00000000000 --- a/src/azure-cli/azure/cli/command_modules/relay/_client_factory.py +++ /dev/null @@ -1,22 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - - -def cf_relay(cli_ctx, **_): - from azure.cli.core.commands.client_factory import get_mgmt_service_client - from azure.mgmt.relay import RelayManagementClient - return get_mgmt_service_client(cli_ctx, RelayManagementClient) - - -def namespaces_mgmt_client_factory(cli_ctx, _): - return cf_relay(cli_ctx).namespaces - - -def wcfrelays_mgmt_client_factory(cli_ctx, _): - return cf_relay(cli_ctx).wcf_relays - - -def hycos_mgmt_client_factory(cli_ctx, _): - return cf_relay(cli_ctx).hybrid_connections diff --git a/src/azure-cli/azure/cli/command_modules/relay/_completers.py b/src/azure-cli/azure/cli/command_modules/relay/_completers.py deleted file mode 100644 index 51c2ace0c9f..00000000000 --- a/src/azure-cli/azure/cli/command_modules/relay/_completers.py +++ /dev/null @@ -1,27 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- -# pylint: disable=unused-argument -# pylint: disable=line-too-long -# pylint: disable=no-value-for-parameter - -from azure.cli.core.decorators import Completer - - -@Completer -def get_wcfrelay_command_completion_list(cmd, prefix, namespace): - from ._client_factory import wcfrelays_mgmt_client_factory - resource_group_name = namespace.resource_group_name - namespace_name = namespace.namespace_name - result = wcfrelays_mgmt_client_factory(cmd.cli_ctx).list_by_namespace(resource_group_name, namespace_name) - return [r.name for r in result] - - -@Completer -def get_hyco_command_completion_list(cmd, prefix, namespace): - from ._client_factory import hycos_mgmt_client_factory - resource_group_name = namespace.resource_group_name - namespace_name = namespace.namespace_name - result = hycos_mgmt_client_factory(cmd.cli_ctx).list_by_namespace(resource_group_name, namespace_name) - return [r.name for r in result] diff --git a/src/azure-cli/azure/cli/command_modules/relay/_params.py b/src/azure-cli/azure/cli/command_modules/relay/_params.py index b13457cdd1e..8cec0b34539 100644 --- a/src/azure-cli/azure/cli/command_modules/relay/_params.py +++ b/src/azure-cli/azure/cli/command_modules/relay/_params.py @@ -2,132 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -# pylint: disable=line-too-long -# pylint: disable=too-many-statements -from azure.cli.core.commands.parameters import tags_type, get_enum_type, resource_group_name_type, name_type, get_location_type, get_resource_name_completion_list, get_three_state_flag -from azure.cli.core.commands.validators import get_default_location_from_resource_group - -def load_arguments_sb(self, _): - from azure.cli.command_modules.relay._completers import get_wcfrelay_command_completion_list, \ - get_hyco_command_completion_list - - from knack.arguments import CLIArgumentType - from azure.mgmt.relay.models import SkuTier, AccessRights, KeyType - rights_arg_type = CLIArgumentType(options_list=['--rights'], nargs='+', arg_type=get_enum_type(AccessRights), help='Space-separated list of Authorization rule rights') - key_arg_type = CLIArgumentType(options_list=['--key'], arg_type=get_enum_type(KeyType), help='specifies Primary or Secondary key needs to be reset') - keyvalue_arg_type = CLIArgumentType(options_list=['--key-value'], help='Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType.') - - with self.argument_context('relay') as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - c.argument('namespace_name', options_list=['--namespace-name'], id_part='name', help='Name of Namespace') - - with self.argument_context('relay namespace') as c: - c.argument('namespace_name', id_part='name', arg_type=name_type, completer=get_resource_name_completion_list('Microsoft.relay/namespaces'), help='Name of Namespace') - - with self.argument_context('relay namespace exists') as c: - c.argument('name', arg_type=name_type, help='Namespace name. Name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.') - - for scope in ['relay namespace create', 'relay namespace update']: - with self.argument_context(scope) as c: - c.argument('tags', arg_type=tags_type) - c.argument('sku', arg_type=get_enum_type(SkuTier)) - - with self.argument_context('relay namespace create') as c: - c.argument('location', arg_type=get_location_type(self.cli_ctx), validator=get_default_location_from_resource_group) - - # region Namespace Authorization Rule - with self.argument_context('relay namespace authorization-rule list') as c: - c.argument('namespace_name', options_list=['--namespace-name'], id_part=None, help='Name of the Namespace') - - with self.argument_context('relay namespace authorization-rule') as c: - c.argument('authorization_rule_name', arg_type=name_type, id_part='child_name_1', help='Name of Namespace Authorization Rule') - c.argument('namespace_name', id_part='name', options_list=['--namespace-name'], help='Name of Namespace') - - for scope in ['relay namespace authorization-rule create', 'relay namespace authorization-rule update', 'relay wcfrelay authorization-rule create', 'relay wcfrelay authorization-rule update', 'relay hyco authorization-rule create', 'relay hyco authorization-rule update']: - with self.argument_context(scope) as c: - c.argument('rights', arg_type=rights_arg_type) - - with self.argument_context('relay namespace authorization-rule keys renew') as c: - c.argument('key_type', arg_type=key_arg_type) - c.argument('key', arg_type=keyvalue_arg_type) - - with self.argument_context('relay namespace authorization-rule keys list') as c: - c.argument('authorization_rule_name', arg_type=name_type, id_part=None, help='Name of Namespace Authorization Rule') - c.argument('namespace_name', id_part=None, options_list=['--namespace-name'], help='Name of Namespace') - - # region WCF Relay - with self.argument_context('relay wcfrelay') as c: - c.argument('relay_name', arg_type=name_type, id_part='child_name_1', completer=get_wcfrelay_command_completion_list, help='Name of WCF Relay') - - for scope in ['relay wcfrelay create', 'relay wcfrelay update']: - with self.argument_context(scope) as c: - c.argument('status', arg_type=get_enum_type(['Active', 'Disabled', 'SendDisabled', 'ReceiveDisabled']), help='Enumerates the possible values for the status of a messaging entity.') - c.argument('relay_type', arg_type=get_enum_type(['Http', 'NetTcp']), default='NetTcp', help='Relay type') - c.argument('user_metadata', help='Endpoint metadata') - - with self.argument_context('relay wcfrelay create') as c: - c.argument('requires_client_authorization', arg_type=get_three_state_flag(), help='Indicates whether client authorization is required') - c.argument('requires_transport_security', arg_type=get_three_state_flag(), help='Indicates whether transport security is required') - - with self.argument_context('relay wcfrelay list') as c: - c.argument('namespace_name', id_part=None, options_list=['--namespace-name'], help='Name of Namespace') - - # region WCF Relay Authorization Rule - with self.argument_context('relay wcfrelay authorization-rule') as c: - c.argument('authorization_rule_name', arg_type=name_type, id_part='child_name_2', help='Name of WCF Relay Authorization Rule') - c.argument('relay_name', id_part='child_name_1', options_list=['--relay-name'], help='Name of WCF Relay') - - with self.argument_context('relay wcfrelay authorization-rule list') as c: - c.argument('namespace_name', id_part=None, options_list=['--namespace-name'], help='Name of Namespace') - c.argument('relay_name', id_part=None, options_list=['--relay-name'], help='Name of WCF Relay') - - with self.argument_context('relay wcfrelay authorization-rule keys renew') as c: - c.argument('key_type', arg_type=key_arg_type) - c.argument('key', arg_type=keyvalue_arg_type) - - with self.argument_context('relay wcfrelay authorization-rule keys list') as c: - c.argument('authorization_rule_name', arg_type=name_type, id_part=None, help='Name of WCF Relay Authorization Rule') - c.argument('relay_name', id_part=None, options_list=['--relay-name'], help='Name of WCF Relay') - c.argument('namespace_name', id_part=None, options_list=['--namespace-name'], help='Name of Namespace') - - # region - Hybrid Connection - for scope in ['relay hyco show', 'relay hyco delete']: - with self.argument_context(scope) as c: - c.argument('hybrid_connection_name', arg_type=name_type, id_part='child_name_1', completer=get_hyco_command_completion_list, help='Name of Hybrid Connection') - - # region - Hybrid Connection Create - with self.argument_context('relay hyco create') as c: - c.argument('hybrid_connection_name', arg_type=name_type, id_part='child_name_1', completer=get_hyco_command_completion_list, help='Name of Hybrid Connection') - c.argument('status', arg_type=get_enum_type(['Active', 'Disabled', 'SendDisabled', 'ReceiveDisabled']), help='Enumerates the possible values for the status of a messaging entity.') - c.argument('requires_client_authorization', arg_type=get_three_state_flag(), help='Indicates whether client authorization is required') - c.argument('user_metadata', help='Endpoint metadata') - - # region - Hybrid Connection Update - with self.argument_context('relay hyco update') as c: - c.argument('hybrid_connection_name', arg_type=name_type, id_part='child_name_1', completer=get_hyco_command_completion_list, help='Name of Hybrid Connection') - c.argument('status', arg_type=get_enum_type(['Active', 'Disabled', 'SendDisabled', 'ReceiveDisabled']), help='Enumerates the possible values for the status of a messaging entity.') - c.argument('requires_client_authorization', arg_type=get_three_state_flag(), help='Indicates whether client authorization is required') - c.argument('user_metadata', help='Endpoint metadata') - - with self.argument_context('relay hyco list') as c: - c.argument('namespace_name', id_part=None, options_list=['--namespace-name'], help='Name of Namespace') - - # region Hybrid Connection Authorization Rule - with self.argument_context('relay hyco authorization-rule') as c: - c.argument('authorization_rule_name', arg_type=name_type, id_part='child_name_2', help='name of Hybrid Connection Authorization Rule') - c.argument('hybrid_connection_name', options_list=['--hybrid-connection-name'], id_part='child_name_1', help='name of Hybrid Connection') - - with self.argument_context('relay hyco authorization-rule list') as c: - c.argument('namespace_name', id_part=None, options_list=['--namespace-name'], help='Name of Namespace') - c.argument('hybrid_connection_name', options_list=['--hybrid-connection-name'], id_part=None, help='name of Hybrid Connection') - - with self.argument_context('relay hyco authorization-rule keys list') as c: - c.argument('authorization_rule_name', arg_type=name_type, id_part=None, help='Name of Hybrid Connection Authorization Rule') - c.argument('hybrid_connection_name', id_part=None, options_list=['--hybrid-connection-name'], help='Name of Hybrid Connection') - c.argument('namespace_name', id_part=None, options_list=['--namespace-name'], help='Name of Namespace') - - with self.argument_context('relay hyco authorization-rule keys renew') as c: - c.argument('key_type', arg_type=key_arg_type) - c.argument('key', arg_type=keyvalue_arg_type) +def load_arguments(self, _): # pylint: disable=unused-argument + pass diff --git a/src/azure-cli/azure/cli/command_modules/relay/_utils.py b/src/azure-cli/azure/cli/command_modules/relay/_utils.py deleted file mode 100644 index a697f8a004e..00000000000 --- a/src/azure-cli/azure/cli/command_modules/relay/_utils.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. -# -------------------------------------------------------------------------------------------- - - -def accessrights_converter(accessrights): - from azure.mgmt.relay.models import AccessRights - accessrights_new = [] - if 'Send' in accessrights: - accessrights_new.append(AccessRights.send) - if 'Manage' in accessrights: - accessrights_new.append(AccessRights.manage) - if 'Listen' in accessrights: - accessrights_new.append(AccessRights.listen) - - return accessrights_new diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/__init__.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# 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/azure-cli/azure/cli/command_modules/relay/aaz/latest/__init__.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# 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/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/__cmd_group.py new file mode 100644 index 00000000000..803b5209b60 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "relay", +) +class __CMDGroup(AAZCommandGroup): + """Manage Azure Relay Service namespaces, WCF relays, hybrid connections, and rules. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/__init__.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# 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/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/__cmd_group.py new file mode 100644 index 00000000000..3f64798929a --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "relay hyco", +) +class __CMDGroup(AAZCommandGroup): + """Manage Azure Relay Service Hybrid Connection and Authorization Rule. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/__init__.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# 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 * diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/_create.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/_create.py new file mode 100644 index 00000000000..283c88a357a --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/_create.py @@ -0,0 +1,238 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay hyco create", +) +class Create(AAZCommand): + """Create the Relay Service Hybrid Connection. + + :example: Create a new Relay Service Hybrid Connection + az relay hyco create --resource-group myresourcegroup --namespace-name mynamespace --name myhyco + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/hybridconnections/{}", "2017-04-01"], + ] + } + + 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="Name of Hybrid Connection.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.requires_client_authorization = AAZBoolArg( + options=["-c", "--requires-client-authorization"], + help="Indicates whether client authorization is required.", + ) + _args_schema.user_metadata = AAZStrArg( + options=["--user-metadata"], + help="Endpoint metadata.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HybridConnectionsCreateOrUpdate(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 HybridConnectionsCreateOrUpdate(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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "hybridConnectionName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("requiresClientAuthorization", AAZBoolType, ".requires_client_authorization") + properties.set_prop("userMetadata", AAZStrType, ".user_metadata") + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.listener_count = AAZIntType( + serialized_name="listenerCount", + flags={"read_only": True}, + ) + properties.requires_client_authorization = AAZBoolType( + serialized_name="requiresClientAuthorization", + ) + properties.updated_at = AAZStrType( + serialized_name="updatedAt", + flags={"read_only": True}, + ) + properties.user_metadata = AAZStrType( + serialized_name="userMetadata", + ) + + return cls._schema_on_200 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/_delete.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/_delete.py new file mode 100644 index 00000000000..077587345fe --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/_delete.py @@ -0,0 +1,155 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay hyco delete", +) +class Delete(AAZCommand): + """Deletes the Relay Service Hybrid Connection. + + :example: Deletes the Relay Service Hybrid Connection + az relay hyco delete --resource-group myresourcegroup --namespace-name mynamespace --name myhyco + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/hybridconnections/{}", "2017-04-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of Hybrid Connection.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HybridConnectionsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class HybridConnectionsDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "hybridConnectionName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/_list.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/_list.py new file mode 100644 index 00000000000..7c6417ddaee --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/_list.py @@ -0,0 +1,210 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay hyco list", +) +class List(AAZCommand): + """List the Hybrid Connection by Relay Service Namespace. + + :example: Get the Hybrid Connections by Namespace. + az relay hyco list --resource-group myresourcegroup --namespace-name mynamespace + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/hybridconnections", "2017-04-01"], + ] + } + + 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.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HybridConnectionsListByNamespace(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 HybridConnectionsListByNamespace(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.Relay/namespaces/{namespaceName}/hybridConnections", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + 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() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.listener_count = AAZIntType( + serialized_name="listenerCount", + flags={"read_only": True}, + ) + properties.requires_client_authorization = AAZBoolType( + serialized_name="requiresClientAuthorization", + ) + properties.updated_at = AAZStrType( + serialized_name="updatedAt", + flags={"read_only": True}, + ) + properties.user_metadata = AAZStrType( + serialized_name="userMetadata", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/_show.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/_show.py new file mode 100644 index 00000000000..6e155b70e02 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/_show.py @@ -0,0 +1,213 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay hyco show", +) +class Show(AAZCommand): + """Shows the Relay Service Hybrid Connection Details. + + :example: Shows the Hybrid Connection details. + az relay hyco show --resource-group myresourcegroup --namespace-name mynamespace --name myhyco + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/hybridconnections/{}", "2017-04-01"], + ] + } + + 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="Name of Hybrid Connection.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HybridConnectionsGet(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 HybridConnectionsGet(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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "hybridConnectionName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.listener_count = AAZIntType( + serialized_name="listenerCount", + flags={"read_only": True}, + ) + properties.requires_client_authorization = AAZBoolType( + serialized_name="requiresClientAuthorization", + ) + properties.updated_at = AAZStrType( + serialized_name="updatedAt", + flags={"read_only": True}, + ) + properties.user_metadata = AAZStrType( + serialized_name="userMetadata", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/_update.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/_update.py new file mode 100644 index 00000000000..acb3e39cd84 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/_update.py @@ -0,0 +1,384 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay hyco update", +) +class Update(AAZCommand): + """Updates the Relay Service Hybrid Connection. + + :example: Updates existing Relay Service Hybrid Connection. + az relay hyco update --resource-group myresourcegroup --namespace-name mynamespace --name myhyco + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/hybridconnections/{}", "2017-04-01"], + ] + } + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of Hybrid Connection.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.requires_client_authorization = AAZBoolArg( + options=["-r", "--requires-client-authorization"], + help="Indicates whether client authorization is required.", + nullable=True, + ) + _args_schema.user_metadata = AAZStrArg( + options=["--user-metadata"], + help="Endpoint metadata.", + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HybridConnectionsGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + self.HybridConnectionsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class HybridConnectionsGet(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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "hybridConnectionName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_hybrid_connection_read(cls._schema_on_200) + + return cls._schema_on_200 + + class HybridConnectionsCreateOrUpdate(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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "hybridConnectionName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_hybrid_connection_read(cls._schema_on_200) + + return cls._schema_on_200 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("requiresClientAuthorization", AAZBoolType, ".requires_client_authorization") + properties.set_prop("userMetadata", AAZStrType, ".user_metadata") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_hybrid_connection_read = None + + @classmethod + def _build_schema_hybrid_connection_read(cls, _schema): + if cls._schema_hybrid_connection_read is not None: + _schema.id = cls._schema_hybrid_connection_read.id + _schema.name = cls._schema_hybrid_connection_read.name + _schema.properties = cls._schema_hybrid_connection_read.properties + _schema.type = cls._schema_hybrid_connection_read.type + return + + cls._schema_hybrid_connection_read = _schema_hybrid_connection_read = AAZObjectType() + + hybrid_connection_read = _schema_hybrid_connection_read + hybrid_connection_read.id = AAZStrType( + flags={"read_only": True}, + ) + hybrid_connection_read.name = AAZStrType( + flags={"read_only": True}, + ) + hybrid_connection_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + hybrid_connection_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_hybrid_connection_read.properties + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.listener_count = AAZIntType( + serialized_name="listenerCount", + flags={"read_only": True}, + ) + properties.requires_client_authorization = AAZBoolType( + serialized_name="requiresClientAuthorization", + ) + properties.updated_at = AAZStrType( + serialized_name="updatedAt", + flags={"read_only": True}, + ) + properties.user_metadata = AAZStrType( + serialized_name="userMetadata", + ) + + _schema.id = cls._schema_hybrid_connection_read.id + _schema.name = cls._schema_hybrid_connection_read.name + _schema.properties = cls._schema_hybrid_connection_read.properties + _schema.type = cls._schema_hybrid_connection_read.type + + +__all__ = ["Update"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/__cmd_group.py new file mode 100644 index 00000000000..881d8936825 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "relay hyco authorization-rule", +) +class __CMDGroup(AAZCommandGroup): + """Manage Azure Relay Service Hybrid Connection Authorization Rule. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/__init__.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# 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 * diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/_create.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/_create.py new file mode 100644 index 00000000000..50f47d7899e --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/_create.py @@ -0,0 +1,246 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay hyco authorization-rule create", +) +class Create(AAZCommand): + """Create Authorization Rule for given Relay Service Hybrid Connection. + + :example: Create Authorization Rule for given Relay Service Hybrid Connection + az relay hyco authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule --rights Send Listen + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/hybridconnections/{}/authorizationrules/{}", "2017-04-01"], + ] + } + + 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="Name of Hybrid Connection Authorization Rule.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.hybrid_connection_name = AAZStrArg( + options=["--hybrid-connection-name"], + help="Name of Hybrid Connection.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.rights = AAZListArg( + options=["--rights"], + help="Space-separated list of Authorization rule rights. Allowed values: Listen, Manage, Send.", + required=True, + fmt=AAZListArgFormat( + unique=True, + ), + ) + + rights = cls._args_schema.rights + rights.Element = AAZStrArg( + enum={"Listen": "Listen", "Manage": "Manage", "Send": "Send"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HybridConnectionsCreateOrUpdateAuthorizationRule(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 HybridConnectionsCreateOrUpdateAuthorizationRule(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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "hybridConnectionName", self.ctx.args.hybrid_connection_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("rights", AAZListType, ".rights", typ_kwargs={"flags": {"required": True}}) + + rights = _builder.get(".properties.rights") + if rights is not None: + rights.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.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.rights = AAZListType( + flags={"required": True}, + ) + + rights = cls._schema_on_200.properties.rights + rights.Element = AAZStrType() + + return cls._schema_on_200 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/_delete.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/_delete.py new file mode 100644 index 00000000000..8f2aa09b602 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/_delete.py @@ -0,0 +1,168 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay hyco authorization-rule delete", +) +class Delete(AAZCommand): + """Deletes the Authorization Rule of the given Relay Service Hybrid Connection. + + :example: Deletes the Authorization Rule of Relay Service Hybrid Connection. + az relay hyco authorization-rule delete --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/hybridconnections/{}/authorizationrules/{}", "2017-04-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of Hybrid Connection Authorization Rule.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.hybrid_connection_name = AAZStrArg( + options=["--hybrid-connection-name"], + help="Name of Hybrid Connection.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HybridConnectionsDeleteAuthorizationRule(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class HybridConnectionsDeleteAuthorizationRule(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "hybridConnectionName", self.ctx.args.hybrid_connection_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/_list.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/_list.py new file mode 100644 index 00000000000..3345b036bcf --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/_list.py @@ -0,0 +1,210 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay hyco authorization-rule list", +) +class List(AAZCommand): + """Shows list of Authorization Rule by Relay Service Hybrid Connection. + + :example: shows list of Authorization Rule by Relay Service Hybrid Connection + az relay hyco authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/hybridconnections/{}/authorizationrules", "2017-04-01"], + ] + } + + 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.hybrid_connection_name = AAZStrArg( + options=["--hybrid-connection-name"], + help="Name of Hybrid Connection.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HybridConnectionsListAuthorizationRules(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 HybridConnectionsListAuthorizationRules(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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "hybridConnectionName", self.ctx.args.hybrid_connection_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + 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() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.rights = AAZListType( + flags={"required": True}, + ) + + rights = cls._schema_on_200.value.Element.properties.rights + rights.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/_show.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/_show.py new file mode 100644 index 00000000000..4b10bc9bd85 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/_show.py @@ -0,0 +1,214 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay hyco authorization-rule show", +) +class Show(AAZCommand): + """Shows the details of Authorization Rule for given Relay Service Hybrid Connection. + + :example: Shows the details of Authorization Rule for given Relay Service Hybrid Connection + az relay hyco authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/hybridconnections/{}/authorizationrules/{}", "2017-04-01"], + ] + } + + 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="Name of Hybrid Connection Authorization Rule.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.hybrid_connection_name = AAZStrArg( + options=["--hybrid-connection-name"], + help="Name of Hybrid Connection.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HybridConnectionsGetAuthorizationRule(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 HybridConnectionsGetAuthorizationRule(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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "hybridConnectionName", self.ctx.args.hybrid_connection_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.rights = AAZListType( + flags={"required": True}, + ) + + rights = cls._schema_on_200.properties.rights + rights.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/_update.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/_update.py new file mode 100644 index 00000000000..f430cbde5c3 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/_update.py @@ -0,0 +1,395 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay hyco authorization-rule update", +) +class Update(AAZCommand): + """Update Authorization Rule for given Relay Service Hybrid Connection. + + :example: Update Authorization Rule for given Relay Service Hybrid Connection + az relay hyco authorization-rule update --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule --rights Send + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/hybridconnections/{}/authorizationrules/{}", "2017-04-01"], + ] + } + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of Hybrid Connection Authorization Rule.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.hybrid_connection_name = AAZStrArg( + options=["--hybrid-connection-name"], + help="Name of Hybrid Connection.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.rights = AAZListArg( + options=["--rights"], + help="Space-separated list of Authorization rule rights. Allowed values: Listen, Manage, Send.", + fmt=AAZListArgFormat( + unique=True, + ), + ) + + rights = cls._args_schema.rights + rights.Element = AAZStrArg( + nullable=True, + enum={"Listen": "Listen", "Manage": "Manage", "Send": "Send"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HybridConnectionsGetAuthorizationRule(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + self.HybridConnectionsCreateOrUpdateAuthorizationRule(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class HybridConnectionsGetAuthorizationRule(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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "hybridConnectionName", self.ctx.args.hybrid_connection_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_authorization_rule_read(cls._schema_on_200) + + return cls._schema_on_200 + + class HybridConnectionsCreateOrUpdateAuthorizationRule(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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "hybridConnectionName", self.ctx.args.hybrid_connection_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_authorization_rule_read(cls._schema_on_200) + + return cls._schema_on_200 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("rights", AAZListType, ".rights", typ_kwargs={"flags": {"required": True}}) + + rights = _builder.get(".properties.rights") + if rights is not None: + rights.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_authorization_rule_read = None + + @classmethod + def _build_schema_authorization_rule_read(cls, _schema): + if cls._schema_authorization_rule_read is not None: + _schema.id = cls._schema_authorization_rule_read.id + _schema.name = cls._schema_authorization_rule_read.name + _schema.properties = cls._schema_authorization_rule_read.properties + _schema.type = cls._schema_authorization_rule_read.type + return + + cls._schema_authorization_rule_read = _schema_authorization_rule_read = AAZObjectType() + + authorization_rule_read = _schema_authorization_rule_read + authorization_rule_read.id = AAZStrType( + flags={"read_only": True}, + ) + authorization_rule_read.name = AAZStrType( + flags={"read_only": True}, + ) + authorization_rule_read.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + authorization_rule_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_authorization_rule_read.properties + properties.rights = AAZListType( + flags={"required": True}, + ) + + rights = _schema_authorization_rule_read.properties.rights + rights.Element = AAZStrType() + + _schema.id = cls._schema_authorization_rule_read.id + _schema.name = cls._schema_authorization_rule_read.name + _schema.properties = cls._schema_authorization_rule_read.properties + _schema.type = cls._schema_authorization_rule_read.type + + +__all__ = ["Update"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/keys/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/keys/__cmd_group.py new file mode 100644 index 00000000000..f25d73e340a --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/keys/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "relay hyco authorization-rule keys", +) +class __CMDGroup(AAZCommandGroup): + """Manage Azure Authorization Rule keys for Relay Service Hybrid Connection. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/keys/__init__.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/keys/__init__.py new file mode 100644 index 00000000000..024ba0f6ade --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/keys/__init__.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * +from ._renew import * diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/keys/_list.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/keys/_list.py new file mode 100644 index 00000000000..f6028bdb8d5 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/keys/_list.py @@ -0,0 +1,209 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay hyco authorization-rule keys list", +) +class List(AAZCommand): + """List the keys and connection strings of Authorization Rule for Relay Service Hybrid Connection. + + :example: List the keys and connection strings of Authorization Rule for Relay Service Hybrid Connection. + az relay hyco authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule + + :example: List the keys and connection strings of Authorization Rule for Relay Service Hybrid Connection (autogenerated) + az relay hyco authorization-rule keys list --hybrid-connection-name myhyco --name myauthorule --namespace-name mynamespace --resource-group myresourcegroup --subscription MySubscription + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/hybridconnections/{}/authorizationrules/{}/listkeys", "2017-04-01"], + ] + } + + 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="Name of Hybrid Connection Authorization Rule.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.hybrid_connection_name = AAZStrArg( + options=["--hybrid-connection-name"], + help="Name of Hybrid Connection.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HybridConnectionsListKeys(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 HybridConnectionsListKeys(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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/listKeys", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "hybridConnectionName", self.ctx.args.hybrid_connection_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + 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.key_name = AAZStrType( + serialized_name="keyName", + ) + _schema_on_200.primary_connection_string = AAZStrType( + serialized_name="primaryConnectionString", + ) + _schema_on_200.primary_key = AAZStrType( + serialized_name="primaryKey", + ) + _schema_on_200.secondary_connection_string = AAZStrType( + serialized_name="secondaryConnectionString", + ) + _schema_on_200.secondary_key = AAZStrType( + serialized_name="secondaryKey", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/keys/_renew.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/keys/_renew.py new file mode 100644 index 00000000000..985db77fd89 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/keys/_renew.py @@ -0,0 +1,234 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay hyco authorization-rule keys renew", +) +class Renew(AAZCommand): + """Regenerate keys of Authorization Rule for Relay Service Hybrid Connection. + + :example: Regenerate key of Relay Service Hybrid Connection. + az relay hyco authorization-rule keys renew --resource-group myresourcegroup --namespace- name mynamespace --hybrid-connection-name myhyco --name myauthorule --key PrimaryKey + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/hybridconnections/{}/authorizationrules/{}/regeneratekeys", "2017-04-01"], + ] + } + + 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="Name of Hybrid Connection Authorization Rule.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.hybrid_connection_name = AAZStrArg( + options=["--hybrid-connection-name"], + help="Name of Hybrid Connection.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.key_value = AAZStrArg( + options=["--key-value"], + help="Optional. If the key value is provided, this is set to key type, or autogenerated key value set for key type.", + ) + _args_schema.key = AAZStrArg( + options=["--key"], + help="Specifies Primary or Secondary key needs to be reset.", + required=True, + enum={"PrimaryKey": "PrimaryKey", "SecondaryKey": "SecondaryKey"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HybridConnectionsRegenerateKeys(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 HybridConnectionsRegenerateKeys(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.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/regenerateKeys", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "hybridConnectionName", self.ctx.args.hybrid_connection_name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + 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("key", AAZStrType, ".key_value") + _builder.set_prop("keyType", AAZStrType, ".key", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.key_name = AAZStrType( + serialized_name="keyName", + ) + _schema_on_200.primary_connection_string = AAZStrType( + serialized_name="primaryConnectionString", + ) + _schema_on_200.primary_key = AAZStrType( + serialized_name="primaryKey", + ) + _schema_on_200.secondary_connection_string = AAZStrType( + serialized_name="secondaryConnectionString", + ) + _schema_on_200.secondary_key = AAZStrType( + serialized_name="secondaryKey", + ) + + return cls._schema_on_200 + + +class _RenewHelper: + """Helper class for Renew""" + + +__all__ = ["Renew"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/__cmd_group.py new file mode 100644 index 00000000000..de317d42876 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "relay namespace", +) +class __CMDGroup(AAZCommandGroup): + """Manage Azure Relay Service Namespace. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/__init__.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/__init__.py new file mode 100644 index 00000000000..1fe81c2c1b7 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/__init__.py @@ -0,0 +1,18 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._exists import * +from ._list import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_create.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_create.py new file mode 100644 index 00000000000..a059ccd65ae --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_create.py @@ -0,0 +1,267 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay namespace create", +) +class Create(AAZCommand): + """Create a Relay Service Namespace. + + :example: Create a Relay Service Namespace. + az relay namespace create --resource-group myresourcegroup --name mynamespace --location westus --tags tag1=value1 tag2=value2 + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}", "2017-04-01"], + ] + } + + 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="Name of Namespace.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.location = AAZResourceLocationArg( + help="Location. Values from: `az account list-locations`. You can configure the default location using `az configure --defaults location=`.", + required=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + help="Space-separated tags: key[=value] [key[=value] ...]. Use \"\" to clear existing tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + # define Arg Group "Parameters" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.NamespacesCreateOrUpdate(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 NamespacesCreateOrUpdate(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.Relay/namespaces/{namespaceName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "namespaceName", 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", "2017-04-01", + 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("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_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( + flags={"client_flatten": True}, + ) + _schema_on_200_201.sku = AAZObjectType() + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.metric_id = AAZStrType( + serialized_name="metricId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.service_bus_endpoint = AAZStrType( + serialized_name="serviceBusEndpoint", + flags={"read_only": True}, + ) + properties.updated_at = AAZStrType( + serialized_name="updatedAt", + flags={"read_only": True}, + ) + + sku = cls._schema_on_200_201.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.tier = AAZStrType() + + 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/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_delete.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_delete.py new file mode 100644 index 00000000000..671b75b6da8 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_delete.py @@ -0,0 +1,166 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "relay namespace delete", +) +class Delete(AAZCommand): + """Deletes the Relay Service Namespace. + + :example: Deletes the Relay Service Namespace + az relay namespace delete --resource-group myresourcegroup --name mynamespace + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}", "2017-04-01"], + ] + } + + 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="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.NamespacesDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class NamespacesDelete(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": "azure-async-operation"}, + 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": "azure-async-operation"}, + 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": "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.Relay/namespaces/{namespaceName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "namespaceName", 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", "2017-04-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_exists.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_exists.py new file mode 100644 index 00000000000..9c2a8e975de --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_exists.py @@ -0,0 +1,173 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay namespace exists", +) +class Exists(AAZCommand): + """Check for the availability of the given name for the Namespace. + + :example: check for the availability of mynamespace for the Namespace + az relay namespace exists --name mynamespace + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.relay/checknameavailability", "2017-04-01"], + ] + } + + 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="Namespace name. Name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NamespacesCheckNameAvailability(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 NamespacesCheckNameAvailability(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.Relay/checkNameAvailability", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "ODataV4Format" + + @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", "2017-04-01", + 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("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.message = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name_available = AAZBoolType( + serialized_name="nameAvailable", + ) + _schema_on_200.reason = AAZStrType() + + return cls._schema_on_200 + + +class _ExistsHelper: + """Helper class for Exists""" + + +__all__ = ["Exists"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_list.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_list.py new file mode 100644 index 00000000000..02ad960057a --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_list.py @@ -0,0 +1,353 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay namespace list", +) +class List(AAZCommand): + """List the Relay Service Namespaces. + + :example: Get the Relay Service Namespaces by resource group + az relay namespace list --resource-group myresourcegroup + + :example: Get the Relay Service Namespaces by Subscription. + az relay namespace list + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.relay/namespaces", "2017-04-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces", "2017-04-01"], + ] + } + + 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.args.resource_group) and has_value(self.ctx.subscription_id) + condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + if condition_0: + self.NamespacesListByResourceGroup(ctx=self.ctx)() + if condition_1: + self.NamespacesList(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 NamespacesListByResourceGroup(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.Relay/namespaces", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @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", "2017-04-01", + 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() + + 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( + flags={"client_flatten": True}, + ) + _element.sku = AAZObjectType() + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.metric_id = AAZStrType( + serialized_name="metricId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.service_bus_endpoint = AAZStrType( + serialized_name="serviceBusEndpoint", + flags={"read_only": True}, + ) + properties.updated_at = AAZStrType( + serialized_name="updatedAt", + flags={"read_only": True}, + ) + + sku = cls._schema_on_200.value.Element.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.tier = AAZStrType() + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class NamespacesList(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.Relay/namespaces", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @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", "2017-04-01", + 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() + + 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( + flags={"client_flatten": True}, + ) + _element.sku = AAZObjectType() + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.metric_id = AAZStrType( + serialized_name="metricId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.service_bus_endpoint = AAZStrType( + serialized_name="serviceBusEndpoint", + flags={"read_only": True}, + ) + properties.updated_at = AAZStrType( + serialized_name="updatedAt", + flags={"read_only": True}, + ) + + sku = cls._schema_on_200.value.Element.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.tier = AAZStrType() + + 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/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_show.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_show.py new file mode 100644 index 00000000000..f23a1690463 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_show.py @@ -0,0 +1,216 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay namespace show", +) +class Show(AAZCommand): + """Shows the Relay Service Namespace details. + + :example: shows the Namespace details. + az relay namespace show --resource-group myresourcegroup --name mynamespace + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}", "2017-04-01"], + ] + } + + 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="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NamespacesGet(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 NamespacesGet(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.Relay/namespaces/{namespaceName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "namespaceName", 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", "2017-04-01", + 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( + flags={"client_flatten": True}, + ) + _schema_on_200.sku = AAZObjectType() + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.metric_id = AAZStrType( + serialized_name="metricId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.service_bus_endpoint = AAZStrType( + serialized_name="serviceBusEndpoint", + flags={"read_only": True}, + ) + properties.updated_at = AAZStrType( + serialized_name="updatedAt", + flags={"read_only": True}, + ) + + sku = cls._schema_on_200.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.tier = AAZStrType() + + 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/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_update.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_update.py new file mode 100644 index 00000000000..e75fc7e78da --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_update.py @@ -0,0 +1,407 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay namespace update", +) +class Update(AAZCommand): + """Updates a Relay Service Namespace. + + :example: Updates a Relay Service Namespace. + az relay namespace update --resource-group myresourcegroup --name mynamespace --tags tag=value + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}", "2017-04-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = 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="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + help="Space-separated tags: key[=value] [key[=value] ...]. Use \"\" to clear existing tags.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + + # define Arg Group "Parameters" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NamespacesGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.NamespacesCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class NamespacesGet(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.Relay/namespaces/{namespaceName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "namespaceName", 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", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_relay_namespace_read(cls._schema_on_200) + + return cls._schema_on_200 + + class NamespacesCreateOrUpdate(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.Relay/namespaces/{namespaceName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "namespaceName", 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", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_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() + _UpdateHelper._build_schema_relay_namespace_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("tags", AAZDictType, ".tags") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_relay_namespace_read = None + + @classmethod + def _build_schema_relay_namespace_read(cls, _schema): + if cls._schema_relay_namespace_read is not None: + _schema.id = cls._schema_relay_namespace_read.id + _schema.location = cls._schema_relay_namespace_read.location + _schema.name = cls._schema_relay_namespace_read.name + _schema.properties = cls._schema_relay_namespace_read.properties + _schema.sku = cls._schema_relay_namespace_read.sku + _schema.tags = cls._schema_relay_namespace_read.tags + _schema.type = cls._schema_relay_namespace_read.type + return + + cls._schema_relay_namespace_read = _schema_relay_namespace_read = AAZObjectType() + + relay_namespace_read = _schema_relay_namespace_read + relay_namespace_read.id = AAZStrType( + flags={"read_only": True}, + ) + relay_namespace_read.location = AAZStrType( + flags={"required": True}, + ) + relay_namespace_read.name = AAZStrType( + flags={"read_only": True}, + ) + relay_namespace_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + relay_namespace_read.sku = AAZObjectType() + relay_namespace_read.tags = AAZDictType() + relay_namespace_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_relay_namespace_read.properties + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.metric_id = AAZStrType( + serialized_name="metricId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.service_bus_endpoint = AAZStrType( + serialized_name="serviceBusEndpoint", + flags={"read_only": True}, + ) + properties.updated_at = AAZStrType( + serialized_name="updatedAt", + flags={"read_only": True}, + ) + + sku = _schema_relay_namespace_read.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.tier = AAZStrType() + + tags = _schema_relay_namespace_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_relay_namespace_read.id + _schema.location = cls._schema_relay_namespace_read.location + _schema.name = cls._schema_relay_namespace_read.name + _schema.properties = cls._schema_relay_namespace_read.properties + _schema.sku = cls._schema_relay_namespace_read.sku + _schema.tags = cls._schema_relay_namespace_read.tags + _schema.type = cls._schema_relay_namespace_read.type + + +__all__ = ["Update"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_wait.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_wait.py new file mode 100644 index 00000000000..18b8f53cf1f --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/_wait.py @@ -0,0 +1,212 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay namespace 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.relay/namespaces/{}", "2017-04-01"], + ] + } + + 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="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NamespacesGet(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 NamespacesGet(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.Relay/namespaces/{namespaceName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "namespaceName", 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", "2017-04-01", + 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( + flags={"client_flatten": True}, + ) + _schema_on_200.sku = AAZObjectType() + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.metric_id = AAZStrType( + serialized_name="metricId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.service_bus_endpoint = AAZStrType( + serialized_name="serviceBusEndpoint", + flags={"read_only": True}, + ) + properties.updated_at = AAZStrType( + serialized_name="updatedAt", + flags={"read_only": True}, + ) + + sku = cls._schema_on_200.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + sku.tier = AAZStrType() + + 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/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/__cmd_group.py new file mode 100644 index 00000000000..153229c012d --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "relay namespace authorization-rule", +) +class __CMDGroup(AAZCommandGroup): + """Manage Azure Relay Service Namespace Authorization Rule. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/__init__.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# 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 * diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/_create.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/_create.py new file mode 100644 index 00000000000..352b7cd304a --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/_create.py @@ -0,0 +1,234 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay namespace authorization-rule create", +) +class Create(AAZCommand): + """Create Authorization Rule for the given Relay Service Namespace. + + :example: Create Authorization Rule 'myrule' for the given Relay Service Namespace 'mynamespace' in resourcegroup + az relay namespace authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --rights Send Listen + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/authorizationrules/{}", "2017-04-01"], + ] + } + + 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="Name of Namespace Authorization Rule.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.rights = AAZListArg( + options=["--rights"], + help="Space-separated list of Authorization rule rights. Allowed values: Listen, Manage, Send.", + required=True, + fmt=AAZListArgFormat( + unique=True, + ), + ) + + rights = cls._args_schema.rights + rights.Element = AAZStrArg( + enum={"Listen": "Listen", "Manage": "Manage", "Send": "Send"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NamespacesCreateOrUpdateAuthorizationRule(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 NamespacesCreateOrUpdateAuthorizationRule(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.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("rights", AAZListType, ".rights", typ_kwargs={"flags": {"required": True}}) + + rights = _builder.get(".properties.rights") + if rights is not None: + rights.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.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.rights = AAZListType( + flags={"required": True}, + ) + + rights = cls._schema_on_200.properties.rights + rights.Element = AAZStrType() + + return cls._schema_on_200 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/_delete.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/_delete.py new file mode 100644 index 00000000000..d1efbdeaecb --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/_delete.py @@ -0,0 +1,155 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay namespace authorization-rule delete", +) +class Delete(AAZCommand): + """Deletes the Authorization Rule of the Relay Service Namespace. + + :example: Deletes the Authorization Rule of the Relay Service Namespace. + az relay namespace authorization-rule delete --resource-group myresourcegroup --namespace- name mynamespace --name myauthorule + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/authorizationrules/{}", "2017-04-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of Namespace Authorization Rule.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NamespacesDeleteAuthorizationRule(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class NamespacesDeleteAuthorizationRule(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/_list.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/_list.py new file mode 100644 index 00000000000..bcd93682419 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/_list.py @@ -0,0 +1,198 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay namespace authorization-rule list", +) +class List(AAZCommand): + """Shows the list of Authorization Rule by Relay Service Namespace. + + :example: Shows the list of Authorization Rule by Relay Service Namespace + az relay namespace authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/authorizationrules", "2017-04-01"], + ] + } + + 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.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NamespacesListAuthorizationRules(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 NamespacesListAuthorizationRules(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.Relay/namespaces/{namespaceName}/authorizationRules", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + 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() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.rights = AAZListType( + flags={"required": True}, + ) + + rights = cls._schema_on_200.value.Element.properties.rights + rights.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/_show.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/_show.py new file mode 100644 index 00000000000..6ee3b41c210 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/_show.py @@ -0,0 +1,201 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay namespace authorization-rule show", +) +class Show(AAZCommand): + """Shows the details of Relay Service Namespace Authorization Rule. + + :example: Shows the details of Relay Service Namespace Authorization Rule + az relay namespace authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/authorizationrules/{}", "2017-04-01"], + ] + } + + 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="Name of Namespace Authorization Rule.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NamespacesGetAuthorizationRule(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 NamespacesGetAuthorizationRule(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.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.rights = AAZListType( + flags={"required": True}, + ) + + rights = cls._schema_on_200.properties.rights + rights.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/_update.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/_update.py new file mode 100644 index 00000000000..4a97d069cbe --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/_update.py @@ -0,0 +1,378 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay namespace authorization-rule update", +) +class Update(AAZCommand): + """Updates Authorization Rule for the given Relay Service Namespace. + + :example: Updates Authorization Rule 'myrule' for the given Relay Service Namespace 'mynamespace' in resourcegroup + az relay namespace authorization-rule update --resource-group myresourcegroup --namespace- name mynamespace --name myauthorule --rights Send + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/authorizationrules/{}", "2017-04-01"], + ] + } + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of Namespace Authorization Rule.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.rights = AAZListArg( + options=["--rights"], + help="Space-separated list of Authorization rule rights. Allowed values: Listen, Manage, Send.", + fmt=AAZListArgFormat( + unique=True, + ), + ) + + rights = cls._args_schema.rights + rights.Element = AAZStrArg( + nullable=True, + enum={"Listen": "Listen", "Manage": "Manage", "Send": "Send"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NamespacesGetAuthorizationRule(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + self.NamespacesCreateOrUpdateAuthorizationRule(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class NamespacesGetAuthorizationRule(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.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_authorization_rule_read(cls._schema_on_200) + + return cls._schema_on_200 + + class NamespacesCreateOrUpdateAuthorizationRule(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.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_authorization_rule_read(cls._schema_on_200) + + return cls._schema_on_200 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("rights", AAZListType, ".rights", typ_kwargs={"flags": {"required": True}}) + + rights = _builder.get(".properties.rights") + if rights is not None: + rights.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_authorization_rule_read = None + + @classmethod + def _build_schema_authorization_rule_read(cls, _schema): + if cls._schema_authorization_rule_read is not None: + _schema.id = cls._schema_authorization_rule_read.id + _schema.name = cls._schema_authorization_rule_read.name + _schema.properties = cls._schema_authorization_rule_read.properties + _schema.type = cls._schema_authorization_rule_read.type + return + + cls._schema_authorization_rule_read = _schema_authorization_rule_read = AAZObjectType() + + authorization_rule_read = _schema_authorization_rule_read + authorization_rule_read.id = AAZStrType( + flags={"read_only": True}, + ) + authorization_rule_read.name = AAZStrType( + flags={"read_only": True}, + ) + authorization_rule_read.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + authorization_rule_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_authorization_rule_read.properties + properties.rights = AAZListType( + flags={"required": True}, + ) + + rights = _schema_authorization_rule_read.properties.rights + rights.Element = AAZStrType() + + _schema.id = cls._schema_authorization_rule_read.id + _schema.name = cls._schema_authorization_rule_read.name + _schema.properties = cls._schema_authorization_rule_read.properties + _schema.type = cls._schema_authorization_rule_read.type + + +__all__ = ["Update"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/keys/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/keys/__cmd_group.py new file mode 100644 index 00000000000..2f9c63daace --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/keys/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "relay namespace authorization-rule keys", +) +class __CMDGroup(AAZCommandGroup): + """Manage Azure Authorization Rule connection strings for Namespace. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/keys/__init__.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/keys/__init__.py new file mode 100644 index 00000000000..024ba0f6ade --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/keys/__init__.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * +from ._renew import * diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/keys/_list.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/keys/_list.py new file mode 100644 index 00000000000..6b2b7da937e --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/keys/_list.py @@ -0,0 +1,197 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay namespace authorization-rule keys list", +) +class List(AAZCommand): + """List the keys and connection strings of Authorization Rule for Relay Service Namespace. + + :example: List the keys and connection strings of Authorization Rule for Relay Service Namespace + az relay namespace authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule + + :example: List the keys and connection strings of Authorization Rule for Relay Service Namespace (commonly used with --output and --query). (autogenerated) + az relay namespace authorization-rule keys list --name myauthorule --namespace-name mynamespace --resource-group myresourcegroup --subscription MySubscription + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/authorizationrules/{}/listkeys", "2017-04-01"], + ] + } + + 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="Name of Namespace Authorization Rule.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NamespacesListKeys(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 NamespacesListKeys(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.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + 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.key_name = AAZStrType( + serialized_name="keyName", + ) + _schema_on_200.primary_connection_string = AAZStrType( + serialized_name="primaryConnectionString", + ) + _schema_on_200.primary_key = AAZStrType( + serialized_name="primaryKey", + ) + _schema_on_200.secondary_connection_string = AAZStrType( + serialized_name="secondaryConnectionString", + ) + _schema_on_200.secondary_key = AAZStrType( + serialized_name="secondaryKey", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/keys/_renew.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/keys/_renew.py new file mode 100644 index 00000000000..6e13e0d718d --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/namespace/authorization_rule/keys/_renew.py @@ -0,0 +1,221 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay namespace authorization-rule keys renew", +) +class Renew(AAZCommand): + """Regenerate keys of Authorization Rule for the Relay Service Namespace. + + :example: Regenerate keys of Authorization Rule for the Relay Service Namespace. + az relay namespace authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --key PrimaryKey + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/authorizationrules/{}/regeneratekeys", "2017-04-01"], + ] + } + + 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="Name of Namespace Authorization Rule.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.key_value = AAZStrArg( + options=["--key-value"], + help="Optional. If the key value is provided, this is set to key type, or autogenerated key value set for key type.", + ) + _args_schema.key = AAZStrArg( + options=["--key"], + help="Specifies Primary or Secondary key needs to be reset.", + required=True, + enum={"PrimaryKey": "PrimaryKey", "SecondaryKey": "SecondaryKey"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NamespacesRegenerateKeys(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 NamespacesRegenerateKeys(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.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + 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("key", AAZStrType, ".key_value") + _builder.set_prop("keyType", AAZStrType, ".key", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.key_name = AAZStrType( + serialized_name="keyName", + ) + _schema_on_200.primary_connection_string = AAZStrType( + serialized_name="primaryConnectionString", + ) + _schema_on_200.primary_key = AAZStrType( + serialized_name="primaryKey", + ) + _schema_on_200.secondary_connection_string = AAZStrType( + serialized_name="secondaryConnectionString", + ) + _schema_on_200.secondary_key = AAZStrType( + serialized_name="secondaryKey", + ) + + return cls._schema_on_200 + + +class _RenewHelper: + """Helper class for Renew""" + + +__all__ = ["Renew"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/__cmd_group.py new file mode 100644 index 00000000000..93f004e7d67 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "relay wcfrelay", +) +class __CMDGroup(AAZCommandGroup): + """Manage Azure Relay Service WCF Relay and Authorization Rule. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/__init__.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# 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 * diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/_create.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/_create.py new file mode 100644 index 00000000000..b8eca9f39c8 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/_create.py @@ -0,0 +1,260 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay wcfrelay create", +) +class Create(AAZCommand): + """Create the Relay Service WCF Relay. + + :example: Create Relay Service WCF Relay. + az relay wcfrelay create --resource-group myresourcegroup --namespace-name mynamespace --name myrelay --relay-type NetTcp + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/wcfrelays/{}", "2017-04-01"], + ] + } + + 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.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of WCF Relay.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.relay_type = AAZStrArg( + options=["--relay-type"], + help="Relay type. Allowed values: Http, NetTcp.", + default="NetTcp", + enum={"Http": "Http", "NetTcp": "NetTcp"}, + ) + _args_schema.requires_client_authorization = AAZBoolArg( + options=["-c", "--requires-client-authorization"], + help="Indicates whether client authorization is required.", + ) + _args_schema.requires_transport_security = AAZBoolArg( + options=["-t", "--requires-transport-security"], + help="Indicates whether transport security is required.", + ) + _args_schema.user_metadata = AAZStrArg( + options=["--user-metadata"], + help="Endpoint metadata.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WCFRelaysCreateOrUpdate(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 WCFRelaysCreateOrUpdate(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.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "relayName", 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", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("relayType", AAZStrType, ".relay_type") + properties.set_prop("requiresClientAuthorization", AAZBoolType, ".requires_client_authorization") + properties.set_prop("requiresTransportSecurity", AAZBoolType, ".requires_transport_security") + properties.set_prop("userMetadata", AAZStrType, ".user_metadata") + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.is_dynamic = AAZBoolType( + serialized_name="isDynamic", + flags={"read_only": True}, + ) + properties.listener_count = AAZIntType( + serialized_name="listenerCount", + flags={"read_only": True}, + ) + properties.relay_type = AAZStrType( + serialized_name="relayType", + ) + properties.requires_client_authorization = AAZBoolType( + serialized_name="requiresClientAuthorization", + ) + properties.requires_transport_security = AAZBoolType( + serialized_name="requiresTransportSecurity", + ) + properties.updated_at = AAZStrType( + serialized_name="updatedAt", + flags={"read_only": True}, + ) + properties.user_metadata = AAZStrType( + serialized_name="userMetadata", + ) + + return cls._schema_on_200 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/_delete.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/_delete.py new file mode 100644 index 00000000000..b41c52774e9 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/_delete.py @@ -0,0 +1,155 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay wcfrelay delete", +) +class Delete(AAZCommand): + """Deletes the Relay Service WCF Relay. + + :example: Deletes the wcfrelay + az relay wcfrelay delete --resource-group myresourcegroup --namespace-name mynamespace --name myrelay + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/wcfrelays/{}", "2017-04-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of WCF Relay.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WCFRelaysDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class WCFRelaysDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "relayName", 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", "2017-04-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/_list.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/_list.py new file mode 100644 index 00000000000..cfe7e214af2 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/_list.py @@ -0,0 +1,220 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay wcfrelay list", +) +class List(AAZCommand): + """List the WCF Relay by Relay Service Namespace. + + :example: Get the WCF Relays by Relay Service Namespace. + az relay wcfrelay list --resource-group myresourcegroup --namespace-name mynamespace + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/wcfrelays", "2017-04-01"], + ] + } + + 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.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WCFRelaysListByNamespace(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 WCFRelaysListByNamespace(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.Relay/namespaces/{namespaceName}/wcfRelays", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2017-04-01", + 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() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.is_dynamic = AAZBoolType( + serialized_name="isDynamic", + flags={"read_only": True}, + ) + properties.listener_count = AAZIntType( + serialized_name="listenerCount", + flags={"read_only": True}, + ) + properties.relay_type = AAZStrType( + serialized_name="relayType", + ) + properties.requires_client_authorization = AAZBoolType( + serialized_name="requiresClientAuthorization", + ) + properties.requires_transport_security = AAZBoolType( + serialized_name="requiresTransportSecurity", + ) + properties.updated_at = AAZStrType( + serialized_name="updatedAt", + flags={"read_only": True}, + ) + properties.user_metadata = AAZStrType( + serialized_name="userMetadata", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/_show.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/_show.py new file mode 100644 index 00000000000..8dfd00bf457 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/_show.py @@ -0,0 +1,228 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay wcfrelay show", +) +class Show(AAZCommand): + """Shows the Relay Service WCF Relay Details. + + :example: Shows the Relay Service WCF Relay Details + az relay wcfrelay show --resource-group myresourcegroup --namespace-name mynamespace --name myrelay + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/wcfrelays/{}", "2017-04-01"], + ] + } + + 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.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of WCF Relay.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WCFRelaysGet(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 WCFRelaysGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "relayName", 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", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.is_dynamic = AAZBoolType( + serialized_name="isDynamic", + flags={"read_only": True}, + ) + properties.listener_count = AAZIntType( + serialized_name="listenerCount", + flags={"read_only": True}, + ) + properties.relay_type = AAZStrType( + serialized_name="relayType", + ) + properties.requires_client_authorization = AAZBoolType( + serialized_name="requiresClientAuthorization", + ) + properties.requires_transport_security = AAZBoolType( + serialized_name="requiresTransportSecurity", + ) + properties.updated_at = AAZStrType( + serialized_name="updatedAt", + flags={"read_only": True}, + ) + properties.user_metadata = AAZStrType( + serialized_name="userMetadata", + ) + + return cls._schema_on_200 + + def on_204(self, session): + pass + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/_update.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/_update.py new file mode 100644 index 00000000000..90b73a24f7e --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/_update.py @@ -0,0 +1,400 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay wcfrelay update", +) +class Update(AAZCommand): + """Updates existing Relay Service WCF Relay. + + :example: Updates Relay Service WCF Relay. + az relay wcfrelay update --resource-group myresourcegroup --namespace-name mynamespace --name myrelay + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/wcfrelays/{}", "2017-04-01"], + ] + } + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of WCF Relay.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.relay_type = AAZStrArg( + options=["--relay-type"], + help="Relay type.", + nullable=True, + enum={"Http": "Http", "NetTcp": "NetTcp"}, + ) + _args_schema.user_metadata = AAZStrArg( + options=["--user-metadata"], + help="Endpoint metadata.", + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WCFRelaysGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + self.WCFRelaysCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WCFRelaysGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "relayName", 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", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_wcf_relay_read(cls._schema_on_200) + + return cls._schema_on_200 + + def on_204(self, session): + pass + + class WCFRelaysCreateOrUpdate(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.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "relayName", 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", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_wcf_relay_read(cls._schema_on_200) + + return cls._schema_on_200 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("relayType", AAZStrType, ".relay_type") + properties.set_prop("userMetadata", AAZStrType, ".user_metadata") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_wcf_relay_read = None + + @classmethod + def _build_schema_wcf_relay_read(cls, _schema): + if cls._schema_wcf_relay_read is not None: + _schema.id = cls._schema_wcf_relay_read.id + _schema.name = cls._schema_wcf_relay_read.name + _schema.properties = cls._schema_wcf_relay_read.properties + _schema.type = cls._schema_wcf_relay_read.type + return + + cls._schema_wcf_relay_read = _schema_wcf_relay_read = AAZObjectType() + + wcf_relay_read = _schema_wcf_relay_read + wcf_relay_read.id = AAZStrType( + flags={"read_only": True}, + ) + wcf_relay_read.name = AAZStrType( + flags={"read_only": True}, + ) + wcf_relay_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + wcf_relay_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_wcf_relay_read.properties + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.is_dynamic = AAZBoolType( + serialized_name="isDynamic", + flags={"read_only": True}, + ) + properties.listener_count = AAZIntType( + serialized_name="listenerCount", + flags={"read_only": True}, + ) + properties.relay_type = AAZStrType( + serialized_name="relayType", + ) + properties.requires_client_authorization = AAZBoolType( + serialized_name="requiresClientAuthorization", + ) + properties.requires_transport_security = AAZBoolType( + serialized_name="requiresTransportSecurity", + ) + properties.updated_at = AAZStrType( + serialized_name="updatedAt", + flags={"read_only": True}, + ) + properties.user_metadata = AAZStrType( + serialized_name="userMetadata", + ) + + _schema.id = cls._schema_wcf_relay_read.id + _schema.name = cls._schema_wcf_relay_read.name + _schema.properties = cls._schema_wcf_relay_read.properties + _schema.type = cls._schema_wcf_relay_read.type + + +__all__ = ["Update"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/__cmd_group.py new file mode 100644 index 00000000000..a67ce142309 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "relay wcfrelay authorization-rule", +) +class __CMDGroup(AAZCommandGroup): + """Manage Azure Relay Service WCF Relay Authorization Rule. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/__init__.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# 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 * diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/_create.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/_create.py new file mode 100644 index 00000000000..6259f167671 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/_create.py @@ -0,0 +1,246 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay wcfrelay authorization-rule create", +) +class Create(AAZCommand): + """Create Authorization Rule for the given Relay Service WCF Relay. + + :example: Create Authorization Rule for WCF Relay + az relay wcfrelay authorization-rule create --resource-group myresourcegroup --namespace- name mynamespace --relay-name myrelay --name myauthorule --rights Listen + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/wcfrelays/{}/authorizationrules/{}", "2017-04-01"], + ] + } + + 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="Name of WCF Relay Authorization Rule.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.relay_name = AAZStrArg( + options=["--relay-name"], + help="Name of WCF Relay.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.rights = AAZListArg( + options=["--rights"], + help="The rights associated with the rule.", + required=True, + fmt=AAZListArgFormat( + unique=True, + ), + ) + + rights = cls._args_schema.rights + rights.Element = AAZStrArg( + enum={"Listen": "Listen", "Manage": "Manage", "Send": "Send"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WCFRelaysCreateOrUpdateAuthorizationRule(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 WCFRelaysCreateOrUpdateAuthorizationRule(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.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "relayName", self.ctx.args.relay_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", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("rights", AAZListType, ".rights", typ_kwargs={"flags": {"required": True}}) + + rights = _builder.get(".properties.rights") + if rights is not None: + rights.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.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.rights = AAZListType( + flags={"required": True}, + ) + + rights = cls._schema_on_200.properties.rights + rights.Element = AAZStrType() + + return cls._schema_on_200 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/_delete.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/_delete.py new file mode 100644 index 00000000000..e0c10e5b417 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/_delete.py @@ -0,0 +1,168 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay wcfrelay authorization-rule delete", +) +class Delete(AAZCommand): + """Delete the Authorization Rule of Relay Service WCF Relay. + + :example: Delete the Authorization Rule of Relay Service WCF Relay + az relay wcfrelay authorization-rule delete --resource-group myresourcegroup --namespace- name mynamespace --relay-name myrelay --name myauthorule + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/wcfrelays/{}/authorizationrules/{}", "2017-04-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of WCF Relay Authorization Rule.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.relay_name = AAZStrArg( + options=["--relay-name"], + help="Name of WCF Relay.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WCFRelaysDeleteAuthorizationRule(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class WCFRelaysDeleteAuthorizationRule(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "relayName", self.ctx.args.relay_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", "2017-04-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/_list.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/_list.py new file mode 100644 index 00000000000..7f548d1ec22 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/_list.py @@ -0,0 +1,210 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay wcfrelay authorization-rule list", +) +class List(AAZCommand): + """List of Authorization Rule by Relay Service WCF Relay. + + :example: List of Authorization Rule by WCF Relay + az relay wcfrelay authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace --relay-name myrelay + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/wcfrelays/{}/authorizationrules", "2017-04-01"], + ] + } + + 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.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.relay_name = AAZStrArg( + options=["--relay-name"], + help="Name of WCF Relay.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WCFRelaysListAuthorizationRules(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 WCFRelaysListAuthorizationRules(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.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules", + **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( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "relayName", self.ctx.args.relay_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", "2017-04-01", + 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() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.rights = AAZListType( + flags={"required": True}, + ) + + rights = cls._schema_on_200.value.Element.properties.rights + rights.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/_show.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/_show.py new file mode 100644 index 00000000000..cf4797de26d --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/_show.py @@ -0,0 +1,214 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay wcfrelay authorization-rule show", +) +class Show(AAZCommand): + """Show properties of Authorization Rule for the given Relay Service WCF Relay. + + :example: show properties of Authorization Rule + az relay wcfrelay authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --relay-name myrelay --name myauthorule + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/wcfrelays/{}/authorizationrules/{}", "2017-04-01"], + ] + } + + 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="Name of WCF Relay Authorization Rule.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.relay_name = AAZStrArg( + options=["--relay-name"], + help="Name of WCF Relay.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WCFRelaysGetAuthorizationRule(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 WCFRelaysGetAuthorizationRule(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.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "relayName", self.ctx.args.relay_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", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.rights = AAZListType( + flags={"required": True}, + ) + + rights = cls._schema_on_200.properties.rights + rights.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/_update.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/_update.py new file mode 100644 index 00000000000..4407e43eefb --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/_update.py @@ -0,0 +1,395 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay wcfrelay authorization-rule update", +) +class Update(AAZCommand): + """Update Authorization Rule for the given Relay Service WCF Relay. + + :example: Update Authorization Rule for WCF Relay + az relay wcfrelay authorization-rule update --resource-group myresourcegroup --namespace- name mynamespace --relay-name myrelay --name myauthorule --rights Send + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/wcfrelays/{}/authorizationrules/{}", "2017-04-01"], + ] + } + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of WCF Relay Authorization Rule.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.relay_name = AAZStrArg( + options=["--relay-name"], + help="Name of WCF Relay.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.rights = AAZListArg( + options=["--rights"], + help="The rights associated with the rule.", + fmt=AAZListArgFormat( + unique=True, + ), + ) + + rights = cls._args_schema.rights + rights.Element = AAZStrArg( + nullable=True, + enum={"Listen": "Listen", "Manage": "Manage", "Send": "Send"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WCFRelaysGetAuthorizationRule(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + self.WCFRelaysCreateOrUpdateAuthorizationRule(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WCFRelaysGetAuthorizationRule(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.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "relayName", self.ctx.args.relay_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", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_authorization_rule_read(cls._schema_on_200) + + return cls._schema_on_200 + + class WCFRelaysCreateOrUpdateAuthorizationRule(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.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "relayName", self.ctx.args.relay_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", "2017-04-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_authorization_rule_read(cls._schema_on_200) + + return cls._schema_on_200 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("rights", AAZListType, ".rights", typ_kwargs={"flags": {"required": True}}) + + rights = _builder.get(".properties.rights") + if rights is not None: + rights.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_authorization_rule_read = None + + @classmethod + def _build_schema_authorization_rule_read(cls, _schema): + if cls._schema_authorization_rule_read is not None: + _schema.id = cls._schema_authorization_rule_read.id + _schema.name = cls._schema_authorization_rule_read.name + _schema.properties = cls._schema_authorization_rule_read.properties + _schema.type = cls._schema_authorization_rule_read.type + return + + cls._schema_authorization_rule_read = _schema_authorization_rule_read = AAZObjectType() + + authorization_rule_read = _schema_authorization_rule_read + authorization_rule_read.id = AAZStrType( + flags={"read_only": True}, + ) + authorization_rule_read.name = AAZStrType( + flags={"read_only": True}, + ) + authorization_rule_read.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + authorization_rule_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_authorization_rule_read.properties + properties.rights = AAZListType( + flags={"required": True}, + ) + + rights = _schema_authorization_rule_read.properties.rights + rights.Element = AAZStrType() + + _schema.id = cls._schema_authorization_rule_read.id + _schema.name = cls._schema_authorization_rule_read.name + _schema.properties = cls._schema_authorization_rule_read.properties + _schema.type = cls._schema_authorization_rule_read.type + + +__all__ = ["Update"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/keys/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/keys/__cmd_group.py new file mode 100644 index 00000000000..bb86a770874 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/keys/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "relay wcfrelay authorization-rule keys", +) +class __CMDGroup(AAZCommandGroup): + """Manage Azure Authorization Rule keys for Relay Service WCF Relay. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/keys/__init__.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/keys/__init__.py new file mode 100644 index 00000000000..024ba0f6ade --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/keys/__init__.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * +from ._renew import * diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/keys/_list.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/keys/_list.py new file mode 100644 index 00000000000..3c72a5ee2bd --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/keys/_list.py @@ -0,0 +1,206 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay wcfrelay authorization-rule keys list", +) +class List(AAZCommand): + """List the keys and connection strings of Authorization Rule for the given Relay Service WCF Relay. + + :example: List the keys and connection strings of Authorization Rule for the given Relay Service WCF Relay + az relay wcfrelay authorization-rule keys list --resource-group myresourcegroup --namespace- name mynamespace --relay-name myrelay --name myauthorule + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/wcfrelays/{}/authorizationrules/{}/listkeys", "2017-04-01"], + ] + } + + 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="Name of WCF Relay Authorization Rule.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.relay_name = AAZStrArg( + options=["--relay-name"], + help="Name of WCF Relay.", + required=True, + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WCFRelaysListKeys(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 WCFRelaysListKeys(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.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/listKeys", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "relayName", self.ctx.args.relay_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", "2017-04-01", + 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.key_name = AAZStrType( + serialized_name="keyName", + ) + _schema_on_200.primary_connection_string = AAZStrType( + serialized_name="primaryConnectionString", + ) + _schema_on_200.primary_key = AAZStrType( + serialized_name="primaryKey", + ) + _schema_on_200.secondary_connection_string = AAZStrType( + serialized_name="secondaryConnectionString", + ) + _schema_on_200.secondary_key = AAZStrType( + serialized_name="secondaryKey", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/keys/_renew.py b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/keys/_renew.py new file mode 100644 index 00000000000..28124731223 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/authorization_rule/keys/_renew.py @@ -0,0 +1,234 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "relay wcfrelay authorization-rule keys renew", +) +class Renew(AAZCommand): + """Regenerate keys of Authorization Rule for Relay Service WCF Relay. + + :example: Regenerate keys of Authorization Rule for Relay Service WCF Relay + az relay wcfrelay authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --relay-name myrelay --name myauthorule --key PrimaryKey + """ + + _aaz_info = { + "version": "2017-04-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.relay/namespaces/{}/wcfrelays/{}/authorizationrules/{}/regeneratekeys", "2017-04-01"], + ] + } + + 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="Name of WCF Relay Authorization Rule.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.namespace_name = AAZStrArg( + options=["--namespace-name"], + help="Name of Namespace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + max_length=50, + min_length=6, + ), + ) + _args_schema.relay_name = AAZStrArg( + options=["--relay-name"], + help="Name of WCF Relay.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.key_value = AAZStrArg( + options=["--key-value"], + help="Optional. If the key value is provided, this is set to key type, or autogenerated key value set for key type.", + ) + _args_schema.key = AAZStrArg( + options=["--key"], + help="Specifies Primary or Secondary key needs to be reset.", + required=True, + enum={"PrimaryKey": "PrimaryKey", "SecondaryKey": "SecondaryKey"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WCFRelaysRegenerateKeys(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 WCFRelaysRegenerateKeys(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.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/regenerateKeys", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationRuleName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "namespaceName", self.ctx.args.namespace_name, + required=True, + ), + **self.serialize_url_param( + "relayName", self.ctx.args.relay_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", "2017-04-01", + 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("key", AAZStrType, ".key_value") + _builder.set_prop("keyType", AAZStrType, ".key", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.key_name = AAZStrType( + serialized_name="keyName", + ) + _schema_on_200.primary_connection_string = AAZStrType( + serialized_name="primaryConnectionString", + ) + _schema_on_200.primary_key = AAZStrType( + serialized_name="primaryKey", + ) + _schema_on_200.secondary_connection_string = AAZStrType( + serialized_name="secondaryConnectionString", + ) + _schema_on_200.secondary_key = AAZStrType( + serialized_name="secondaryKey", + ) + + return cls._schema_on_200 + + +class _RenewHelper: + """Helper class for Renew""" + + +__all__ = ["Renew"] diff --git a/src/azure-cli/azure/cli/command_modules/relay/commands.py b/src/azure-cli/azure/cli/command_modules/relay/commands.py index b47babac225..6876d4a3770 100644 --- a/src/azure-cli/azure/cli/command_modules/relay/commands.py +++ b/src/azure-cli/azure/cli/command_modules/relay/commands.py @@ -6,79 +6,30 @@ # pylint: disable=line-too-long # pylint: disable=too-many-statements -from azure.cli.core.commands import CliCommandType - def load_command_table(self, _): - from azure.cli.command_modules.relay._client_factory import namespaces_mgmt_client_factory, \ - wcfrelays_mgmt_client_factory, hycos_mgmt_client_factory - from azure.cli.command_modules.relay.custom import empty_on_404 - - sb_namespace_util = CliCommandType( - operations_tmpl='azure.mgmt.relay.operations#NamespacesOperations.{}', - client_factory=namespaces_mgmt_client_factory - ) - - sb_wcfrelay_util = CliCommandType( - operations_tmpl='azure.mgmt.relay.operations#WCFRelaysOperations.{}', - client_factory=wcfrelays_mgmt_client_factory - ) - - sb_hyco_util = CliCommandType( - operations_tmpl='azure.mgmt.relay.operations#HybridConnectionsOperations.{}', - client_factory=hycos_mgmt_client_factory - ) - -# Namespace Region - custom_tmpl = 'azure.cli.command_modules.relay.custom#{}' - relay_custom = CliCommandType(operations_tmpl=custom_tmpl) - with self.command_group('relay namespace', sb_namespace_util, client_factory=namespaces_mgmt_client_factory) as g: - g.custom_command('create', 'cli_namespace_create') - g.show_command('show') - g.custom_command('list', 'cli_namespace_list', exception_handler=empty_on_404) - g.command('delete', 'delete') - g.command('exists', 'check_name_availability_method') - g.generic_update_command('update', custom_func_name='cli_namespace_update', custom_func_type=relay_custom) - - with self.command_group('relay namespace authorization-rule', sb_namespace_util, client_factory=namespaces_mgmt_client_factory) as g: - g.command('create', 'create_or_update_authorization_rule',) - g.show_command('show', 'get_authorization_rule') - g.command('list', 'list_authorization_rules', exception_handler=empty_on_404) - g.command('keys list', 'list_keys') - g.command('keys renew', 'regenerate_keys') - g.command('delete', 'delete_authorization_rule') - g.generic_update_command('update', getter_name='get_authorization_rule', setter_name='create_or_update_authorization_rule', custom_func_name='cli_namespaceautho_update') - -# WCF Relay Region - with self.command_group('relay wcfrelay', sb_wcfrelay_util, client_factory=wcfrelays_mgmt_client_factory) as g: - g.custom_command('create', 'cli_wcfrelay_create') - g.show_command('show') - g.command('list', 'list_by_namespace', exception_handler=empty_on_404) - g.command('delete', 'delete') - g.generic_update_command('update', custom_func_name='cli_wcfrelay_update') - - with self.command_group('relay wcfrelay authorization-rule', sb_wcfrelay_util, client_factory=wcfrelays_mgmt_client_factory) as g: - g.command('create', 'create_or_update_authorization_rule',) - g.show_command('show', 'get_authorization_rule') - g.command('list', 'list_authorization_rules', exception_handler=empty_on_404) - g.command('keys list', 'list_keys') - g.command('keys renew', 'regenerate_keys') - g.command('delete', 'delete_authorization_rule') - g.generic_update_command('update', getter_name='get_authorization_rule', setter_name='create_or_update_authorization_rule', custom_func_name='cli_namespaceautho_update') - -# Hybrid Connections Region - with self.command_group('relay hyco', sb_hyco_util, client_factory=hycos_mgmt_client_factory) as g: - g.custom_command('create', 'cli_hyco_create') - g.show_command('show') - g.command('list', 'list_by_namespace', exception_handler=empty_on_404) - g.command('delete', 'delete') - g.generic_update_command('update', custom_func_name='cli_hyco_update') - with self.command_group('relay hyco authorization-rule', sb_hyco_util, client_factory=hycos_mgmt_client_factory) as g: - g.command('create', 'create_or_update_authorization_rule') - g.show_command('show', 'get_authorization_rule') - g.command('list', 'list_authorization_rules', exception_handler=empty_on_404) - g.command('keys list', 'list_keys') - g.command('keys renew', 'regenerate_keys') - g.command('delete', 'delete_authorization_rule') - g.generic_update_command('update', getter_name='get_authorization_rule', setter_name='create_or_update_authorization_rule', custom_func_name='cli_namespaceautho_update') + # Namespace Region + with self.command_group('relay namespace authorization-rule'): + from azure.cli.command_modules.relay.custom import NamespaceAuthoCreate + self.command_table['relay namespace authorization-rule create'] = NamespaceAuthoCreate(loader=self) + + # WCF Relay Region + with self.command_group('relay wcfrelay'): + from azure.cli.command_modules.relay.custom import WcfrelayUpdate + self.command_table['relay wcfrelay update'] = WcfrelayUpdate(loader=self) + + with self.command_group('relay wcfrelay authorization-rule'): + from azure.cli.command_modules.relay.custom import WcfrelayAuthoCreate, WcfrelayAuthoUpdate + self.command_table['relay wcfrelay authorization-rule create'] = WcfrelayAuthoCreate(loader=self) + self.command_table['relay wcfrelay authorization-rule update'] = WcfrelayAuthoUpdate(loader=self) + + # Hybrid Connections Region + with self.command_group('relay hyco'): + from azure.cli.command_modules.relay.custom import HycoUpdate + self.command_table['relay hyco update'] = HycoUpdate(loader=self) + + with self.command_group('relay hyco authorization-rule'): + from azure.cli.command_modules.relay.custom import HycoAuthoCreate, HycoAuthoUpdate + self.command_table['relay hyco authorization-rule create'] = HycoAuthoCreate(loader=self) + self.command_table['relay hyco authorization-rule update'] = HycoAuthoUpdate(loader=self) diff --git a/src/azure-cli/azure/cli/command_modules/relay/custom.py b/src/azure-cli/azure/cli/command_modules/relay/custom.py index f7c4c624f5b..a8310e0f57c 100644 --- a/src/azure-cli/azure/cli/command_modules/relay/custom.py +++ b/src/azure-cli/azure/cli/command_modules/relay/custom.py @@ -2,136 +2,88 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +from .aaz.latest.relay.hyco import Update as _HycoUpdate +from .aaz.latest.relay.hyco.authorization_rule import Create as _HycoAuthoCreate, Update as _HycoAuthoUpdate +from .aaz.latest.relay.namespace.authorization_rule import Create as _NamespaceAuthoCreate +from .aaz.latest.relay.wcfrelay import Update as _WcfrelayUpdate +from .aaz.latest.relay.wcfrelay.authorization_rule import Create as _WcfrelayAuthoCreate, Update as _WcfrelayAuthoUpdate + # pylint: disable=line-too-long # pylint: disable=too-many-lines # pylint: disable=inconsistent-return-statements # pylint: disable=unused-variable +# pylint: disable=protected-access -# Namespace Region -def cli_namespace_create(client, resource_group_name, namespace_name, location=None, tags=None): - from azure.mgmt.relay.models import RelayNamespace - return client.create_or_update( - resource_group_name=resource_group_name, - namespace_name=namespace_name, - parameters=RelayNamespace( - location, - tags) - ) - - -def cli_namespace_update(instance, tags=None): - - if tags is not None: - instance.tags = tags - - return instance - - -def cli_namespace_list(client, resource_group_name=None): - if resource_group_name: - return client.list_by_resource_group(resource_group_name=resource_group_name) - - return client.list() - - -# Namespace Authorization rule: -def cli_namespaceautho_create(client, resource_group_name, namespace_name, name, access_rights=None): - from azure.cli.command_modules.relay._utils import accessrights_converter - return client.create_or_update_authorization_rule( - resource_group_name=resource_group_name, - namespace_name=namespace_name, - authorization_rule_name=name, - rights=accessrights_converter(access_rights) - ) - - -# Namespace Authorization rule: -def cli_namespaceautho_update(instance, rights): - from azure.cli.command_modules.relay._utils import accessrights_converter - instance.rights = accessrights_converter(rights) - return instance - - -# WCF Relay Region -def cli_wcfrelay_create(client, resource_group_name, namespace_name, relay_name, relay_type, - requires_client_authorization=None, requires_transport_security=None, user_metadata=None): - - from azure.mgmt.relay.models import WcfRelay, Relaytype - - if relay_type is None: - set_relay_type = Relaytype.net_tcp - elif relay_type == "Http": - set_relay_type = Relaytype.http - else: - set_relay_type = Relaytype.net_tcp - - wcfrelay_params = WcfRelay( - relay_type=set_relay_type, - requires_client_authorization=requires_client_authorization, - requires_transport_security=requires_transport_security, - user_metadata=user_metadata - ) - - return client.create_or_update( - resource_group_name=resource_group_name, - namespace_name=namespace_name, - relay_name=relay_name, - parameters=wcfrelay_params) - - -def cli_wcfrelay_update(instance, relay_type=None, user_metadata=None, status=None): +class NamespaceAuthoCreate(_NamespaceAuthoCreate): - from azure.mgmt.relay.models import WcfRelay - returnobj = WcfRelay(relay_type=instance.relay_type, - requires_client_authorization=instance.requires_client_authorization, - requires_transport_security=instance.requires_transport_security, - user_metadata=instance.user_metadata) + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.rights._required = False + return args_schema - if relay_type: - returnobj.relay_type = relay_type - if user_metadata: - returnobj.user_metadata = user_metadata +class WcfrelayAuthoCreate(_WcfrelayAuthoCreate): - if status: - returnobj.status = status + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.rights._required = False + return args_schema - return returnobj +class WcfrelayAuthoUpdate(_WcfrelayAuthoUpdate): -# Hybrid Connection Region -def cli_hyco_create(client, resource_group_name, namespace_name, hybrid_connection_name, - requires_client_authorization=None, user_metadata=None): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.rights._required = True + return args_schema - return client.create_or_update( - resource_group_name=resource_group_name, - namespace_name=namespace_name, - hybrid_connection_name=hybrid_connection_name, - requires_client_authorization=requires_client_authorization, user_metadata=user_metadata) +class HycoAuthoCreate(_HycoAuthoCreate): -def cli_hyco_update(instance, requires_client_authorization=None, status=None, user_metadata=None): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.rights._required = False + return args_schema - from azure.mgmt.relay.models import HybridConnection - hyco_params = HybridConnection(requires_client_authorization=instance.requires_client_authorization, - user_metadata=instance.user_metadata) - if requires_client_authorization: - hyco_params.requires_client_authorization = requires_client_authorization +class HycoAuthoUpdate(_HycoAuthoUpdate): - if status: - hyco_params.status = status + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.rights._required = True + return args_schema - if user_metadata: - hyco_params.user_metadata = user_metadata - return hyco_params +class WcfrelayUpdate(_WcfrelayUpdate): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.status = AAZStrArg( + options=["--status"], + help="Enumerates the possible values for the status of a messaging entity.", + enum={"Active": "Active", "Disabled": "Disabled", "ReceiveDisabled": "ReceiveDisabled", "SendDisabled": "SendDisabled"}, + nullable=True + ) + return args_schema -def empty_on_404(ex): - from azure.mgmt.relay.models import ErrorResponseException - if isinstance(ex, ErrorResponseException) and ex.response.status_code == 404: - return None - raise ex +class HycoUpdate(_HycoUpdate): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.status = AAZStrArg( + options=["--status"], + help="Enumerates the possible values for the status of a messaging entity.", + enum={"Active": "Active", "Disabled": "Disabled", "ReceiveDisabled": "ReceiveDisabled", "SendDisabled": "SendDisabled"}, + nullable=True + ) + return args_schema diff --git a/src/azure-cli/azure/cli/command_modules/relay/tests/latest/recordings/test_relay_hyco.yaml b/src/azure-cli/azure/cli/command_modules/relay/tests/latest/recordings/test_relay_hyco.yaml index ed1e59c79ef..1b2d9c7f4a4 100644 --- a/src/azure-cli/azure/cli/command_modules/relay/tests/latest/recordings/test_relay_hyco.yaml +++ b/src/azure-cli/azure/cli/command_modules/relay/tests/latest/recordings/test_relay_hyco.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"location": "westus2", "tags": {"{tag1": "value1,", "tag2": "value2}"}}' + body: '{"location": "westus2", "tags": {"tag1": "value1tag2=value2"}}' headers: Accept: - application/json @@ -11,40 +11,37 @@ interactions: Connection: - keep-alive Content-Length: - - '72' + - '62' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --name --location --tags User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag1":"value1,","tag2":"value2}"},"properties":{"provisioningState":"Created","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscli000002","createdAt":"2019-07-09T23:30:39.813Z","updatedAt":"2019-07-09T23:30:39.813Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' + US 2","tags":{"tag1":"value1tag2=value2"},"properties":{"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:52.943Z","updatedAt":"2023-08-22T11:31:52.943Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' headers: cache-control: - no-cache content-length: - - '682' + - '612' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:30:39 GMT + - Tue, 22 Aug 2023 11:31:54 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -53,8 +50,8 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' + x-ms-ratelimit-remaining-subscription-resource-requests: + - '49' status: code: 200 message: OK @@ -62,46 +59,41 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - relay namespace create Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --name --location --tags User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag1":"value1,","tag2":"value2}"},"properties":{"provisioningState":"Created","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscli000002","createdAt":"2019-07-09T23:30:39.813Z","updatedAt":"2019-07-09T23:30:39.813Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' + US 2","tags":{"tag1":"value1tag2=value2"},"properties":{"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:52.943Z","updatedAt":"2023-08-22T11:31:52.943Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' headers: cache-control: - no-cache content-length: - - '682' + - '612' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:31:10 GMT + - Tue, 22 Aug 2023 11:31:54 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -117,46 +109,91 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - relay namespace create Connection: - keep-alive - Content-Type: + ParameterSetName: + - --resource-group --name --location --tags + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 + response: + body: + string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West + US 2","tags":{"tag1":"value1tag2=value2"},"properties":{"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:52.943Z","updatedAt":"2023-08-22T11:31:52.943Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' + headers: + cache-control: + - no-cache + content-length: + - '612' + content-type: - application/json; charset=utf-8 + date: + - Tue, 22 Aug 2023 11:32:24 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Service-Bus-Resource-Provider/DM2 + - Microsoft-HTTPAPI/2.0 + server-sb: + - Service-Bus-Resource-Provider/DM2 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - relay namespace create + Connection: + - keep-alive ParameterSetName: - --resource-group --name --location --tags User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag1":"value1,","tag2":"value2}"},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscli000002","createdAt":"2019-07-09T23:30:39.813Z","updatedAt":"2019-07-09T23:31:23.33Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}' + US 2","tags":{"tag1":"value1tag2=value2"},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:52.943Z","updatedAt":"2023-08-22T11:32:36.417Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}' headers: cache-control: - no-cache content-length: - - '679' + - '610' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:31:40 GMT + - Tue, 22 Aug 2023 11:32:55 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -179,39 +216,34 @@ interactions: - relay namespace show Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag1":"value1,","tag2":"value2}"},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscli000002","createdAt":"2019-07-09T23:30:39.813Z","updatedAt":"2019-07-09T23:31:23.33Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}' + US 2","tags":{"tag1":"value1tag2=value2"},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:52.943Z","updatedAt":"2023-08-22T11:32:36.417Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}' headers: cache-control: - no-cache content-length: - - '679' + - '610' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:31:40 GMT + - Tue, 22 Aug 2023 11:32:58 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -237,38 +269,31 @@ interactions: Content-Length: - '2' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --namespace-name --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004","name":"relay-hycocli000004","type":"Microsoft.Relay/Namespaces/HybridConnections","location":"West - US 2","properties":{"createdAt":"2019-07-09T23:31:43.5869033Z","updatedAt":"2019-07-09T23:31:43.5869033Z","listenerCount":0,"requiresClientAuthorization":true}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridconnections/relay-hycocli000004","name":"relay-hycocli000004","type":"Microsoft.Relay/namespaces/hybridconnections","location":"westus2","properties":{"createdAt":"2023-08-22T11:33:01.1058103Z","updatedAt":"2023-08-22T11:33:01.1058103Z","listenerCount":0,"requiresClientAuthorization":true}}' headers: cache-control: - no-cache content-length: - - '519' + - '452' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:31:43 GMT + - Tue, 22 Aug 2023 11:33:00 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -293,39 +318,30 @@ interactions: - relay hyco show Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004","name":"relay-hycocli000004","type":"Microsoft.Relay/Namespaces/HybridConnections","location":"West - US 2","properties":{"createdAt":"2019-07-09T23:31:43.5869033Z","updatedAt":"2019-07-09T23:31:43.5869033Z","listenerCount":0,"requiresClientAuthorization":true}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridconnections/relay-hycocli000004","name":"relay-hycocli000004","type":"Microsoft.Relay/namespaces/hybridconnections","location":"westus2","properties":{"createdAt":"2023-08-22T11:33:01.1058103Z","updatedAt":"2023-08-22T11:33:01.1058103Z","listenerCount":0,"requiresClientAuthorization":true}}' headers: cache-control: - no-cache content-length: - - '519' + - '452' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:31:44 GMT + - Tue, 22 Aug 2023 11:33:02 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -348,39 +364,30 @@ interactions: - relay hyco update Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004","name":"relay-hycocli000004","type":"Microsoft.Relay/Namespaces/HybridConnections","location":"West - US 2","properties":{"createdAt":"2019-07-09T23:31:43.5869033Z","updatedAt":"2019-07-09T23:31:43.5869033Z","listenerCount":0,"requiresClientAuthorization":true}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridconnections/relay-hycocli000004","name":"relay-hycocli000004","type":"Microsoft.Relay/namespaces/hybridconnections","location":"westus2","properties":{"createdAt":"2023-08-22T11:33:01.1058103Z","updatedAt":"2023-08-22T11:33:01.1058103Z","listenerCount":0,"requiresClientAuthorization":true}}' headers: cache-control: - no-cache content-length: - - '519' + - '452' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:31:45 GMT + - Tue, 22 Aug 2023 11:33:04 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -393,7 +400,7 @@ interactions: code: 200 message: OK - request: - body: '{}' + body: '{"properties": {"requiresClientAuthorization": true}}' headers: Accept: - application/json @@ -404,40 +411,33 @@ interactions: Connection: - keep-alive Content-Length: - - '2' + - '53' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --namespace-name --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004","name":"relay-hycocli000004","type":"Microsoft.Relay/Namespaces/HybridConnections","location":"West - US 2","properties":{"createdAt":"0001-01-01T00:00:00","updatedAt":"0001-01-01T00:00:00","listenerCount":0,"requiresClientAuthorization":true}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridconnections/relay-hycocli000004","name":"relay-hycocli000004","type":"Microsoft.Relay/namespaces/hybridconnections","location":"westus2","properties":{"createdAt":"2023-08-22T11:33:01.1058103Z","updatedAt":"2023-08-22T11:33:01.1058103Z","listenerCount":0,"requiresClientAuthorization":true}}' headers: cache-control: - no-cache content-length: - - '501' + - '452' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:31:46 GMT + - Tue, 22 Aug 2023 11:33:04 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -447,7 +447,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -462,39 +462,30 @@ interactions: - relay hyco list Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections?api-version=2017-04-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004","name":"relay-hycocli000004","type":"Microsoft.Relay/Namespaces/HybridConnections","location":"West - US 2","properties":{"createdAt":"2019-07-09T23:31:43.5869033Z","updatedAt":"2019-07-09T23:31:46.5610622Z","listenerCount":0,"requiresClientAuthorization":true}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridconnections/relay-hycocli000004","name":"relay-hycocli000004","type":"Microsoft.Relay/namespaces/hybridconnections","location":"westus2","properties":{"createdAt":"2023-08-22T11:33:01.1058103Z","updatedAt":"2023-08-22T11:33:01.1058103Z","listenerCount":0,"requiresClientAuthorization":true}}]}' headers: cache-control: - no-cache content-length: - - '531' + - '464' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:31:48 GMT + - Tue, 22 Aug 2023 11:33:06 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -522,38 +513,31 @@ interactions: Content-Length: - '38' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --namespace-name --hybrid-connection-name --name --rights User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004/authorizationRules/cliAutho000003?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/Namespaces/HybridConnections/AuthorizationRules","location":"West - US 2","properties":{"rights":["Listen"]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/namespaces/hybridconnections/authorizationrules","properties":{"rights":["Listen"]}}' headers: cache-control: - no-cache content-length: - - '454' + - '360' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:31:49 GMT + - Tue, 22 Aug 2023 11:33:07 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -563,7 +547,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1198' status: code: 200 message: OK @@ -578,39 +562,30 @@ interactions: - relay hyco authorization-rule show Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --hybrid-connection-name --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004/authorizationRules/cliAutho000003?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/Namespaces/HybridConnections/AuthorizationRules","location":"West - US 2","properties":{"rights":["Listen"]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridconnections/relay-hycocli000004/authorizationrules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/namespaces/hybridconnections/authorizationrules","location":"westus2","properties":{"rights":["Listen"]}}' headers: cache-control: - no-cache content-length: - - '454' + - '381' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:31:49 GMT + - Tue, 22 Aug 2023 11:33:08 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -633,39 +608,30 @@ interactions: - relay hyco authorization-rule update Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --hybrid-connection-name --name --rights User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004/authorizationRules/cliAutho000003?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/Namespaces/HybridConnections/AuthorizationRules","location":"West - US 2","properties":{"rights":["Listen"]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridconnections/relay-hycocli000004/authorizationrules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/namespaces/hybridconnections/authorizationrules","location":"westus2","properties":{"rights":["Listen"]}}' headers: cache-control: - no-cache content-length: - - '454' + - '381' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:31:50 GMT + - Tue, 22 Aug 2023 11:33:09 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -691,38 +657,31 @@ interactions: Content-Length: - '36' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --namespace-name --hybrid-connection-name --name --rights User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004/authorizationRules/cliAutho000003?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/Namespaces/HybridConnections/AuthorizationRules","location":"West - US 2","properties":{"rights":["Send"]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/namespaces/hybridconnections/authorizationrules","properties":{"rights":["Send"]}}' headers: cache-control: - no-cache content-length: - - '452' + - '358' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:31:50 GMT + - Tue, 22 Aug 2023 11:33:10 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -732,7 +691,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -749,38 +708,30 @@ interactions: - keep-alive Content-Length: - '0' - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --hybrid-connection-name --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004/authorizationRules/cliAutho000003/listKeys?api-version=2017-04-01 response: body: - string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=RR1Q0/RZCsLz3cXg/+esqGANG1MvZQXm59JUogJ1F9E=;EntityPath=relay-hycocli000004","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=CAGc19fIGLhzEgooexnJZFg5foh7ZQjR34Td7V/YZdU=;EntityPath=relay-hycocli000004","primaryKey":"RR1Q0/RZCsLz3cXg/+esqGANG1MvZQXm59JUogJ1F9E=","secondaryKey":"CAGc19fIGLhzEgooexnJZFg5foh7ZQjR34Td7V/YZdU=","keyName":"cliAutho000003"}' + string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=/HJLY3fDuujbWC3s0j01vuYrJCevPC1Pn+ARmJM89MU=;EntityPath=relay-hycocli000004","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=8otSeUlukxbDsylqStEXvJFoD2MtoFQiR+ARmKKLLSo=;EntityPath=relay-hycocli000004","primaryKey":"/HJLY3fDuujbWC3s0j01vuYrJCevPC1Pn+ARmJM89MU=","secondaryKey":"8otSeUlukxbDsylqStEXvJFoD2MtoFQiR+ARmKKLLSo=","keyName":"cliAutho000003"}' headers: cache-control: - no-cache content-length: - - '610' + - '574' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:31:51 GMT + - Tue, 22 Aug 2023 11:33:11 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -808,37 +759,31 @@ interactions: Content-Length: - '25' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --namespace-name --hybrid-connection-name --name --key User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004/authorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 response: body: - string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=dwDp7feO4JwghL3Yl57QX+mrDO5h/O7LE+R8FEoFaeA=;EntityPath=relay-hycocli000004","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=CAGc19fIGLhzEgooexnJZFg5foh7ZQjR34Td7V/YZdU=;EntityPath=relay-hycocli000004","primaryKey":"dwDp7feO4JwghL3Yl57QX+mrDO5h/O7LE+R8FEoFaeA=","secondaryKey":"CAGc19fIGLhzEgooexnJZFg5foh7ZQjR34Td7V/YZdU=","keyName":"cliAutho000003"}' + string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=wNTwanabQg9wEmeI+mPT0JNWWzsu5zqss+ARmLZYhB8=;EntityPath=relay-hycocli000004","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=8otSeUlukxbDsylqStEXvJFoD2MtoFQiR+ARmKKLLSo=;EntityPath=relay-hycocli000004","primaryKey":"wNTwanabQg9wEmeI+mPT0JNWWzsu5zqss+ARmLZYhB8=","secondaryKey":"8otSeUlukxbDsylqStEXvJFoD2MtoFQiR+ARmKKLLSo=","keyName":"cliAutho000003"}' headers: cache-control: - no-cache content-length: - - '610' + - '574' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:31:53 GMT + - Tue, 22 Aug 2023 11:33:12 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -866,37 +811,31 @@ interactions: Content-Length: - '27' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --namespace-name --hybrid-connection-name --name --key User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004/authorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 response: body: - string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=dwDp7feO4JwghL3Yl57QX+mrDO5h/O7LE+R8FEoFaeA=;EntityPath=relay-hycocli000004","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=FinYCY/QyJIJrN4LTNTH4yLZOy6todKzFpuZDe/TRJQ=;EntityPath=relay-hycocli000004","primaryKey":"dwDp7feO4JwghL3Yl57QX+mrDO5h/O7LE+R8FEoFaeA=","secondaryKey":"FinYCY/QyJIJrN4LTNTH4yLZOy6todKzFpuZDe/TRJQ=","keyName":"cliAutho000003"}' + string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=wNTwanabQg9wEmeI+mPT0JNWWzsu5zqss+ARmLZYhB8=;EntityPath=relay-hycocli000004","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=MdHhPdMhZqEWUMdkzmbdT8zv7S5Fpqw3g+ARmCqG82c=;EntityPath=relay-hycocli000004","primaryKey":"wNTwanabQg9wEmeI+mPT0JNWWzsu5zqss+ARmLZYhB8=","secondaryKey":"MdHhPdMhZqEWUMdkzmbdT8zv7S5Fpqw3g+ARmCqG82c=","keyName":"cliAutho000003"}' headers: cache-control: - no-cache content-length: - - '610' + - '574' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:31:53 GMT + - Tue, 22 Aug 2023 11:33:13 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -914,7 +853,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -923,15 +862,10 @@ interactions: - keep-alive Content-Length: - '0' - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --hybrid-connection-name --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004/authorizationRules/cliAutho000003?api-version=2017-04-01 response: @@ -943,16 +877,13 @@ interactions: content-length: - '0' date: - - Tue, 09 Jul 2019 23:31:55 GMT + - Tue, 22 Aug 2023 11:33:14 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: @@ -966,7 +897,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -975,15 +906,10 @@ interactions: - keep-alive Content-Length: - '0' - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/hybridConnections/relay-hycocli000004?api-version=2017-04-01 response: @@ -995,16 +921,13 @@ interactions: content-length: - '0' date: - - Tue, 09 Jul 2019 23:31:56 GMT + - Tue, 22 Aug 2023 11:33:15 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: @@ -1018,7 +941,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1027,15 +950,10 @@ interactions: - keep-alive Content-Length: - '0' - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 response: @@ -1047,7 +965,7 @@ interactions: content-length: - '0' date: - - Tue, 09 Jul 2019 23:31:56 GMT + - Tue, 22 Aug 2023 11:33:16 GMT expires: - '-1' location: @@ -1055,10 +973,10 @@ interactions: pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: @@ -1072,22 +990,65 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - relay namespace delete Connection: - keep-alive - Content-Type: + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/operationresults/relay-nscli000002?api-version=2017-04-01 + response: + body: + string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West + US 2","tags":{"tag1":"value1tag2=value2"},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:52.943Z","updatedAt":"2023-08-22T11:33:17.28Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Removing"}}' + headers: + cache-control: + - no-cache + content-length: + - '611' + content-type: - application/json; charset=utf-8 + date: + - Tue, 22 Aug 2023 11:33:17 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/operationresults/relay-nscli000002?api-version=2017-04-01 + pragma: + - no-cache + server: + - Service-Bus-Resource-Provider/CH3 + - Microsoft-HTTPAPI/2.0 + server-sb: + - Service-Bus-Resource-Provider/CH3 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - relay namespace delete + Connection: + - keep-alive ParameterSetName: - --resource-group --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hyco000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/operationresults/relay-nscli000002?api-version=2017-04-01 response: @@ -1099,16 +1060,16 @@ interactions: content-length: - '0' date: - - Tue, 09 Jul 2019 23:32:27 GMT + - Tue, 22 Aug 2023 11:34:03 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: diff --git a/src/azure-cli/azure/cli/command_modules/relay/tests/latest/recordings/test_relay_namespace.yaml b/src/azure-cli/azure/cli/command_modules/relay/tests/latest/recordings/test_relay_namespace.yaml index c8cdb1212da..869b4c85631 100644 --- a/src/azure-cli/azure/cli/command_modules/relay/tests/latest/recordings/test_relay_namespace.yaml +++ b/src/azure-cli/azure/cli/command_modules/relay/tests/latest/recordings/test_relay_namespace.yaml @@ -11,16 +11,13 @@ interactions: Connection: - keep-alive Content-Length: - - '32' + - '29' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Relay/checkNameAvailability?api-version=2017-04-01 response: @@ -34,16 +31,16 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:32:32 GMT + - Tue, 22 Aug 2023 11:31:48 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -58,7 +55,7 @@ interactions: code: 200 message: OK - request: - body: '{"location": "westus2", "tags": {"{tag1": "value1}"}}' + body: '{"location": "westus2", "tags": {"tag1": "value1"}}' headers: Accept: - application/json @@ -69,40 +66,37 @@ interactions: Connection: - keep-alive Content-Length: - - '53' + - '51' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --name --location --tags User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag1":"value1}"},"properties":{"provisioningState":"Created","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscli000002","createdAt":"2019-07-09T23:32:35.8Z","updatedAt":"2019-07-09T23:32:35.8Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' + US 2","tags":{"tag1":"value1"},"properties":{"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:55.637Z","updatedAt":"2023-08-22T11:31:55.637Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' headers: cache-control: - no-cache content-length: - - '661' + - '606' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:32:35 GMT + - Tue, 22 Aug 2023 11:31:56 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -111,8 +105,8 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' + x-ms-ratelimit-remaining-subscription-resource-requests: + - '49' status: code: 200 message: OK @@ -120,46 +114,41 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - relay namespace create Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --name --location --tags User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag1":"value1}"},"properties":{"provisioningState":"Created","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscli000002","createdAt":"2019-07-09T23:32:35.8Z","updatedAt":"2019-07-09T23:32:35.8Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' + US 2","tags":{"tag1":"value1"},"properties":{"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:55.637Z","updatedAt":"2023-08-22T11:31:55.637Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' headers: cache-control: - no-cache content-length: - - '661' + - '606' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:33:05 GMT + - Tue, 22 Aug 2023 11:31:56 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -175,46 +164,91 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - relay namespace create Connection: - keep-alive - Content-Type: + ParameterSetName: + - --resource-group --name --location --tags + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 + response: + body: + string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West + US 2","tags":{"tag1":"value1"},"properties":{"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:55.637Z","updatedAt":"2023-08-22T11:31:55.637Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' + headers: + cache-control: + - no-cache + content-length: + - '606' + content-type: - application/json; charset=utf-8 + date: + - Tue, 22 Aug 2023 11:32:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Service-Bus-Resource-Provider/DM2 + - Microsoft-HTTPAPI/2.0 + server-sb: + - Service-Bus-Resource-Provider/DM2 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - relay namespace create + Connection: + - keep-alive ParameterSetName: - --resource-group --name --location --tags User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag1":"value1}"},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscli000002","createdAt":"2019-07-09T23:32:35.8Z","updatedAt":"2019-07-09T23:33:19.847Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}' + US 2","tags":{"tag1":"value1"},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:55.637Z","updatedAt":"2023-08-22T11:32:40.737Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}' headers: cache-control: - no-cache content-length: - - '661' + - '604' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:33:36 GMT + - Tue, 22 Aug 2023 11:32:58 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -237,30 +271,25 @@ interactions: - relay namespace show Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag1":"value1}"},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscli000002","createdAt":"2019-07-09T23:32:35.8Z","updatedAt":"2019-07-09T23:33:19.847Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}' + US 2","tags":{"tag1":"value1"},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:55.637Z","updatedAt":"2023-08-22T11:32:40.737Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}' headers: cache-control: - no-cache content-length: - - '661' + - '604' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:33:37 GMT + - Tue, 22 Aug 2023 11:32:59 GMT expires: - '-1' pragma: @@ -292,39 +321,34 @@ interactions: - relay namespace update Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --name --tags User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag1":"value1}"},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscli000002","createdAt":"2019-07-09T23:32:35.8Z","updatedAt":"2019-07-09T23:33:19.847Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}' + US 2","tags":{"tag1":"value1"},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:55.637Z","updatedAt":"2023-08-22T11:32:40.737Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}' headers: cache-control: - no-cache content-length: - - '661' + - '604' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:33:37 GMT + - Tue, 22 Aug 2023 11:33:01 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -337,8 +361,8 @@ interactions: code: 200 message: OK - request: - body: '{"location": "West US 2", "tags": {"{tag1": "value1}"}, "sku": {"name": - "Standard", "tier": "Standard"}}' + body: '{"location": "West US 2", "properties": {}, "sku": {"name": "Standard", + "tier": "Standard"}, "tags": {"tag1": "value1"}}' headers: Accept: - application/json @@ -349,40 +373,37 @@ interactions: Connection: - keep-alive Content-Length: - - '104' + - '120' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --name --tags User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag1":"value1}"},"properties":{"provisioningState":"Updating","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscli000002","createdAt":"2019-07-09T23:32:35.8Z","updatedAt":"2019-07-09T23:33:38.28Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' + US 2","tags":{"tag1":"value1"},"properties":{"provisioningState":"Updating","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:55.637Z","updatedAt":"2023-08-22T11:33:02.51Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' headers: cache-control: - no-cache content-length: - - '663' + - '606' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:33:38 GMT + - Tue, 22 Aug 2023 11:33:02 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -391,8 +412,8 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1197' + x-ms-ratelimit-remaining-subscription-resource-requests: + - '49' status: code: 200 message: OK @@ -400,46 +421,91 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - relay namespace update Connection: - keep-alive - Content-Type: + ParameterSetName: + - --resource-group --name --tags + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 + response: + body: + string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West + US 2","tags":{"tag1":"value1"},"properties":{"provisioningState":"Updating","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:55.637Z","updatedAt":"2023-08-22T11:33:02.51Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' + headers: + cache-control: + - no-cache + content-length: + - '606' + content-type: - application/json; charset=utf-8 + date: + - Tue, 22 Aug 2023 11:33:02 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Service-Bus-Resource-Provider/CH3 + - Microsoft-HTTPAPI/2.0 + server-sb: + - Service-Bus-Resource-Provider/CH3 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - relay namespace update + Connection: + - keep-alive ParameterSetName: - --resource-group --name --tags User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag1":"value1}"},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscli000002","createdAt":"2019-07-09T23:32:35.8Z","updatedAt":"2019-07-09T23:33:39.213Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}' + US 2","tags":{"tag1":"value1"},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:55.637Z","updatedAt":"2023-08-22T11:33:06.44Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}' headers: cache-control: - no-cache content-length: - - '661' + - '603' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:34:08 GMT + - Tue, 22 Aug 2023 11:33:33 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -462,53 +528,34 @@ interactions: - relay namespace list Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Relay/namespaces?api-version=2017-04-01 response: body: - string: '{"value":[{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-ServiceBus-CentralUSEUAP/providers/Microsoft.Relay/namespaces/testvinsurelay2","name":"testvinsurelay2","type":"Microsoft.Relay/Namespaces","location":"Central - US EUAP","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:testvinsurelay2","createdAt":"2018-08-16T00:06:52.663Z","updatedAt":"2018-08-16T00:07:15.567Z","serviceBusEndpoint":"https://testvinsurelay2.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RelayAspNetCoreUnitTest/providers/Microsoft.Relay/namespaces/RelayAspNetCoreUnitTest","name":"RelayAspNetCoreUnitTest","type":"Microsoft.Relay/Namespaces","location":"West - Central US","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relayaspnetcoreunittest","createdAt":"2018-05-22T08:09:21.853Z","updatedAt":"2019-05-24T08:45:10.163Z","serviceBusEndpoint":"https://RelayAspNetCoreUnitTest.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dstucki-rg-eastasia/providers/Microsoft.Relay/namespaces/dstucki-relay-eastasia","name":"dstucki-relay-eastasia","type":"Microsoft.Relay/Namespaces","location":"East - Asia","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:dstucki-relay-eastasia","createdAt":"2018-08-15T01:09:37.59Z","updatedAt":"2018-08-15T01:10:03.457Z","serviceBusEndpoint":"https://dstucki-relay-eastasia.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-ServiceBus-AustraliaEast/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-2215","name":"sdk-RelayNamespace-2215","type":"Microsoft.Relay/Namespaces","location":"Australia - East","tags":{"tag1":"value1","tag2":"value2"},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:sdk-relaynamespace-2215","createdAt":"2019-07-01T18:00:07.703Z","updatedAt":"2019-07-01T18:00:51.537Z","serviceBusEndpoint":"https://sdk-RelayNamespace-2215.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/relayrg/providers/Microsoft.Relay/namespaces/onemorerelay","name":"onemorerelay","type":"Microsoft.Relay/Namespaces","location":"North - Central US","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:onemorerelay","createdAt":"2016-10-18T20:55:59.42Z","updatedAt":"2019-04-02T19:52:48.99Z","serviceBusEndpoint":"https://onemorerelay.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testvinsucentralus/providers/Microsoft.Relay/namespaces/testrelay815","name":"testrelay815","type":"Microsoft.Relay/Namespaces","location":"Central - US","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:testrelay815","createdAt":"2018-08-15T22:55:37.28Z","updatedAt":"2019-05-24T07:38:15.113Z","serviceBusEndpoint":"https://testrelay815.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-ServiceBus-CentralUS/providers/Microsoft.Relay/namespaces/testrelay2vinsu815","name":"testrelay2vinsu815","type":"Microsoft.Relay/Namespaces","location":"Central - US","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:testrelay2vinsu815","createdAt":"2018-08-16T04:07:19.137Z","updatedAt":"2018-08-16T04:21:43.64Z","serviceBusEndpoint":"https://testrelay2vinsu815.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-service-bus-brian-liu/providers/Microsoft.Relay/namespaces/bailiu-relay-test","name":"bailiu-relay-test","type":"Microsoft.Relay/Namespaces","location":"UK - West","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:bailiu-relay-test","createdAt":"2018-10-05T20:38:36.047Z","updatedAt":"2018-10-05T20:38:59.96Z","serviceBusEndpoint":"https://bailiu-relay-test.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/v-ajnavtest/providers/Microsoft.Relay/namespaces/testingrelayns","name":"testingrelayns","type":"Microsoft.Relay/Namespaces","location":"East - US","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:testingrelayns","createdAt":"2019-07-08T21:14:01.727Z","updatedAt":"2019-07-08T21:14:43.843Z","serviceBusEndpoint":"https://testingrelayns.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dstucki-rg-usw/providers/Microsoft.Relay/namespaces/dstucki-relay-usw","name":"dstucki-relay-usw","type":"Microsoft.Relay/Namespaces","location":"West - US","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:dstucki-relay-usw","createdAt":"2018-08-22T16:52:19.507Z","updatedAt":"2018-11-06T17:18:51.427Z","serviceBusEndpoint":"https://dstucki-relay-usw.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-vnet-bailiu/providers/Microsoft.Relay/namespaces/bailiu-test-relay","name":"bailiu-test-relay","type":"Microsoft.Relay/Namespaces","location":"West - US","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:bailiu-test-relay","createdAt":"2018-10-08T22:12:41.663Z","updatedAt":"2018-10-08T22:13:05.6Z","serviceBusEndpoint":"https://bailiu-test-relay.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-service-bus-brian-liu/providers/Microsoft.Relay/namespaces/newNamespaceName","name":"newNamespaceName","type":"Microsoft.Relay/Namespaces","location":"West - US","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:newnamespacename","createdAt":"2019-07-05T20:21:32.317Z","updatedAt":"2019-07-05T20:22:17.367Z","serviceBusEndpoint":"https://newNamespaceName.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dstucki-rg-eastasia/providers/Microsoft.Relay/namespaces/dstucki-relay-ausse","name":"dstucki-relay-ausse","type":"Microsoft.Relay/Namespaces","location":"Australia - Southeast","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:dstucki-relay-ausse","createdAt":"2018-08-20T17:07:03.767Z","updatedAt":"2018-11-06T17:31:43.123Z","serviceBusEndpoint":"https://dstucki-relay-ausse.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dstucki-rg-usw/providers/Microsoft.Relay/namespaces/dstucki-relay-usw2","name":"dstucki-relay-usw2","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:dstucki-relay-usw2","createdAt":"2018-05-03T21:37:27.297Z","updatedAt":"2018-11-06T17:26:42.293Z","serviceBusEndpoint":"https://dstucki-relay-usw2.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testvinsusouthcentral/providers/Microsoft.Relay/namespaces/testvinsurelay815","name":"testvinsurelay815","type":"Microsoft.Relay/Namespaces","location":"South - Central US","tags":{},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:testvinsurelay815","createdAt":"2018-08-15T23:12:03.507Z","updatedAt":"2018-08-15T23:12:26.83Z","serviceBusEndpoint":"https://testvinsurelay815.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hycoylgr5ezup3cyhvvfa7hip2ya6n5hge7o4lquuhwlql46v7aswj33kgdy/providers/Microsoft.Relay/namespaces/relay-nscliy7qxhazfc","name":"relay-nscliy7qxhazfc","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag2":"value2,","tag1":"value1}"},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscliy7qxhazfc","createdAt":"2019-07-09T23:23:02.723Z","updatedAt":"2019-07-09T23:23:45.747Z","serviceBusEndpoint":"https://relay-nscliy7qxhazfc.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag1":"value1}"},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscli000002","createdAt":"2019-07-09T23:32:35.8Z","updatedAt":"2019-07-09T23:33:39.213Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}]}' + string: '{"value":[{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_hycobsgqd4icxkhg5t2pkyjxcflcta5g76hxly63b7awc7vivulwr5qlcxns/providers/Microsoft.Relay/namespaces/relay-nsclinw4utlgur","name":"relay-nsclinw4utlgur","type":"Microsoft.Relay/Namespaces","location":"West + US 2","tags":{"tag1":"value1tag2=value2"},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nsclinw4utlgur","createdAt":"2023-08-22T11:31:52.943Z","updatedAt":"2023-08-22T11:33:17.28Z","serviceBusEndpoint":"https://relay-nsclinw4utlgur.servicebus.windows.net:443/","status":"Removing"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelayzonwe4ago5hddojdepuskxxi2zzc5xulx634urwqi4ddo3apd3cb/providers/Microsoft.Relay/namespaces/relay-nsclitia256ezz","name":"relay-nsclitia256ezz","type":"Microsoft.Relay/Namespaces","location":"West + US 2","tags":{"tag1":"value1tag2=value2"},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nsclitia256ezz","createdAt":"2023-08-22T11:31:54.533Z","updatedAt":"2023-08-22T11:32:40.39Z","serviceBusEndpoint":"https://relay-nsclitia256ezz.servicebus.windows.net:443/","status":"Active"}},{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West + US 2","tags":{"tag1":"value1"},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:55.637Z","updatedAt":"2023-08-22T11:33:06.44Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}]}' headers: cache-control: - no-cache content-length: - - '10135' + - '1961' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:34:08 GMT + - Tue, 22 Aug 2023 11:33:34 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -517,6 +564,8 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-inline-count: + - '' status: code: 200 message: OK @@ -531,39 +580,34 @@ interactions: - relay namespace list Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces?api-version=2017-04-01 response: body: string: '{"value":[{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag1":"value1}"},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscli000002","createdAt":"2019-07-09T23:32:35.8Z","updatedAt":"2019-07-09T23:33:39.213Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}]}' + US 2","tags":{"tag1":"value1"},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:55.637Z","updatedAt":"2023-08-22T11:33:06.44Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}]}' headers: cache-control: - no-cache content-length: - - '673' + - '615' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:34:08 GMT + - Tue, 22 Aug 2023 11:33:35 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -589,38 +633,31 @@ interactions: Content-Length: - '36' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --namespace-name --name --rights User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/authorizationRules/cliAutho000003?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/Namespaces/AuthorizationRules","location":"West - US 2","properties":{"rights":["Send"]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/Namespaces/AuthorizationRules","location":"westus2","properties":{"rights":["Send"]}}' headers: cache-control: - no-cache content-length: - - '390' + - '328' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:34:26 GMT + - Tue, 22 Aug 2023 11:33:42 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -630,7 +667,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -645,39 +682,30 @@ interactions: - relay namespace authorization-rule show Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/authorizationRules/cliAutho000003?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/Namespaces/AuthorizationRules","location":"West - US 2","properties":{"rights":["Send"]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/authorizationrules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/Namespaces/AuthorizationRules","location":"westus2","properties":{"rights":["Send"]}}' headers: cache-control: - no-cache content-length: - - '390' + - '328' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:34:27 GMT + - Tue, 22 Aug 2023 11:33:43 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -703,38 +731,31 @@ interactions: Content-Length: - '38' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --namespace-name --name --rights User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/authorizationRules/cliAutho000003?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/Namespaces/AuthorizationRules","location":"West - US 2","properties":{"rights":["Listen"]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/Namespaces/AuthorizationRules","location":"westus2","properties":{"rights":["Listen"]}}' headers: cache-control: - no-cache content-length: - - '392' + - '330' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:34:43 GMT + - Tue, 22 Aug 2023 11:33:50 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -744,7 +765,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1197' status: code: 200 message: OK @@ -759,39 +780,30 @@ interactions: - relay namespace authorization-rule show Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/authorizationRules/RootManageSharedAccessKey?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/authorizationRules/RootManageSharedAccessKey","name":"RootManageSharedAccessKey","type":"Microsoft.Relay/Namespaces/AuthorizationRules","location":"West - US 2","properties":{"rights":["Listen","Manage","Send"]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/authorizationrules/RootManageSharedAccessKey","name":"RootManageSharedAccessKey","type":"Microsoft.Relay/Namespaces/AuthorizationRules","location":"westus2","properties":{"rights":["Listen","Manage","Send"]}}' headers: cache-control: - no-cache content-length: - - '418' + - '368' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:34:44 GMT + - Tue, 22 Aug 2023 11:33:51 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -816,38 +828,30 @@ interactions: - keep-alive Content-Length: - '0' - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/authorizationRules/cliAutho000003/listKeys?api-version=2017-04-01 response: body: - string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=Xx/fTebbwWct7HFxL681P/bhvFKVQNLRc8OBiEgCyqs=","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=FJSzG/ZWvOYx2cbAbJrKDFjYA7nbG7U+BT3u/56M0kk=","primaryKey":"Xx/fTebbwWct7HFxL681P/bhvFKVQNLRc8OBiEgCyqs=","secondaryKey":"FJSzG/ZWvOYx2cbAbJrKDFjYA7nbG7U+BT3u/56M0kk=","keyName":"cliAutho000003"}' + string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=4jjIrMg4yK41TX2oottSNl5St0xyN9Wu5+ARmP1jHCg=","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=w2GO3uOhJQHsy2m+Ik6KrVl/oQfffbSK3+ARmCzEOEk=","primaryKey":"4jjIrMg4yK41TX2oottSNl5St0xyN9Wu5+ARmP1jHCg=","secondaryKey":"w2GO3uOhJQHsy2m+Ik6KrVl/oQfffbSK3+ARmCzEOEk=","keyName":"cliAutho000003"}' headers: cache-control: - no-cache content-length: - - '536' + - '512' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:34:45 GMT + - Tue, 22 Aug 2023 11:33:53 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -857,7 +861,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -875,37 +879,31 @@ interactions: Content-Length: - '25' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --namespace-name --name --key User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/authorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 response: body: - string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=/N82d9ncwTB8CQVuaI3Xnu3SEWYonZvN06qxDmGozWU=","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=FJSzG/ZWvOYx2cbAbJrKDFjYA7nbG7U+BT3u/56M0kk=","primaryKey":"/N82d9ncwTB8CQVuaI3Xnu3SEWYonZvN06qxDmGozWU=","secondaryKey":"FJSzG/ZWvOYx2cbAbJrKDFjYA7nbG7U+BT3u/56M0kk=","keyName":"cliAutho000003"}' + string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=AeGNFdVFFPrV+WSBzs90zvqB9BW9fJX89+ARmBPCi8M=","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=w2GO3uOhJQHsy2m+Ik6KrVl/oQfffbSK3+ARmCzEOEk=","primaryKey":"AeGNFdVFFPrV+WSBzs90zvqB9BW9fJX89+ARmBPCi8M=","secondaryKey":"w2GO3uOhJQHsy2m+Ik6KrVl/oQfffbSK3+ARmCzEOEk=","keyName":"cliAutho000003"}' headers: cache-control: - no-cache content-length: - - '536' + - '512' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:35:02 GMT + - Tue, 22 Aug 2023 11:33:59 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -915,7 +913,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -933,37 +931,31 @@ interactions: Content-Length: - '27' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --namespace-name --name --key User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/authorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 response: body: - string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=/N82d9ncwTB8CQVuaI3Xnu3SEWYonZvN06qxDmGozWU=","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=lk81d3e8uCYyJ0XqSoIqA00l3OWaxnqPs0k/BTQMjug=","primaryKey":"/N82d9ncwTB8CQVuaI3Xnu3SEWYonZvN06qxDmGozWU=","secondaryKey":"lk81d3e8uCYyJ0XqSoIqA00l3OWaxnqPs0k/BTQMjug=","keyName":"cliAutho000003"}' + string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=AeGNFdVFFPrV+WSBzs90zvqB9BW9fJX89+ARmBPCi8M=","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=PLImI2+mrGM+V372GRY3YTKUD2B+TM9Bg+ARmJTwQJ4=","primaryKey":"AeGNFdVFFPrV+WSBzs90zvqB9BW9fJX89+ARmBPCi8M=","secondaryKey":"PLImI2+mrGM+V372GRY3YTKUD2B+TM9Bg+ARmJTwQJ4=","keyName":"cliAutho000003"}' headers: cache-control: - no-cache content-length: - - '536' + - '512' content-type: - application/json; charset=utf-8 date: - - Tue, 09 Jul 2019 23:35:18 GMT + - Tue, 22 Aug 2023 11:34:06 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -973,7 +965,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 200 message: OK @@ -981,7 +973,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -990,15 +982,10 @@ interactions: - keep-alive Content-Length: - '0' - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/authorizationRules/cliAutho000003?api-version=2017-04-01 response: @@ -1010,16 +997,13 @@ interactions: content-length: - '0' date: - - Tue, 09 Jul 2019 23:35:35 GMT + - Tue, 22 Aug 2023 11:34:12 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: @@ -1033,7 +1017,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1042,15 +1026,10 @@ interactions: - keep-alive Content-Length: - '0' - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 response: @@ -1062,7 +1041,7 @@ interactions: content-length: - '0' date: - - Tue, 09 Jul 2019 23:35:36 GMT + - Tue, 22 Aug 2023 11:34:15 GMT expires: - '-1' location: @@ -1070,16 +1049,16 @@ interactions: pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14998' status: code: 202 message: Accepted @@ -1087,22 +1066,65 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - relay namespace delete Connection: - keep-alive - Content-Type: + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/operationresults/relay-nscli000002?api-version=2017-04-01 + response: + body: + string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West + US 2","tags":{"tag1":"value1"},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:55.637Z","updatedAt":"2023-08-22T11:34:15.267Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Removing"}}' + headers: + cache-control: + - no-cache + content-length: + - '606' + content-type: - application/json; charset=utf-8 + date: + - Tue, 22 Aug 2023 11:34:16 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/operationresults/relay-nscli000002?api-version=2017-04-01 + pragma: + - no-cache + server: + - Service-Bus-Resource-Provider/DM2 + - Microsoft-HTTPAPI/2.0 + server-sb: + - Service-Bus-Resource-Provider/DM2 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - relay namespace delete + Connection: + - keep-alive ParameterSetName: - --resource-group --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_namespace000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/operationresults/relay-nscli000002?api-version=2017-04-01 response: @@ -1114,16 +1136,16 @@ interactions: content-length: - '0' date: - - Tue, 09 Jul 2019 23:36:06 GMT + - Tue, 22 Aug 2023 11:35:14 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: diff --git a/src/azure-cli/azure/cli/command_modules/relay/tests/latest/recordings/test_relay_wcfrelay.yaml b/src/azure-cli/azure/cli/command_modules/relay/tests/latest/recordings/test_relay_wcfrelay.yaml index a7088375e30..00847749034 100644 --- a/src/azure-cli/azure/cli/command_modules/relay/tests/latest/recordings/test_relay_wcfrelay.yaml +++ b/src/azure-cli/azure/cli/command_modules/relay/tests/latest/recordings/test_relay_wcfrelay.yaml @@ -1,7 +1,6 @@ interactions: - request: - body: '{"location": "westus2", "tags": {"{tag2: value2,": "", "tag1: value1}": - ""}}' + body: '{"location": "westus2", "tags": {"tag1": "value1tag2=value2"}}' headers: Accept: - application/json @@ -12,31 +11,28 @@ interactions: Connection: - keep-alive Content-Length: - - '76' + - '62' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --name --location --tags User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"provisioningState":"Created","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscli000002","createdAt":"2019-07-10T01:31:43.897Z","updatedAt":"2019-07-10T01:31:43.897Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' + US 2","tags":{"tag1":"value1tag2=value2"},"properties":{"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:54.533Z","updatedAt":"2023-08-22T11:31:54.533Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' headers: cache-control: - no-cache content-length: - - '686' + - '616' content-type: - application/json; charset=utf-8 date: - - Wed, 10 Jul 2019 01:31:43 GMT + - Tue, 22 Aug 2023 11:31:55 GMT expires: - '-1' pragma: @@ -54,8 +50,8 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' + x-ms-ratelimit-remaining-subscription-resource-requests: + - '49' status: code: 200 message: OK @@ -63,37 +59,32 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - relay namespace create Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --name --location --tags User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"provisioningState":"Created","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscli000002","createdAt":"2019-07-10T01:31:43.897Z","updatedAt":"2019-07-10T01:31:43.897Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' + US 2","tags":{"tag1":"value1tag2=value2"},"properties":{"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:54.533Z","updatedAt":"2023-08-22T11:31:54.533Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' headers: cache-control: - no-cache content-length: - - '686' + - '616' content-type: - application/json; charset=utf-8 date: - - Wed, 10 Jul 2019 01:32:14 GMT + - Tue, 22 Aug 2023 11:31:56 GMT expires: - '-1' pragma: @@ -118,37 +109,82 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - relay namespace create Connection: - keep-alive - Content-Type: + ParameterSetName: + - --resource-group --name --location --tags + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 + response: + body: + string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West + US 2","tags":{"tag1":"value1tag2=value2"},"properties":{"provisioningState":"Created","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:54.533Z","updatedAt":"2023-08-22T11:31:54.533Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Activating"}}' + headers: + cache-control: + - no-cache + content-length: + - '616' + content-type: - application/json; charset=utf-8 + date: + - Tue, 22 Aug 2023 11:32:27 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Service-Bus-Resource-Provider/SN1 + - Microsoft-HTTPAPI/2.0 + server-sb: + - Service-Bus-Resource-Provider/SN1 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - relay namespace create + Connection: + - keep-alive ParameterSetName: - --resource-group --name --location --tags User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscli000002","createdAt":"2019-07-10T01:31:43.897Z","updatedAt":"2019-07-10T01:32:28.267Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}' + US 2","tags":{"tag1":"value1tag2=value2"},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:54.533Z","updatedAt":"2023-08-22T11:32:40.39Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}' headers: cache-control: - no-cache content-length: - - '684' + - '613' content-type: - application/json; charset=utf-8 date: - - Wed, 10 Jul 2019 01:32:43 GMT + - Tue, 22 Aug 2023 11:32:57 GMT expires: - '-1' pragma: @@ -180,39 +216,34 @@ interactions: - relay namespace show Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002?api-version=2017-04-01 response: body: string: '{"sku":{"name":"Standard","tier":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002","name":"relay-nscli000002","type":"Microsoft.Relay/Namespaces","location":"West - US 2","tags":{"{tag2: value2,":"","tag1: value1}":""},"properties":{"provisioningState":"Succeeded","metricId":"854d368f-1828-428f-8f3c-f2affa9b2f7d:relay-nscli000002","createdAt":"2019-07-10T01:31:43.897Z","updatedAt":"2019-07-10T01:32:28.267Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}' + US 2","tags":{"tag1":"value1tag2=value2"},"properties":{"provisioningState":"Succeeded","metricId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590:relay-nscli000002","createdAt":"2023-08-22T11:31:54.533Z","updatedAt":"2023-08-22T11:32:40.39Z","serviceBusEndpoint":"https://relay-nscli000002.servicebus.windows.net:443/","status":"Active"}}' headers: cache-control: - no-cache content-length: - - '684' + - '613' content-type: - application/json; charset=utf-8 date: - - Wed, 10 Jul 2019 01:32:45 GMT + - Tue, 22 Aug 2023 11:32:58 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/DM2 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -239,39 +270,32 @@ interactions: Content-Length: - '111' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --namespace-name --name --relay-type --requires-transport-security --requires-client-authorization User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004","name":"relay-wcfrelaycli000004","type":"Microsoft.Relay/Namespaces/WcfRelays","location":"West - US 2","properties":{"createdAt":"2019-07-10T01:32:48.1610261Z","updatedAt":"2019-07-10T01:32:48.1610261Z","listenerCount":0,"requiresClientAuthorization":false,"relayType":"Http","requiresTransportSecurity":false,"isDynamic":false}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfrelays/relay-wcfrelaycli000004","name":"relay-wcfrelaycli000004","type":"Microsoft.Relay/namespaces/wcfrelays","location":"westus2","properties":{"createdAt":"2023-08-22T11:33:02.3118852Z","updatedAt":"2023-08-22T11:33:02.3118852Z","listenerCount":0,"requiresClientAuthorization":false,"relayType":"Http","requiresTransportSecurity":false,"isDynamic":false}}' headers: cache-control: - no-cache content-length: - - '575' + - '520' content-type: - application/json; charset=utf-8 date: - - Wed, 10 Jul 2019 01:32:48 GMT + - Tue, 22 Aug 2023 11:33:02 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -296,39 +320,30 @@ interactions: - relay wcfrelay show Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004","name":"relay-wcfrelaycli000004","type":"Microsoft.Relay/Namespaces/WcfRelays","location":"West - US 2","properties":{"createdAt":"2019-07-10T01:32:48.1610261Z","updatedAt":"2019-07-10T01:32:48.1610261Z","listenerCount":0,"requiresClientAuthorization":false,"relayType":"Http","requiresTransportSecurity":false,"isDynamic":false}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfrelays/relay-wcfrelaycli000004","name":"relay-wcfrelaycli000004","type":"Microsoft.Relay/namespaces/wcfrelays","location":"westus2","properties":{"createdAt":"2023-08-22T11:33:02.3118852Z","updatedAt":"2023-08-22T11:33:02.3118852Z","listenerCount":0,"requiresClientAuthorization":false,"relayType":"Http","requiresTransportSecurity":false,"isDynamic":false}}' headers: cache-control: - no-cache content-length: - - '575' + - '520' content-type: - application/json; charset=utf-8 date: - - Wed, 10 Jul 2019 01:32:49 GMT + - Tue, 22 Aug 2023 11:33:03 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -351,39 +366,30 @@ interactions: - relay wcfrelay update Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --name --relay-type User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004","name":"relay-wcfrelaycli000004","type":"Microsoft.Relay/Namespaces/WcfRelays","location":"West - US 2","properties":{"createdAt":"2019-07-10T01:32:48.1610261Z","updatedAt":"2019-07-10T01:32:48.1610261Z","listenerCount":0,"requiresClientAuthorization":false,"relayType":"Http","requiresTransportSecurity":false,"isDynamic":false}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfrelays/relay-wcfrelaycli000004","name":"relay-wcfrelaycli000004","type":"Microsoft.Relay/namespaces/wcfrelays","location":"westus2","properties":{"createdAt":"2023-08-22T11:33:02.3118852Z","updatedAt":"2023-08-22T11:33:02.3118852Z","listenerCount":0,"requiresClientAuthorization":false,"relayType":"Http","requiresTransportSecurity":false,"isDynamic":false}}' headers: cache-control: - no-cache content-length: - - '575' + - '520' content-type: - application/json; charset=utf-8 date: - - Wed, 10 Jul 2019 01:32:50 GMT + - Tue, 22 Aug 2023 11:33:05 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -410,38 +416,31 @@ interactions: Content-Length: - '111' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --namespace-name --name --relay-type User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004","name":"relay-wcfrelaycli000004","type":"Microsoft.Relay/Namespaces/WcfRelays","location":"West - US 2","properties":{"createdAt":"0001-01-01T00:00:00","updatedAt":"0001-01-01T00:00:00","listenerCount":0,"requiresClientAuthorization":false,"relayType":"Http","requiresTransportSecurity":false,"isDynamic":false}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfrelays/relay-wcfrelaycli000004","name":"relay-wcfrelaycli000004","type":"Microsoft.Relay/namespaces/wcfrelays","location":"westus2","properties":{"createdAt":"2023-08-22T11:33:02.3118852Z","updatedAt":"2023-08-22T11:33:02.3118852Z","listenerCount":0,"requiresClientAuthorization":false,"relayType":"Http","requiresTransportSecurity":false,"isDynamic":false}}' headers: cache-control: - no-cache content-length: - - '557' + - '520' content-type: - application/json; charset=utf-8 date: - - Wed, 10 Jul 2019 01:33:28 GMT + - Tue, 22 Aug 2023 11:33:05 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -466,39 +465,30 @@ interactions: - relay wcfrelay list Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays?api-version=2017-04-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004","name":"relay-wcfrelaycli000004","type":"Microsoft.Relay/Namespaces/WcfRelays","location":"West - US 2","properties":{"createdAt":"2019-07-10T01:32:48.1610261Z","updatedAt":"2019-07-10T01:33:27.9952177Z","listenerCount":0,"requiresClientAuthorization":false,"relayType":"Http","requiresTransportSecurity":false,"isDynamic":false}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfrelays/relay-wcfrelaycli000004","name":"relay-wcfrelaycli000004","type":"Microsoft.Relay/namespaces/wcfrelays","location":"westus2","properties":{"createdAt":"2023-08-22T11:33:02.3118852Z","updatedAt":"2023-08-22T11:33:02.3118852Z","listenerCount":0,"requiresClientAuthorization":false,"relayType":"Http","requiresTransportSecurity":false,"isDynamic":false}}]}' headers: cache-control: - no-cache content-length: - - '587' + - '532' content-type: - application/json; charset=utf-8 date: - - Wed, 10 Jul 2019 01:33:29 GMT + - Tue, 22 Aug 2023 11:33:07 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -526,38 +516,31 @@ interactions: Content-Length: - '36' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --namespace-name --relay-name --name --rights User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004/authorizationRules/cliAutho000003?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/Namespaces/WcfRelays/AuthorizationRules","location":"West - US 2","properties":{"rights":["Send"]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/namespaces/wcfrelays/authorizationrules","properties":{"rights":["Send"]}}' headers: cache-control: - no-cache content-length: - - '436' + - '350' content-type: - application/json; charset=utf-8 date: - - Wed, 10 Jul 2019 01:33:31 GMT + - Tue, 22 Aug 2023 11:33:10 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -567,7 +550,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -582,39 +565,30 @@ interactions: - relay wcfrelay authorization-rule show Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --relay-name --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004/authorizationRules/cliAutho000003?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/Namespaces/WcfRelays/AuthorizationRules","location":"West - US 2","properties":{"rights":["Send"]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfrelays/relay-wcfrelaycli000004/authorizationrules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/namespaces/wcfrelays/authorizationrules","location":"westus2","properties":{"rights":["Send"]}}' headers: cache-control: - no-cache content-length: - - '436' + - '371' content-type: - application/json; charset=utf-8 date: - - Wed, 10 Jul 2019 01:33:31 GMT + - Tue, 22 Aug 2023 11:33:11 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -637,39 +611,30 @@ interactions: - relay wcfrelay authorization-rule update Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --relay-name --name --rights User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004/authorizationRules/cliAutho000003?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/Namespaces/WcfRelays/AuthorizationRules","location":"West - US 2","properties":{"rights":["Send"]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfrelays/relay-wcfrelaycli000004/authorizationrules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/namespaces/wcfrelays/authorizationrules","location":"westus2","properties":{"rights":["Send"]}}' headers: cache-control: - no-cache content-length: - - '436' + - '371' content-type: - application/json; charset=utf-8 date: - - Wed, 10 Jul 2019 01:33:33 GMT + - Tue, 22 Aug 2023 11:33:11 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -695,38 +660,31 @@ interactions: Content-Length: - '38' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --namespace-name --relay-name --name --rights User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004/authorizationRules/cliAutho000003?api-version=2017-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/Namespaces/WcfRelays/AuthorizationRules","location":"West - US 2","properties":{"rights":["Listen"]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004/authorizationRules/cliAutho000003","name":"cliAutho000003","type":"Microsoft.Relay/namespaces/wcfrelays/authorizationrules","properties":{"rights":["Listen"]}}' headers: cache-control: - no-cache content-length: - - '438' + - '352' content-type: - application/json; charset=utf-8 date: - - Wed, 10 Jul 2019 01:33:34 GMT + - Tue, 22 Aug 2023 11:33:12 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -736,7 +694,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -753,38 +711,30 @@ interactions: - keep-alive Content-Length: - '0' - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --relay-name --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004/authorizationRules/cliAutho000003/listKeys?api-version=2017-04-01 response: body: - string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=sKxN9UHsC5TUz21MGSI27w7+N0f7zpJy5Yx/9OQU3Q0=;EntityPath=relay-wcfrelaycli000004","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=MIfBViYoyJ5i7DtsX5RyupOfXEp/fYnrqjWwW3U5FW4=;EntityPath=relay-wcfrelaycli000004","primaryKey":"sKxN9UHsC5TUz21MGSI27w7+N0f7zpJy5Yx/9OQU3Q0=","secondaryKey":"MIfBViYoyJ5i7DtsX5RyupOfXEp/fYnrqjWwW3U5FW4=","keyName":"cliAutho000003"}' + string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=V3hoL66KsaHDN3Qfp8ZEkKp4X4npQgy1S+ARmKC6MfY=;EntityPath=relay-wcfrelaycli000004","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=Lz49thr6LWnklP7VF7LWMPBeqliJoX6/X+ARmEOnPw8=;EntityPath=relay-wcfrelaycli000004","primaryKey":"V3hoL66KsaHDN3Qfp8ZEkKp4X4npQgy1S+ARmKC6MfY=","secondaryKey":"Lz49thr6LWnklP7VF7LWMPBeqliJoX6/X+ARmEOnPw8=","keyName":"cliAutho000003"}' headers: cache-control: - no-cache content-length: - - '610' + - '582' content-type: - application/json; charset=utf-8 date: - - Wed, 10 Jul 2019 01:33:35 GMT + - Tue, 22 Aug 2023 11:33:13 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -794,7 +744,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -812,37 +762,31 @@ interactions: Content-Length: - '25' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --namespace-name --relay-name --name --key User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004/authorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 response: body: - string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=GTwhKGnG40xVbwj5DG0NAuE84pJXOS78reMQUIxgC/g=;EntityPath=relay-wcfrelaycli000004","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=MIfBViYoyJ5i7DtsX5RyupOfXEp/fYnrqjWwW3U5FW4=;EntityPath=relay-wcfrelaycli000004","primaryKey":"GTwhKGnG40xVbwj5DG0NAuE84pJXOS78reMQUIxgC/g=","secondaryKey":"MIfBViYoyJ5i7DtsX5RyupOfXEp/fYnrqjWwW3U5FW4=","keyName":"cliAutho000003"}' + string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=btQzu+9vTm6L9WWgJNqabC2rfCwHcuc/z+ARmDcHRE4=;EntityPath=relay-wcfrelaycli000004","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=Lz49thr6LWnklP7VF7LWMPBeqliJoX6/X+ARmEOnPw8=;EntityPath=relay-wcfrelaycli000004","primaryKey":"btQzu+9vTm6L9WWgJNqabC2rfCwHcuc/z+ARmDcHRE4=","secondaryKey":"Lz49thr6LWnklP7VF7LWMPBeqliJoX6/X+ARmEOnPw8=","keyName":"cliAutho000003"}' headers: cache-control: - no-cache content-length: - - '610' + - '582' content-type: - application/json; charset=utf-8 date: - - Wed, 10 Jul 2019 01:33:35 GMT + - Tue, 22 Aug 2023 11:33:15 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -870,37 +814,31 @@ interactions: Content-Length: - '27' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --namespace-name --relay-name --name --key User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004/authorizationRules/cliAutho000003/regenerateKeys?api-version=2017-04-01 response: body: - string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=GTwhKGnG40xVbwj5DG0NAuE84pJXOS78reMQUIxgC/g=;EntityPath=relay-wcfrelaycli000004","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=RSqE5aM4UhNqbr5RZrpBaTKTnsH+zToLA/OMXjyzjYw=;EntityPath=relay-wcfrelaycli000004","primaryKey":"GTwhKGnG40xVbwj5DG0NAuE84pJXOS78reMQUIxgC/g=","secondaryKey":"RSqE5aM4UhNqbr5RZrpBaTKTnsH+zToLA/OMXjyzjYw=","keyName":"cliAutho000003"}' + string: '{"primaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=btQzu+9vTm6L9WWgJNqabC2rfCwHcuc/z+ARmDcHRE4=;EntityPath=relay-wcfrelaycli000004","secondaryConnectionString":"Endpoint=sb://relay-nscli000002.servicebus.windows.net/;SharedAccessKeyName=cliAutho000003;SharedAccessKey=bHU1uzX6knwuEHZwkXC3StR/MrnMTiySO+ARmLhY1SA=;EntityPath=relay-wcfrelaycli000004","primaryKey":"btQzu+9vTm6L9WWgJNqabC2rfCwHcuc/z+ARmDcHRE4=","secondaryKey":"bHU1uzX6knwuEHZwkXC3StR/MrnMTiySO+ARmLhY1SA=","keyName":"cliAutho000003"}' headers: cache-control: - no-cache content-length: - - '610' + - '582' content-type: - application/json; charset=utf-8 date: - - Wed, 10 Jul 2019 01:33:37 GMT + - Tue, 22 Aug 2023 11:33:16 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -918,7 +856,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -927,15 +865,10 @@ interactions: - keep-alive Content-Length: - '0' - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --relay-name --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004/authorizationRules/cliAutho000003?api-version=2017-04-01 response: @@ -947,16 +880,13 @@ interactions: content-length: - '0' date: - - Wed, 10 Jul 2019 01:33:38 GMT + - Tue, 22 Aug 2023 11:33:16 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: @@ -970,7 +900,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -979,15 +909,10 @@ interactions: - keep-alive Content-Length: - '0' - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --resource-group --namespace-name --name User-Agent: - - python/3.7.3 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-relay/0.1.0 - Azure-SDK-For-Python AZURECLI/2.0.68 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_relay_wcfrelay000001/providers/Microsoft.Relay/namespaces/relay-nscli000002/wcfRelays/relay-wcfrelaycli000004?api-version=2017-04-01 response: @@ -999,16 +924,13 @@ interactions: content-length: - '0' date: - - Wed, 10 Jul 2019 01:33:40 GMT + - Tue, 22 Aug 2023 11:33:17 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: diff --git a/src/azure-cli/azure/cli/command_modules/relay/tests/latest/test_relay_commands.py b/src/azure-cli/azure/cli/command_modules/relay/tests/latest/test_relay_commands.py index e9812fa1de3..8e4bc42b30d 100644 --- a/src/azure-cli/azure/cli/command_modules/relay/tests/latest/test_relay_commands.py +++ b/src/azure-cli/azure/cli/command_modules/relay/tests/latest/test_relay_commands.py @@ -20,8 +20,8 @@ def test_relay_namespace(self, resource_group): 'loc': 'westus2', 'rg': resource_group, 'namespacename': self.create_random_name(prefix='relay-nscli', length=20), - 'tags': {'tag1=value1'}, - 'tags2': {'tag2=value2'}, + 'tags': 'tag1=value1', + 'tags2': 'tag2=value2', 'authoname': self.create_random_name(prefix='cliAutho', length=20), 'defaultauthorizationrule': 'RootManageSharedAccessKey', 'accessrights': 'Send', @@ -102,7 +102,7 @@ def test_relay_hyco(self, resource_group): 'loc': 'westus2', 'rg': resource_group, 'namespacename': self.create_random_name(prefix='relay-nscli', length=20), - 'tags': {'tag1=value1', 'tag2=value2'}, + 'tags': 'tag1=value1' 'tag2=value2', 'authoname': self.create_random_name(prefix='cliAutho', length=20), 'defaultauthorizationrule': 'RootManageSharedAccessKey', 'accessrights': 'Listen', @@ -185,7 +185,7 @@ def test_relay_wcfrelay(self, resource_group): 'rg': resource_group, 'relaytype': 'Http', 'namespacename': self.create_random_name(prefix='relay-nscli', length=20), - 'tags': {'tag1: value1', 'tag2: value2'}, + 'tags': 'tag1=value1' 'tag2=value2', 'authoname': self.create_random_name(prefix='cliAutho', length=20), 'defaultauthorizationrule': 'RootManageSharedAccessKey', 'accessrights': 'Send', diff --git a/src/azure-cli/requirements.py3.Darwin.txt b/src/azure-cli/requirements.py3.Darwin.txt index 3ed56b10930..bfa313a9573 100644 --- a/src/azure-cli/requirements.py3.Darwin.txt +++ b/src/azure-cli/requirements.py3.Darwin.txt @@ -70,7 +70,6 @@ azure-mgmt-recoveryservices==2.4.0 azure-mgmt-recoveryservicesbackup==6.0.0 azure-mgmt-redhatopenshift==1.2.0 azure-mgmt-redis==14.1.0 -azure-mgmt-relay==0.1.0 azure-mgmt-resource==23.1.0b2 azure-mgmt-search==9.0.0 azure-mgmt-security==5.0.0 diff --git a/src/azure-cli/requirements.py3.Linux.txt b/src/azure-cli/requirements.py3.Linux.txt index 0655de992f9..1627667e111 100644 --- a/src/azure-cli/requirements.py3.Linux.txt +++ b/src/azure-cli/requirements.py3.Linux.txt @@ -70,7 +70,6 @@ azure-mgmt-recoveryservices==2.4.0 azure-mgmt-recoveryservicesbackup==6.0.0 azure-mgmt-redhatopenshift==1.2.0 azure-mgmt-redis==14.1.0 -azure-mgmt-relay==0.1.0 azure-mgmt-resource==23.1.0b2 azure-mgmt-search==9.0.0 azure-mgmt-security==5.0.0 diff --git a/src/azure-cli/requirements.py3.windows.txt b/src/azure-cli/requirements.py3.windows.txt index f73062747c5..4b30349b9c8 100644 --- a/src/azure-cli/requirements.py3.windows.txt +++ b/src/azure-cli/requirements.py3.windows.txt @@ -70,7 +70,6 @@ azure-mgmt-recoveryservices==2.4.0 azure-mgmt-recoveryservicesbackup==6.0.0 azure-mgmt-redhatopenshift==1.2.0 azure-mgmt-redis==14.1.0 -azure-mgmt-relay==0.1.0 azure-mgmt-resource==23.1.0b2 azure-mgmt-search==9.0.0 azure-mgmt-security==5.0.0 diff --git a/src/azure-cli/setup.py b/src/azure-cli/setup.py index 63d35e545b4..1f327f5bea1 100644 --- a/src/azure-cli/setup.py +++ b/src/azure-cli/setup.py @@ -113,7 +113,6 @@ 'azure-mgmt-recoveryservices~=2.4.0', 'azure-mgmt-redhatopenshift~=1.2.0', 'azure-mgmt-redis~=14.1.0', - 'azure-mgmt-relay~=0.1.0', 'azure-mgmt-resource==23.1.0b2', 'azure-mgmt-search~=9.0', 'azure-mgmt-security==5.0.0',