From fc97f89e6cf7ef29ba7070a4fef1b272fc457e41 Mon Sep 17 00:00:00 2001 From: Zhiyi Huang <17182306+calvinhzy@users.noreply.github.com> Date: Tue, 27 Jun 2023 10:33:00 +0800 Subject: [PATCH 1/8] generated initial code, still need to add customization --- .../azext_mixed_reality/__init__.py | 11 + .../azext_mixed_reality/aaz/__init__.py | 6 + .../aaz/latest/__init__.py | 6 + .../remote_rendering_account/__cmd_group.py | 24 + .../remote_rendering_account/__init__.py | 16 + .../remote_rendering_account/_create.py | 435 +++++++++++++ .../remote_rendering_account/_delete.py | 145 +++++ .../latest/remote_rendering_account/_list.py | 440 +++++++++++++ .../latest/remote_rendering_account/_show.py | 290 +++++++++ .../remote_rendering_account/_update.py | 593 ++++++++++++++++++ .../key/__cmd_group.py | 24 + .../remote_rendering_account/key/__init__.py | 13 + .../remote_rendering_account/key/_renew.py | 203 ++++++ .../remote_rendering_account/key/_show.py | 178 ++++++ .../spatial_anchors_account/__cmd_group.py | 24 + .../spatial_anchors_account/__init__.py | 16 + .../latest/spatial_anchors_account/_create.py | 435 +++++++++++++ .../latest/spatial_anchors_account/_delete.py | 144 +++++ .../latest/spatial_anchors_account/_list.py | 440 +++++++++++++ .../latest/spatial_anchors_account/_show.py | 290 +++++++++ .../latest/spatial_anchors_account/_update.py | 593 ++++++++++++++++++ .../key/__cmd_group.py | 24 + .../spatial_anchors_account/key/__init__.py | 13 + .../spatial_anchors_account/key/_renew.py | 203 ++++++ .../spatial_anchors_account/key/_show.py | 178 ++++++ .../azext_mixed_reality/azext_metadata.json | 2 +- 26 files changed, 4745 insertions(+), 1 deletion(-) create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/__init__.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/__init__.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/__cmd_group.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/__init__.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_create.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_delete.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_list.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_show.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_update.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/__cmd_group.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/__init__.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_renew.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_show.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/__cmd_group.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/__init__.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_create.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_delete.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_list.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_show.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_update.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/__cmd_group.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/__init__.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_renew.py create mode 100644 src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_show.py diff --git a/src/mixed-reality/azext_mixed_reality/__init__.py b/src/mixed-reality/azext_mixed_reality/__init__.py index e690e6983af..ecb7c80b68a 100644 --- a/src/mixed-reality/azext_mixed_reality/__init__.py +++ b/src/mixed-reality/azext_mixed_reality/__init__.py @@ -17,6 +17,17 @@ def __init__(self, cli_ctx=None): def load_command_table(self, args): from .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 diff --git a/src/mixed-reality/azext_mixed_reality/aaz/__init__.py b/src/mixed-reality/azext_mixed_reality/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/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/mixed-reality/azext_mixed_reality/aaz/latest/__init__.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/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/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/__cmd_group.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/__cmd_group.py new file mode 100644 index 00000000000..e2615296cc6 --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "remote-rendering-account", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """Manage remote rendering account with mixed reality. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/__init__.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/__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/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_create.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_create.py new file mode 100644 index 00000000000..8313d5b84f4 --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_create.py @@ -0,0 +1,435 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "remote-rendering-account create", + is_preview=True, +) +class Create(AAZCommand): + """Create a Remote Rendering Account. + + :example: Create remote rendering account + az remote-rendering-account create -n "MyAccount" --location "eastus2euap" --resource-group "MyResourceGroup" + """ + + _aaz_info = { + "version": "2021-03-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.mixedreality/remoterenderingaccounts/{}", "2021-03-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of an Mixed Reality Account.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[-\w\._\(\)]+$", + max_length=90, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.storage_account_name = AAZStrArg( + options=["--storage-account-name"], + arg_group="Properties", + help="The name of the storage account associated with this accountId", + ) + + # define Arg Group "RemoteRenderingAccount" + + _args_schema = cls._args_schema + _args_schema.kind = AAZObjectArg( + options=["--kind"], + arg_group="RemoteRenderingAccount", + help="The kind of account, if supported", + ) + cls._build_args_sku_create(_args_schema.kind) + _args_schema.location = AAZResourceLocationArg( + arg_group="RemoteRenderingAccount", + help="The geo-location where the resource lives", + required=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.sku = AAZObjectArg( + options=["--sku"], + arg_group="RemoteRenderingAccount", + help="The sku associated with this account", + ) + cls._build_args_sku_create(_args_schema.sku) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="RemoteRenderingAccount", + help="Resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + return cls._args_schema + + _args_identity_create = None + + @classmethod + def _build_args_identity_create(cls, _schema): + if cls._args_identity_create is not None: + _schema.type = cls._args_identity_create.type + return + + cls._args_identity_create = AAZObjectArg() + + identity_create = cls._args_identity_create + identity_create.type = AAZStrArg( + options=["type"], + help="The identity type.", + enum={"SystemAssigned": "SystemAssigned"}, + ) + + _schema.type = cls._args_identity_create.type + + _args_sku_create = None + + @classmethod + def _build_args_sku_create(cls, _schema): + if cls._args_sku_create is not None: + _schema.capacity = cls._args_sku_create.capacity + _schema.family = cls._args_sku_create.family + _schema.name = cls._args_sku_create.name + _schema.size = cls._args_sku_create.size + _schema.tier = cls._args_sku_create.tier + return + + cls._args_sku_create = AAZObjectArg() + + sku_create = cls._args_sku_create + sku_create.capacity = AAZIntArg( + options=["capacity"], + help="If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + ) + sku_create.family = AAZStrArg( + options=["family"], + help="If the service has different generations of hardware, for the same SKU, then that can be captured here.", + ) + sku_create.name = AAZStrArg( + options=["name"], + help="The name of the SKU. Ex - P3. It is typically a letter+number code", + required=True, + ) + sku_create.size = AAZStrArg( + options=["size"], + help="The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", + ) + sku_create.tier = AAZStrArg( + options=["tier"], + help="This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + enum={"Basic": "Basic", "Free": "Free", "Premium": "Premium", "Standard": "Standard"}, + ) + + _schema.capacity = cls._args_sku_create.capacity + _schema.family = cls._args_sku_create.family + _schema.name = cls._args_sku_create.name + _schema.size = cls._args_sku_create.size + _schema.tier = cls._args_sku_create.tier + + def _execute_operations(self): + self.pre_operations() + self.RemoteRenderingAccountsCreate(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 RemoteRenderingAccountsCreate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}", + **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( + "accountName", 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", "2021-03-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _CreateHelper._build_schema_sku_create(_builder.set_prop("kind", AAZObjectType, ".kind")) + _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _CreateHelper._build_schema_sku_create(_builder.set_prop("sku", AAZObjectType, ".sku")) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("storageAccountName", AAZStrType, ".storage_account_name") + + 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.identity = AAZObjectType() + _CreateHelper._build_schema_identity_read(_schema_on_200_201.identity) + _schema_on_200_201.kind = AAZObjectType() + _CreateHelper._build_schema_sku_read(_schema_on_200_201.kind) + _schema_on_200_201.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.plan = AAZObjectType() + _CreateHelper._build_schema_identity_read(_schema_on_200_201.plan) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.sku = AAZObjectType() + _CreateHelper._build_schema_sku_read(_schema_on_200_201.sku) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.account_domain = AAZStrType( + serialized_name="accountDomain", + flags={"read_only": True}, + ) + properties.account_id = AAZStrType( + serialized_name="accountId", + flags={"read_only": True}, + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + @classmethod + def _build_schema_identity_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("type", AAZStrType, ".type") + + @classmethod + def _build_schema_sku_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("capacity", AAZIntType, ".capacity") + _builder.set_prop("family", AAZStrType, ".family") + _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("size", AAZStrType, ".size") + _builder.set_prop("tier", AAZStrType, ".tier") + + _schema_identity_read = None + + @classmethod + def _build_schema_identity_read(cls, _schema): + if cls._schema_identity_read is not None: + _schema.principal_id = cls._schema_identity_read.principal_id + _schema.tenant_id = cls._schema_identity_read.tenant_id + _schema.type = cls._schema_identity_read.type + return + + cls._schema_identity_read = _schema_identity_read = AAZObjectType() + + identity_read = _schema_identity_read + identity_read.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity_read.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity_read.type = AAZStrType() + + _schema.principal_id = cls._schema_identity_read.principal_id + _schema.tenant_id = cls._schema_identity_read.tenant_id + _schema.type = cls._schema_identity_read.type + + _schema_sku_read = None + + @classmethod + def _build_schema_sku_read(cls, _schema): + if cls._schema_sku_read is not None: + _schema.capacity = cls._schema_sku_read.capacity + _schema.family = cls._schema_sku_read.family + _schema.name = cls._schema_sku_read.name + _schema.size = cls._schema_sku_read.size + _schema.tier = cls._schema_sku_read.tier + return + + cls._schema_sku_read = _schema_sku_read = AAZObjectType() + + sku_read = _schema_sku_read + sku_read.capacity = AAZIntType() + sku_read.family = AAZStrType() + sku_read.name = AAZStrType( + flags={"required": True}, + ) + sku_read.size = AAZStrType() + sku_read.tier = AAZStrType() + + _schema.capacity = cls._schema_sku_read.capacity + _schema.family = cls._schema_sku_read.family + _schema.name = cls._schema_sku_read.name + _schema.size = cls._schema_sku_read.size + _schema.tier = cls._schema_sku_read.tier + + +__all__ = ["Create"] diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_delete.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_delete.py new file mode 100644 index 00000000000..8870f21fda0 --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_delete.py @@ -0,0 +1,145 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "remote-rendering-account delete", + is_preview=True, + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a Remote Rendering Account. + + :example: Delete remote rendering account + az remote-rendering-account delete -n "MyAccount" --resource-group "MyResourceGroup" + """ + + _aaz_info = { + "version": "2021-03-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.mixedreality/remoterenderingaccounts/{}", "2021-03-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of an Mixed Reality Account.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[-\w\._\(\)]+$", + max_length=90, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.RemoteRenderingAccountsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class RemoteRenderingAccountsDelete(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.MixedReality/remoteRenderingAccounts/{accountName}", + **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( + "accountName", 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", "2021-03-01-preview", + 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/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_list.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_list.py new file mode 100644 index 00000000000..b88dd0ed644 --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_list.py @@ -0,0 +1,440 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "remote-rendering-account list", + is_preview=True, +) +class List(AAZCommand): + """List Remote Rendering Accounts by Subscription + + :example: List remote rendering accounts by resource group + az remote-rendering-account list --resource-group "MyResourceGroup" + + :example: List remote rendering accounts by subscription + az remote-rendering-account list + """ + + _aaz_info = { + "version": "2021-03-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.mixedreality/remoterenderingaccounts", "2021-03-01-preview"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.mixedreality/remoterenderingaccounts", "2021-03-01-preview"], + ] + } + + 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.RemoteRenderingAccountsListByResourceGroup(ctx=self.ctx)() + if condition_1: + self.RemoteRenderingAccountsListBySubscription(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 RemoteRenderingAccountsListByResourceGroup(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.MixedReality/remoteRenderingAccounts", + **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", "2021-03-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.identity = AAZObjectType() + _ListHelper._build_schema_identity_read(_element.identity) + _element.kind = AAZObjectType() + _ListHelper._build_schema_sku_read(_element.kind) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.plan = AAZObjectType() + _ListHelper._build_schema_identity_read(_element.plan) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.sku = AAZObjectType() + _ListHelper._build_schema_sku_read(_element.sku) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.account_domain = AAZStrType( + serialized_name="accountDomain", + flags={"read_only": True}, + ) + properties.account_id = AAZStrType( + serialized_name="accountId", + flags={"read_only": True}, + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class RemoteRenderingAccountsListBySubscription(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.MixedReality/remoteRenderingAccounts", + **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", "2021-03-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.identity = AAZObjectType() + _ListHelper._build_schema_identity_read(_element.identity) + _element.kind = AAZObjectType() + _ListHelper._build_schema_sku_read(_element.kind) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.plan = AAZObjectType() + _ListHelper._build_schema_identity_read(_element.plan) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.sku = AAZObjectType() + _ListHelper._build_schema_sku_read(_element.sku) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.account_domain = AAZStrType( + serialized_name="accountDomain", + flags={"read_only": True}, + ) + properties.account_id = AAZStrType( + serialized_name="accountId", + flags={"read_only": True}, + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + _schema_identity_read = None + + @classmethod + def _build_schema_identity_read(cls, _schema): + if cls._schema_identity_read is not None: + _schema.principal_id = cls._schema_identity_read.principal_id + _schema.tenant_id = cls._schema_identity_read.tenant_id + _schema.type = cls._schema_identity_read.type + return + + cls._schema_identity_read = _schema_identity_read = AAZObjectType() + + identity_read = _schema_identity_read + identity_read.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity_read.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity_read.type = AAZStrType() + + _schema.principal_id = cls._schema_identity_read.principal_id + _schema.tenant_id = cls._schema_identity_read.tenant_id + _schema.type = cls._schema_identity_read.type + + _schema_sku_read = None + + @classmethod + def _build_schema_sku_read(cls, _schema): + if cls._schema_sku_read is not None: + _schema.capacity = cls._schema_sku_read.capacity + _schema.family = cls._schema_sku_read.family + _schema.name = cls._schema_sku_read.name + _schema.size = cls._schema_sku_read.size + _schema.tier = cls._schema_sku_read.tier + return + + cls._schema_sku_read = _schema_sku_read = AAZObjectType() + + sku_read = _schema_sku_read + sku_read.capacity = AAZIntType() + sku_read.family = AAZStrType() + sku_read.name = AAZStrType( + flags={"required": True}, + ) + sku_read.size = AAZStrType() + sku_read.tier = AAZStrType() + + _schema.capacity = cls._schema_sku_read.capacity + _schema.family = cls._schema_sku_read.family + _schema.name = cls._schema_sku_read.name + _schema.size = cls._schema_sku_read.size + _schema.tier = cls._schema_sku_read.tier + + +__all__ = ["List"] diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_show.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_show.py new file mode 100644 index 00000000000..0487ca86a0c --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_show.py @@ -0,0 +1,290 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "remote-rendering-account show", + is_preview=True, +) +class Show(AAZCommand): + """Get a Remote Rendering Account. + + :example: Get remote rendering account + az remote-rendering-account show -n "MyAccount" --resource-group "MyResourceGroup" + """ + + _aaz_info = { + "version": "2021-03-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.mixedreality/remoterenderingaccounts/{}", "2021-03-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of an Mixed Reality Account.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[-\w\._\(\)]+$", + max_length=90, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.RemoteRenderingAccountsGet(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 RemoteRenderingAccountsGet(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.MixedReality/remoteRenderingAccounts/{accountName}", + **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( + "accountName", 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", "2021-03-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.identity = AAZObjectType() + _ShowHelper._build_schema_identity_read(_schema_on_200.identity) + _schema_on_200.kind = AAZObjectType() + _ShowHelper._build_schema_sku_read(_schema_on_200.kind) + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.plan = AAZObjectType() + _ShowHelper._build_schema_identity_read(_schema_on_200.plan) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.sku = AAZObjectType() + _ShowHelper._build_schema_sku_read(_schema_on_200.sku) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.account_domain = AAZStrType( + serialized_name="accountDomain", + flags={"read_only": True}, + ) + properties.account_id = AAZStrType( + serialized_name="accountId", + flags={"read_only": True}, + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_identity_read = None + + @classmethod + def _build_schema_identity_read(cls, _schema): + if cls._schema_identity_read is not None: + _schema.principal_id = cls._schema_identity_read.principal_id + _schema.tenant_id = cls._schema_identity_read.tenant_id + _schema.type = cls._schema_identity_read.type + return + + cls._schema_identity_read = _schema_identity_read = AAZObjectType() + + identity_read = _schema_identity_read + identity_read.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity_read.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity_read.type = AAZStrType() + + _schema.principal_id = cls._schema_identity_read.principal_id + _schema.tenant_id = cls._schema_identity_read.tenant_id + _schema.type = cls._schema_identity_read.type + + _schema_sku_read = None + + @classmethod + def _build_schema_sku_read(cls, _schema): + if cls._schema_sku_read is not None: + _schema.capacity = cls._schema_sku_read.capacity + _schema.family = cls._schema_sku_read.family + _schema.name = cls._schema_sku_read.name + _schema.size = cls._schema_sku_read.size + _schema.tier = cls._schema_sku_read.tier + return + + cls._schema_sku_read = _schema_sku_read = AAZObjectType() + + sku_read = _schema_sku_read + sku_read.capacity = AAZIntType() + sku_read.family = AAZStrType() + sku_read.name = AAZStrType( + flags={"required": True}, + ) + sku_read.size = AAZStrType() + sku_read.tier = AAZStrType() + + _schema.capacity = cls._schema_sku_read.capacity + _schema.family = cls._schema_sku_read.family + _schema.name = cls._schema_sku_read.name + _schema.size = cls._schema_sku_read.size + _schema.tier = cls._schema_sku_read.tier + + +__all__ = ["Show"] diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_update.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_update.py new file mode 100644 index 00000000000..2f76c4e7301 --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_update.py @@ -0,0 +1,593 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "remote-rendering-account update", + is_preview=True, +) +class Update(AAZCommand): + """Update a Remote Rendering Account. + + :example: Update remote rendering account + az remote-rendering-account update -n "MyAccount" --tags hero="romeo" heroine="juliet" --resource-group "MyResourceGroup" + """ + + _aaz_info = { + "version": "2021-03-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.mixedreality/remoterenderingaccounts/{}", "2021-03-01-preview"], + ] + } + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of an Mixed Reality Account.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[-\w\._\(\)]+$", + max_length=90, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.storage_account_name = AAZStrArg( + options=["--storage-account-name"], + arg_group="Properties", + help="The name of the storage account associated with this accountId", + nullable=True, + ) + + # define Arg Group "RemoteRenderingAccount" + + _args_schema = cls._args_schema + _args_schema.kind = AAZObjectArg( + options=["--kind"], + arg_group="RemoteRenderingAccount", + help="The kind of account, if supported", + nullable=True, + ) + cls._build_args_sku_update(_args_schema.kind) + _args_schema.sku = AAZObjectArg( + options=["--sku"], + arg_group="RemoteRenderingAccount", + help="The sku associated with this account", + nullable=True, + ) + cls._build_args_sku_update(_args_schema.sku) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="RemoteRenderingAccount", + help="Resource tags.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + _args_identity_update = None + + @classmethod + def _build_args_identity_update(cls, _schema): + if cls._args_identity_update is not None: + _schema.type = cls._args_identity_update.type + return + + cls._args_identity_update = AAZObjectArg( + nullable=True, + ) + + identity_update = cls._args_identity_update + identity_update.type = AAZStrArg( + options=["type"], + help="The identity type.", + nullable=True, + enum={"SystemAssigned": "SystemAssigned"}, + ) + + _schema.type = cls._args_identity_update.type + + _args_sku_update = None + + @classmethod + def _build_args_sku_update(cls, _schema): + if cls._args_sku_update is not None: + _schema.capacity = cls._args_sku_update.capacity + _schema.family = cls._args_sku_update.family + _schema.name = cls._args_sku_update.name + _schema.size = cls._args_sku_update.size + _schema.tier = cls._args_sku_update.tier + return + + cls._args_sku_update = AAZObjectArg( + nullable=True, + ) + + sku_update = cls._args_sku_update + sku_update.capacity = AAZIntArg( + options=["capacity"], + help="If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + nullable=True, + ) + sku_update.family = AAZStrArg( + options=["family"], + help="If the service has different generations of hardware, for the same SKU, then that can be captured here.", + nullable=True, + ) + sku_update.name = AAZStrArg( + options=["name"], + help="The name of the SKU. Ex - P3. It is typically a letter+number code", + ) + sku_update.size = AAZStrArg( + options=["size"], + help="The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", + nullable=True, + ) + sku_update.tier = AAZStrArg( + options=["tier"], + help="This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + nullable=True, + enum={"Basic": "Basic", "Free": "Free", "Premium": "Premium", "Standard": "Standard"}, + ) + + _schema.capacity = cls._args_sku_update.capacity + _schema.family = cls._args_sku_update.family + _schema.name = cls._args_sku_update.name + _schema.size = cls._args_sku_update.size + _schema.tier = cls._args_sku_update.tier + + def _execute_operations(self): + self.pre_operations() + self.RemoteRenderingAccountsGet(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.RemoteRenderingAccountsCreate(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 RemoteRenderingAccountsGet(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.MixedReality/remoteRenderingAccounts/{accountName}", + **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( + "accountName", 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", "2021-03-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_remote_rendering_account_read(cls._schema_on_200) + + return cls._schema_on_200 + + class RemoteRenderingAccountsCreate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}", + **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( + "accountName", 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", "2021-03-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_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_remote_rendering_account_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 + ) + _UpdateHelper._build_schema_sku_update(_builder.set_prop("kind", AAZObjectType, ".kind")) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _UpdateHelper._build_schema_sku_update(_builder.set_prop("sku", AAZObjectType, ".sku")) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("storageAccountName", AAZStrType, ".storage_account_name") + + 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""" + + @classmethod + def _build_schema_identity_update(cls, _builder): + if _builder is None: + return + _builder.set_prop("type", AAZStrType, ".type") + + @classmethod + def _build_schema_sku_update(cls, _builder): + if _builder is None: + return + _builder.set_prop("capacity", AAZIntType, ".capacity") + _builder.set_prop("family", AAZStrType, ".family") + _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("size", AAZStrType, ".size") + _builder.set_prop("tier", AAZStrType, ".tier") + + _schema_identity_read = None + + @classmethod + def _build_schema_identity_read(cls, _schema): + if cls._schema_identity_read is not None: + _schema.principal_id = cls._schema_identity_read.principal_id + _schema.tenant_id = cls._schema_identity_read.tenant_id + _schema.type = cls._schema_identity_read.type + return + + cls._schema_identity_read = _schema_identity_read = AAZObjectType() + + identity_read = _schema_identity_read + identity_read.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity_read.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity_read.type = AAZStrType() + + _schema.principal_id = cls._schema_identity_read.principal_id + _schema.tenant_id = cls._schema_identity_read.tenant_id + _schema.type = cls._schema_identity_read.type + + _schema_remote_rendering_account_read = None + + @classmethod + def _build_schema_remote_rendering_account_read(cls, _schema): + if cls._schema_remote_rendering_account_read is not None: + _schema.id = cls._schema_remote_rendering_account_read.id + _schema.identity = cls._schema_remote_rendering_account_read.identity + _schema.kind = cls._schema_remote_rendering_account_read.kind + _schema.location = cls._schema_remote_rendering_account_read.location + _schema.name = cls._schema_remote_rendering_account_read.name + _schema.plan = cls._schema_remote_rendering_account_read.plan + _schema.properties = cls._schema_remote_rendering_account_read.properties + _schema.sku = cls._schema_remote_rendering_account_read.sku + _schema.system_data = cls._schema_remote_rendering_account_read.system_data + _schema.tags = cls._schema_remote_rendering_account_read.tags + _schema.type = cls._schema_remote_rendering_account_read.type + return + + cls._schema_remote_rendering_account_read = _schema_remote_rendering_account_read = AAZObjectType() + + remote_rendering_account_read = _schema_remote_rendering_account_read + remote_rendering_account_read.id = AAZStrType( + flags={"read_only": True}, + ) + remote_rendering_account_read.identity = AAZObjectType() + cls._build_schema_identity_read(remote_rendering_account_read.identity) + remote_rendering_account_read.kind = AAZObjectType() + cls._build_schema_sku_read(remote_rendering_account_read.kind) + remote_rendering_account_read.location = AAZStrType( + flags={"required": True}, + ) + remote_rendering_account_read.name = AAZStrType( + flags={"read_only": True}, + ) + remote_rendering_account_read.plan = AAZObjectType() + cls._build_schema_identity_read(remote_rendering_account_read.plan) + remote_rendering_account_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + remote_rendering_account_read.sku = AAZObjectType() + cls._build_schema_sku_read(remote_rendering_account_read.sku) + remote_rendering_account_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + remote_rendering_account_read.tags = AAZDictType() + remote_rendering_account_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_remote_rendering_account_read.properties + properties.account_domain = AAZStrType( + serialized_name="accountDomain", + flags={"read_only": True}, + ) + properties.account_id = AAZStrType( + serialized_name="accountId", + flags={"read_only": True}, + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + + system_data = _schema_remote_rendering_account_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = _schema_remote_rendering_account_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_remote_rendering_account_read.id + _schema.identity = cls._schema_remote_rendering_account_read.identity + _schema.kind = cls._schema_remote_rendering_account_read.kind + _schema.location = cls._schema_remote_rendering_account_read.location + _schema.name = cls._schema_remote_rendering_account_read.name + _schema.plan = cls._schema_remote_rendering_account_read.plan + _schema.properties = cls._schema_remote_rendering_account_read.properties + _schema.sku = cls._schema_remote_rendering_account_read.sku + _schema.system_data = cls._schema_remote_rendering_account_read.system_data + _schema.tags = cls._schema_remote_rendering_account_read.tags + _schema.type = cls._schema_remote_rendering_account_read.type + + _schema_sku_read = None + + @classmethod + def _build_schema_sku_read(cls, _schema): + if cls._schema_sku_read is not None: + _schema.capacity = cls._schema_sku_read.capacity + _schema.family = cls._schema_sku_read.family + _schema.name = cls._schema_sku_read.name + _schema.size = cls._schema_sku_read.size + _schema.tier = cls._schema_sku_read.tier + return + + cls._schema_sku_read = _schema_sku_read = AAZObjectType() + + sku_read = _schema_sku_read + sku_read.capacity = AAZIntType() + sku_read.family = AAZStrType() + sku_read.name = AAZStrType( + flags={"required": True}, + ) + sku_read.size = AAZStrType() + sku_read.tier = AAZStrType() + + _schema.capacity = cls._schema_sku_read.capacity + _schema.family = cls._schema_sku_read.family + _schema.name = cls._schema_sku_read.name + _schema.size = cls._schema_sku_read.size + _schema.tier = cls._schema_sku_read.tier + + +__all__ = ["Update"] diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/__cmd_group.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/__cmd_group.py new file mode 100644 index 00000000000..cdace4dcc9c --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "remote-rendering-account key", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """Manage developer keys of a remote rendering account. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/__init__.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/__init__.py new file mode 100644 index 00000000000..1a68789fce7 --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/__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 ._renew import * +from ._show import * diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_renew.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_renew.py new file mode 100644 index 00000000000..17ebb1d52ec --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_renew.py @@ -0,0 +1,203 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "remote-rendering-account key renew", + is_preview=True, +) +class Renew(AAZCommand): + """Regenerate specified Key of a Remote Rendering Account + + :example: Regenerate remote rendering account keys + az remote-rendering-account key renew -n "MyAccount" -k primary --resource-group "MyResourceGroup" + """ + + _aaz_info = { + "version": "2021-03-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.mixedreality/remoterenderingaccounts/{}/regeneratekeys", "2021-03-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of an Mixed Reality Account.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[-\w\._\(\)]+$", + max_length=90, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Regenerate" + + _args_schema = cls._args_schema + _args_schema.serial = AAZIntArg( + options=["--serial"], + arg_group="Regenerate", + help="Serial of key to be regenerated", + default=1, + enum={"1": 1, "2": 2}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.RemoteRenderingAccountsRegenerateKeys(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 RemoteRenderingAccountsRegenerateKeys(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.MixedReality/remoteRenderingAccounts/{accountName}/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( + "accountName", 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", "2021-03-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("serial", AAZIntType, ".serial") + + 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.primary_key = AAZStrType( + serialized_name="primaryKey", + flags={"secret": True, "read_only": True}, + ) + _schema_on_200.secondary_key = AAZStrType( + serialized_name="secondaryKey", + flags={"secret": True, "read_only": True}, + ) + + return cls._schema_on_200 + + +class _RenewHelper: + """Helper class for Renew""" + + +__all__ = ["Renew"] diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_show.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_show.py new file mode 100644 index 00000000000..e1ca89df42e --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_show.py @@ -0,0 +1,178 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "remote-rendering-account key show", + is_preview=True, +) +class Show(AAZCommand): + """List Both of the 2 Keys of a Remote Rendering Account + + :example: List remote rendering account key + az remote-rendering-account key show -n "MyAccount" --resource-group "MyResourceGroup" + """ + + _aaz_info = { + "version": "2021-03-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.mixedreality/remoterenderingaccounts/{}/listkeys", "2021-03-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of an Mixed Reality Account.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[-\w\._\(\)]+$", + max_length=90, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.RemoteRenderingAccountsListKeys(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 RemoteRenderingAccountsListKeys(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.MixedReality/remoteRenderingAccounts/{accountName}/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( + "accountName", 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", "2021-03-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.primary_key = AAZStrType( + serialized_name="primaryKey", + flags={"secret": True, "read_only": True}, + ) + _schema_on_200.secondary_key = AAZStrType( + serialized_name="secondaryKey", + flags={"secret": True, "read_only": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/__cmd_group.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/__cmd_group.py new file mode 100644 index 00000000000..ff02fc03957 --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "spatial-anchors-account", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """Manage spatial anchor account with mixed reality. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/__init__.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/__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/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_create.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_create.py new file mode 100644 index 00000000000..1080f7163ca --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_create.py @@ -0,0 +1,435 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "spatial-anchors-account create", + is_preview=True, +) +class Create(AAZCommand): + """Create a Spatial Anchors Account. + + :example: Create spatial anchor account + az spatial-anchors-account create -n "MyAccount" --resource-group "MyResourceGroup" + """ + + _aaz_info = { + "version": "2021-03-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.mixedreality/spatialanchorsaccounts/{}", "2021-03-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of an Mixed Reality Account.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[-\w\._\(\)]+$", + max_length=90, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.storage_account_name = AAZStrArg( + options=["--storage-account-name"], + arg_group="Properties", + help="The name of the storage account associated with this accountId", + ) + + # define Arg Group "SpatialAnchorsAccount" + + _args_schema = cls._args_schema + _args_schema.kind = AAZObjectArg( + options=["--kind"], + arg_group="SpatialAnchorsAccount", + help="The kind of account, if supported", + ) + cls._build_args_sku_create(_args_schema.kind) + _args_schema.location = AAZResourceLocationArg( + arg_group="SpatialAnchorsAccount", + help="The geo-location where the resource lives", + required=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.sku = AAZObjectArg( + options=["--sku"], + arg_group="SpatialAnchorsAccount", + help="The sku associated with this account", + ) + cls._build_args_sku_create(_args_schema.sku) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="SpatialAnchorsAccount", + help="Resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + return cls._args_schema + + _args_identity_create = None + + @classmethod + def _build_args_identity_create(cls, _schema): + if cls._args_identity_create is not None: + _schema.type = cls._args_identity_create.type + return + + cls._args_identity_create = AAZObjectArg() + + identity_create = cls._args_identity_create + identity_create.type = AAZStrArg( + options=["type"], + help="The identity type.", + enum={"SystemAssigned": "SystemAssigned"}, + ) + + _schema.type = cls._args_identity_create.type + + _args_sku_create = None + + @classmethod + def _build_args_sku_create(cls, _schema): + if cls._args_sku_create is not None: + _schema.capacity = cls._args_sku_create.capacity + _schema.family = cls._args_sku_create.family + _schema.name = cls._args_sku_create.name + _schema.size = cls._args_sku_create.size + _schema.tier = cls._args_sku_create.tier + return + + cls._args_sku_create = AAZObjectArg() + + sku_create = cls._args_sku_create + sku_create.capacity = AAZIntArg( + options=["capacity"], + help="If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + ) + sku_create.family = AAZStrArg( + options=["family"], + help="If the service has different generations of hardware, for the same SKU, then that can be captured here.", + ) + sku_create.name = AAZStrArg( + options=["name"], + help="The name of the SKU. Ex - P3. It is typically a letter+number code", + required=True, + ) + sku_create.size = AAZStrArg( + options=["size"], + help="The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", + ) + sku_create.tier = AAZStrArg( + options=["tier"], + help="This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + enum={"Basic": "Basic", "Free": "Free", "Premium": "Premium", "Standard": "Standard"}, + ) + + _schema.capacity = cls._args_sku_create.capacity + _schema.family = cls._args_sku_create.family + _schema.name = cls._args_sku_create.name + _schema.size = cls._args_sku_create.size + _schema.tier = cls._args_sku_create.tier + + def _execute_operations(self): + self.pre_operations() + self.SpatialAnchorsAccountsCreate(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 SpatialAnchorsAccountsCreate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}", + **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( + "accountName", 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", "2021-03-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _CreateHelper._build_schema_sku_create(_builder.set_prop("kind", AAZObjectType, ".kind")) + _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _CreateHelper._build_schema_sku_create(_builder.set_prop("sku", AAZObjectType, ".sku")) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("storageAccountName", AAZStrType, ".storage_account_name") + + 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.identity = AAZObjectType() + _CreateHelper._build_schema_identity_read(_schema_on_200_201.identity) + _schema_on_200_201.kind = AAZObjectType() + _CreateHelper._build_schema_sku_read(_schema_on_200_201.kind) + _schema_on_200_201.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.plan = AAZObjectType() + _CreateHelper._build_schema_identity_read(_schema_on_200_201.plan) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.sku = AAZObjectType() + _CreateHelper._build_schema_sku_read(_schema_on_200_201.sku) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.account_domain = AAZStrType( + serialized_name="accountDomain", + flags={"read_only": True}, + ) + properties.account_id = AAZStrType( + serialized_name="accountId", + flags={"read_only": True}, + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + @classmethod + def _build_schema_identity_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("type", AAZStrType, ".type") + + @classmethod + def _build_schema_sku_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("capacity", AAZIntType, ".capacity") + _builder.set_prop("family", AAZStrType, ".family") + _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("size", AAZStrType, ".size") + _builder.set_prop("tier", AAZStrType, ".tier") + + _schema_identity_read = None + + @classmethod + def _build_schema_identity_read(cls, _schema): + if cls._schema_identity_read is not None: + _schema.principal_id = cls._schema_identity_read.principal_id + _schema.tenant_id = cls._schema_identity_read.tenant_id + _schema.type = cls._schema_identity_read.type + return + + cls._schema_identity_read = _schema_identity_read = AAZObjectType() + + identity_read = _schema_identity_read + identity_read.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity_read.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity_read.type = AAZStrType() + + _schema.principal_id = cls._schema_identity_read.principal_id + _schema.tenant_id = cls._schema_identity_read.tenant_id + _schema.type = cls._schema_identity_read.type + + _schema_sku_read = None + + @classmethod + def _build_schema_sku_read(cls, _schema): + if cls._schema_sku_read is not None: + _schema.capacity = cls._schema_sku_read.capacity + _schema.family = cls._schema_sku_read.family + _schema.name = cls._schema_sku_read.name + _schema.size = cls._schema_sku_read.size + _schema.tier = cls._schema_sku_read.tier + return + + cls._schema_sku_read = _schema_sku_read = AAZObjectType() + + sku_read = _schema_sku_read + sku_read.capacity = AAZIntType() + sku_read.family = AAZStrType() + sku_read.name = AAZStrType( + flags={"required": True}, + ) + sku_read.size = AAZStrType() + sku_read.tier = AAZStrType() + + _schema.capacity = cls._schema_sku_read.capacity + _schema.family = cls._schema_sku_read.family + _schema.name = cls._schema_sku_read.name + _schema.size = cls._schema_sku_read.size + _schema.tier = cls._schema_sku_read.tier + + +__all__ = ["Create"] diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_delete.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_delete.py new file mode 100644 index 00000000000..53e032e5ad8 --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_delete.py @@ -0,0 +1,144 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "spatial-anchors-account delete", + is_preview=True, +) +class Delete(AAZCommand): + """Delete a Spatial Anchors Account. + + :example: Delete spatial anchors account + az spatial-anchors-account delete -n "MyAccount" --resource-group "MyResourceGroup" + """ + + _aaz_info = { + "version": "2021-03-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.mixedreality/spatialanchorsaccounts/{}", "2021-03-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of an Mixed Reality Account.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[-\w\._\(\)]+$", + max_length=90, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SpatialAnchorsAccountsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class SpatialAnchorsAccountsDelete(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.MixedReality/spatialAnchorsAccounts/{accountName}", + **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( + "accountName", 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", "2021-03-01-preview", + 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/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_list.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_list.py new file mode 100644 index 00000000000..268405f3dd5 --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_list.py @@ -0,0 +1,440 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "spatial-anchors-account list", + is_preview=True, +) +class List(AAZCommand): + """List Spatial Anchors Accounts by Subscription + + :example: List spatial anchor accounts by resource group + az spatial-anchors-account list --resource-group "MyResourceGroup" + + :example: List spatial anchors accounts by subscription + az spatial-anchors-account list + """ + + _aaz_info = { + "version": "2021-03-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.mixedreality/spatialanchorsaccounts", "2021-03-01-preview"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.mixedreality/spatialanchorsaccounts", "2021-03-01-preview"], + ] + } + + 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.SpatialAnchorsAccountsListByResourceGroup(ctx=self.ctx)() + if condition_1: + self.SpatialAnchorsAccountsListBySubscription(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 SpatialAnchorsAccountsListByResourceGroup(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.MixedReality/spatialAnchorsAccounts", + **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", "2021-03-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.identity = AAZObjectType() + _ListHelper._build_schema_identity_read(_element.identity) + _element.kind = AAZObjectType() + _ListHelper._build_schema_sku_read(_element.kind) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.plan = AAZObjectType() + _ListHelper._build_schema_identity_read(_element.plan) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.sku = AAZObjectType() + _ListHelper._build_schema_sku_read(_element.sku) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.account_domain = AAZStrType( + serialized_name="accountDomain", + flags={"read_only": True}, + ) + properties.account_id = AAZStrType( + serialized_name="accountId", + flags={"read_only": True}, + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class SpatialAnchorsAccountsListBySubscription(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.MixedReality/spatialAnchorsAccounts", + **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", "2021-03-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.identity = AAZObjectType() + _ListHelper._build_schema_identity_read(_element.identity) + _element.kind = AAZObjectType() + _ListHelper._build_schema_sku_read(_element.kind) + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.plan = AAZObjectType() + _ListHelper._build_schema_identity_read(_element.plan) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.sku = AAZObjectType() + _ListHelper._build_schema_sku_read(_element.sku) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.account_domain = AAZStrType( + serialized_name="accountDomain", + flags={"read_only": True}, + ) + properties.account_id = AAZStrType( + serialized_name="accountId", + flags={"read_only": True}, + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + _schema_identity_read = None + + @classmethod + def _build_schema_identity_read(cls, _schema): + if cls._schema_identity_read is not None: + _schema.principal_id = cls._schema_identity_read.principal_id + _schema.tenant_id = cls._schema_identity_read.tenant_id + _schema.type = cls._schema_identity_read.type + return + + cls._schema_identity_read = _schema_identity_read = AAZObjectType() + + identity_read = _schema_identity_read + identity_read.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity_read.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity_read.type = AAZStrType() + + _schema.principal_id = cls._schema_identity_read.principal_id + _schema.tenant_id = cls._schema_identity_read.tenant_id + _schema.type = cls._schema_identity_read.type + + _schema_sku_read = None + + @classmethod + def _build_schema_sku_read(cls, _schema): + if cls._schema_sku_read is not None: + _schema.capacity = cls._schema_sku_read.capacity + _schema.family = cls._schema_sku_read.family + _schema.name = cls._schema_sku_read.name + _schema.size = cls._schema_sku_read.size + _schema.tier = cls._schema_sku_read.tier + return + + cls._schema_sku_read = _schema_sku_read = AAZObjectType() + + sku_read = _schema_sku_read + sku_read.capacity = AAZIntType() + sku_read.family = AAZStrType() + sku_read.name = AAZStrType( + flags={"required": True}, + ) + sku_read.size = AAZStrType() + sku_read.tier = AAZStrType() + + _schema.capacity = cls._schema_sku_read.capacity + _schema.family = cls._schema_sku_read.family + _schema.name = cls._schema_sku_read.name + _schema.size = cls._schema_sku_read.size + _schema.tier = cls._schema_sku_read.tier + + +__all__ = ["List"] diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_show.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_show.py new file mode 100644 index 00000000000..ad976a15325 --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_show.py @@ -0,0 +1,290 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "spatial-anchors-account show", + is_preview=True, +) +class Show(AAZCommand): + """Get a Spatial Anchors Account. + + :example: Get spatial anchors account + az spatial-anchors-account show -n "MyAccount" --resource-group "MyResourceGroup" + """ + + _aaz_info = { + "version": "2021-03-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.mixedreality/spatialanchorsaccounts/{}", "2021-03-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of an Mixed Reality Account.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[-\w\._\(\)]+$", + max_length=90, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SpatialAnchorsAccountsGet(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 SpatialAnchorsAccountsGet(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.MixedReality/spatialAnchorsAccounts/{accountName}", + **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( + "accountName", 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", "2021-03-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.identity = AAZObjectType() + _ShowHelper._build_schema_identity_read(_schema_on_200.identity) + _schema_on_200.kind = AAZObjectType() + _ShowHelper._build_schema_sku_read(_schema_on_200.kind) + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.plan = AAZObjectType() + _ShowHelper._build_schema_identity_read(_schema_on_200.plan) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.sku = AAZObjectType() + _ShowHelper._build_schema_sku_read(_schema_on_200.sku) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.account_domain = AAZStrType( + serialized_name="accountDomain", + flags={"read_only": True}, + ) + properties.account_id = AAZStrType( + serialized_name="accountId", + flags={"read_only": True}, + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_identity_read = None + + @classmethod + def _build_schema_identity_read(cls, _schema): + if cls._schema_identity_read is not None: + _schema.principal_id = cls._schema_identity_read.principal_id + _schema.tenant_id = cls._schema_identity_read.tenant_id + _schema.type = cls._schema_identity_read.type + return + + cls._schema_identity_read = _schema_identity_read = AAZObjectType() + + identity_read = _schema_identity_read + identity_read.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity_read.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity_read.type = AAZStrType() + + _schema.principal_id = cls._schema_identity_read.principal_id + _schema.tenant_id = cls._schema_identity_read.tenant_id + _schema.type = cls._schema_identity_read.type + + _schema_sku_read = None + + @classmethod + def _build_schema_sku_read(cls, _schema): + if cls._schema_sku_read is not None: + _schema.capacity = cls._schema_sku_read.capacity + _schema.family = cls._schema_sku_read.family + _schema.name = cls._schema_sku_read.name + _schema.size = cls._schema_sku_read.size + _schema.tier = cls._schema_sku_read.tier + return + + cls._schema_sku_read = _schema_sku_read = AAZObjectType() + + sku_read = _schema_sku_read + sku_read.capacity = AAZIntType() + sku_read.family = AAZStrType() + sku_read.name = AAZStrType( + flags={"required": True}, + ) + sku_read.size = AAZStrType() + sku_read.tier = AAZStrType() + + _schema.capacity = cls._schema_sku_read.capacity + _schema.family = cls._schema_sku_read.family + _schema.name = cls._schema_sku_read.name + _schema.size = cls._schema_sku_read.size + _schema.tier = cls._schema_sku_read.tier + + +__all__ = ["Show"] diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_update.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_update.py new file mode 100644 index 00000000000..ba6a4e977d1 --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_update.py @@ -0,0 +1,593 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "spatial-anchors-account update", + is_preview=True, +) +class Update(AAZCommand): + """Update a Spatial Anchors Account. + + :example: Update spatial anchors account + az spatial-anchors-account update -n "MyAccount" --resource-group "MyResourceGroup" --location "eastus2euap" --tags hero="romeo" heroine="juliet" + """ + + _aaz_info = { + "version": "2021-03-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.mixedreality/spatialanchorsaccounts/{}", "2021-03-01-preview"], + ] + } + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of an Mixed Reality Account.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[-\w\._\(\)]+$", + max_length=90, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.storage_account_name = AAZStrArg( + options=["--storage-account-name"], + arg_group="Properties", + help="The name of the storage account associated with this accountId", + nullable=True, + ) + + # define Arg Group "SpatialAnchorsAccount" + + _args_schema = cls._args_schema + _args_schema.kind = AAZObjectArg( + options=["--kind"], + arg_group="SpatialAnchorsAccount", + help="The kind of account, if supported", + nullable=True, + ) + cls._build_args_sku_update(_args_schema.kind) + _args_schema.sku = AAZObjectArg( + options=["--sku"], + arg_group="SpatialAnchorsAccount", + help="The sku associated with this account", + nullable=True, + ) + cls._build_args_sku_update(_args_schema.sku) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="SpatialAnchorsAccount", + help="Resource tags.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + _args_identity_update = None + + @classmethod + def _build_args_identity_update(cls, _schema): + if cls._args_identity_update is not None: + _schema.type = cls._args_identity_update.type + return + + cls._args_identity_update = AAZObjectArg( + nullable=True, + ) + + identity_update = cls._args_identity_update + identity_update.type = AAZStrArg( + options=["type"], + help="The identity type.", + nullable=True, + enum={"SystemAssigned": "SystemAssigned"}, + ) + + _schema.type = cls._args_identity_update.type + + _args_sku_update = None + + @classmethod + def _build_args_sku_update(cls, _schema): + if cls._args_sku_update is not None: + _schema.capacity = cls._args_sku_update.capacity + _schema.family = cls._args_sku_update.family + _schema.name = cls._args_sku_update.name + _schema.size = cls._args_sku_update.size + _schema.tier = cls._args_sku_update.tier + return + + cls._args_sku_update = AAZObjectArg( + nullable=True, + ) + + sku_update = cls._args_sku_update + sku_update.capacity = AAZIntArg( + options=["capacity"], + help="If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + nullable=True, + ) + sku_update.family = AAZStrArg( + options=["family"], + help="If the service has different generations of hardware, for the same SKU, then that can be captured here.", + nullable=True, + ) + sku_update.name = AAZStrArg( + options=["name"], + help="The name of the SKU. Ex - P3. It is typically a letter+number code", + ) + sku_update.size = AAZStrArg( + options=["size"], + help="The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", + nullable=True, + ) + sku_update.tier = AAZStrArg( + options=["tier"], + help="This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + nullable=True, + enum={"Basic": "Basic", "Free": "Free", "Premium": "Premium", "Standard": "Standard"}, + ) + + _schema.capacity = cls._args_sku_update.capacity + _schema.family = cls._args_sku_update.family + _schema.name = cls._args_sku_update.name + _schema.size = cls._args_sku_update.size + _schema.tier = cls._args_sku_update.tier + + def _execute_operations(self): + self.pre_operations() + self.SpatialAnchorsAccountsGet(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.SpatialAnchorsAccountsCreate(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 SpatialAnchorsAccountsGet(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.MixedReality/spatialAnchorsAccounts/{accountName}", + **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( + "accountName", 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", "2021-03-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_spatial_anchors_account_read(cls._schema_on_200) + + return cls._schema_on_200 + + class SpatialAnchorsAccountsCreate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}", + **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( + "accountName", 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", "2021-03-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_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_spatial_anchors_account_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 + ) + _UpdateHelper._build_schema_sku_update(_builder.set_prop("kind", AAZObjectType, ".kind")) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _UpdateHelper._build_schema_sku_update(_builder.set_prop("sku", AAZObjectType, ".sku")) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("storageAccountName", AAZStrType, ".storage_account_name") + + 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""" + + @classmethod + def _build_schema_identity_update(cls, _builder): + if _builder is None: + return + _builder.set_prop("type", AAZStrType, ".type") + + @classmethod + def _build_schema_sku_update(cls, _builder): + if _builder is None: + return + _builder.set_prop("capacity", AAZIntType, ".capacity") + _builder.set_prop("family", AAZStrType, ".family") + _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("size", AAZStrType, ".size") + _builder.set_prop("tier", AAZStrType, ".tier") + + _schema_identity_read = None + + @classmethod + def _build_schema_identity_read(cls, _schema): + if cls._schema_identity_read is not None: + _schema.principal_id = cls._schema_identity_read.principal_id + _schema.tenant_id = cls._schema_identity_read.tenant_id + _schema.type = cls._schema_identity_read.type + return + + cls._schema_identity_read = _schema_identity_read = AAZObjectType() + + identity_read = _schema_identity_read + identity_read.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity_read.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity_read.type = AAZStrType() + + _schema.principal_id = cls._schema_identity_read.principal_id + _schema.tenant_id = cls._schema_identity_read.tenant_id + _schema.type = cls._schema_identity_read.type + + _schema_sku_read = None + + @classmethod + def _build_schema_sku_read(cls, _schema): + if cls._schema_sku_read is not None: + _schema.capacity = cls._schema_sku_read.capacity + _schema.family = cls._schema_sku_read.family + _schema.name = cls._schema_sku_read.name + _schema.size = cls._schema_sku_read.size + _schema.tier = cls._schema_sku_read.tier + return + + cls._schema_sku_read = _schema_sku_read = AAZObjectType() + + sku_read = _schema_sku_read + sku_read.capacity = AAZIntType() + sku_read.family = AAZStrType() + sku_read.name = AAZStrType( + flags={"required": True}, + ) + sku_read.size = AAZStrType() + sku_read.tier = AAZStrType() + + _schema.capacity = cls._schema_sku_read.capacity + _schema.family = cls._schema_sku_read.family + _schema.name = cls._schema_sku_read.name + _schema.size = cls._schema_sku_read.size + _schema.tier = cls._schema_sku_read.tier + + _schema_spatial_anchors_account_read = None + + @classmethod + def _build_schema_spatial_anchors_account_read(cls, _schema): + if cls._schema_spatial_anchors_account_read is not None: + _schema.id = cls._schema_spatial_anchors_account_read.id + _schema.identity = cls._schema_spatial_anchors_account_read.identity + _schema.kind = cls._schema_spatial_anchors_account_read.kind + _schema.location = cls._schema_spatial_anchors_account_read.location + _schema.name = cls._schema_spatial_anchors_account_read.name + _schema.plan = cls._schema_spatial_anchors_account_read.plan + _schema.properties = cls._schema_spatial_anchors_account_read.properties + _schema.sku = cls._schema_spatial_anchors_account_read.sku + _schema.system_data = cls._schema_spatial_anchors_account_read.system_data + _schema.tags = cls._schema_spatial_anchors_account_read.tags + _schema.type = cls._schema_spatial_anchors_account_read.type + return + + cls._schema_spatial_anchors_account_read = _schema_spatial_anchors_account_read = AAZObjectType() + + spatial_anchors_account_read = _schema_spatial_anchors_account_read + spatial_anchors_account_read.id = AAZStrType( + flags={"read_only": True}, + ) + spatial_anchors_account_read.identity = AAZObjectType() + cls._build_schema_identity_read(spatial_anchors_account_read.identity) + spatial_anchors_account_read.kind = AAZObjectType() + cls._build_schema_sku_read(spatial_anchors_account_read.kind) + spatial_anchors_account_read.location = AAZStrType( + flags={"required": True}, + ) + spatial_anchors_account_read.name = AAZStrType( + flags={"read_only": True}, + ) + spatial_anchors_account_read.plan = AAZObjectType() + cls._build_schema_identity_read(spatial_anchors_account_read.plan) + spatial_anchors_account_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + spatial_anchors_account_read.sku = AAZObjectType() + cls._build_schema_sku_read(spatial_anchors_account_read.sku) + spatial_anchors_account_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + spatial_anchors_account_read.tags = AAZDictType() + spatial_anchors_account_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_spatial_anchors_account_read.properties + properties.account_domain = AAZStrType( + serialized_name="accountDomain", + flags={"read_only": True}, + ) + properties.account_id = AAZStrType( + serialized_name="accountId", + flags={"read_only": True}, + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) + + system_data = _schema_spatial_anchors_account_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = _schema_spatial_anchors_account_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_spatial_anchors_account_read.id + _schema.identity = cls._schema_spatial_anchors_account_read.identity + _schema.kind = cls._schema_spatial_anchors_account_read.kind + _schema.location = cls._schema_spatial_anchors_account_read.location + _schema.name = cls._schema_spatial_anchors_account_read.name + _schema.plan = cls._schema_spatial_anchors_account_read.plan + _schema.properties = cls._schema_spatial_anchors_account_read.properties + _schema.sku = cls._schema_spatial_anchors_account_read.sku + _schema.system_data = cls._schema_spatial_anchors_account_read.system_data + _schema.tags = cls._schema_spatial_anchors_account_read.tags + _schema.type = cls._schema_spatial_anchors_account_read.type + + +__all__ = ["Update"] diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/__cmd_group.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/__cmd_group.py new file mode 100644 index 00000000000..3b468143657 --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "spatial-anchors-account key", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """Manage developer keys of a spatial anchors account. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/__init__.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/__init__.py new file mode 100644 index 00000000000..1a68789fce7 --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/__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 ._renew import * +from ._show import * diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_renew.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_renew.py new file mode 100644 index 00000000000..f85d8ee58ea --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_renew.py @@ -0,0 +1,203 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "spatial-anchors-account key renew", + is_preview=True, +) +class Renew(AAZCommand): + """Regenerate specified Key of a Spatial Anchors Account + + :example: Regenerate spatial anchors account keys + az spatial-anchors-account key renew -n "MyAccount" -k primary --resource-group "MyResourceGroup" + """ + + _aaz_info = { + "version": "2021-03-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.mixedreality/spatialanchorsaccounts/{}/regeneratekeys", "2021-03-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of an Mixed Reality Account.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[-\w\._\(\)]+$", + max_length=90, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Regenerate" + + _args_schema = cls._args_schema + _args_schema.serial = AAZIntArg( + options=["--serial"], + arg_group="Regenerate", + help="Serial of key to be regenerated", + default=1, + enum={"1": 1, "2": 2}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SpatialAnchorsAccountsRegenerateKeys(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 SpatialAnchorsAccountsRegenerateKeys(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.MixedReality/spatialAnchorsAccounts/{accountName}/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( + "accountName", 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", "2021-03-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("serial", AAZIntType, ".serial") + + 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.primary_key = AAZStrType( + serialized_name="primaryKey", + flags={"secret": True, "read_only": True}, + ) + _schema_on_200.secondary_key = AAZStrType( + serialized_name="secondaryKey", + flags={"secret": True, "read_only": True}, + ) + + return cls._schema_on_200 + + +class _RenewHelper: + """Helper class for Renew""" + + +__all__ = ["Renew"] diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_show.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_show.py new file mode 100644 index 00000000000..d9da03b4cbe --- /dev/null +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_show.py @@ -0,0 +1,178 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "spatial-anchors-account key show", + is_preview=True, +) +class Show(AAZCommand): + """List Both of the 2 Keys of a Spatial Anchors Account + + :example: List spatial anchor account key + az spatial-anchors-account key show -n "MyAccount" --resource-group "MyResourceGroup" + """ + + _aaz_info = { + "version": "2021-03-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.mixedreality/spatialanchorsaccounts/{}/listkeys", "2021-03-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of an Mixed Reality Account.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[-\w\._\(\)]+$", + max_length=90, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SpatialAnchorsAccountsListKeys(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 SpatialAnchorsAccountsListKeys(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.MixedReality/spatialAnchorsAccounts/{accountName}/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( + "accountName", 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", "2021-03-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.primary_key = AAZStrType( + serialized_name="primaryKey", + flags={"secret": True, "read_only": True}, + ) + _schema_on_200.secondary_key = AAZStrType( + serialized_name="secondaryKey", + flags={"secret": True, "read_only": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/mixed-reality/azext_mixed_reality/azext_metadata.json b/src/mixed-reality/azext_mixed_reality/azext_metadata.json index 30fdaf614ee..7923ce3c67b 100644 --- a/src/mixed-reality/azext_mixed_reality/azext_metadata.json +++ b/src/mixed-reality/azext_mixed_reality/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.isPreview": true, - "azext.minCliCoreVersion": "2.15.0" + "azext.minCliCoreVersion": "2.49.0" } \ No newline at end of file From 2a8189cf36fe1ab4221702017c6fd9001779875a Mon Sep 17 00:00:00 2001 From: Zhiyi Huang <17182306+calvinhzy@users.noreply.github.com> Date: Tue, 27 Jun 2023 13:07:07 +0800 Subject: [PATCH 2/8] fix swagger to not mark account key as secret(hidden) --- .../aaz/latest/remote_rendering_account/key/_renew.py | 4 ++-- .../aaz/latest/remote_rendering_account/key/_show.py | 4 ++-- .../aaz/latest/spatial_anchors_account/key/_renew.py | 4 ++-- .../aaz/latest/spatial_anchors_account/key/_show.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_renew.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_renew.py index 17ebb1d52ec..ee87ee99b64 100644 --- a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_renew.py +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_renew.py @@ -186,11 +186,11 @@ def _build_schema_on_200(cls): _schema_on_200 = cls._schema_on_200 _schema_on_200.primary_key = AAZStrType( serialized_name="primaryKey", - flags={"secret": True, "read_only": True}, + flags={"read_only": True}, ) _schema_on_200.secondary_key = AAZStrType( serialized_name="secondaryKey", - flags={"secret": True, "read_only": True}, + flags={"read_only": True}, ) return cls._schema_on_200 diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_show.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_show.py index e1ca89df42e..99865335f9d 100644 --- a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_show.py +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_show.py @@ -161,11 +161,11 @@ def _build_schema_on_200(cls): _schema_on_200 = cls._schema_on_200 _schema_on_200.primary_key = AAZStrType( serialized_name="primaryKey", - flags={"secret": True, "read_only": True}, + flags={"read_only": True}, ) _schema_on_200.secondary_key = AAZStrType( serialized_name="secondaryKey", - flags={"secret": True, "read_only": True}, + flags={"read_only": True}, ) return cls._schema_on_200 diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_renew.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_renew.py index f85d8ee58ea..ad1499dbaaa 100644 --- a/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_renew.py +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_renew.py @@ -186,11 +186,11 @@ def _build_schema_on_200(cls): _schema_on_200 = cls._schema_on_200 _schema_on_200.primary_key = AAZStrType( serialized_name="primaryKey", - flags={"secret": True, "read_only": True}, + flags={"read_only": True}, ) _schema_on_200.secondary_key = AAZStrType( serialized_name="secondaryKey", - flags={"secret": True, "read_only": True}, + flags={"read_only": True}, ) return cls._schema_on_200 diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_show.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_show.py index d9da03b4cbe..3c2ecb39848 100644 --- a/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_show.py +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_show.py @@ -161,11 +161,11 @@ def _build_schema_on_200(cls): _schema_on_200 = cls._schema_on_200 _schema_on_200.primary_key = AAZStrType( serialized_name="primaryKey", - flags={"secret": True, "read_only": True}, + flags={"read_only": True}, ) _schema_on_200.secondary_key = AAZStrType( serialized_name="secondaryKey", - flags={"secret": True, "read_only": True}, + flags={"read_only": True}, ) return cls._schema_on_200 From 5489b745bee039be89e0463cf3080f5e4bcbd92f Mon Sep 17 00:00:00 2001 From: Zhiyi Huang <17182306+calvinhzy@users.noreply.github.com> Date: Tue, 27 Jun 2023 13:39:05 +0800 Subject: [PATCH 3/8] fix for `az spatial-anchors-account create` make --sku equal to --kind if exist. `az spatial-anchors-account key renew` bring back `--key` instead of --serial --- .../azext_mixed_reality/_params.py | 47 +-- .../azext_mixed_reality/commands.py | 72 ++-- .../azext_mixed_reality/custom.py | 370 ++++++++++-------- ...test_spatial_anchors_account_scenario.yaml | 209 ++++------ .../latest/test_spatial_anchors_account.py | 2 +- 5 files changed, 344 insertions(+), 356 deletions(-) diff --git a/src/mixed-reality/azext_mixed_reality/_params.py b/src/mixed-reality/azext_mixed_reality/_params.py index 9deecaa377b..c82693fe3ed 100644 --- a/src/mixed-reality/azext_mixed_reality/_params.py +++ b/src/mixed-reality/azext_mixed_reality/_params.py @@ -22,26 +22,27 @@ def load_arguments(self, _): - with self.argument_context('spatial-anchors-account') as c: - c.argument('resource_group_name', arg_type=resource_group_name_type) - c.argument('account_name', type=str, help='Name of an mixed reality account.', arg_type=name_type, id_part='name') # pylint: disable=line-too-long - c.argument('location', arg_type=get_location_type(self.cli_ctx), validator=get_default_location_from_resource_group) # pylint: disable=line-too-long - c.argument('tags', arg_type=tags_type) - c.argument('sku', action=AddSku, nargs='+', help='The SKU associated with this account') - c.argument('kind', action=AddSku, nargs='+', help='The kind of account, if supported') - c.argument('storage_account_name', type=str, help='The name of the storage account associated with this accountId') # pylint: disable=line-too-long - - with self.argument_context('spatial-anchors-account key renew') as c: - c.argument('key', arg_type=account_key_type) - - with self.argument_context('remote-rendering-account') as c: - c.argument('resource_group_name', resource_group_name_type) - c.argument('account_name', type=str, help='Name of an mixed reality account.', arg_type=name_type, id_part='name') # pylint: disable=line-too-long - c.argument('tags', arg_type=tags_type) - c.argument('location', arg_type=get_location_type(self.cli_ctx), validator=get_default_location_from_resource_group) # pylint: disable=line-too-long - c.argument('sku', action=AddSku, nargs='+', help='The SKU associated with this account') - c.argument('kind', action=AddSku, nargs='+', help='The kind of account, if supported') - c.argument('storage_account_name', type=str, help='The name of the storage account associated with this accountId') # pylint: disable=line-too-long - - with self.argument_context('remote-rendering-account key renew') as c: - c.argument('key', arg_type=account_key_type) + pass + # with self.argument_context('spatial-anchors-account') as c: + # c.argument('resource_group_name', arg_type=resource_group_name_type) + # c.argument('account_name', type=str, help='Name of an mixed reality account.', arg_type=name_type, id_part='name') # pylint: disable=line-too-long + # c.argument('location', arg_type=get_location_type(self.cli_ctx), validator=get_default_location_from_resource_group) # pylint: disable=line-too-long + # c.argument('tags', arg_type=tags_type) + # c.argument('sku', action=AddSku, nargs='+', help='The SKU associated with this account') + # c.argument('kind', action=AddSku, nargs='+', help='The kind of account, if supported') + # c.argument('storage_account_name', type=str, help='The name of the storage account associated with this accountId') # pylint: disable=line-too-long + # + # with self.argument_context('spatial-anchors-account key renew') as c: + # c.argument('key', arg_type=account_key_type) + # + # with self.argument_context('remote-rendering-account') as c: + # c.argument('resource_group_name', resource_group_name_type) + # c.argument('account_name', type=str, help='Name of an mixed reality account.', arg_type=name_type, id_part='name') # pylint: disable=line-too-long + # c.argument('tags', arg_type=tags_type) + # c.argument('location', arg_type=get_location_type(self.cli_ctx), validator=get_default_location_from_resource_group) # pylint: disable=line-too-long + # c.argument('sku', action=AddSku, nargs='+', help='The SKU associated with this account') + # c.argument('kind', action=AddSku, nargs='+', help='The kind of account, if supported') + # c.argument('storage_account_name', type=str, help='The name of the storage account associated with this accountId') # pylint: disable=line-too-long + # + # with self.argument_context('remote-rendering-account key renew') as c: + # c.argument('key', arg_type=account_key_type) diff --git a/src/mixed-reality/azext_mixed_reality/commands.py b/src/mixed-reality/azext_mixed_reality/commands.py index 0f4c81c8b14..8ef3b95b170 100644 --- a/src/mixed-reality/azext_mixed_reality/commands.py +++ b/src/mixed-reality/azext_mixed_reality/commands.py @@ -4,40 +4,48 @@ # -------------------------------------------------------------------------------------------- from azure.cli.core.commands import CliCommandType -from ._client_factory import cf_spatial_anchor_account, cf_remote_rendering_account # pylint: disable=line-too-long def load_command_table(self, _): - spatial_anchor_account = CliCommandType( - operations_tmpl='azext_mixed_reality.vendored_sdks.mixedreality.operations._spatial_anchors_accounts_operations#SpatialAnchorsAccountsOperations.{}', - client_factory=cf_spatial_anchor_account - ) - - remote_rendering_account = CliCommandType( - operations_tmpl='azext_mixed_reality.vendored_sdks.mixedreality.operations._remote_rendering_accounts_operations#RemoteRenderingAccountsOperations.{}', - client_factory=cf_remote_rendering_account - ) - - with self.command_group('spatial-anchors-account', spatial_anchor_account, is_preview=True) as g: - g.custom_command('create', 'spatial_anchor_account_create') - g.custom_command('list', 'spatial_anchor_account_list') - g.custom_show_command('show', 'spatial_anchor_account_show') - g.generic_update_command('update', setter_name='update', custom_func_name='spatial_anchor_account_update', setter_arg_name='spatial_anchors_account') - g.custom_command('delete', 'spatial_anchor_account_delete') - - with self.command_group('spatial-anchors-account key', spatial_anchor_account, is_preview=True) as g: - g.custom_show_command('show', 'spatial_anchor_account_list_key') - g.custom_command('renew', 'spatial_anchor_account_regenerate_key') - - with self.command_group('remote-rendering-account', remote_rendering_account, is_preview=True) as g: - g.custom_command('create', 'remote_rendering_account_create') - g.custom_command('update', 'remote_rendering_account_update') - g.custom_command('list', 'remote_rendering_account_list') - g.custom_show_command('show', 'remote_rendering_account_show') - g.custom_command('delete', 'remote_rendering_account_delete') - - with self.command_group('remote-rendering-account key', remote_rendering_account, is_preview=True) as g: - g.custom_show_command('show', 'remote_rendering_account_list_key') - g.custom_command('renew', 'remote_rendering_account_regenerate_key') + with self.command_group('spatial-anchors-account') as g: + from .custom import SpatialAnchorsCreate, SpatialAnchorsKeyRenew + self.command_table['spatial-anchors-account create'] = SpatialAnchorsCreate(loader=self) + self.command_table['spatial-anchors-account key renew'] = SpatialAnchorsKeyRenew(loader=self) + + # with self.command_group('spatial-anchors-account key'): + + + + # spatial_anchor_account = CliCommandType( + # operations_tmpl='azext_mixed_reality.vendored_sdks.mixedreality.operations._spatial_anchors_accounts_operations#SpatialAnchorsAccountsOperations.{}', + # client_factory=cf_spatial_anchor_account + # ) + # + # remote_rendering_account = CliCommandType( + # operations_tmpl='azext_mixed_reality.vendored_sdks.mixedreality.operations._remote_rendering_accounts_operations#RemoteRenderingAccountsOperations.{}', + # client_factory=cf_remote_rendering_account + # ) + + # with self.command_group('spatial-anchors-account', spatial_anchor_account, is_preview=True) as g: + # # g.custom_command('create', 'spatial_anchor_account_create') + # g.custom_command('list', 'spatial_anchor_account_list') + # g.custom_show_command('show', 'spatial_anchor_account_show') + # g.generic_update_command('update', setter_name='update', custom_func_name='spatial_anchor_account_update', setter_arg_name='spatial_anchors_account') + # g.custom_command('delete', 'spatial_anchor_account_delete') + # + # with self.command_group('spatial-anchors-account key', spatial_anchor_account, is_preview=True) as g: + # g.custom_show_command('show', 'spatial_anchor_account_list_key') + # g.custom_command('renew', 'spatial_anchor_account_regenerate_key') + # + # with self.command_group('remote-rendering-account', remote_rendering_account, is_preview=True) as g: + # g.custom_command('create', 'remote_rendering_account_create') + # g.custom_command('update', 'remote_rendering_account_update') + # g.custom_command('list', 'remote_rendering_account_list') + # g.custom_show_command('show', 'remote_rendering_account_show') + # g.custom_command('delete', 'remote_rendering_account_delete') + # + # with self.command_group('remote-rendering-account key', remote_rendering_account, is_preview=True) as g: + # g.custom_show_command('show', 'remote_rendering_account_list_key') + # g.custom_command('renew', 'remote_rendering_account_regenerate_key') diff --git a/src/mixed-reality/azext_mixed_reality/custom.py b/src/mixed-reality/azext_mixed_reality/custom.py index 5180a038514..933e5147ee2 100644 --- a/src/mixed-reality/azext_mixed_reality/custom.py +++ b/src/mixed-reality/azext_mixed_reality/custom.py @@ -7,171 +7,205 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- -import json -from ._client_factory import cf_spatial_anchor_account, cf_remote_rendering_account - - -def spatial_anchor_account_list(cmd, - resource_group_name=None): - client = cf_spatial_anchor_account(cmd.cli_ctx) - if resource_group_name: - return client.list_by_resource_group(resource_group_name=resource_group_name) - return client.list_by_subscription() - - -def spatial_anchor_account_show(cmd, - resource_group_name, - account_name): - client = cf_spatial_anchor_account(cmd.cli_ctx) - return client.get(resource_group_name=resource_group_name, - account_name=account_name) - - -def spatial_anchor_account_create(cmd, - resource_group_name, - account_name, - location=None, - tags=None, - sku=None, - kind=None, - storage_account_name=None): - spatial_anchors_account = {} - spatial_anchors_account['tags'] = tags - spatial_anchors_account['location'] = location - spatial_anchors_account['sku'] = sku - spatial_anchors_account['kind'] = kind - spatial_anchors_account['storage_account_name'] = storage_account_name - client = cf_spatial_anchor_account(cmd.cli_ctx) - return client.create(resource_group_name=resource_group_name, - account_name=account_name, - spatial_anchors_account=spatial_anchors_account) - - -def spatial_anchor_account_update(cmd, - instance, - location=None, - tags=None, - sku=None, - kind=None, - storage_account_name=None): - with cmd.update_context(instance) as c: - c.set_param('tags', tags) - c.set_param('location', location) - c.set_param('sku', sku) - c.set_param('kind', kind) - c.set_param('storage_account_name', storage_account_name) - return instance - - -def spatial_anchor_account_delete(cmd, - resource_group_name, - account_name): - client = cf_spatial_anchor_account(cmd.cli_ctx) - return client.delete(resource_group_name=resource_group_name, - account_name=account_name) - - -def spatial_anchor_account_list_key(cmd, - resource_group_name, - account_name): - client = cf_spatial_anchor_account(cmd.cli_ctx) - return client.list_keys(resource_group_name=resource_group_name, - account_name=account_name) - - -def spatial_anchor_account_regenerate_key(cmd, - resource_group_name, - account_name, - key=None): - regenerate = {} - regenerate['serial'] = ['primary', 'secondary'].index(key) + 1 - client = cf_spatial_anchor_account(cmd.cli_ctx) - return client.regenerate_keys(resource_group_name=resource_group_name, - account_name=account_name, - regenerate=regenerate) - - -def remote_rendering_account_list(cmd, - resource_group_name=None): - client = cf_remote_rendering_account(cmd.cli_ctx) - if resource_group_name: - return client.list_by_resource_group(resource_group_name=resource_group_name) - return client.list_by_subscription() - - -def remote_rendering_account_show(cmd, - resource_group_name, - account_name): - client = cf_remote_rendering_account(cmd.cli_ctx) - return client.get(resource_group_name=resource_group_name, - account_name=account_name) - - -def remote_rendering_account_create(cmd, - resource_group_name, - account_name, - location=None, - tags=None, - sku=None, - kind=None, - storage_account_name=None): - remote_rendering_account = {} - remote_rendering_account['tags'] = tags - remote_rendering_account['location'] = location - remote_rendering_account['identity'] = json.loads("{\"type\": \"SystemAssigned\"}") - remote_rendering_account['sku'] = sku - remote_rendering_account['kind'] = kind - remote_rendering_account['storage_account_name'] = storage_account_name - client = cf_remote_rendering_account(cmd.cli_ctx) - return client.create(resource_group_name=resource_group_name, - account_name=account_name, - remote_rendering_account=remote_rendering_account) - - -def remote_rendering_account_update(cmd, - resource_group_name, - account_name, - location=None, - tags=None, - sku=None, - kind=None, - storage_account_name=None): - remote_rendering_account = {} - remote_rendering_account['tags'] = tags - remote_rendering_account['location'] = location - remote_rendering_account['identity'] = json.loads("{\"type\": \"SystemAssigned\"}") - remote_rendering_account['sku'] = sku - remote_rendering_account['kind'] = kind - remote_rendering_account['storage_account_name'] = storage_account_name - client = cf_remote_rendering_account(cmd.cli_ctx) - return client.update(resource_group_name=resource_group_name, - account_name=account_name, - remote_rendering_account=remote_rendering_account) - - -def remote_rendering_account_delete(cmd, - resource_group_name, - account_name): - client = cf_remote_rendering_account(cmd.cli_ctx) - return client.delete(resource_group_name=resource_group_name, - account_name=account_name) - - -def remote_rendering_account_list_key(cmd, - resource_group_name, - account_name): - client = cf_remote_rendering_account(cmd.cli_ctx) - return client.list_keys(resource_group_name=resource_group_name, - account_name=account_name) - - -def remote_rendering_account_regenerate_key(cmd, - resource_group_name, - account_name, - key=None): - regenerate = {} - regenerate['serial'] = ['primary', 'secondary'].index(key) + 1 - client = cf_remote_rendering_account(cmd.cli_ctx) - return client.regenerate_keys(resource_group_name=resource_group_name, - account_name=account_name, - regenerate=regenerate) +from azure.cli.core.aaz import has_value +from .aaz.latest.spatial_anchors_account import Create as _SpatialAnchorsCreate +from .aaz.latest.spatial_anchors_account.key import Renew as _SpatialAnchorsKeyRenew + + +class SpatialAnchorsCreate(_SpatialAnchorsCreate): + def pre_operations(self): + args = self.ctx.args + if has_value(args.kind): + args.sku = args.kind + del args.kind + + + +class SpatialAnchorsKeyRenew(_SpatialAnchorsKeyRenew): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg, AAZArgEnum + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.key = AAZStrArg( + options=["--key", "-k"], + help="Key to be regenerated.", + default="primary" + ) + args_schema.key.enum = AAZArgEnum({"primary":"primary", "secondary":"secondary"}) + args_schema.serial._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + if has_value(args.key): + args.serial = 1 if str(args.key).lower() == 'primary' else 2 + del args.key + +# import json +# from ._client_factory import cf_spatial_anchor_account, cf_remote_rendering_account +# +# +# def spatial_anchor_account_list(cmd, +# resource_group_name=None): +# client = cf_spatial_anchor_account(cmd.cli_ctx) +# if resource_group_name: +# return client.list_by_resource_group(resource_group_name=resource_group_name) +# return client.list_by_subscription() +# +# +# def spatial_anchor_account_show(cmd, +# resource_group_name, +# account_name): +# client = cf_spatial_anchor_account(cmd.cli_ctx) +# return client.get(resource_group_name=resource_group_name, +# account_name=account_name) +# +# +# def spatial_anchor_account_create(cmd, +# resource_group_name, +# account_name, +# location=None, +# tags=None, +# sku=None, +# kind=None, +# storage_account_name=None): +# spatial_anchors_account = {} +# spatial_anchors_account['tags'] = tags +# spatial_anchors_account['location'] = location +# spatial_anchors_account['sku'] = sku +# spatial_anchors_account['kind'] = kind +# spatial_anchors_account['storage_account_name'] = storage_account_name +# client = cf_spatial_anchor_account(cmd.cli_ctx) +# return client.create(resource_group_name=resource_group_name, +# account_name=account_name, +# spatial_anchors_account=spatial_anchors_account) +# +# +# def spatial_anchor_account_update(cmd, +# instance, +# location=None, +# tags=None, +# sku=None, +# kind=None, +# storage_account_name=None): +# with cmd.update_context(instance) as c: +# c.set_param('tags', tags) +# c.set_param('location', location) +# c.set_param('sku', sku) +# c.set_param('kind', kind) +# c.set_param('storage_account_name', storage_account_name) +# return instance +# +# +# def spatial_anchor_account_delete(cmd, +# resource_group_name, +# account_name): +# client = cf_spatial_anchor_account(cmd.cli_ctx) +# return client.delete(resource_group_name=resource_group_name, +# account_name=account_name) +# +# +# def spatial_anchor_account_list_key(cmd, +# resource_group_name, +# account_name): +# client = cf_spatial_anchor_account(cmd.cli_ctx) +# return client.list_keys(resource_group_name=resource_group_name, +# account_name=account_name) +# +# +# def spatial_anchor_account_regenerate_key(cmd, +# resource_group_name, +# account_name, +# key=None): +# regenerate = {} +# regenerate['serial'] = ['primary', 'secondary'].index(key) + 1 +# client = cf_spatial_anchor_account(cmd.cli_ctx) +# return client.regenerate_keys(resource_group_name=resource_group_name, +# account_name=account_name, +# regenerate=regenerate) +# +# +# def remote_rendering_account_list(cmd, +# resource_group_name=None): +# client = cf_remote_rendering_account(cmd.cli_ctx) +# if resource_group_name: +# return client.list_by_resource_group(resource_group_name=resource_group_name) +# return client.list_by_subscription() +# +# +# def remote_rendering_account_show(cmd, +# resource_group_name, +# account_name): +# client = cf_remote_rendering_account(cmd.cli_ctx) +# return client.get(resource_group_name=resource_group_name, +# account_name=account_name) +# +# +# def remote_rendering_account_create(cmd, +# resource_group_name, +# account_name, +# location=None, +# tags=None, +# sku=None, +# kind=None, +# storage_account_name=None): +# remote_rendering_account = {} +# remote_rendering_account['tags'] = tags +# remote_rendering_account['location'] = location +# remote_rendering_account['identity'] = json.loads("{\"type\": \"SystemAssigned\"}") +# remote_rendering_account['sku'] = sku +# remote_rendering_account['kind'] = kind +# remote_rendering_account['storage_account_name'] = storage_account_name +# client = cf_remote_rendering_account(cmd.cli_ctx) +# return client.create(resource_group_name=resource_group_name, +# account_name=account_name, +# remote_rendering_account=remote_rendering_account) +# +# +# def remote_rendering_account_update(cmd, +# resource_group_name, +# account_name, +# location=None, +# tags=None, +# sku=None, +# kind=None, +# storage_account_name=None): +# remote_rendering_account = {} +# remote_rendering_account['tags'] = tags +# remote_rendering_account['location'] = location +# remote_rendering_account['identity'] = json.loads("{\"type\": \"SystemAssigned\"}") +# remote_rendering_account['sku'] = sku +# remote_rendering_account['kind'] = kind +# remote_rendering_account['storage_account_name'] = storage_account_name +# client = cf_remote_rendering_account(cmd.cli_ctx) +# return client.update(resource_group_name=resource_group_name, +# account_name=account_name, +# remote_rendering_account=remote_rendering_account) +# +# +# def remote_rendering_account_delete(cmd, +# resource_group_name, +# account_name): +# client = cf_remote_rendering_account(cmd.cli_ctx) +# return client.delete(resource_group_name=resource_group_name, +# account_name=account_name) +# +# +# def remote_rendering_account_list_key(cmd, +# resource_group_name, +# account_name): +# client = cf_remote_rendering_account(cmd.cli_ctx) +# return client.list_keys(resource_group_name=resource_group_name, +# account_name=account_name) +# +# +# def remote_rendering_account_regenerate_key(cmd, +# resource_group_name, +# account_name, +# key=None): +# regenerate = {} +# regenerate['serial'] = ['primary', 'secondary'].index(key) + 1 +# client = cf_remote_rendering_account(cmd.cli_ctx) +# return client.regenerate_keys(resource_group_name=resource_group_name, +# account_name=account_name, +# regenerate=regenerate) diff --git a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml index 66537e318d3..d374ce34b14 100644 --- a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml +++ b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml @@ -13,28 +13,29 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.46.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/23.0.1 Python/3.9.6 (Windows-10-10.0.19045-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":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2023-03-28T10:59:59Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-27T05:07:31Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '311' + - '383' content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 11:00:00 GMT + - Tue, 27 Jun 2023 05:07:37 GMT expires: - '-1' pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding x-content-type-options: - nosniff status: @@ -58,13 +59,12 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"mixedreality.azure.com","accountId":"6b65d2ec-f9ad-42fe-83b0-b4f688e2232a"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"mixedreality.azure.com","accountId":"0192b519-bebc-4dcb-b129-18eedc54b713"}}' headers: cache-control: - no-cache @@ -73,13 +73,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 11:00:01 GMT + - Tue, 27 Jun 2023 05:07:43 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name ms-cv: - - 3bhZj/w9W0ubPV4Kgi0Iww.0 + - 2TPjx1EbhUOL1ONKtmtBQg.0 pragma: - no-cache strict-transport-security: @@ -87,7 +87,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1199' status: code: 201 message: Created @@ -103,24 +103,23 @@ interactions: Connection: - keep-alive ParameterSetName: - - -g -n --storage-account-name --tag + - -g -n --storage-account-name --tag --kind User-Agent: - - AZURECLI/2.46.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/23.0.1 Python/3.9.6 (Windows-10-10.0.19045-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":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2023-03-28T10:59:59Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-27T05:07:31Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '311' + - '383' content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 11:00:01 GMT + - Tue, 27 Jun 2023 05:07:44 GMT expires: - '-1' pragma: @@ -135,8 +134,8 @@ interactions: code: 200 message: OK - request: - body: '{"tags": {"tag": "tag"}, "location": "eastus2", "properties": {"storageAccountName": - "storage_account_name"}}' + body: '{"location": "eastus2", "properties": {"storageAccountName": "storage_account_name"}, + "sku": {"name": "P3"}, "tags": {"tag": "tag"}}' headers: Accept: - application/json @@ -147,19 +146,18 @@ interactions: Connection: - keep-alive Content-Length: - - '109' + - '132' Content-Type: - application/json ParameterSetName: - - -g -n --storage-account-name --tag + - -g -n --storage-account-name --tag --kind User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"c5c3bfc2-b343-4ac6-a4cc-c12acf1d38e8"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"e1442b49-b238-474e-8cd6-30de04d8d436"}}' headers: cache-control: - no-cache @@ -168,13 +166,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 11:00:02 GMT + - Tue, 27 Jun 2023 05:07:51 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1 ms-cv: - - 3VIAPG8aSkO638wxHsDWqA.0 + - nTHZz0hVFUGX+k1VRJDLiw.0 pragma: - no-cache strict-transport-security: @@ -182,7 +180,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1199' status: code: 201 message: Created @@ -200,56 +198,12 @@ interactions: ParameterSetName: - -g -n --storage-account-name User-Agent: - - AZURECLI/2.46.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2022-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2023-03-28T10:59:59Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '311' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 28 Mar 2023 11:00:02 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - spatial-anchors-account update - Connection: - - keep-alive - ParameterSetName: - - -g -n --storage-account-name - User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-01-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"mixedreality.azure.com","accountId":"6b65d2ec-f9ad-42fe-83b0-b4f688e2232a"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"mixedreality.azure.com","accountId":"0192b519-bebc-4dcb-b129-18eedc54b713"}}' headers: cache-control: - no-cache @@ -258,11 +212,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 11:00:03 GMT + - Tue, 27 Jun 2023 05:07:54 GMT expires: - '-1' ms-cv: - - WjhypcMkh0GQrKQogPC/tw.0 + - 9j59dshLm0yDzZHC/mwFwQ.0 pragma: - no-cache strict-transport-security: @@ -277,8 +231,8 @@ interactions: code: 200 message: OK - request: - body: '{"tags": {}, "location": "eastus2", "properties": {"storageAccountName": - "storage_account_name1"}}' + body: '{"location": "eastus2", "properties": {"storageAccountName": "storage_account_name1"}, + "tags": {}}' headers: Accept: - application/json @@ -295,13 +249,12 @@ interactions: ParameterSetName: - -g -n --storage-account-name User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-01-01 + - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"6b65d2ec-f9ad-42fe-83b0-b4f688e2232a"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"0192b519-bebc-4dcb-b129-18eedc54b713"}}' headers: cache-control: - no-cache @@ -310,11 +263,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 11:00:03 GMT + - Tue, 27 Jun 2023 05:07:55 GMT expires: - '-1' ms-cv: - - zHtq6XOYykCryUY2gvff1Q.0 + - 4a3t/yKQhkec2tZgIRtlXw.0 pragma: - no-cache strict-transport-security: @@ -344,13 +297,12 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"6b65d2ec-f9ad-42fe-83b0-b4f688e2232a"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"0192b519-bebc-4dcb-b129-18eedc54b713"}}' headers: cache-control: - no-cache @@ -359,11 +311,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 11:00:03 GMT + - Tue, 27 Jun 2023 05:07:58 GMT expires: - '-1' ms-cv: - - Dk0XLHTzoUKaBrbbUJF01A.0 + - cR7hgUewREaQnV5/Bq0FDA.0 pragma: - no-cache strict-transport-security: @@ -391,13 +343,12 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"6b65d2ec-f9ad-42fe-83b0-b4f688e2232a"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"c5c3bfc2-b343-4ac6-a4cc-c12acf1d38e8"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"0192b519-bebc-4dcb-b129-18eedc54b713"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"e1442b49-b238-474e-8cd6-30de04d8d436"}}]}' headers: cache-control: - no-cache @@ -406,11 +357,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 11:00:03 GMT + - Tue, 27 Jun 2023 05:08:00 GMT expires: - '-1' ms-cv: - - sJajFyqS8EahdpAhtCN+ig.0 + - y79M77EyFEGoj7dwFLg8ng.0 pragma: - no-cache strict-transport-security: @@ -428,7 +379,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -440,10 +391,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1?api-version=2021-03-01-preview response: body: string: '' @@ -453,11 +403,11 @@ interactions: content-length: - '0' date: - - Tue, 28 Mar 2023 11:00:04 GMT + - Tue, 27 Jun 2023 05:08:07 GMT expires: - '-1' ms-cv: - - 3B7uoZnb60O10Qp0y2Yx/A.0 + - mV3tQctH20CtBqIvwdZudA.0 pragma: - no-cache strict-transport-security: @@ -483,13 +433,12 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"6b65d2ec-f9ad-42fe-83b0-b4f688e2232a"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"0192b519-bebc-4dcb-b129-18eedc54b713"}}]}' headers: cache-control: - no-cache @@ -498,11 +447,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 11:00:04 GMT + - Tue, 27 Jun 2023 05:08:09 GMT expires: - '-1' ms-cv: - - jiRCRf9uMkGpsm3HoFMhBA.0 + - 9Hyj8hFohUKdgVVGv5fnMg.0 pragma: - no-cache strict-transport-security: @@ -532,10 +481,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name/listKeys?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name/listKeys?api-version=2021-03-01-preview response: body: string: '{"primaryKey":"mock_key","secondaryKey":"mock_key"}' @@ -547,11 +495,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 11:00:05 GMT + - Tue, 27 Jun 2023 05:08:10 GMT expires: - '-1' ms-cv: - - uDS8zA9prEqzF2Zq4/imfw.0 + - KryMzkepW0O/STJLsw63cg.0 pragma: - no-cache strict-transport-security: @@ -585,10 +533,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name/regenerateKeys?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name/regenerateKeys?api-version=2021-03-01-preview response: body: string: '{"primaryKey":"mock_key","secondaryKey":"mock_key"}' @@ -600,11 +547,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 11:00:05 GMT + - Tue, 27 Jun 2023 05:35:36 GMT expires: - '-1' ms-cv: - - YggAmkjcz0CjK8OgAHcMcg.0 + - OW7aV14xSEGAUPNa3lEwYA.0 pragma: - no-cache strict-transport-security: @@ -616,7 +563,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -638,10 +585,9 @@ interactions: ParameterSetName: - -g -n -k User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name/regenerateKeys?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name/regenerateKeys?api-version=2021-03-01-preview response: body: string: '{"primaryKey":"mock_key","secondaryKey":"mock_key"}' @@ -653,11 +599,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 11:00:06 GMT + - Tue, 27 Jun 2023 05:36:15 GMT expires: - '-1' ms-cv: - - Ogh9t+YT2kir0T7O0DInvw.0 + - FRBHryhbmUecfzLZLnU55Q.0 pragma: - no-cache strict-transport-security: @@ -691,10 +637,9 @@ interactions: ParameterSetName: - -g -n -k User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name/regenerateKeys?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name/regenerateKeys?api-version=2021-03-01-preview response: body: string: '{"primaryKey":"mock_key","secondaryKey":"mock_key"}' @@ -706,11 +651,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 11:00:06 GMT + - Tue, 27 Jun 2023 05:36:17 GMT expires: - '-1' ms-cv: - - WUtfJ8KnE0es8OZvgDhBkg.0 + - sr7VjQp5x0C558lmYSOktQ.0 pragma: - no-cache strict-transport-security: diff --git a/src/mixed-reality/azext_mixed_reality/tests/latest/test_spatial_anchors_account.py b/src/mixed-reality/azext_mixed_reality/tests/latest/test_spatial_anchors_account.py index f746cc41732..8c20342e607 100644 --- a/src/mixed-reality/azext_mixed_reality/tests/latest/test_spatial_anchors_account.py +++ b/src/mixed-reality/azext_mixed_reality/tests/latest/test_spatial_anchors_account.py @@ -30,7 +30,7 @@ def test_spatial_anchors_account_scenario(self, resource_group, location): # Create with more parameters self.cmd('spatial-anchors-account create -g {rg} -n {account_name1} ' - '--storage-account-name {storage_account_name} --tag tag=tag', + '--storage-account-name {storage_account_name} --tag tag=tag --kind name=P3', checks=[self.exists('tags'), self.check('storageAccountName', '{storage_account_name}')]) From 827b2491d7b66de8bcaa6acdd635867a07c6e26e Mon Sep 17 00:00:00 2001 From: Zhiyi Huang <17182306+calvinhzy@users.noreply.github.com> Date: Tue, 27 Jun 2023 15:37:31 +0800 Subject: [PATCH 4/8] fix for `az remote-rendering-account create` make --sku equal to --kind if exist and autofill --identity. `az spatial-anchors-account key renew` bring back `--key` instead of `--serial` --- .../remote_rendering_account/_create.py | 7 + .../remote_rendering_account/_delete.py | 1 - .../azext_mixed_reality/commands.py | 5 +- .../azext_mixed_reality/custom.py | 39 ++++ ...est_remote_rendering_account_scenario.yaml | 181 +++++++++--------- ...test_spatial_anchors_account_scenario.yaml | 104 +++++----- .../latest/test_remote_rendering_account.py | 2 +- 7 files changed, 193 insertions(+), 146 deletions(-) diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_create.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_create.py index 8313d5b84f4..0b54b2cd1ad 100644 --- a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_create.py +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_create.py @@ -71,6 +71,12 @@ def _build_arguments_schema(cls, *args, **kwargs): # define Arg Group "RemoteRenderingAccount" _args_schema = cls._args_schema + _args_schema.identity = AAZObjectArg( + options=["--identity"], + arg_group="RemoteRenderingAccount", + help="The identity associated with this account", + ) + cls._build_args_identity_create(_args_schema.identity) _args_schema.kind = AAZObjectArg( options=["--kind"], arg_group="RemoteRenderingAccount", @@ -254,6 +260,7 @@ def content(self): typ=AAZObjectType, typ_kwargs={"flags": {"required": True, "client_flatten": True}} ) + _CreateHelper._build_schema_identity_create(_builder.set_prop("identity", AAZObjectType, ".identity")) _CreateHelper._build_schema_sku_create(_builder.set_prop("kind", AAZObjectType, ".kind")) _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_delete.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_delete.py index 8870f21fda0..080cc2a90b4 100644 --- a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_delete.py +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_delete.py @@ -14,7 +14,6 @@ @register_command( "remote-rendering-account delete", is_preview=True, - confirmation="Are you sure you want to perform this operation?", ) class Delete(AAZCommand): """Delete a Remote Rendering Account. diff --git a/src/mixed-reality/azext_mixed_reality/commands.py b/src/mixed-reality/azext_mixed_reality/commands.py index 8ef3b95b170..b7861f4590c 100644 --- a/src/mixed-reality/azext_mixed_reality/commands.py +++ b/src/mixed-reality/azext_mixed_reality/commands.py @@ -14,7 +14,10 @@ def load_command_table(self, _): self.command_table['spatial-anchors-account create'] = SpatialAnchorsCreate(loader=self) self.command_table['spatial-anchors-account key renew'] = SpatialAnchorsKeyRenew(loader=self) - # with self.command_group('spatial-anchors-account key'): + with self.command_group('remote-rendering-account') as g: + from .custom import RemoteRenderingCreate, RemoteRenderingKeyRenew + self.command_table['remote-rendering-account create'] = RemoteRenderingCreate(loader=self) + self.command_table['remote-rendering-account key renew'] = RemoteRenderingKeyRenew(loader=self) diff --git a/src/mixed-reality/azext_mixed_reality/custom.py b/src/mixed-reality/azext_mixed_reality/custom.py index 933e5147ee2..47ccf3aa04a 100644 --- a/src/mixed-reality/azext_mixed_reality/custom.py +++ b/src/mixed-reality/azext_mixed_reality/custom.py @@ -10,6 +10,8 @@ from azure.cli.core.aaz import has_value from .aaz.latest.spatial_anchors_account import Create as _SpatialAnchorsCreate from .aaz.latest.spatial_anchors_account.key import Renew as _SpatialAnchorsKeyRenew +from .aaz.latest.remote_rendering_account import Create as _RemoteRenderingCreate +from .aaz.latest.remote_rendering_account.key import Renew as _RemoteRenderingKeyRenew class SpatialAnchorsCreate(_SpatialAnchorsCreate): @@ -20,6 +22,20 @@ def pre_operations(self): del args.kind +class RemoteRenderingCreate(_RemoteRenderingCreate): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.identity._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + if has_value(args.kind): + args.sku = args.kind + del args.kind + args.identity = {"type": "SystemAssigned"} + class SpatialAnchorsKeyRenew(_SpatialAnchorsKeyRenew): @classmethod @@ -41,6 +57,29 @@ def pre_operations(self): args.serial = 1 if str(args.key).lower() == 'primary' else 2 del args.key + +class RemoteRenderingKeyRenew(_RemoteRenderingKeyRenew): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg, AAZArgEnum + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.key = AAZStrArg( + options=["--key", "-k"], + help="Key to be regenerated.", + default="primary" + ) + args_schema.key.enum = AAZArgEnum({"primary":"primary", "secondary":"secondary"}) + args_schema.serial._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + if has_value(args.key): + args.serial = 1 if str(args.key).lower() == 'primary' else 2 + del args.key + + + # import json # from ._client_factory import cf_spatial_anchor_account, cf_remote_rendering_account # diff --git a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_remote_rendering_account_scenario.yaml b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_remote_rendering_account_scenario.yaml index e683377990a..3d3e3e280bb 100644 --- a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_remote_rendering_account_scenario.yaml +++ b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_remote_rendering_account_scenario.yaml @@ -13,22 +13,22 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.46.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (PIP) azsdk-python-azure-mgmt-resource/23.0.1 Python/3.9.6 + (Windows-10-10.0.19045-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":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2023-03-28T10:59:36Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_remote_rendering_account_scenario","date":"2023-06-27T07:26:44Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '311' + - '384' content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 10:59:36 GMT + - Tue, 27 Jun 2023 07:26:48 GMT expires: - '-1' pragma: @@ -43,7 +43,7 @@ interactions: code: 200 message: OK - request: - body: '{"location": "eastus2", "identity": {"type": "SystemAssigned"}}' + body: '{"identity": {"type": "SystemAssigned"}, "location": "eastus2"}' headers: Accept: - application/json @@ -60,13 +60,12 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"3b98f6c5-ba25-467c-b89b-ab8a5b63c8fe","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus2.mixedreality.azure.com","accountId":"b0b697e2-3fb8-4558-a02d-06054db7b78d"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4bafd9aa-6ac1-4707-842e-7b2f92a95b5c","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus2.mixedreality.azure.com","accountId":"7a85ec5c-6735-4619-b1ba-10d1eaf5ba63"}}' headers: cache-control: - no-cache @@ -75,13 +74,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 10:59:43 GMT + - Tue, 27 Jun 2023 07:27:00 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name ms-cv: - - IJaPoQS2I0CKYOcCB7rETg.0 + - d2lOz0MjWkWaJ6FnU0jsGA.0 pragma: - no-cache strict-transport-security: @@ -89,7 +88,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1182' + - '1198' status: code: 201 message: Created @@ -105,24 +104,24 @@ interactions: Connection: - keep-alive ParameterSetName: - - -g -n --storage-account-name --tag + - -g -n --storage-account-name --tag --kind User-Agent: - - AZURECLI/2.46.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (PIP) azsdk-python-azure-mgmt-resource/23.0.1 Python/3.9.6 + (Windows-10-10.0.19045-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":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2023-03-28T10:59:36Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_remote_rendering_account_scenario","date":"2023-06-27T07:26:44Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '311' + - '384' content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 10:59:43 GMT + - Tue, 27 Jun 2023 07:27:01 GMT expires: - '-1' pragma: @@ -137,8 +136,9 @@ interactions: code: 200 message: OK - request: - body: '{"tags": {"tag": "tag"}, "location": "eastus2", "identity": {"type": "SystemAssigned"}, - "properties": {"storageAccountName": "storage_account_name"}}' + body: '{"identity": {"type": "SystemAssigned"}, "location": "eastus2", "properties": + {"storageAccountName": "storage_account_name"}, "sku": {"name": "P3"}, "tags": + {"tag": "tag"}}' headers: Accept: - application/json @@ -149,19 +149,18 @@ interactions: Connection: - keep-alive Content-Length: - - '149' + - '172' Content-Type: - application/json ParameterSetName: - - -g -n --storage-account-name --tag + - -g -n --storage-account-name --tag --kind User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1","name":"remote-rendering-account-name1","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"7f98ca0d-ba77-4bfb-a3cd-18f0fba9b5a1","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"eastus2.mixedreality.azure.com","accountId":"628e5618-41de-4c63-b6ab-b024cfac3b5c"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1","name":"remote-rendering-account-name1","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"1891d195-6895-4d47-9784-462d9010eb3f","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"eastus2.mixedreality.azure.com","accountId":"e5da8a76-ee73-40d6-9194-91856af753c3"}}' headers: cache-control: - no-cache @@ -170,13 +169,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 10:59:50 GMT + - Tue, 27 Jun 2023 07:27:15 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1 ms-cv: - - 4oXr9QNGWECEsTnueAzh+Q.0 + - jFApWBZPmUq1r7nwwYUadA.0 pragma: - no-cache strict-transport-security: @@ -184,7 +183,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1190' + - '1199' status: code: 201 message: Created @@ -202,28 +201,31 @@ interactions: ParameterSetName: - -g -n --storage-account-name User-Agent: - - AZURECLI/2.46.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2022-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2023-03-28T10:59:36Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4bafd9aa-6ac1-4707-842e-7b2f92a95b5c","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus2.mixedreality.azure.com","accountId":"7a85ec5c-6735-4619-b1ba-10d1eaf5ba63"}}' headers: cache-control: - no-cache content-length: - - '311' + - '595' content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 10:59:50 GMT + - Tue, 27 Jun 2023 07:27:17 GMT expires: - '-1' + ms-cv: + - qIArZlyVgkePDhAymFVEDQ.0 pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked vary: - Accept-Encoding x-content-type-options: @@ -232,8 +234,8 @@ interactions: code: 200 message: OK - request: - body: '{"location": "eastus2", "identity": {"type": "SystemAssigned"}, "properties": - {"storageAccountName": "storage_account_name1"}}' + body: '{"identity": {"type": "SystemAssigned"}, "location": "eastus2", "properties": + {"storageAccountName": "storage_account_name1"}, "tags": {}}' headers: Accept: - application/json @@ -244,19 +246,18 @@ interactions: Connection: - keep-alive Content-Length: - - '126' + - '138' Content-Type: - application/json ParameterSetName: - -g -n --storage-account-name User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-01-01 + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"3b98f6c5-ba25-467c-b89b-ab8a5b63c8fe","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"b0b697e2-3fb8-4558-a02d-06054db7b78d"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4bafd9aa-6ac1-4707-842e-7b2f92a95b5c","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"7a85ec5c-6735-4619-b1ba-10d1eaf5ba63"}}' headers: cache-control: - no-cache @@ -265,11 +266,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 10:59:51 GMT + - Tue, 27 Jun 2023 07:27:21 GMT expires: - '-1' ms-cv: - - /F4vjJYNS0y9dInrx11aaw.0 + - 9ZVkpS8OqEOpL5CEFt+4Zw.0 pragma: - no-cache strict-transport-security: @@ -281,7 +282,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1189' + - '1199' status: code: 200 message: OK @@ -299,13 +300,12 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"3b98f6c5-ba25-467c-b89b-ab8a5b63c8fe","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"b0b697e2-3fb8-4558-a02d-06054db7b78d"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4bafd9aa-6ac1-4707-842e-7b2f92a95b5c","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"7a85ec5c-6735-4619-b1ba-10d1eaf5ba63"}}' headers: cache-control: - no-cache @@ -314,11 +314,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 10:59:51 GMT + - Tue, 27 Jun 2023 07:27:23 GMT expires: - '-1' ms-cv: - - 0j8QntmX1E+K58jMj+VejQ.0 + - vKPO2nE8h0+JLSV7YD7mZg.0 pragma: - no-cache strict-transport-security: @@ -346,13 +346,12 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"3b98f6c5-ba25-467c-b89b-ab8a5b63c8fe","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"b0b697e2-3fb8-4558-a02d-06054db7b78d"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1","name":"remote-rendering-account-name1","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"7f98ca0d-ba77-4bfb-a3cd-18f0fba9b5a1","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"eastus2.mixedreality.azure.com","accountId":"628e5618-41de-4c63-b6ab-b024cfac3b5c"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4bafd9aa-6ac1-4707-842e-7b2f92a95b5c","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"7a85ec5c-6735-4619-b1ba-10d1eaf5ba63"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1","name":"remote-rendering-account-name1","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"1891d195-6895-4d47-9784-462d9010eb3f","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"eastus2.mixedreality.azure.com","accountId":"e5da8a76-ee73-40d6-9194-91856af753c3"}}]}' headers: cache-control: - no-cache @@ -361,11 +360,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 10:59:54 GMT + - Tue, 27 Jun 2023 07:27:27 GMT expires: - '-1' ms-cv: - - //96z/osE0+Sl2cHDLg1Zw.0 + - B6d+5S3cI0yBIS2Yqjdg8A.0 pragma: - no-cache strict-transport-security: @@ -383,7 +382,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -395,10 +394,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1?api-version=2021-03-01-preview response: body: string: '' @@ -408,11 +406,11 @@ interactions: content-length: - '0' date: - - Tue, 28 Mar 2023 10:59:55 GMT + - Tue, 27 Jun 2023 07:27:35 GMT expires: - '-1' ms-cv: - - 4bNQfsa7zk+zbzyJ4KK0UQ.0 + - vOJX6naBOUiatpym2PdZXA.0 pragma: - no-cache strict-transport-security: @@ -420,7 +418,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14992' + - '14999' status: code: 200 message: OK @@ -438,13 +436,12 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"3b98f6c5-ba25-467c-b89b-ab8a5b63c8fe","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"b0b697e2-3fb8-4558-a02d-06054db7b78d"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4bafd9aa-6ac1-4707-842e-7b2f92a95b5c","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"7a85ec5c-6735-4619-b1ba-10d1eaf5ba63"}}]}' headers: cache-control: - no-cache @@ -453,15 +450,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 10:59:57 GMT + - Tue, 27 Jun 2023 07:27:38 GMT expires: - '-1' ms-cv: - - Gt7uQuLx3U6rtv/C3jZGnw.0 + - 5mVUf0Q6mkS7hg5Fvpugyw.0 pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff status: @@ -483,10 +484,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name/listKeys?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name/listKeys?api-version=2021-03-01-preview response: body: string: '{"primaryKey":"mock_key","secondaryKey":"mock_key"}' @@ -498,11 +498,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 10:59:58 GMT + - Tue, 27 Jun 2023 07:27:40 GMT expires: - '-1' ms-cv: - - Na7YkQcfH0Ki4Jity3nlEg.0 + - PyOHa7l150W19qyGmO2wFA.0 pragma: - no-cache strict-transport-security: @@ -536,10 +536,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name/regenerateKeys?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name/regenerateKeys?api-version=2021-03-01-preview response: body: string: '{"primaryKey":"mock_key","secondaryKey":"mock_key"}' @@ -551,11 +550,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 10:59:57 GMT + - Tue, 27 Jun 2023 07:27:42 GMT expires: - '-1' ms-cv: - - qrwnUrRsXE255DIqC5WscA.0 + - V+i16AeHwEavbH5ERhVX5Q.0 pragma: - no-cache strict-transport-security: @@ -589,10 +588,9 @@ interactions: ParameterSetName: - -g -n -k User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name/regenerateKeys?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name/regenerateKeys?api-version=2021-03-01-preview response: body: string: '{"primaryKey":"mock_key","secondaryKey":"mock_key"}' @@ -604,11 +602,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 10:59:57 GMT + - Tue, 27 Jun 2023 07:27:44 GMT expires: - '-1' ms-cv: - - 41PGC+Vc9UCR01pzbLwnbA.0 + - KR0wikiKaU66dFChQEsYTQ.0 pragma: - no-cache strict-transport-security: @@ -642,10 +640,9 @@ interactions: ParameterSetName: - -g -n -k User-Agent: - - AZURECLI/2.46.0 azsdk-python-mgmt-mixedreality/0.0.1 Python/3.10.10 (Linux-5.15.0-1034-azure-x86_64-with-glibc2.31) - VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_261_0 + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name/regenerateKeys?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name/regenerateKeys?api-version=2021-03-01-preview response: body: string: '{"primaryKey":"mock_key","secondaryKey":"mock_key"}' @@ -657,11 +654,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Mar 2023 10:59:59 GMT + - Tue, 27 Jun 2023 07:27:47 GMT expires: - '-1' ms-cv: - - 81MUb03GoE2dfA/BFBjnQg.0 + - CaaScNfi7kWytjcyXoU8uQ.0 pragma: - no-cache strict-transport-security: diff --git a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml index d374ce34b14..9c4160e1a4c 100644 --- a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml +++ b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml @@ -13,12 +13,13 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/23.0.1 Python/3.9.6 (Windows-10-10.0.19045-SP0) + - AZURECLI/2.49.0 (PIP) azsdk-python-azure-mgmt-resource/23.0.1 Python/3.9.6 + (Windows-10-10.0.19045-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":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-27T05:07:31Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-27T07:26:44Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -27,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 05:07:37 GMT + - Tue, 27 Jun 2023 07:26:46 GMT expires: - '-1' pragma: @@ -59,12 +60,12 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"mixedreality.azure.com","accountId":"0192b519-bebc-4dcb-b129-18eedc54b713"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"mixedreality.azure.com","accountId":"115edfde-846b-406c-a486-de76c1ee65ec"}}' headers: cache-control: - no-cache @@ -73,13 +74,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 05:07:43 GMT + - Tue, 27 Jun 2023 07:26:53 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name ms-cv: - - 2TPjx1EbhUOL1ONKtmtBQg.0 + - ulg6KH1bE0qcjniQrSDgGw.0 pragma: - no-cache strict-transport-security: @@ -105,12 +106,13 @@ interactions: ParameterSetName: - -g -n --storage-account-name --tag --kind User-Agent: - - AZURECLI/2.49.0 azsdk-python-azure-mgmt-resource/23.0.1 Python/3.9.6 (Windows-10-10.0.19045-SP0) + - AZURECLI/2.49.0 (PIP) azsdk-python-azure-mgmt-resource/23.0.1 Python/3.9.6 + (Windows-10-10.0.19045-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":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-27T05:07:31Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-27T07:26:44Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -119,7 +121,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 05:07:44 GMT + - Tue, 27 Jun 2023 07:26:54 GMT expires: - '-1' pragma: @@ -152,12 +154,12 @@ interactions: ParameterSetName: - -g -n --storage-account-name --tag --kind User-Agent: - - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"e1442b49-b238-474e-8cd6-30de04d8d436"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"a24b71d9-d83a-4ea1-8f06-f6600a972806"}}' headers: cache-control: - no-cache @@ -166,13 +168,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 05:07:51 GMT + - Tue, 27 Jun 2023 07:27:00 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1 ms-cv: - - nTHZz0hVFUGX+k1VRJDLiw.0 + - XJwsgdna20WNt7vtMCOevg.0 pragma: - no-cache strict-transport-security: @@ -198,12 +200,12 @@ interactions: ParameterSetName: - -g -n --storage-account-name User-Agent: - - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"mixedreality.azure.com","accountId":"0192b519-bebc-4dcb-b129-18eedc54b713"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"mixedreality.azure.com","accountId":"115edfde-846b-406c-a486-de76c1ee65ec"}}' headers: cache-control: - no-cache @@ -212,11 +214,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 05:07:54 GMT + - Tue, 27 Jun 2023 07:27:02 GMT expires: - '-1' ms-cv: - - 9j59dshLm0yDzZHC/mwFwQ.0 + - SZpUmYtiVkSy5AqE14P9hg.0 pragma: - no-cache strict-transport-security: @@ -249,12 +251,12 @@ interactions: ParameterSetName: - -g -n --storage-account-name User-Agent: - - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"0192b519-bebc-4dcb-b129-18eedc54b713"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"115edfde-846b-406c-a486-de76c1ee65ec"}}' headers: cache-control: - no-cache @@ -263,11 +265,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 05:07:55 GMT + - Tue, 27 Jun 2023 07:27:03 GMT expires: - '-1' ms-cv: - - 4a3t/yKQhkec2tZgIRtlXw.0 + - SlOm2hKbMUmXFSeix8cxBQ.0 pragma: - no-cache strict-transport-security: @@ -279,7 +281,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 200 message: OK @@ -297,12 +299,12 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"0192b519-bebc-4dcb-b129-18eedc54b713"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"115edfde-846b-406c-a486-de76c1ee65ec"}}' headers: cache-control: - no-cache @@ -311,11 +313,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 05:07:58 GMT + - Tue, 27 Jun 2023 07:27:05 GMT expires: - '-1' ms-cv: - - cR7hgUewREaQnV5/Bq0FDA.0 + - e1fvMpeVl0y7CEwIHDKvMg.0 pragma: - no-cache strict-transport-security: @@ -343,12 +345,12 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"0192b519-bebc-4dcb-b129-18eedc54b713"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"e1442b49-b238-474e-8cd6-30de04d8d436"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"115edfde-846b-406c-a486-de76c1ee65ec"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"a24b71d9-d83a-4ea1-8f06-f6600a972806"}}]}' headers: cache-control: - no-cache @@ -357,11 +359,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 05:08:00 GMT + - Tue, 27 Jun 2023 07:27:07 GMT expires: - '-1' ms-cv: - - y79M77EyFEGoj7dwFLg8ng.0 + - ID7pjedgZ0iSXJGR2ueAkg.0 pragma: - no-cache strict-transport-security: @@ -391,7 +393,7 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1?api-version=2021-03-01-preview response: @@ -403,11 +405,11 @@ interactions: content-length: - '0' date: - - Tue, 27 Jun 2023 05:08:07 GMT + - Tue, 27 Jun 2023 07:27:13 GMT expires: - '-1' ms-cv: - - mV3tQctH20CtBqIvwdZudA.0 + - pICMsJztuU2onaP9iw/oVA.0 pragma: - no-cache strict-transport-security: @@ -433,12 +435,12 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"0192b519-bebc-4dcb-b129-18eedc54b713"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"115edfde-846b-406c-a486-de76c1ee65ec"}}]}' headers: cache-control: - no-cache @@ -447,11 +449,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 05:08:09 GMT + - Tue, 27 Jun 2023 07:27:15 GMT expires: - '-1' ms-cv: - - 9Hyj8hFohUKdgVVGv5fnMg.0 + - hu3nKMnmUEOvSPdbLzh0EA.0 pragma: - no-cache strict-transport-security: @@ -481,7 +483,7 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name/listKeys?api-version=2021-03-01-preview response: @@ -495,11 +497,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 05:08:10 GMT + - Tue, 27 Jun 2023 07:27:16 GMT expires: - '-1' ms-cv: - - KryMzkepW0O/STJLsw63cg.0 + - HbiMrM1qL0aA3wR0BO+V9Q.0 pragma: - no-cache strict-transport-security: @@ -511,7 +513,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -533,7 +535,7 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name/regenerateKeys?api-version=2021-03-01-preview response: @@ -547,11 +549,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 05:35:36 GMT + - Tue, 27 Jun 2023 07:27:19 GMT expires: - '-1' ms-cv: - - OW7aV14xSEGAUPNa3lEwYA.0 + - aJc/V5T3SESmZGq+XOyLPg.0 pragma: - no-cache strict-transport-security: @@ -585,7 +587,7 @@ interactions: ParameterSetName: - -g -n -k User-Agent: - - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name/regenerateKeys?api-version=2021-03-01-preview response: @@ -599,11 +601,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 05:36:15 GMT + - Tue, 27 Jun 2023 07:27:21 GMT expires: - '-1' ms-cv: - - FRBHryhbmUecfzLZLnU55Q.0 + - Myg0G/vM5kaMc+3aDZKbHQ.0 pragma: - no-cache strict-transport-security: @@ -637,7 +639,7 @@ interactions: ParameterSetName: - -g -n -k User-Agent: - - AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) + - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name/regenerateKeys?api-version=2021-03-01-preview response: @@ -651,11 +653,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 05:36:17 GMT + - Tue, 27 Jun 2023 07:27:22 GMT expires: - '-1' ms-cv: - - sr7VjQp5x0C558lmYSOktQ.0 + - h9Syd9C76UiwPF5G6LdKcw.0 pragma: - no-cache strict-transport-security: diff --git a/src/mixed-reality/azext_mixed_reality/tests/latest/test_remote_rendering_account.py b/src/mixed-reality/azext_mixed_reality/tests/latest/test_remote_rendering_account.py index f1c44af2998..1a9e2842fa0 100644 --- a/src/mixed-reality/azext_mixed_reality/tests/latest/test_remote_rendering_account.py +++ b/src/mixed-reality/azext_mixed_reality/tests/latest/test_remote_rendering_account.py @@ -29,7 +29,7 @@ def test_remote_rendering_account_scenario(self, resource_group, location): # Create with more parameters self.cmd('remote-rendering-account create -g {rg} -n {account_name1} ' - '--storage-account-name {storage_account_name} --tag tag=tag', + '--storage-account-name {storage_account_name} --tag tag=tag --kind name=P3', checks=[self.exists('tags'), self.check('storageAccountName', '{storage_account_name}')]) From 40d72ce59907d81bff3876cda63ac9c7157ca4e7 Mon Sep 17 00:00:00 2001 From: Zhiyi Huang <17182306+calvinhzy@users.noreply.github.com> Date: Tue, 27 Jun 2023 16:07:36 +0800 Subject: [PATCH 5/8] remove all old files --- .../azext_mixed_reality/_client_factory.py | 18 - .../azext_mixed_reality/_help.py | 279 ------ .../azext_mixed_reality/_params.py | 41 - .../azext_mixed_reality/action.py | 47 - .../azext_mixed_reality/commands.py | 37 - .../azext_mixed_reality/custom.py | 175 +--- ...est_remote_rendering_account_scenario.yaml | 76 +- ...test_spatial_anchors_account_scenario.yaml | 74 +- .../vendored_sdks/__init__.py | 6 - .../vendored_sdks/mixedreality/__init__.py | 19 - .../mixedreality/_configuration.py | 71 -- .../mixedreality/_mixed_reality_client.py | 99 -- .../vendored_sdks/mixedreality/_version.py | 9 - .../mixedreality/aio/__init__.py | 10 - .../mixedreality/aio/_configuration.py | 67 -- .../mixedreality/aio/_mixed_reality_client.py | 92 -- .../mixedreality/aio/operations/__init__.py | 19 - .../_mixed_reality_client_operations.py | 83 -- .../aio/operations/_operations.py | 104 -- .../_remote_rendering_accounts_operations.py | 551 ----------- .../_spatial_anchors_accounts_operations.py | 551 ----------- .../mixedreality/models/__init__.py | 90 -- .../models/_mixed_reality_client_enums.py | 62 -- .../mixedreality/models/_models.py | 802 ---------------- .../mixedreality/models/_models_py3.py | 894 ------------------ .../mixedreality/operations/__init__.py | 19 - .../_mixed_reality_client_operations.py | 88 -- .../mixedreality/operations/_operations.py | 109 --- .../_remote_rendering_accounts_operations.py | 563 ----------- .../_spatial_anchors_accounts_operations.py | 563 ----------- .../vendored_sdks/mixedreality/py.typed | 1 - 31 files changed, 79 insertions(+), 5540 deletions(-) delete mode 100644 src/mixed-reality/azext_mixed_reality/_client_factory.py delete mode 100644 src/mixed-reality/azext_mixed_reality/action.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/__init__.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/__init__.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/_configuration.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/_mixed_reality_client.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/_version.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/__init__.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/_configuration.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/_mixed_reality_client.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/__init__.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/_mixed_reality_client_operations.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/_operations.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/_remote_rendering_accounts_operations.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/_spatial_anchors_accounts_operations.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/models/__init__.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/models/_mixed_reality_client_enums.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/models/_models.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/models/_models_py3.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/__init__.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/_mixed_reality_client_operations.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/_operations.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/_remote_rendering_accounts_operations.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/_spatial_anchors_accounts_operations.py delete mode 100644 src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/py.typed diff --git a/src/mixed-reality/azext_mixed_reality/_client_factory.py b/src/mixed-reality/azext_mixed_reality/_client_factory.py deleted file mode 100644 index 173bf090462..00000000000 --- a/src/mixed-reality/azext_mixed_reality/_client_factory.py +++ /dev/null @@ -1,18 +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_mixedreality_cl(cli_ctx): - from azure.cli.core.commands.client_factory import get_mgmt_service_client - from azext_mixed_reality.vendored_sdks.mixedreality import MixedRealityClient - return get_mgmt_service_client(cli_ctx, MixedRealityClient) - - -def cf_spatial_anchor_account(cli_ctx): - return cf_mixedreality_cl(cli_ctx).spatial_anchors_accounts - - -def cf_remote_rendering_account(cli_ctx): - return cf_mixedreality_cl(cli_ctx).remote_rendering_accounts diff --git a/src/mixed-reality/azext_mixed_reality/_help.py b/src/mixed-reality/azext_mixed_reality/_help.py index 081e23d4365..50f8d5125e2 100644 --- a/src/mixed-reality/azext_mixed_reality/_help.py +++ b/src/mixed-reality/azext_mixed_reality/_help.py @@ -4,282 +4,3 @@ # -------------------------------------------------------------------------------------------- from knack.help_files import helps - -helps['spatial-anchors-account'] = """ - type: group - short-summary: Manage spatial anchor account with mixed reality -""" - -helps['spatial-anchors-account list'] = """ - type: command - short-summary: List resources by resource group and list spatial anchors accounts by subscription. - examples: - - name: List spatial anchor accounts by resource group - text: |- - az spatial-anchors-account list --resource-group "MyResourceGroup" - - name: List spatial anchors accounts by subscription - text: |- - az spatial-anchors-account list -""" - -helps['spatial-anchors-account show'] = """ - type: command - short-summary: Retrieve a spatial anchors account. - examples: - - name: Get spatial anchors account - text: |- - az spatial-anchors-account show -n "MyAccount" --resource-group \ -"MyResourceGroup" -""" - -helps['spatial-anchors-account create'] = """ - type: command - short-summary: Create a spatial anchors account. - parameters: - - name: --sku - short-summary: The SKU associated with this account - long-summary: | - Usage: --sku name=XX tier=XX size=XX family=XX capacity=XX - - name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code - tier: This field is required to be implemented by the resource provider if the service has more than one \ -tier, but is not required on a PUT. - size: The SKU size. When the name field is the combination of tier and some other value, this would be the \ -standalone code. - family: If the service has different generations of hardware, for the same SKU, then that can be captured \ -here. - capacity: If the SKU supports scale out/in then the capacity integer should be included. If scale out/in \ -is not possible for the resource this may be omitted. - - name: --kind - short-summary: The kind of account, if supported - long-summary: | - Usage: --kind name=XX tier=XX size=XX family=XX capacity=XX - - name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code - tier: This field is required to be implemented by the resource provider if the service has more than one \ -tier, but is not required on a PUT. - size: The SKU size. When the name field is the combination of tier and some other value, this would be the \ -standalone code. - family: If the service has different generations of hardware, for the same SKU, then that can be captured \ -here. - capacity: If the SKU supports scale out/in then the capacity integer should be included. If scale out/in \ -is not possible for the resource this may be omitted. - examples: - - name: Create spatial anchor account - text: |- - az spatial-anchors-account create -n "MyAccount" --resource-group "MyResourceGroup" -""" - -helps['spatial-anchors-account update'] = """ - type: command - short-summary: Update a spatial anchors account. - parameters: - - name: --sku - short-summary: The SKU associated with this account - long-summary: | - Usage: --sku name=XX tier=XX size=XX family=XX capacity=XX - - name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code - tier: This field is required to be implemented by the resource provider if the service has more than one \ -tier, but is not required on a PUT. - size: The SKU size. When the name field is the combination of tier and some other value, this would be the \ -standalone code. - family: If the service has different generations of hardware, for the same SKU, then that can be captured \ -here. - capacity: If the SKU supports scale out/in then the capacity integer should be included. If scale out/in \ -is not possible for the resource this may be omitted. - - name: --kind - short-summary: The kind of account, if supported - long-summary: | - Usage: --kind name=XX tier=XX size=XX family=XX capacity=XX - - name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code - tier: This field is required to be implemented by the resource provider if the service has more than one \ -tier, but is not required on a PUT. - size: The SKU size. When the name field is the combination of tier and some other value, this would be the \ -standalone code. - family: If the service has different generations of hardware, for the same SKU, then that can be captured \ -here. - capacity: If the SKU supports scale out/in then the capacity integer should be included. If scale out/in \ -is not possible for the resource this may be omitted. - examples: - - name: Update spatial anchors account - text: |- - az spatial-anchors-account update -n "MyAccount" --resource-group \ -"MyResourceGroup" --location "eastus2euap" --tags hero="romeo" heroine="juliet" -""" - -helps['spatial-anchors-account delete'] = """ - type: command - short-summary: Delete a spatial anchors account. - examples: - - name: Delete spatial anchors account - text: |- - az spatial-anchors-account delete -n "MyAccount" --resource-group \ -"MyResourceGroup" -""" - -helps['spatial-anchors-account key show'] = """ - type: command - short-summary: List both of the 2 keys of a spatial anchors account. - examples: - - name: List spatial anchor account key - text: |- - az spatial-anchors-account key show -n "MyAccount" --resource-group \ -"MyResourceGroup" -""" - -helps['spatial-anchors-account key renew'] = """ - type: command - short-summary: Regenerate specified key of a spatial anchors account. - examples: - - name: Regenerate spatial anchors account keys - text: |- - az spatial-anchors-account key renew -n "MyAccount" -k primary \ ---resource-group "MyResourceGroup" -""" - -helps['remote-rendering-account'] = """ - type: group - short-summary: Manage remote rendering account with mixed reality -""" - -helps['remote-rendering-account list'] = """ - type: command - short-summary: List resources by resource group and list remote rendering accounts by subscription. - examples: - - name: List remote rendering accounts by resource group - text: |- - az remote-rendering-account list --resource-group "MyResourceGroup" - - name: List remote rendering accounts by subscription - text: |- - az remote-rendering-account list -""" - -helps['remote-rendering-account show'] = """ - type: command - short-summary: Retrieve a remote rendering account. - examples: - - name: Get remote rendering account - text: |- - az remote-rendering-account show -n "MyAccount" --resource-group \ -"MyResourceGroup" -""" - -helps['remote-rendering-account create'] = """ - type: command - short-summary: Create a remote rendering account. - parameters: - - name: --sku - short-summary: The SKU associated with this account - long-summary: | - Usage: --sku name=XX tier=XX size=XX family=XX capacity=XX - - name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code - tier: This field is required to be implemented by the resource provider if the service has more than one \ -tier, but is not required on a PUT. - size: The SKU size. When the name field is the combination of tier and some other value, this would be the \ -standalone code. - family: If the service has different generations of hardware, for the same SKU, then that can be captured \ -here. - capacity: If the SKU supports scale out/in then the capacity integer should be included. If scale out/in \ -is not possible for the resource this may be omitted. - - name: --kind - short-summary: The kind of account, if supported - long-summary: | - Usage: --kind name=XX tier=XX size=XX family=XX capacity=XX - - name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code - tier: This field is required to be implemented by the resource provider if the service has more than one \ -tier, but is not required on a PUT. - size: The SKU size. When the name field is the combination of tier and some other value, this would be the \ -standalone code. - family: If the service has different generations of hardware, for the same SKU, then that can be captured \ -here. - capacity: If the SKU supports scale out/in then the capacity integer should be included. If scale out/in \ -is not possible for the resource this may be omitted. - examples: - - name: Create remote rendering account - text: |- - az remote-rendering-account create -n "MyAccount" --location "eastus2euap" \ ---resource-group "MyResourceGroup" -""" - -helps['remote-rendering-account update'] = """ - type: command - short-summary: Update a remote rendering account. - parameters: - - name: --sku - short-summary: The SKU associated with this account - long-summary: | - Usage: --sku name=XX tier=XX size=XX family=XX capacity=XX - - name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code - tier: This field is required to be implemented by the resource provider if the service has more than one \ -tier, but is not required on a PUT. - size: The SKU size. When the name field is the combination of tier and some other value, this would be the \ -standalone code. - family: If the service has different generations of hardware, for the same SKU, then that can be captured \ -here. - capacity: If the SKU supports scale out/in then the capacity integer should be included. If scale out/in \ -is not possible for the resource this may be omitted. - - name: --kind - short-summary: The kind of account, if supported - long-summary: | - Usage: --kind name=XX tier=XX size=XX family=XX capacity=XX - - name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code - tier: This field is required to be implemented by the resource provider if the service has more than one \ -tier, but is not required on a PUT. - size: The SKU size. When the name field is the combination of tier and some other value, this would be the \ -standalone code. - family: If the service has different generations of hardware, for the same SKU, then that can be captured \ -here. - capacity: If the SKU supports scale out/in then the capacity integer should be included. If scale out/in \ -is not possible for the resource this may be omitted. - examples: - - name: Update remote rendering account - text: |- - az remote-rendering-account update -n "MyAccount" --tags hero="romeo" heroine="juliet" \ ---resource-group "MyResourceGroup" -""" - -helps['remote-rendering-account delete'] = """ - type: command - short-summary: Delete a remote rendering account. - examples: - - name: Delete remote rendering account - text: |- - az remote-rendering-account delete -n "MyAccount" --resource-group \ -"MyResourceGroup" -""" - -helps['remote-rendering-account key show'] = """ - type: command - short-summary: List both of the 2 keys of a remote rendering account. - examples: - - name: List remote rendering account key - text: |- - az remote-rendering-account key show -n "MyAccount" --resource-group \ -"MyResourceGroup" -""" - -helps['remote-rendering-account key renew'] = """ - type: command - short-summary: Regenerate specified key of a remote rendering account. - examples: - - name: Regenerate remote rendering account keys - text: |- - az remote-rendering-account key renew -n "MyAccount" -k primary \ ---resource-group "MyResourceGroup" -""" - -helps['spatial-anchors-account key'] = """ - type: group - short-summary: Manage developer keys of a spatial anchors account. -""" - -helps['remote-rendering-account key'] = """ - type: group - short-summary: Manage developer keys of a remote rendering account. -""" diff --git a/src/mixed-reality/azext_mixed_reality/_params.py b/src/mixed-reality/azext_mixed_reality/_params.py index c82693fe3ed..a939a577809 100644 --- a/src/mixed-reality/azext_mixed_reality/_params.py +++ b/src/mixed-reality/azext_mixed_reality/_params.py @@ -3,46 +3,5 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from knack.arguments import CLIArgumentType -from azure.cli.core.commands.validators import get_default_location_from_resource_group -from azure.cli.core.commands.parameters import ( - resource_group_name_type, - get_location_type, - get_enum_type, - tags_type, - name_type -) -from azext_mixed_reality.action import AddSku - -account_key_type = CLIArgumentType( - help='Key to be regenerated.', - arg_type=get_enum_type(['primary', 'secondary'], default='primary'), - options_list=['--key', '-k'], -) - - def load_arguments(self, _): pass - # with self.argument_context('spatial-anchors-account') as c: - # c.argument('resource_group_name', arg_type=resource_group_name_type) - # c.argument('account_name', type=str, help='Name of an mixed reality account.', arg_type=name_type, id_part='name') # pylint: disable=line-too-long - # c.argument('location', arg_type=get_location_type(self.cli_ctx), validator=get_default_location_from_resource_group) # pylint: disable=line-too-long - # c.argument('tags', arg_type=tags_type) - # c.argument('sku', action=AddSku, nargs='+', help='The SKU associated with this account') - # c.argument('kind', action=AddSku, nargs='+', help='The kind of account, if supported') - # c.argument('storage_account_name', type=str, help='The name of the storage account associated with this accountId') # pylint: disable=line-too-long - # - # with self.argument_context('spatial-anchors-account key renew') as c: - # c.argument('key', arg_type=account_key_type) - # - # with self.argument_context('remote-rendering-account') as c: - # c.argument('resource_group_name', resource_group_name_type) - # c.argument('account_name', type=str, help='Name of an mixed reality account.', arg_type=name_type, id_part='name') # pylint: disable=line-too-long - # c.argument('tags', arg_type=tags_type) - # c.argument('location', arg_type=get_location_type(self.cli_ctx), validator=get_default_location_from_resource_group) # pylint: disable=line-too-long - # c.argument('sku', action=AddSku, nargs='+', help='The SKU associated with this account') - # c.argument('kind', action=AddSku, nargs='+', help='The kind of account, if supported') - # c.argument('storage_account_name', type=str, help='The name of the storage account associated with this accountId') # pylint: disable=line-too-long - # - # with self.argument_context('remote-rendering-account key renew') as c: - # c.argument('key', arg_type=account_key_type) diff --git a/src/mixed-reality/azext_mixed_reality/action.py b/src/mixed-reality/azext_mixed_reality/action.py deleted file mode 100644 index 6597db6e2d0..00000000000 --- a/src/mixed-reality/azext_mixed_reality/action.py +++ /dev/null @@ -1,47 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=protected-access - -import argparse -from collections import defaultdict -from azure.cli.core.azclierror import ArgumentUsageError, InvalidArgumentValueError - - -class AddSku(argparse.Action): - def __call__(self, parser, namespace, values, option_string=None): - action = self.get_action(values, option_string) - namespace.sku = action - - def get_action(self, values, option_string): # pylint: disable=no-self-use - try: - properties = defaultdict(list) - for (k, v) in (x.split('=', 1) for x in values): - properties[k].append(v) - properties = dict(properties) - except ValueError: - raise ArgumentUsageError('usage error: {} [KEY=VALUE ...]'.format(option_string)) - d = {} - for k in properties: - kl = k.lower() - v = properties[k] - if kl == 'name': - d['name'] = v[0] - elif kl == 'tier': - d['tier'] = v[0] - elif kl == 'size': - d['size'] = v[0] - elif kl == 'family': - d['family'] = v[0] - elif kl == 'capacity': - d['capacity'] = v[0] - else: - raise InvalidArgumentValueError('Unsupported Key {} is provided for parameter sku. All possible keys ' - 'are: name, tier, size, family, capacity'.format(k)) - return d diff --git a/src/mixed-reality/azext_mixed_reality/commands.py b/src/mixed-reality/azext_mixed_reality/commands.py index b7861f4590c..e9c4e82bb16 100644 --- a/src/mixed-reality/azext_mixed_reality/commands.py +++ b/src/mixed-reality/azext_mixed_reality/commands.py @@ -3,9 +3,6 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from azure.cli.core.commands import CliCommandType - - # pylint: disable=line-too-long def load_command_table(self, _): @@ -18,37 +15,3 @@ def load_command_table(self, _): from .custom import RemoteRenderingCreate, RemoteRenderingKeyRenew self.command_table['remote-rendering-account create'] = RemoteRenderingCreate(loader=self) self.command_table['remote-rendering-account key renew'] = RemoteRenderingKeyRenew(loader=self) - - - - # spatial_anchor_account = CliCommandType( - # operations_tmpl='azext_mixed_reality.vendored_sdks.mixedreality.operations._spatial_anchors_accounts_operations#SpatialAnchorsAccountsOperations.{}', - # client_factory=cf_spatial_anchor_account - # ) - # - # remote_rendering_account = CliCommandType( - # operations_tmpl='azext_mixed_reality.vendored_sdks.mixedreality.operations._remote_rendering_accounts_operations#RemoteRenderingAccountsOperations.{}', - # client_factory=cf_remote_rendering_account - # ) - - # with self.command_group('spatial-anchors-account', spatial_anchor_account, is_preview=True) as g: - # # g.custom_command('create', 'spatial_anchor_account_create') - # g.custom_command('list', 'spatial_anchor_account_list') - # g.custom_show_command('show', 'spatial_anchor_account_show') - # g.generic_update_command('update', setter_name='update', custom_func_name='spatial_anchor_account_update', setter_arg_name='spatial_anchors_account') - # g.custom_command('delete', 'spatial_anchor_account_delete') - # - # with self.command_group('spatial-anchors-account key', spatial_anchor_account, is_preview=True) as g: - # g.custom_show_command('show', 'spatial_anchor_account_list_key') - # g.custom_command('renew', 'spatial_anchor_account_regenerate_key') - # - # with self.command_group('remote-rendering-account', remote_rendering_account, is_preview=True) as g: - # g.custom_command('create', 'remote_rendering_account_create') - # g.custom_command('update', 'remote_rendering_account_update') - # g.custom_command('list', 'remote_rendering_account_list') - # g.custom_show_command('show', 'remote_rendering_account_show') - # g.custom_command('delete', 'remote_rendering_account_delete') - # - # with self.command_group('remote-rendering-account key', remote_rendering_account, is_preview=True) as g: - # g.custom_show_command('show', 'remote_rendering_account_list_key') - # g.custom_command('renew', 'remote_rendering_account_regenerate_key') diff --git a/src/mixed-reality/azext_mixed_reality/custom.py b/src/mixed-reality/azext_mixed_reality/custom.py index 47ccf3aa04a..4e83159a99c 100644 --- a/src/mixed-reality/azext_mixed_reality/custom.py +++ b/src/mixed-reality/azext_mixed_reality/custom.py @@ -12,6 +12,10 @@ from .aaz.latest.spatial_anchors_account.key import Renew as _SpatialAnchorsKeyRenew from .aaz.latest.remote_rendering_account import Create as _RemoteRenderingCreate from .aaz.latest.remote_rendering_account.key import Renew as _RemoteRenderingKeyRenew +from knack.log import get_logger + + +logger = get_logger(__name__) class SpatialAnchorsCreate(_SpatialAnchorsCreate): @@ -77,174 +81,3 @@ def pre_operations(self): if has_value(args.key): args.serial = 1 if str(args.key).lower() == 'primary' else 2 del args.key - - - -# import json -# from ._client_factory import cf_spatial_anchor_account, cf_remote_rendering_account -# -# -# def spatial_anchor_account_list(cmd, -# resource_group_name=None): -# client = cf_spatial_anchor_account(cmd.cli_ctx) -# if resource_group_name: -# return client.list_by_resource_group(resource_group_name=resource_group_name) -# return client.list_by_subscription() -# -# -# def spatial_anchor_account_show(cmd, -# resource_group_name, -# account_name): -# client = cf_spatial_anchor_account(cmd.cli_ctx) -# return client.get(resource_group_name=resource_group_name, -# account_name=account_name) -# -# -# def spatial_anchor_account_create(cmd, -# resource_group_name, -# account_name, -# location=None, -# tags=None, -# sku=None, -# kind=None, -# storage_account_name=None): -# spatial_anchors_account = {} -# spatial_anchors_account['tags'] = tags -# spatial_anchors_account['location'] = location -# spatial_anchors_account['sku'] = sku -# spatial_anchors_account['kind'] = kind -# spatial_anchors_account['storage_account_name'] = storage_account_name -# client = cf_spatial_anchor_account(cmd.cli_ctx) -# return client.create(resource_group_name=resource_group_name, -# account_name=account_name, -# spatial_anchors_account=spatial_anchors_account) -# -# -# def spatial_anchor_account_update(cmd, -# instance, -# location=None, -# tags=None, -# sku=None, -# kind=None, -# storage_account_name=None): -# with cmd.update_context(instance) as c: -# c.set_param('tags', tags) -# c.set_param('location', location) -# c.set_param('sku', sku) -# c.set_param('kind', kind) -# c.set_param('storage_account_name', storage_account_name) -# return instance -# -# -# def spatial_anchor_account_delete(cmd, -# resource_group_name, -# account_name): -# client = cf_spatial_anchor_account(cmd.cli_ctx) -# return client.delete(resource_group_name=resource_group_name, -# account_name=account_name) -# -# -# def spatial_anchor_account_list_key(cmd, -# resource_group_name, -# account_name): -# client = cf_spatial_anchor_account(cmd.cli_ctx) -# return client.list_keys(resource_group_name=resource_group_name, -# account_name=account_name) -# -# -# def spatial_anchor_account_regenerate_key(cmd, -# resource_group_name, -# account_name, -# key=None): -# regenerate = {} -# regenerate['serial'] = ['primary', 'secondary'].index(key) + 1 -# client = cf_spatial_anchor_account(cmd.cli_ctx) -# return client.regenerate_keys(resource_group_name=resource_group_name, -# account_name=account_name, -# regenerate=regenerate) -# -# -# def remote_rendering_account_list(cmd, -# resource_group_name=None): -# client = cf_remote_rendering_account(cmd.cli_ctx) -# if resource_group_name: -# return client.list_by_resource_group(resource_group_name=resource_group_name) -# return client.list_by_subscription() -# -# -# def remote_rendering_account_show(cmd, -# resource_group_name, -# account_name): -# client = cf_remote_rendering_account(cmd.cli_ctx) -# return client.get(resource_group_name=resource_group_name, -# account_name=account_name) -# -# -# def remote_rendering_account_create(cmd, -# resource_group_name, -# account_name, -# location=None, -# tags=None, -# sku=None, -# kind=None, -# storage_account_name=None): -# remote_rendering_account = {} -# remote_rendering_account['tags'] = tags -# remote_rendering_account['location'] = location -# remote_rendering_account['identity'] = json.loads("{\"type\": \"SystemAssigned\"}") -# remote_rendering_account['sku'] = sku -# remote_rendering_account['kind'] = kind -# remote_rendering_account['storage_account_name'] = storage_account_name -# client = cf_remote_rendering_account(cmd.cli_ctx) -# return client.create(resource_group_name=resource_group_name, -# account_name=account_name, -# remote_rendering_account=remote_rendering_account) -# -# -# def remote_rendering_account_update(cmd, -# resource_group_name, -# account_name, -# location=None, -# tags=None, -# sku=None, -# kind=None, -# storage_account_name=None): -# remote_rendering_account = {} -# remote_rendering_account['tags'] = tags -# remote_rendering_account['location'] = location -# remote_rendering_account['identity'] = json.loads("{\"type\": \"SystemAssigned\"}") -# remote_rendering_account['sku'] = sku -# remote_rendering_account['kind'] = kind -# remote_rendering_account['storage_account_name'] = storage_account_name -# client = cf_remote_rendering_account(cmd.cli_ctx) -# return client.update(resource_group_name=resource_group_name, -# account_name=account_name, -# remote_rendering_account=remote_rendering_account) -# -# -# def remote_rendering_account_delete(cmd, -# resource_group_name, -# account_name): -# client = cf_remote_rendering_account(cmd.cli_ctx) -# return client.delete(resource_group_name=resource_group_name, -# account_name=account_name) -# -# -# def remote_rendering_account_list_key(cmd, -# resource_group_name, -# account_name): -# client = cf_remote_rendering_account(cmd.cli_ctx) -# return client.list_keys(resource_group_name=resource_group_name, -# account_name=account_name) -# -# -# def remote_rendering_account_regenerate_key(cmd, -# resource_group_name, -# account_name, -# key=None): -# regenerate = {} -# regenerate['serial'] = ['primary', 'secondary'].index(key) + 1 -# client = cf_remote_rendering_account(cmd.cli_ctx) -# return client.regenerate_keys(resource_group_name=resource_group_name, -# account_name=account_name, -# regenerate=regenerate) diff --git a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_remote_rendering_account_scenario.yaml b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_remote_rendering_account_scenario.yaml index 3d3e3e280bb..0f1aae133b6 100644 --- a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_remote_rendering_account_scenario.yaml +++ b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_remote_rendering_account_scenario.yaml @@ -19,7 +19,7 @@ interactions: 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":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_remote_rendering_account_scenario","date":"2023-06-27T07:26:44Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_remote_rendering_account_scenario","date":"2023-06-27T07:42:52Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -28,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:26:48 GMT + - Tue, 27 Jun 2023 07:42:55 GMT expires: - '-1' pragma: @@ -65,7 +65,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4bafd9aa-6ac1-4707-842e-7b2f92a95b5c","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus2.mixedreality.azure.com","accountId":"7a85ec5c-6735-4619-b1ba-10d1eaf5ba63"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"e0dc2da4-c51d-41a7-9fd9-a1ba89719aba","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus2.mixedreality.azure.com","accountId":"51fca8ad-2387-4baa-a64e-2c53537442e9"}}' headers: cache-control: - no-cache @@ -74,13 +74,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:00 GMT + - Tue, 27 Jun 2023 07:43:06 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name ms-cv: - - d2lOz0MjWkWaJ6FnU0jsGA.0 + - Pf339rsXbUOvSVJeawtm+Q.0 pragma: - no-cache strict-transport-security: @@ -112,7 +112,7 @@ interactions: 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":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_remote_rendering_account_scenario","date":"2023-06-27T07:26:44Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_remote_rendering_account_scenario","date":"2023-06-27T07:42:52Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -121,7 +121,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:01 GMT + - Tue, 27 Jun 2023 07:43:07 GMT expires: - '-1' pragma: @@ -160,7 +160,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1","name":"remote-rendering-account-name1","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"1891d195-6895-4d47-9784-462d9010eb3f","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"eastus2.mixedreality.azure.com","accountId":"e5da8a76-ee73-40d6-9194-91856af753c3"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1","name":"remote-rendering-account-name1","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"f7ced1ad-e98c-4e2e-9910-6d0b76336a0a","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"eastus2.mixedreality.azure.com","accountId":"96fd80e2-ab07-4b5d-aca4-629bffb73964"}}' headers: cache-control: - no-cache @@ -169,13 +169,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:15 GMT + - Tue, 27 Jun 2023 07:43:16 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1 ms-cv: - - jFApWBZPmUq1r7nwwYUadA.0 + - VisKNg88xk+GYoVQAIwydQ.0 pragma: - no-cache strict-transport-security: @@ -206,7 +206,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4bafd9aa-6ac1-4707-842e-7b2f92a95b5c","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus2.mixedreality.azure.com","accountId":"7a85ec5c-6735-4619-b1ba-10d1eaf5ba63"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"e0dc2da4-c51d-41a7-9fd9-a1ba89719aba","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus2.mixedreality.azure.com","accountId":"51fca8ad-2387-4baa-a64e-2c53537442e9"}}' headers: cache-control: - no-cache @@ -215,11 +215,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:17 GMT + - Tue, 27 Jun 2023 07:43:17 GMT expires: - '-1' ms-cv: - - qIArZlyVgkePDhAymFVEDQ.0 + - 9FpMHiHi+ESrfUDYQo0OHQ.0 pragma: - no-cache strict-transport-security: @@ -257,7 +257,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4bafd9aa-6ac1-4707-842e-7b2f92a95b5c","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"7a85ec5c-6735-4619-b1ba-10d1eaf5ba63"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"e0dc2da4-c51d-41a7-9fd9-a1ba89719aba","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"51fca8ad-2387-4baa-a64e-2c53537442e9"}}' headers: cache-control: - no-cache @@ -266,11 +266,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:21 GMT + - Tue, 27 Jun 2023 07:43:20 GMT expires: - '-1' ms-cv: - - 9ZVkpS8OqEOpL5CEFt+4Zw.0 + - miiSHhhLZEG+Zq395y7+xQ.0 pragma: - no-cache strict-transport-security: @@ -282,7 +282,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -305,7 +305,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4bafd9aa-6ac1-4707-842e-7b2f92a95b5c","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"7a85ec5c-6735-4619-b1ba-10d1eaf5ba63"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"e0dc2da4-c51d-41a7-9fd9-a1ba89719aba","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"51fca8ad-2387-4baa-a64e-2c53537442e9"}}' headers: cache-control: - no-cache @@ -314,11 +314,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:23 GMT + - Tue, 27 Jun 2023 07:43:22 GMT expires: - '-1' ms-cv: - - vKPO2nE8h0+JLSV7YD7mZg.0 + - QuGOGzjJAEWukkc6rd7i7A.0 pragma: - no-cache strict-transport-security: @@ -351,7 +351,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4bafd9aa-6ac1-4707-842e-7b2f92a95b5c","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"7a85ec5c-6735-4619-b1ba-10d1eaf5ba63"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1","name":"remote-rendering-account-name1","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"1891d195-6895-4d47-9784-462d9010eb3f","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"eastus2.mixedreality.azure.com","accountId":"e5da8a76-ee73-40d6-9194-91856af753c3"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"e0dc2da4-c51d-41a7-9fd9-a1ba89719aba","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"51fca8ad-2387-4baa-a64e-2c53537442e9"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1","name":"remote-rendering-account-name1","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"f7ced1ad-e98c-4e2e-9910-6d0b76336a0a","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"eastus2.mixedreality.azure.com","accountId":"96fd80e2-ab07-4b5d-aca4-629bffb73964"}}]}' headers: cache-control: - no-cache @@ -360,11 +360,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:27 GMT + - Tue, 27 Jun 2023 07:43:27 GMT expires: - '-1' ms-cv: - - B6d+5S3cI0yBIS2Yqjdg8A.0 + - ki2E6Je7TkaXYiUzOaxD/g.0 pragma: - no-cache strict-transport-security: @@ -406,11 +406,11 @@ interactions: content-length: - '0' date: - - Tue, 27 Jun 2023 07:27:35 GMT + - Tue, 27 Jun 2023 07:43:32 GMT expires: - '-1' ms-cv: - - vOJX6naBOUiatpym2PdZXA.0 + - i+b0T+/w5EaKHPjUymjjwg.0 pragma: - no-cache strict-transport-security: @@ -441,7 +441,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4bafd9aa-6ac1-4707-842e-7b2f92a95b5c","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"7a85ec5c-6735-4619-b1ba-10d1eaf5ba63"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"e0dc2da4-c51d-41a7-9fd9-a1ba89719aba","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"51fca8ad-2387-4baa-a64e-2c53537442e9"}}]}' headers: cache-control: - no-cache @@ -450,11 +450,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:38 GMT + - Tue, 27 Jun 2023 07:43:37 GMT expires: - '-1' ms-cv: - - 5mVUf0Q6mkS7hg5Fvpugyw.0 + - LA4wEJgucUSOG0M8tQR07w.0 pragma: - no-cache strict-transport-security: @@ -498,11 +498,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:40 GMT + - Tue, 27 Jun 2023 07:43:40 GMT expires: - '-1' ms-cv: - - PyOHa7l150W19qyGmO2wFA.0 + - iF6sfEcq8EKeXa8hSrHpQg.0 pragma: - no-cache strict-transport-security: @@ -550,11 +550,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:42 GMT + - Tue, 27 Jun 2023 07:43:42 GMT expires: - '-1' ms-cv: - - V+i16AeHwEavbH5ERhVX5Q.0 + - 9w8vzhaT7USYcq6HRsi1JQ.0 pragma: - no-cache strict-transport-security: @@ -602,11 +602,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:44 GMT + - Tue, 27 Jun 2023 07:43:45 GMT expires: - '-1' ms-cv: - - KR0wikiKaU66dFChQEsYTQ.0 + - NQURqdL/gEWBGA6yPevbqw.0 pragma: - no-cache strict-transport-security: @@ -618,7 +618,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -654,11 +654,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:47 GMT + - Tue, 27 Jun 2023 07:43:47 GMT expires: - '-1' ms-cv: - - CaaScNfi7kWytjcyXoU8uQ.0 + - 1mHHIfkK9ES12Q+jANLZsA.0 pragma: - no-cache strict-transport-security: @@ -670,7 +670,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK diff --git a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml index 9c4160e1a4c..3b5609de094 100644 --- a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml +++ b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml @@ -19,7 +19,7 @@ interactions: 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":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-27T07:26:44Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-27T07:42:52Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -28,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:26:46 GMT + - Tue, 27 Jun 2023 07:42:58 GMT expires: - '-1' pragma: @@ -65,7 +65,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"mixedreality.azure.com","accountId":"115edfde-846b-406c-a486-de76c1ee65ec"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"mixedreality.azure.com","accountId":"3d160d1d-7aa3-4fd7-a498-1e0260a2ca3f"}}' headers: cache-control: - no-cache @@ -74,13 +74,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:26:53 GMT + - Tue, 27 Jun 2023 07:43:04 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name ms-cv: - - ulg6KH1bE0qcjniQrSDgGw.0 + - 65hVAISA7kWJngJjPRPnLw.0 pragma: - no-cache strict-transport-security: @@ -112,7 +112,7 @@ interactions: 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":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-27T07:26:44Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-27T07:42:52Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -121,7 +121,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:26:54 GMT + - Tue, 27 Jun 2023 07:43:04 GMT expires: - '-1' pragma: @@ -159,7 +159,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"a24b71d9-d83a-4ea1-8f06-f6600a972806"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"fc3550a1-a9f9-487e-b420-f4e7b61dead8"}}' headers: cache-control: - no-cache @@ -168,13 +168,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:00 GMT + - Tue, 27 Jun 2023 07:43:11 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1 ms-cv: - - XJwsgdna20WNt7vtMCOevg.0 + - 3ANP01v4Q0W9HKopRnkBsg.0 pragma: - no-cache strict-transport-security: @@ -205,7 +205,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"mixedreality.azure.com","accountId":"115edfde-846b-406c-a486-de76c1ee65ec"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"mixedreality.azure.com","accountId":"3d160d1d-7aa3-4fd7-a498-1e0260a2ca3f"}}' headers: cache-control: - no-cache @@ -214,11 +214,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:02 GMT + - Tue, 27 Jun 2023 07:43:13 GMT expires: - '-1' ms-cv: - - SZpUmYtiVkSy5AqE14P9hg.0 + - YONY/AmlBEmpWf94Xht0eg.0 pragma: - no-cache strict-transport-security: @@ -256,7 +256,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"115edfde-846b-406c-a486-de76c1ee65ec"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"3d160d1d-7aa3-4fd7-a498-1e0260a2ca3f"}}' headers: cache-control: - no-cache @@ -265,11 +265,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:03 GMT + - Tue, 27 Jun 2023 07:43:13 GMT expires: - '-1' ms-cv: - - SlOm2hKbMUmXFSeix8cxBQ.0 + - pqskHIVtnUyuz62TM9lvEQ.0 pragma: - no-cache strict-transport-security: @@ -281,7 +281,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1199' status: code: 200 message: OK @@ -304,7 +304,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"115edfde-846b-406c-a486-de76c1ee65ec"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"3d160d1d-7aa3-4fd7-a498-1e0260a2ca3f"}}' headers: cache-control: - no-cache @@ -313,11 +313,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:05 GMT + - Tue, 27 Jun 2023 07:43:15 GMT expires: - '-1' ms-cv: - - e1fvMpeVl0y7CEwIHDKvMg.0 + - RSfL4H5vhUqRlpLqv+Puyw.0 pragma: - no-cache strict-transport-security: @@ -350,7 +350,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"115edfde-846b-406c-a486-de76c1ee65ec"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"a24b71d9-d83a-4ea1-8f06-f6600a972806"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"3d160d1d-7aa3-4fd7-a498-1e0260a2ca3f"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"fc3550a1-a9f9-487e-b420-f4e7b61dead8"}}]}' headers: cache-control: - no-cache @@ -359,11 +359,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:07 GMT + - Tue, 27 Jun 2023 07:43:18 GMT expires: - '-1' ms-cv: - - ID7pjedgZ0iSXJGR2ueAkg.0 + - J7K1gL14Y0KQQ0aZnqYBfA.0 pragma: - no-cache strict-transport-security: @@ -405,11 +405,11 @@ interactions: content-length: - '0' date: - - Tue, 27 Jun 2023 07:27:13 GMT + - Tue, 27 Jun 2023 07:43:23 GMT expires: - '-1' ms-cv: - - pICMsJztuU2onaP9iw/oVA.0 + - vERm6VfYaEqi7sGZvWnn2g.0 pragma: - no-cache strict-transport-security: @@ -440,7 +440,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"115edfde-846b-406c-a486-de76c1ee65ec"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"3d160d1d-7aa3-4fd7-a498-1e0260a2ca3f"}}]}' headers: cache-control: - no-cache @@ -449,11 +449,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:15 GMT + - Tue, 27 Jun 2023 07:43:24 GMT expires: - '-1' ms-cv: - - hu3nKMnmUEOvSPdbLzh0EA.0 + - J/ALdfawNEGD6n9j0bK1oA.0 pragma: - no-cache strict-transport-security: @@ -497,11 +497,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:16 GMT + - Tue, 27 Jun 2023 07:43:26 GMT expires: - '-1' ms-cv: - - HbiMrM1qL0aA3wR0BO+V9Q.0 + - sZQIR4fgK0OxatlP7wRLzg.0 pragma: - no-cache strict-transport-security: @@ -513,7 +513,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -549,11 +549,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:19 GMT + - Tue, 27 Jun 2023 07:43:29 GMT expires: - '-1' ms-cv: - - aJc/V5T3SESmZGq+XOyLPg.0 + - pi3QWhZuxE2ceWuahl4ciA.0 pragma: - no-cache strict-transport-security: @@ -601,11 +601,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:21 GMT + - Tue, 27 Jun 2023 07:43:31 GMT expires: - '-1' ms-cv: - - Myg0G/vM5kaMc+3aDZKbHQ.0 + - GhVbLpI/7keCGhv5dsLu4A.0 pragma: - no-cache strict-transport-security: @@ -653,11 +653,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:27:22 GMT + - Tue, 27 Jun 2023 07:43:32 GMT expires: - '-1' ms-cv: - - h9Syd9C76UiwPF5G6LdKcw.0 + - SaCEbxgau0eWqgeUpdVMkA.0 pragma: - no-cache strict-transport-security: diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/__init__.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/__init__.py deleted file mode 100644 index 7183870ee56..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/__init__.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/__init__.py deleted file mode 100644 index 91382c74357..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._mixed_reality_client import MixedRealityClient -from ._version import VERSION - -__version__ = VERSION -__all__ = ['MixedRealityClient'] - -try: - from ._patch import patch_sdk # type: ignore - patch_sdk() -except ImportError: - pass diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/_configuration.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/_configuration.py deleted file mode 100644 index c18f56d541f..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/_configuration.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMHttpLoggingPolicy - -from ._version import VERSION - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any - - from azure.core.credentials import TokenCredential - - -class MixedRealityClientConfiguration(Configuration): - """Configuration for MixedRealityClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). - :type subscription_id: str - """ - - def __init__( - self, - credential, # type: "TokenCredential" - subscription_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - if credential is None: - raise ValueError("Parameter 'credential' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - super(MixedRealityClientConfiguration, self).__init__(**kwargs) - - self.credential = credential - self.subscription_id = subscription_id - self.api_version = "2021-01-01" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-mixedreality/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs # type: Any - ): - # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') - if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/_mixed_reality_client.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/_mixed_reality_client.py deleted file mode 100644 index 5fd801b9b5b..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/_mixed_reality_client.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Optional - - from azure.core.credentials import TokenCredential - from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from ._configuration import MixedRealityClientConfiguration -from .operations import Operations -from .operations import MixedRealityClientOperationsMixin -from .operations import SpatialAnchorsAccountsOperations -from .operations import RemoteRenderingAccountsOperations -from . import models - - -class MixedRealityClient(MixedRealityClientOperationsMixin): - """Mixed Reality Client. - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.mixedreality.operations.Operations - :ivar spatial_anchors_accounts: SpatialAnchorsAccountsOperations operations - :vartype spatial_anchors_accounts: azure.mgmt.mixedreality.operations.SpatialAnchorsAccountsOperations - :ivar remote_rendering_accounts: RemoteRenderingAccountsOperations operations - :vartype remote_rendering_accounts: azure.mgmt.mixedreality.operations.RemoteRenderingAccountsOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, - credential, # type: "TokenCredential" - subscription_id, # type: str - base_url=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - if not base_url: - base_url = 'https://management.azure.com' - self._config = MixedRealityClientConfiguration(credential, subscription_id, **kwargs) - self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) - self.spatial_anchors_accounts = SpatialAnchorsAccountsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.remote_rendering_accounts = RemoteRenderingAccountsOperations( - self._client, self._config, self._serialize, self._deserialize) - - def _send_request(self, http_request, **kwargs): - # type: (HttpRequest, Any) -> HttpResponse - """Runs the network request through the client's chained policies. - - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.HttpResponse - """ - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response - - def close(self): - # type: () -> None - self._client.close() - - def __enter__(self): - # type: () -> MixedRealityClient - self._client.__enter__() - return self - - def __exit__(self, *exc_details): - # type: (Any) -> None - self._client.__exit__(*exc_details) diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/_version.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/_version.py deleted file mode 100644 index 8dbbc07e356..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.0.1" diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/__init__.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/__init__.py deleted file mode 100644 index e254a9f5f57..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._mixed_reality_client import MixedRealityClient -__all__ = ['MixedRealityClient'] diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/_configuration.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/_configuration.py deleted file mode 100644 index 9655a959c45..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/_configuration.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMHttpLoggingPolicy - -from .._version import VERSION - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - - -class MixedRealityClientConfiguration(Configuration): - """Configuration for MixedRealityClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). - :type subscription_id: str - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - **kwargs: Any - ) -> None: - if credential is None: - raise ValueError("Parameter 'credential' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - super(MixedRealityClientConfiguration, self).__init__(**kwargs) - - self.credential = credential - self.subscription_id = subscription_id - self.api_version = "2021-01-01" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-mixedreality/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') - if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/_mixed_reality_client.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/_mixed_reality_client.py deleted file mode 100644 index ee6a492afff..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/_mixed_reality_client.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, Optional, TYPE_CHECKING - -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - -from ._configuration import MixedRealityClientConfiguration -from .operations import Operations -from .operations import MixedRealityClientOperationsMixin -from .operations import SpatialAnchorsAccountsOperations -from .operations import RemoteRenderingAccountsOperations -from .. import models - - -class MixedRealityClient(MixedRealityClientOperationsMixin): - """Mixed Reality Client. - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.mixedreality.aio.operations.Operations - :ivar spatial_anchors_accounts: SpatialAnchorsAccountsOperations operations - :vartype spatial_anchors_accounts: azure.mgmt.mixedreality.aio.operations.SpatialAnchorsAccountsOperations - :ivar remote_rendering_accounts: RemoteRenderingAccountsOperations operations - :vartype remote_rendering_accounts: azure.mgmt.mixedreality.aio.operations.RemoteRenderingAccountsOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: Optional[str] = None, - **kwargs: Any - ) -> None: - if not base_url: - base_url = 'https://management.azure.com' - self._config = MixedRealityClientConfiguration(credential, subscription_id, **kwargs) - self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) - self.spatial_anchors_accounts = SpatialAnchorsAccountsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.remote_rendering_accounts = RemoteRenderingAccountsOperations( - self._client, self._config, self._serialize, self._deserialize) - - async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: - """Runs the network request through the client's chained policies. - - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse - """ - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "MixedRealityClient": - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details) -> None: - await self._client.__aexit__(*exc_details) diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/__init__.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/__init__.py deleted file mode 100644 index 93f9fc77519..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._mixed_reality_client_operations import MixedRealityClientOperationsMixin -from ._spatial_anchors_accounts_operations import SpatialAnchorsAccountsOperations -from ._remote_rendering_accounts_operations import RemoteRenderingAccountsOperations - -__all__ = [ - 'Operations', - 'MixedRealityClientOperationsMixin', - 'SpatialAnchorsAccountsOperations', - 'RemoteRenderingAccountsOperations', -] diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/_mixed_reality_client_operations.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/_mixed_reality_client_operations.py deleted file mode 100644 index 94a32b391c3..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/_mixed_reality_client_operations.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class MixedRealityClientOperationsMixin: - - async def check_name_availability_local( - self, - location: str, - check_name_availability: "_models.CheckNameAvailabilityRequest", - **kwargs - ) -> "_models.CheckNameAvailabilityResponse": - """Check Name Availability for local uniqueness. - - :param location: The location in which uniqueness will be verified. - :type location: str - :param check_name_availability: Check Name Availability Request. - :type check_name_availability: ~azure.mgmt.mixedreality.models.CheckNameAvailabilityRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CheckNameAvailabilityResponse, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.CheckNameAvailabilityResponse - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.check_name_availability_local.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'location': self._serialize.url("location", location, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(check_name_availability, 'CheckNameAvailabilityRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('CheckNameAvailabilityResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - check_name_availability_local.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/locations/{location}/checkNameAvailability'} # type: ignore diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/_operations.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/_operations.py deleted file mode 100644 index e802da0f5a9..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class Operations: - """Operations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.mixedreality.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - **kwargs - ) -> AsyncIterable["_models.OperationPage"]: - """Exposing Available Operations. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OperationPage or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.mixedreality.models.OperationPage] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationPage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('OperationPage', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/providers/Microsoft.MixedReality/operations'} # type: ignore diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/_remote_rendering_accounts_operations.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/_remote_rendering_accounts_operations.py deleted file mode 100644 index 323e533cee1..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/_remote_rendering_accounts_operations.py +++ /dev/null @@ -1,551 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class RemoteRenderingAccountsOperations: - """RemoteRenderingAccountsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.mixedreality.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list_by_subscription( - self, - **kwargs - ) -> AsyncIterable["_models.RemoteRenderingAccountPage"]: - """List Remote Rendering Accounts by Subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RemoteRenderingAccountPage or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.mixedreality.models.RemoteRenderingAccountPage] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RemoteRenderingAccountPage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('RemoteRenderingAccountPage', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/remoteRenderingAccounts'} # type: ignore - - def list_by_resource_group( - self, - resource_group_name: str, - **kwargs - ) -> AsyncIterable["_models.RemoteRenderingAccountPage"]: - """List Resources by Resource Group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RemoteRenderingAccountPage or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.mixedreality.models.RemoteRenderingAccountPage] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RemoteRenderingAccountPage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('RemoteRenderingAccountPage', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts'} # type: ignore - - async def delete( - self, - resource_group_name: str, - account_name: str, - **kwargs - ) -> None: - """Delete a Remote Rendering Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}'} # type: ignore - - async def get( - self, - resource_group_name: str, - account_name: str, - **kwargs - ) -> "_models.RemoteRenderingAccount": - """Retrieve a Remote Rendering Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RemoteRenderingAccount, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.RemoteRenderingAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RemoteRenderingAccount"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RemoteRenderingAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}'} # type: ignore - - async def update( - self, - resource_group_name: str, - account_name: str, - remote_rendering_account: "_models.RemoteRenderingAccount", - **kwargs - ) -> "_models.RemoteRenderingAccount": - """Updating a Remote Rendering Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :param remote_rendering_account: Remote Rendering Account parameter. - :type remote_rendering_account: ~azure.mgmt.mixedreality.models.RemoteRenderingAccount - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RemoteRenderingAccount, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.RemoteRenderingAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RemoteRenderingAccount"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.update.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(remote_rendering_account, 'RemoteRenderingAccount') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RemoteRenderingAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}'} # type: ignore - - async def create( - self, - resource_group_name: str, - account_name: str, - remote_rendering_account: "_models.RemoteRenderingAccount", - **kwargs - ) -> "_models.RemoteRenderingAccount": - """Creating or Updating a Remote Rendering Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :param remote_rendering_account: Remote Rendering Account parameter. - :type remote_rendering_account: ~azure.mgmt.mixedreality.models.RemoteRenderingAccount - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RemoteRenderingAccount, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.RemoteRenderingAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RemoteRenderingAccount"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(remote_rendering_account, 'RemoteRenderingAccount') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('RemoteRenderingAccount', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('RemoteRenderingAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}'} # type: ignore - - async def list_keys( - self, - resource_group_name: str, - account_name: str, - **kwargs - ) -> "_models.AccountKeys": - """List Both of the 2 Keys of a Remote Rendering Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AccountKeys, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.AccountKeys - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AccountKeys"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - # Construct URL - url = self.list_keys.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AccountKeys', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}/listKeys'} # type: ignore - - async def regenerate_keys( - self, - resource_group_name: str, - account_name: str, - regenerate: "_models.AccountKeyRegenerateRequest", - **kwargs - ) -> "_models.AccountKeys": - """Regenerate specified Key of a Remote Rendering Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :param regenerate: Required information for key regeneration. - :type regenerate: ~azure.mgmt.mixedreality.models.AccountKeyRegenerateRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AccountKeys, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.AccountKeys - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AccountKeys"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.regenerate_keys.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(regenerate, 'AccountKeyRegenerateRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AccountKeys', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}/regenerateKeys'} # type: ignore diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/_spatial_anchors_accounts_operations.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/_spatial_anchors_accounts_operations.py deleted file mode 100644 index 2f412610f7f..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/aio/operations/_spatial_anchors_accounts_operations.py +++ /dev/null @@ -1,551 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class SpatialAnchorsAccountsOperations: - """SpatialAnchorsAccountsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.mixedreality.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list_by_subscription( - self, - **kwargs - ) -> AsyncIterable["_models.SpatialAnchorsAccountPage"]: - """List Spatial Anchors Accounts by Subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SpatialAnchorsAccountPage or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.mixedreality.models.SpatialAnchorsAccountPage] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SpatialAnchorsAccountPage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('SpatialAnchorsAccountPage', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/spatialAnchorsAccounts'} # type: ignore - - def list_by_resource_group( - self, - resource_group_name: str, - **kwargs - ) -> AsyncIterable["_models.SpatialAnchorsAccountPage"]: - """List Resources by Resource Group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SpatialAnchorsAccountPage or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.mixedreality.models.SpatialAnchorsAccountPage] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SpatialAnchorsAccountPage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('SpatialAnchorsAccountPage', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts'} # type: ignore - - async def delete( - self, - resource_group_name: str, - account_name: str, - **kwargs - ) -> None: - """Delete a Spatial Anchors Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}'} # type: ignore - - async def get( - self, - resource_group_name: str, - account_name: str, - **kwargs - ) -> "_models.SpatialAnchorsAccount": - """Retrieve a Spatial Anchors Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SpatialAnchorsAccount, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.SpatialAnchorsAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SpatialAnchorsAccount"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SpatialAnchorsAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}'} # type: ignore - - async def update( - self, - resource_group_name: str, - account_name: str, - spatial_anchors_account: "_models.SpatialAnchorsAccount", - **kwargs - ) -> "_models.SpatialAnchorsAccount": - """Updating a Spatial Anchors Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :param spatial_anchors_account: Spatial Anchors Account parameter. - :type spatial_anchors_account: ~azure.mgmt.mixedreality.models.SpatialAnchorsAccount - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SpatialAnchorsAccount, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.SpatialAnchorsAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SpatialAnchorsAccount"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.update.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(spatial_anchors_account, 'SpatialAnchorsAccount') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SpatialAnchorsAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}'} # type: ignore - - async def create( - self, - resource_group_name: str, - account_name: str, - spatial_anchors_account: "_models.SpatialAnchorsAccount", - **kwargs - ) -> "_models.SpatialAnchorsAccount": - """Creating or Updating a Spatial Anchors Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :param spatial_anchors_account: Spatial Anchors Account parameter. - :type spatial_anchors_account: ~azure.mgmt.mixedreality.models.SpatialAnchorsAccount - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SpatialAnchorsAccount, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.SpatialAnchorsAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SpatialAnchorsAccount"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(spatial_anchors_account, 'SpatialAnchorsAccount') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('SpatialAnchorsAccount', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('SpatialAnchorsAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}'} # type: ignore - - async def list_keys( - self, - resource_group_name: str, - account_name: str, - **kwargs - ) -> "_models.AccountKeys": - """List Both of the 2 Keys of a Spatial Anchors Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AccountKeys, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.AccountKeys - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AccountKeys"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - # Construct URL - url = self.list_keys.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AccountKeys', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}/listKeys'} # type: ignore - - async def regenerate_keys( - self, - resource_group_name: str, - account_name: str, - regenerate: "_models.AccountKeyRegenerateRequest", - **kwargs - ) -> "_models.AccountKeys": - """Regenerate specified Key of a Spatial Anchors Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :param regenerate: Required information for key regeneration. - :type regenerate: ~azure.mgmt.mixedreality.models.AccountKeyRegenerateRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AccountKeys, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.AccountKeys - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AccountKeys"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.regenerate_keys.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(regenerate, 'AccountKeyRegenerateRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AccountKeys', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}/regenerateKeys'} # type: ignore diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/models/__init__.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/models/__init__.py deleted file mode 100644 index 7b0b0140a17..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/models/__init__.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AccountKeyRegenerateRequest - from ._models_py3 import AccountKeys - from ._models_py3 import CheckNameAvailabilityRequest - from ._models_py3 import CheckNameAvailabilityResponse - from ._models_py3 import CloudErrorBody - from ._models_py3 import Identity - from ._models_py3 import LogSpecification - from ._models_py3 import MetricDimension - from ._models_py3 import MetricSpecification - from ._models_py3 import Operation - from ._models_py3 import OperationDisplay - from ._models_py3 import OperationPage - from ._models_py3 import OperationProperties - from ._models_py3 import RemoteRenderingAccount - from ._models_py3 import RemoteRenderingAccountPage - from ._models_py3 import Resource - from ._models_py3 import ServiceSpecification - from ._models_py3 import Sku - from ._models_py3 import SpatialAnchorsAccount - from ._models_py3 import SpatialAnchorsAccountPage - from ._models_py3 import SystemData - from ._models_py3 import TrackedResource -except (SyntaxError, ImportError): - from ._models import AccountKeyRegenerateRequest # type: ignore - from ._models import AccountKeys # type: ignore - from ._models import CheckNameAvailabilityRequest # type: ignore - from ._models import CheckNameAvailabilityResponse # type: ignore - from ._models import CloudErrorBody # type: ignore - from ._models import Identity # type: ignore - from ._models import LogSpecification # type: ignore - from ._models import MetricDimension # type: ignore - from ._models import MetricSpecification # type: ignore - from ._models import Operation # type: ignore - from ._models import OperationDisplay # type: ignore - from ._models import OperationPage # type: ignore - from ._models import OperationProperties # type: ignore - from ._models import RemoteRenderingAccount # type: ignore - from ._models import RemoteRenderingAccountPage # type: ignore - from ._models import Resource # type: ignore - from ._models import ServiceSpecification # type: ignore - from ._models import Sku # type: ignore - from ._models import SpatialAnchorsAccount # type: ignore - from ._models import SpatialAnchorsAccountPage # type: ignore - from ._models import SystemData # type: ignore - from ._models import TrackedResource # type: ignore - -from ._mixed_reality_client_enums import ( - CreatedByType, - NameUnavailableReason, - Serial, - SkuTier, -) - -__all__ = [ - 'AccountKeyRegenerateRequest', - 'AccountKeys', - 'CheckNameAvailabilityRequest', - 'CheckNameAvailabilityResponse', - 'CloudErrorBody', - 'Identity', - 'LogSpecification', - 'MetricDimension', - 'MetricSpecification', - 'Operation', - 'OperationDisplay', - 'OperationPage', - 'OperationProperties', - 'RemoteRenderingAccount', - 'RemoteRenderingAccountPage', - 'Resource', - 'ServiceSpecification', - 'Sku', - 'SpatialAnchorsAccount', - 'SpatialAnchorsAccountPage', - 'SystemData', - 'TrackedResource', - 'CreatedByType', - 'NameUnavailableReason', - 'Serial', - 'SkuTier', -] diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/models/_mixed_reality_client_enums.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/models/_mixed_reality_client_enums.py deleted file mode 100644 index 3c095b56888..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/models/_mixed_reality_client_enums.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum, EnumMeta -from six import with_metaclass - -class _CaseInsensitiveEnumMeta(EnumMeta): - def __getitem__(self, name): - return super().__getitem__(name.upper()) - - def __getattr__(cls, name): - """Return the enum member matching `name` - We use __getattr__ instead of descriptors or inserting into the enum - class' __dict__ in order to support `name` and `value` being both - properties for enum members (which live in the class' __dict__) and - enum members themselves. - """ - try: - return cls._member_map_[name.upper()] - except KeyError: - raise AttributeError(name) - - -class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of identity that created the resource. - """ - - USER = "User" - APPLICATION = "Application" - MANAGED_IDENTITY = "ManagedIdentity" - KEY = "Key" - -class NameUnavailableReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """reason of name unavailable. - """ - - INVALID = "Invalid" - ALREADY_EXISTS = "AlreadyExists" - -class Serial(with_metaclass(_CaseInsensitiveEnumMeta, int, Enum)): - """serial of key to be regenerated - """ - - #: The Primary Key. - PRIMARY = 1 - #: The Secondary Key. - SECONDARY = 2 - -class SkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """This field is required to be implemented by the Resource Provider if the service has more than - one tier, but is not required on a PUT. - """ - - FREE = "Free" - BASIC = "Basic" - STANDARD = "Standard" - PREMIUM = "Premium" diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/models/_models.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/models/_models.py deleted file mode 100644 index c3f82735ec3..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/models/_models.py +++ /dev/null @@ -1,802 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import msrest.serialization - - -class AccountKeyRegenerateRequest(msrest.serialization.Model): - """Request for account key regeneration. - - :param serial: serial of key to be regenerated. Possible values include: 1, 2. Default value: - "1". - :type serial: str or ~azure.mgmt.mixedreality.models.Serial - """ - - _attribute_map = { - 'serial': {'key': 'serial', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(AccountKeyRegenerateRequest, self).__init__(**kwargs) - self.serial = kwargs.get('serial', "1") - - -class AccountKeys(msrest.serialization.Model): - """Developer Keys of account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar primary_key: value of primary key. - :vartype primary_key: str - :ivar secondary_key: value of secondary key. - :vartype secondary_key: str - """ - - _validation = { - 'primary_key': {'readonly': True}, - 'secondary_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AccountKeys, self).__init__(**kwargs) - self.primary_key = None - self.secondary_key = None - - -class CheckNameAvailabilityRequest(msrest.serialization.Model): - """Check Name Availability Request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource Name To Verify. - :type name: str - :param type: Required. Fully qualified resource type which includes provider namespace. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CheckNameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs['name'] - self.type = kwargs['type'] - - -class CheckNameAvailabilityResponse(msrest.serialization.Model): - """Check Name Availability Response. - - All required parameters must be populated in order to send to Azure. - - :param name_available: Required. if name Available. - :type name_available: bool - :param reason: Resource Name To Verify. Possible values include: "Invalid", "AlreadyExists". - :type reason: str or ~azure.mgmt.mixedreality.models.NameUnavailableReason - :param message: detail message. - :type message: str - """ - - _validation = { - 'name_available': {'required': True}, - } - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CheckNameAvailabilityResponse, self).__init__(**kwargs) - self.name_available = kwargs['name_available'] - self.reason = kwargs.get('reason', None) - self.message = kwargs.get('message', None) - - -class CloudErrorBody(msrest.serialization.Model): - """An error response from Azure. - - :param code: An identifier for the error. Codes are invariant and are intended to be consumed - programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable for displaying in a - user interface. - :type message: str - :param target: The target of the particular error. For example, the name of the property in - error. - :type target: str - :param details: A list of additional details about the error. - :type details: list[~azure.mgmt.mixedreality.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__( - self, - **kwargs - ): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - - -class Identity(msrest.serialization.Model): - """Identity for the resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :ivar type: The identity type. Default value: "SystemAssigned". - :vartype type: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - 'type': {'constant': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "SystemAssigned" - - def __init__( - self, - **kwargs - ): - super(Identity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - - -class LogSpecification(msrest.serialization.Model): - """Specifications of the Log for Azure Monitoring. - - :param name: Name of the log. - :type name: str - :param display_name: Localized friendly display name of the log. - :type display_name: str - :param blob_duration: Blob duration of the log. - :type blob_duration: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LogSpecification, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.blob_duration = kwargs.get('blob_duration', None) - - -class MetricDimension(msrest.serialization.Model): - """Specifications of the Dimension of metrics. - - :param name: Name of the dimension. - :type name: str - :param display_name: Localized friendly display name of the dimension. - :type display_name: str - :param internal_name: Internal name of the dimension. - :type internal_name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'internal_name': {'key': 'internalName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(MetricDimension, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.internal_name = kwargs.get('internal_name', None) - - -class MetricSpecification(msrest.serialization.Model): - """Specifications of the Metrics for Azure Monitoring. - - :param name: Name of the metric. - :type name: str - :param display_name: Localized friendly display name of the metric. - :type display_name: str - :param display_description: Localized friendly description of the metric. - :type display_description: str - :param unit: Unit that makes sense for the metric. - :type unit: str - :param aggregation_type: Only provide one value for this field. Valid values: Average, Minimum, - Maximum, Total, Count. - :type aggregation_type: str - :param internal_metric_name: Internal metric name. - :type internal_metric_name: str - :param dimensions: Dimensions of the metric. - :type dimensions: list[~azure.mgmt.mixedreality.models.MetricDimension] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'display_description': {'key': 'displayDescription', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, - 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, - 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, - } - - def __init__( - self, - **kwargs - ): - super(MetricSpecification, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.display_description = kwargs.get('display_description', None) - self.unit = kwargs.get('unit', None) - self.aggregation_type = kwargs.get('aggregation_type', None) - self.internal_metric_name = kwargs.get('internal_metric_name', None) - self.dimensions = kwargs.get('dimensions', None) - - -class Operation(msrest.serialization.Model): - """REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation}. - :type name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.mixedreality.models.OperationDisplay - :param is_data_action: Whether or not this is a data plane operation. - :type is_data_action: bool - :param origin: The origin. - :type origin: str - :param properties: Properties of the operation. - :type properties: ~azure.mgmt.mixedreality.models.OperationProperties - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'OperationProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) - self.is_data_action = kwargs.get('is_data_action', None) - self.origin = kwargs.get('origin', None) - self.properties = kwargs.get('properties', None) - - -class OperationDisplay(msrest.serialization.Model): - """The object that represents the operation. - - All required parameters must be populated in order to send to Azure. - - :param provider: Required. Service provider: Microsoft.ResourceProvider. - :type provider: str - :param resource: Required. Resource on which the operation is performed: Profile, endpoint, - etc. - :type resource: str - :param operation: Required. Operation type: Read, write, delete, etc. - :type operation: str - :param description: Required. Description of operation. - :type description: str - """ - - _validation = { - 'provider': {'required': True}, - 'resource': {'required': True}, - 'operation': {'required': True}, - 'description': {'required': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs['provider'] - self.resource = kwargs['resource'] - self.operation = kwargs['operation'] - self.description = kwargs['description'] - - -class OperationPage(msrest.serialization.Model): - """Result of the request to list Resource Provider operations. It contains a list of operations and a URL link to get the next set of results. - - :param value: List of operations supported by the Resource Provider. - :type value: list[~azure.mgmt.mixedreality.models.Operation] - :param next_link: URL to get the next set of operation list results if there are any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationPage, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class OperationProperties(msrest.serialization.Model): - """Operation properties. - - :param service_specification: Service specification. - :type service_specification: ~azure.mgmt.mixedreality.models.ServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationProperties, self).__init__(**kwargs) - self.service_specification = kwargs.get('service_specification', None) - - -class Resource(msrest.serialization.Model): - """Common fields that are returned in the response for all Azure Resource Manager resources. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs['location'] - - -class RemoteRenderingAccount(TrackedResource): - """RemoteRenderingAccount Response. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str - :param identity: The identity associated with this account. - :type identity: ~azure.mgmt.mixedreality.models.Identity - :param plan: The plan associated with this account. - :type plan: ~azure.mgmt.mixedreality.models.Identity - :param sku: The sku associated with this account. - :type sku: ~azure.mgmt.mixedreality.models.Sku - :param kind: The kind of account, if supported. - :type kind: ~azure.mgmt.mixedreality.models.Sku - :ivar system_data: System metadata for this account. - :vartype system_data: ~azure.mgmt.mixedreality.models.SystemData - :param storage_account_name: The name of the storage account associated with this accountId. - :type storage_account_name: str - :ivar account_id: unique id of certain account. - :vartype account_id: str - :ivar account_domain: Correspond domain name of certain Spatial Anchors Account. - :vartype account_domain: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'system_data': {'readonly': True}, - 'account_id': {'readonly': True}, - 'account_domain': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'plan': {'key': 'plan', 'type': 'Identity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'Sku'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, - 'account_id': {'key': 'properties.accountId', 'type': 'str'}, - 'account_domain': {'key': 'properties.accountDomain', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RemoteRenderingAccount, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.plan = kwargs.get('plan', None) - self.sku = kwargs.get('sku', None) - self.kind = kwargs.get('kind', None) - self.system_data = None - self.storage_account_name = kwargs.get('storage_account_name', None) - self.account_id = None - self.account_domain = None - - -class RemoteRenderingAccountPage(msrest.serialization.Model): - """Result of the request to get resource collection. It contains a list of resources and a URL link to get the next set of results. - - :param value: List of resources supported by the Resource Provider. - :type value: list[~azure.mgmt.mixedreality.models.RemoteRenderingAccount] - :param next_link: URL to get the next set of resource list results if there are any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RemoteRenderingAccount]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RemoteRenderingAccountPage, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ServiceSpecification(msrest.serialization.Model): - """Service specification payload. - - :param log_specifications: Specifications of the Log for Azure Monitoring. - :type log_specifications: list[~azure.mgmt.mixedreality.models.LogSpecification] - :param metric_specifications: Specifications of the Metrics for Azure Monitoring. - :type metric_specifications: list[~azure.mgmt.mixedreality.models.MetricSpecification] - """ - - _attribute_map = { - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - } - - def __init__( - self, - **kwargs - ): - super(ServiceSpecification, self).__init__(**kwargs) - self.log_specifications = kwargs.get('log_specifications', None) - self.metric_specifications = kwargs.get('metric_specifications', None) - - -class Sku(msrest.serialization.Model): - """The resource model definition representing SKU. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code. - :type name: str - :param tier: This field is required to be implemented by the Resource Provider if the service - has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", - "Standard", "Premium". - :type tier: str or ~azure.mgmt.mixedreality.models.SkuTier - :param size: The SKU size. When the name field is the combination of tier and some other value, - this would be the standalone code. - :type size: str - :param family: If the service has different generations of hardware, for the same SKU, then - that can be captured here. - :type family: str - :param capacity: If the SKU supports scale out/in then the capacity integer should be included. - If scale out/in is not possible for the resource this may be omitted. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(Sku, self).__init__(**kwargs) - self.name = kwargs['name'] - self.tier = kwargs.get('tier', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) - self.capacity = kwargs.get('capacity', None) - - -class SpatialAnchorsAccount(TrackedResource): - """SpatialAnchorsAccount Response. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str - :param identity: The identity associated with this account. - :type identity: ~azure.mgmt.mixedreality.models.Identity - :param plan: The plan associated with this account. - :type plan: ~azure.mgmt.mixedreality.models.Identity - :param sku: The sku associated with this account. - :type sku: ~azure.mgmt.mixedreality.models.Sku - :param kind: The kind of account, if supported. - :type kind: ~azure.mgmt.mixedreality.models.Sku - :ivar system_data: System metadata for this account. - :vartype system_data: ~azure.mgmt.mixedreality.models.SystemData - :param storage_account_name: The name of the storage account associated with this accountId. - :type storage_account_name: str - :ivar account_id: unique id of certain account. - :vartype account_id: str - :ivar account_domain: Correspond domain name of certain Spatial Anchors Account. - :vartype account_domain: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'system_data': {'readonly': True}, - 'account_id': {'readonly': True}, - 'account_domain': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'plan': {'key': 'plan', 'type': 'Identity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'Sku'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, - 'account_id': {'key': 'properties.accountId', 'type': 'str'}, - 'account_domain': {'key': 'properties.accountDomain', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SpatialAnchorsAccount, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.plan = kwargs.get('plan', None) - self.sku = kwargs.get('sku', None) - self.kind = kwargs.get('kind', None) - self.system_data = None - self.storage_account_name = kwargs.get('storage_account_name', None) - self.account_id = None - self.account_domain = None - - -class SpatialAnchorsAccountPage(msrest.serialization.Model): - """Result of the request to get resource collection. It contains a list of resources and a URL link to get the next set of results. - - :param value: List of resources supported by the Resource Provider. - :type value: list[~azure.mgmt.mixedreality.models.SpatialAnchorsAccount] - :param next_link: URL to get the next set of resource list results if there are any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SpatialAnchorsAccount]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SpatialAnchorsAccountPage, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class SystemData(msrest.serialization.Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. Possible values - include: "User", "Application", "ManagedIdentity", "Key". - :type created_by_type: str or ~azure.mgmt.mixedreality.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: ~datetime.datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the resource. Possible - values include: "User", "Application", "ManagedIdentity", "Key". - :type last_modified_by_type: str or ~azure.mgmt.mixedreality.models.CreatedByType - :param last_modified_at: The timestamp of resource last modification (UTC). - :type last_modified_at: ~datetime.datetime - """ - - _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - super(SystemData, self).__init__(**kwargs) - self.created_by = kwargs.get('created_by', None) - self.created_by_type = kwargs.get('created_by_type', None) - self.created_at = kwargs.get('created_at', None) - self.last_modified_by = kwargs.get('last_modified_by', None) - self.last_modified_by_type = kwargs.get('last_modified_by_type', None) - self.last_modified_at = kwargs.get('last_modified_at', None) diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/models/_models_py3.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/models/_models_py3.py deleted file mode 100644 index aff31315baa..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/models/_models_py3.py +++ /dev/null @@ -1,894 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import datetime -from typing import Dict, List, Optional, Union - -import msrest.serialization - -from ._mixed_reality_client_enums import * - - -class AccountKeyRegenerateRequest(msrest.serialization.Model): - """Request for account key regeneration. - - :param serial: serial of key to be regenerated. Possible values include: 1, 2. Default value: - "1". - :type serial: str or ~azure.mgmt.mixedreality.models.Serial - """ - - _attribute_map = { - 'serial': {'key': 'serial', 'type': 'int'}, - } - - def __init__( - self, - *, - serial: Optional[Union[int, "Serial"]] = "1", - **kwargs - ): - super(AccountKeyRegenerateRequest, self).__init__(**kwargs) - self.serial = serial - - -class AccountKeys(msrest.serialization.Model): - """Developer Keys of account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar primary_key: value of primary key. - :vartype primary_key: str - :ivar secondary_key: value of secondary key. - :vartype secondary_key: str - """ - - _validation = { - 'primary_key': {'readonly': True}, - 'secondary_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AccountKeys, self).__init__(**kwargs) - self.primary_key = None - self.secondary_key = None - - -class CheckNameAvailabilityRequest(msrest.serialization.Model): - """Check Name Availability Request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource Name To Verify. - :type name: str - :param type: Required. Fully qualified resource type which includes provider namespace. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - *, - name: str, - type: str, - **kwargs - ): - super(CheckNameAvailabilityRequest, self).__init__(**kwargs) - self.name = name - self.type = type - - -class CheckNameAvailabilityResponse(msrest.serialization.Model): - """Check Name Availability Response. - - All required parameters must be populated in order to send to Azure. - - :param name_available: Required. if name Available. - :type name_available: bool - :param reason: Resource Name To Verify. Possible values include: "Invalid", "AlreadyExists". - :type reason: str or ~azure.mgmt.mixedreality.models.NameUnavailableReason - :param message: detail message. - :type message: str - """ - - _validation = { - 'name_available': {'required': True}, - } - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - *, - name_available: bool, - reason: Optional[Union[str, "NameUnavailableReason"]] = None, - message: Optional[str] = None, - **kwargs - ): - super(CheckNameAvailabilityResponse, self).__init__(**kwargs) - self.name_available = name_available - self.reason = reason - self.message = message - - -class CloudErrorBody(msrest.serialization.Model): - """An error response from Azure. - - :param code: An identifier for the error. Codes are invariant and are intended to be consumed - programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable for displaying in a - user interface. - :type message: str - :param target: The target of the particular error. For example, the name of the property in - error. - :type target: str - :param details: A list of additional details about the error. - :type details: list[~azure.mgmt.mixedreality.models.CloudErrorBody] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - } - - def __init__( - self, - *, - code: Optional[str] = None, - message: Optional[str] = None, - target: Optional[str] = None, - details: Optional[List["CloudErrorBody"]] = None, - **kwargs - ): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - - -class Identity(msrest.serialization.Model): - """Identity for the resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :ivar type: The identity type. Default value: "SystemAssigned". - :vartype type: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - 'type': {'constant': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "SystemAssigned" - - def __init__( - self, - **kwargs - ): - super(Identity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - - -class LogSpecification(msrest.serialization.Model): - """Specifications of the Log for Azure Monitoring. - - :param name: Name of the log. - :type name: str - :param display_name: Localized friendly display name of the log. - :type display_name: str - :param blob_duration: Blob duration of the log. - :type blob_duration: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - blob_duration: Optional[str] = None, - **kwargs - ): - super(LogSpecification, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.blob_duration = blob_duration - - -class MetricDimension(msrest.serialization.Model): - """Specifications of the Dimension of metrics. - - :param name: Name of the dimension. - :type name: str - :param display_name: Localized friendly display name of the dimension. - :type display_name: str - :param internal_name: Internal name of the dimension. - :type internal_name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'internal_name': {'key': 'internalName', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - internal_name: Optional[str] = None, - **kwargs - ): - super(MetricDimension, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.internal_name = internal_name - - -class MetricSpecification(msrest.serialization.Model): - """Specifications of the Metrics for Azure Monitoring. - - :param name: Name of the metric. - :type name: str - :param display_name: Localized friendly display name of the metric. - :type display_name: str - :param display_description: Localized friendly description of the metric. - :type display_description: str - :param unit: Unit that makes sense for the metric. - :type unit: str - :param aggregation_type: Only provide one value for this field. Valid values: Average, Minimum, - Maximum, Total, Count. - :type aggregation_type: str - :param internal_metric_name: Internal metric name. - :type internal_metric_name: str - :param dimensions: Dimensions of the metric. - :type dimensions: list[~azure.mgmt.mixedreality.models.MetricDimension] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'display_description': {'key': 'displayDescription', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, - 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, - 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - display_description: Optional[str] = None, - unit: Optional[str] = None, - aggregation_type: Optional[str] = None, - internal_metric_name: Optional[str] = None, - dimensions: Optional[List["MetricDimension"]] = None, - **kwargs - ): - super(MetricSpecification, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.display_description = display_description - self.unit = unit - self.aggregation_type = aggregation_type - self.internal_metric_name = internal_metric_name - self.dimensions = dimensions - - -class Operation(msrest.serialization.Model): - """REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation}. - :type name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.mixedreality.models.OperationDisplay - :param is_data_action: Whether or not this is a data plane operation. - :type is_data_action: bool - :param origin: The origin. - :type origin: str - :param properties: Properties of the operation. - :type properties: ~azure.mgmt.mixedreality.models.OperationProperties - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'OperationProperties'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display: Optional["OperationDisplay"] = None, - is_data_action: Optional[bool] = None, - origin: Optional[str] = None, - properties: Optional["OperationProperties"] = None, - **kwargs - ): - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display - self.is_data_action = is_data_action - self.origin = origin - self.properties = properties - - -class OperationDisplay(msrest.serialization.Model): - """The object that represents the operation. - - All required parameters must be populated in order to send to Azure. - - :param provider: Required. Service provider: Microsoft.ResourceProvider. - :type provider: str - :param resource: Required. Resource on which the operation is performed: Profile, endpoint, - etc. - :type resource: str - :param operation: Required. Operation type: Read, write, delete, etc. - :type operation: str - :param description: Required. Description of operation. - :type description: str - """ - - _validation = { - 'provider': {'required': True}, - 'resource': {'required': True}, - 'operation': {'required': True}, - 'description': {'required': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - *, - provider: str, - resource: str, - operation: str, - description: str, - **kwargs - ): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description - - -class OperationPage(msrest.serialization.Model): - """Result of the request to list Resource Provider operations. It contains a list of operations and a URL link to get the next set of results. - - :param value: List of operations supported by the Resource Provider. - :type value: list[~azure.mgmt.mixedreality.models.Operation] - :param next_link: URL to get the next set of operation list results if there are any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Operation"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(OperationPage, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class OperationProperties(msrest.serialization.Model): - """Operation properties. - - :param service_specification: Service specification. - :type service_specification: ~azure.mgmt.mixedreality.models.ServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__( - self, - *, - service_specification: Optional["ServiceSpecification"] = None, - **kwargs - ): - super(OperationProperties, self).__init__(**kwargs) - self.service_specification = service_specification - - -class Resource(msrest.serialization.Model): - """Common fields that are returned in the response for all Azure Resource Manager resources. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__( - self, - *, - location: str, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - super(TrackedResource, self).__init__(**kwargs) - self.tags = tags - self.location = location - - -class RemoteRenderingAccount(TrackedResource): - """RemoteRenderingAccount Response. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str - :param identity: The identity associated with this account. - :type identity: ~azure.mgmt.mixedreality.models.Identity - :param plan: The plan associated with this account. - :type plan: ~azure.mgmt.mixedreality.models.Identity - :param sku: The sku associated with this account. - :type sku: ~azure.mgmt.mixedreality.models.Sku - :param kind: The kind of account, if supported. - :type kind: ~azure.mgmt.mixedreality.models.Sku - :ivar system_data: System metadata for this account. - :vartype system_data: ~azure.mgmt.mixedreality.models.SystemData - :param storage_account_name: The name of the storage account associated with this accountId. - :type storage_account_name: str - :ivar account_id: unique id of certain account. - :vartype account_id: str - :ivar account_domain: Correspond domain name of certain Spatial Anchors Account. - :vartype account_domain: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'system_data': {'readonly': True}, - 'account_id': {'readonly': True}, - 'account_domain': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'plan': {'key': 'plan', 'type': 'Identity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'Sku'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, - 'account_id': {'key': 'properties.accountId', 'type': 'str'}, - 'account_domain': {'key': 'properties.accountDomain', 'type': 'str'}, - } - - def __init__( - self, - *, - location: str, - tags: Optional[Dict[str, str]] = None, - identity: Optional["Identity"] = None, - plan: Optional["Identity"] = None, - sku: Optional["Sku"] = None, - kind: Optional["Sku"] = None, - storage_account_name: Optional[str] = None, - **kwargs - ): - super(RemoteRenderingAccount, self).__init__(tags=tags, location=location, **kwargs) - self.identity = identity - self.plan = plan - self.sku = sku - self.kind = kind - self.system_data = None - self.storage_account_name = storage_account_name - self.account_id = None - self.account_domain = None - - -class RemoteRenderingAccountPage(msrest.serialization.Model): - """Result of the request to get resource collection. It contains a list of resources and a URL link to get the next set of results. - - :param value: List of resources supported by the Resource Provider. - :type value: list[~azure.mgmt.mixedreality.models.RemoteRenderingAccount] - :param next_link: URL to get the next set of resource list results if there are any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RemoteRenderingAccount]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["RemoteRenderingAccount"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(RemoteRenderingAccountPage, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ServiceSpecification(msrest.serialization.Model): - """Service specification payload. - - :param log_specifications: Specifications of the Log for Azure Monitoring. - :type log_specifications: list[~azure.mgmt.mixedreality.models.LogSpecification] - :param metric_specifications: Specifications of the Metrics for Azure Monitoring. - :type metric_specifications: list[~azure.mgmt.mixedreality.models.MetricSpecification] - """ - - _attribute_map = { - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - } - - def __init__( - self, - *, - log_specifications: Optional[List["LogSpecification"]] = None, - metric_specifications: Optional[List["MetricSpecification"]] = None, - **kwargs - ): - super(ServiceSpecification, self).__init__(**kwargs) - self.log_specifications = log_specifications - self.metric_specifications = metric_specifications - - -class Sku(msrest.serialization.Model): - """The resource model definition representing SKU. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code. - :type name: str - :param tier: This field is required to be implemented by the Resource Provider if the service - has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", - "Standard", "Premium". - :type tier: str or ~azure.mgmt.mixedreality.models.SkuTier - :param size: The SKU size. When the name field is the combination of tier and some other value, - this would be the standalone code. - :type size: str - :param family: If the service has different generations of hardware, for the same SKU, then - that can be captured here. - :type family: str - :param capacity: If the SKU supports scale out/in then the capacity integer should be included. - If scale out/in is not possible for the resource this may be omitted. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - *, - name: str, - tier: Optional[Union[str, "SkuTier"]] = None, - size: Optional[str] = None, - family: Optional[str] = None, - capacity: Optional[int] = None, - **kwargs - ): - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.size = size - self.family = family - self.capacity = capacity - - -class SpatialAnchorsAccount(TrackedResource): - """SpatialAnchorsAccount Response. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str - :param identity: The identity associated with this account. - :type identity: ~azure.mgmt.mixedreality.models.Identity - :param plan: The plan associated with this account. - :type plan: ~azure.mgmt.mixedreality.models.Identity - :param sku: The sku associated with this account. - :type sku: ~azure.mgmt.mixedreality.models.Sku - :param kind: The kind of account, if supported. - :type kind: ~azure.mgmt.mixedreality.models.Sku - :ivar system_data: System metadata for this account. - :vartype system_data: ~azure.mgmt.mixedreality.models.SystemData - :param storage_account_name: The name of the storage account associated with this accountId. - :type storage_account_name: str - :ivar account_id: unique id of certain account. - :vartype account_id: str - :ivar account_domain: Correspond domain name of certain Spatial Anchors Account. - :vartype account_domain: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'system_data': {'readonly': True}, - 'account_id': {'readonly': True}, - 'account_domain': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'plan': {'key': 'plan', 'type': 'Identity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'kind': {'key': 'kind', 'type': 'Sku'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, - 'account_id': {'key': 'properties.accountId', 'type': 'str'}, - 'account_domain': {'key': 'properties.accountDomain', 'type': 'str'}, - } - - def __init__( - self, - *, - location: str, - tags: Optional[Dict[str, str]] = None, - identity: Optional["Identity"] = None, - plan: Optional["Identity"] = None, - sku: Optional["Sku"] = None, - kind: Optional["Sku"] = None, - storage_account_name: Optional[str] = None, - **kwargs - ): - super(SpatialAnchorsAccount, self).__init__(tags=tags, location=location, **kwargs) - self.identity = identity - self.plan = plan - self.sku = sku - self.kind = kind - self.system_data = None - self.storage_account_name = storage_account_name - self.account_id = None - self.account_domain = None - - -class SpatialAnchorsAccountPage(msrest.serialization.Model): - """Result of the request to get resource collection. It contains a list of resources and a URL link to get the next set of results. - - :param value: List of resources supported by the Resource Provider. - :type value: list[~azure.mgmt.mixedreality.models.SpatialAnchorsAccount] - :param next_link: URL to get the next set of resource list results if there are any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SpatialAnchorsAccount]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["SpatialAnchorsAccount"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(SpatialAnchorsAccountPage, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class SystemData(msrest.serialization.Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. Possible values - include: "User", "Application", "ManagedIdentity", "Key". - :type created_by_type: str or ~azure.mgmt.mixedreality.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: ~datetime.datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the resource. Possible - values include: "User", "Application", "ManagedIdentity", "Key". - :type last_modified_by_type: str or ~azure.mgmt.mixedreality.models.CreatedByType - :param last_modified_at: The timestamp of resource last modification (UTC). - :type last_modified_at: ~datetime.datetime - """ - - _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - created_by: Optional[str] = None, - created_by_type: Optional[Union[str, "CreatedByType"]] = None, - created_at: Optional[datetime.datetime] = None, - last_modified_by: Optional[str] = None, - last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, - last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): - super(SystemData, self).__init__(**kwargs) - self.created_by = created_by - self.created_by_type = created_by_type - self.created_at = created_at - self.last_modified_by = last_modified_by - self.last_modified_by_type = last_modified_by_type - self.last_modified_at = last_modified_at diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/__init__.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/__init__.py deleted file mode 100644 index 93f9fc77519..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._mixed_reality_client_operations import MixedRealityClientOperationsMixin -from ._spatial_anchors_accounts_operations import SpatialAnchorsAccountsOperations -from ._remote_rendering_accounts_operations import RemoteRenderingAccountsOperations - -__all__ = [ - 'Operations', - 'MixedRealityClientOperationsMixin', - 'SpatialAnchorsAccountsOperations', - 'RemoteRenderingAccountsOperations', -] diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/_mixed_reality_client_operations.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/_mixed_reality_client_operations.py deleted file mode 100644 index 2c8bd9b22be..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/_mixed_reality_client_operations.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class MixedRealityClientOperationsMixin(object): - - def check_name_availability_local( - self, - location, # type: str - check_name_availability, # type: "_models.CheckNameAvailabilityRequest" - **kwargs # type: Any - ): - # type: (...) -> "_models.CheckNameAvailabilityResponse" - """Check Name Availability for local uniqueness. - - :param location: The location in which uniqueness will be verified. - :type location: str - :param check_name_availability: Check Name Availability Request. - :type check_name_availability: ~azure.mgmt.mixedreality.models.CheckNameAvailabilityRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CheckNameAvailabilityResponse, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.CheckNameAvailabilityResponse - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.check_name_availability_local.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'location': self._serialize.url("location", location, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(check_name_availability, 'CheckNameAvailabilityRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('CheckNameAvailabilityResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - check_name_availability_local.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/locations/{location}/checkNameAvailability'} # type: ignore diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/_operations.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/_operations.py deleted file mode 100644 index 9e1eb53efef..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/_operations.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class Operations(object): - """Operations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.mixedreality.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.OperationPage"] - """Exposing Available Operations. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OperationPage or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.mixedreality.models.OperationPage] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationPage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('OperationPage', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/providers/Microsoft.MixedReality/operations'} # type: ignore diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/_remote_rendering_accounts_operations.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/_remote_rendering_accounts_operations.py deleted file mode 100644 index 4c414958d1f..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/_remote_rendering_accounts_operations.py +++ /dev/null @@ -1,563 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class RemoteRenderingAccountsOperations(object): - """RemoteRenderingAccountsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.mixedreality.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list_by_subscription( - self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.RemoteRenderingAccountPage"] - """List Remote Rendering Accounts by Subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RemoteRenderingAccountPage or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.mixedreality.models.RemoteRenderingAccountPage] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RemoteRenderingAccountPage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('RemoteRenderingAccountPage', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/remoteRenderingAccounts'} # type: ignore - - def list_by_resource_group( - self, - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.RemoteRenderingAccountPage"] - """List Resources by Resource Group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RemoteRenderingAccountPage or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.mixedreality.models.RemoteRenderingAccountPage] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RemoteRenderingAccountPage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('RemoteRenderingAccountPage', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts'} # type: ignore - - def delete( - self, - resource_group_name, # type: str - account_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Delete a Remote Rendering Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}'} # type: ignore - - def get( - self, - resource_group_name, # type: str - account_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.RemoteRenderingAccount" - """Retrieve a Remote Rendering Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RemoteRenderingAccount, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.RemoteRenderingAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RemoteRenderingAccount"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RemoteRenderingAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}'} # type: ignore - - def update( - self, - resource_group_name, # type: str - account_name, # type: str - remote_rendering_account, # type: "_models.RemoteRenderingAccount" - **kwargs # type: Any - ): - # type: (...) -> "_models.RemoteRenderingAccount" - """Updating a Remote Rendering Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :param remote_rendering_account: Remote Rendering Account parameter. - :type remote_rendering_account: ~azure.mgmt.mixedreality.models.RemoteRenderingAccount - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RemoteRenderingAccount, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.RemoteRenderingAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RemoteRenderingAccount"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.update.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(remote_rendering_account, 'RemoteRenderingAccount') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RemoteRenderingAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}'} # type: ignore - - def create( - self, - resource_group_name, # type: str - account_name, # type: str - remote_rendering_account, # type: "_models.RemoteRenderingAccount" - **kwargs # type: Any - ): - # type: (...) -> "_models.RemoteRenderingAccount" - """Creating or Updating a Remote Rendering Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :param remote_rendering_account: Remote Rendering Account parameter. - :type remote_rendering_account: ~azure.mgmt.mixedreality.models.RemoteRenderingAccount - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RemoteRenderingAccount, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.RemoteRenderingAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RemoteRenderingAccount"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(remote_rendering_account, 'RemoteRenderingAccount') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('RemoteRenderingAccount', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('RemoteRenderingAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}'} # type: ignore - - def list_keys( - self, - resource_group_name, # type: str - account_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.AccountKeys" - """List Both of the 2 Keys of a Remote Rendering Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AccountKeys, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.AccountKeys - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AccountKeys"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - # Construct URL - url = self.list_keys.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AccountKeys', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}/listKeys'} # type: ignore - - def regenerate_keys( - self, - resource_group_name, # type: str - account_name, # type: str - regenerate, # type: "_models.AccountKeyRegenerateRequest" - **kwargs # type: Any - ): - # type: (...) -> "_models.AccountKeys" - """Regenerate specified Key of a Remote Rendering Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :param regenerate: Required information for key regeneration. - :type regenerate: ~azure.mgmt.mixedreality.models.AccountKeyRegenerateRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AccountKeys, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.AccountKeys - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AccountKeys"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.regenerate_keys.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(regenerate, 'AccountKeyRegenerateRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AccountKeys', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}/regenerateKeys'} # type: ignore diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/_spatial_anchors_accounts_operations.py b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/_spatial_anchors_accounts_operations.py deleted file mode 100644 index 2b87553c3eb..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/operations/_spatial_anchors_accounts_operations.py +++ /dev/null @@ -1,563 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class SpatialAnchorsAccountsOperations(object): - """SpatialAnchorsAccountsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.mixedreality.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list_by_subscription( - self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.SpatialAnchorsAccountPage"] - """List Spatial Anchors Accounts by Subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SpatialAnchorsAccountPage or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.mixedreality.models.SpatialAnchorsAccountPage] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SpatialAnchorsAccountPage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('SpatialAnchorsAccountPage', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/spatialAnchorsAccounts'} # type: ignore - - def list_by_resource_group( - self, - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.SpatialAnchorsAccountPage"] - """List Resources by Resource Group. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SpatialAnchorsAccountPage or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.mixedreality.models.SpatialAnchorsAccountPage] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SpatialAnchorsAccountPage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('SpatialAnchorsAccountPage', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts'} # type: ignore - - def delete( - self, - resource_group_name, # type: str - account_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Delete a Spatial Anchors Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}'} # type: ignore - - def get( - self, - resource_group_name, # type: str - account_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.SpatialAnchorsAccount" - """Retrieve a Spatial Anchors Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SpatialAnchorsAccount, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.SpatialAnchorsAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SpatialAnchorsAccount"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SpatialAnchorsAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}'} # type: ignore - - def update( - self, - resource_group_name, # type: str - account_name, # type: str - spatial_anchors_account, # type: "_models.SpatialAnchorsAccount" - **kwargs # type: Any - ): - # type: (...) -> "_models.SpatialAnchorsAccount" - """Updating a Spatial Anchors Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :param spatial_anchors_account: Spatial Anchors Account parameter. - :type spatial_anchors_account: ~azure.mgmt.mixedreality.models.SpatialAnchorsAccount - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SpatialAnchorsAccount, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.SpatialAnchorsAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SpatialAnchorsAccount"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.update.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(spatial_anchors_account, 'SpatialAnchorsAccount') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SpatialAnchorsAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}'} # type: ignore - - def create( - self, - resource_group_name, # type: str - account_name, # type: str - spatial_anchors_account, # type: "_models.SpatialAnchorsAccount" - **kwargs # type: Any - ): - # type: (...) -> "_models.SpatialAnchorsAccount" - """Creating or Updating a Spatial Anchors Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :param spatial_anchors_account: Spatial Anchors Account parameter. - :type spatial_anchors_account: ~azure.mgmt.mixedreality.models.SpatialAnchorsAccount - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SpatialAnchorsAccount, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.SpatialAnchorsAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SpatialAnchorsAccount"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(spatial_anchors_account, 'SpatialAnchorsAccount') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('SpatialAnchorsAccount', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('SpatialAnchorsAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}'} # type: ignore - - def list_keys( - self, - resource_group_name, # type: str - account_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.AccountKeys" - """List Both of the 2 Keys of a Spatial Anchors Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AccountKeys, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.AccountKeys - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AccountKeys"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - accept = "application/json" - - # Construct URL - url = self.list_keys.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AccountKeys', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}/listKeys'} # type: ignore - - def regenerate_keys( - self, - resource_group_name, # type: str - account_name, # type: str - regenerate, # type: "_models.AccountKeyRegenerateRequest" - **kwargs # type: Any - ): - # type: (...) -> "_models.AccountKeys" - """Regenerate specified Key of a Spatial Anchors Account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Name of an Mixed Reality Account. - :type account_name: str - :param regenerate: Required information for key regeneration. - :type regenerate: ~azure.mgmt.mixedreality.models.AccountKeyRegenerateRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AccountKeys, or the result of cls(response) - :rtype: ~azure.mgmt.mixedreality.models.AccountKeys - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AccountKeys"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.regenerate_keys.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(regenerate, 'AccountKeyRegenerateRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AccountKeys', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}/regenerateKeys'} # type: ignore diff --git a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/py.typed b/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/py.typed deleted file mode 100644 index e5aff4f83af..00000000000 --- a/src/mixed-reality/azext_mixed_reality/vendored_sdks/mixedreality/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file From c8a14f887d1e2dc76ba31963c90f3f4463803371 Mon Sep 17 00:00:00 2001 From: Zhiyi Huang <17182306+calvinhzy@users.noreply.github.com> Date: Tue, 27 Jun 2023 16:53:53 +0800 Subject: [PATCH 6/8] use patch for update to be consistent with swagger --- .../remote_rendering_account/_update.py | 353 +++++------------- .../latest/spatial_anchors_account/_update.py | 346 +++++------------ ...est_remote_rendering_account_scenario.yaml | 123 ++---- ...test_spatial_anchors_account_scenario.yaml | 123 ++---- 4 files changed, 263 insertions(+), 682 deletions(-) diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_update.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_update.py index 2f76c4e7301..a60a74529a1 100644 --- a/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_update.py +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_update.py @@ -29,8 +29,6 @@ class Update(AAZCommand): ] } - AZ_SUPPORT_GENERIC_UPDATE = True - def _handler(self, command_args): super()._handler(command_args) self._execute_operations() @@ -69,37 +67,37 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["--storage-account-name"], arg_group="Properties", help="The name of the storage account associated with this accountId", - nullable=True, ) # define Arg Group "RemoteRenderingAccount" _args_schema = cls._args_schema + _args_schema.identity = AAZObjectArg( + options=["--identity"], + arg_group="RemoteRenderingAccount", + help="The identity associated with this account", + ) + cls._build_args_identity_update(_args_schema.identity) _args_schema.kind = AAZObjectArg( options=["--kind"], arg_group="RemoteRenderingAccount", help="The kind of account, if supported", - nullable=True, ) cls._build_args_sku_update(_args_schema.kind) _args_schema.sku = AAZObjectArg( options=["--sku"], arg_group="RemoteRenderingAccount", help="The sku associated with this account", - nullable=True, ) cls._build_args_sku_update(_args_schema.sku) _args_schema.tags = AAZDictArg( options=["--tags"], arg_group="RemoteRenderingAccount", help="Resource tags.", - nullable=True, ) tags = cls._args_schema.tags - tags.Element = AAZStrArg( - nullable=True, - ) + tags.Element = AAZStrArg() return cls._args_schema _args_identity_update = None @@ -110,15 +108,12 @@ def _build_args_identity_update(cls, _schema): _schema.type = cls._args_identity_update.type return - cls._args_identity_update = AAZObjectArg( - nullable=True, - ) + cls._args_identity_update = AAZObjectArg() identity_update = cls._args_identity_update identity_update.type = AAZStrArg( options=["type"], help="The identity type.", - nullable=True, enum={"SystemAssigned": "SystemAssigned"}, ) @@ -136,34 +131,29 @@ def _build_args_sku_update(cls, _schema): _schema.tier = cls._args_sku_update.tier return - cls._args_sku_update = AAZObjectArg( - nullable=True, - ) + cls._args_sku_update = AAZObjectArg() sku_update = cls._args_sku_update sku_update.capacity = AAZIntArg( options=["capacity"], help="If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", - nullable=True, ) sku_update.family = AAZStrArg( options=["family"], help="If the service has different generations of hardware, for the same SKU, then that can be captured here.", - nullable=True, ) sku_update.name = AAZStrArg( options=["name"], help="The name of the SKU. Ex - P3. It is typically a letter+number code", + required=True, ) sku_update.size = AAZStrArg( options=["size"], help="The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", - nullable=True, ) sku_update.tier = AAZStrArg( options=["tier"], help="This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", - nullable=True, enum={"Basic": "Basic", "Free": "Free", "Premium": "Premium", "Standard": "Standard"}, ) @@ -175,12 +165,7 @@ def _build_args_sku_update(cls, _schema): def _execute_operations(self): self.pre_operations() - self.RemoteRenderingAccountsGet(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.RemoteRenderingAccountsCreate(ctx=self.ctx)() + self.RemoteRenderingAccountsUpdate(ctx=self.ctx)() self.post_operations() @register_callback @@ -191,19 +176,11 @@ def pre_operations(self): 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 RemoteRenderingAccountsGet(AAZHttpOperation): + class RemoteRenderingAccountsUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): @@ -223,90 +200,7 @@ def url(self): @property def method(self): - return "GET" - - @property - def error_format(self): - return "ODataV4Format" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "accountName", 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", "2021-03-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - _UpdateHelper._build_schema_remote_rendering_account_read(cls._schema_on_200) - - return cls._schema_on_200 - - class RemoteRenderingAccountsCreate(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200, 201]: - return self.on_200_201(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}", - **self.url_parameters - ) - - @property - def method(self): - return "PUT" + return "PATCH" @property def error_format(self): @@ -356,64 +250,109 @@ def header_parameters(self): def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, - value=self.ctx.vars.instance, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} ) + _UpdateHelper._build_schema_identity_update(_builder.set_prop("identity", AAZObjectType, ".identity")) + _UpdateHelper._build_schema_sku_update(_builder.set_prop("kind", AAZObjectType, ".kind")) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _UpdateHelper._build_schema_sku_update(_builder.set_prop("sku", AAZObjectType, ".sku")) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("storageAccountName", AAZStrType, ".storage_account_name") + + 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): + def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, - schema_builder=self._build_schema_on_200_201 + schema_builder=self._build_schema_on_200 ) - _schema_on_200_201 = None + _schema_on_200 = 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_remote_rendering_account_read(cls._schema_on_200_201) - - return cls._schema_on_200_201 - - class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 - def __call__(self, *args, **kwargs): - self._update_instance(self.ctx.vars.instance) + cls._schema_on_200 = AAZObjectType() - def _update_instance(self, instance): - _instance_value, _builder = self.new_content_builder( - self.ctx.args, - value=instance, - typ=AAZObjectType + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.identity = AAZObjectType() + _UpdateHelper._build_schema_identity_read(_schema_on_200.identity) + _schema_on_200.kind = AAZObjectType() + _UpdateHelper._build_schema_sku_read(_schema_on_200.kind) + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.plan = AAZObjectType() + _UpdateHelper._build_schema_identity_read(_schema_on_200.plan) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.sku = AAZObjectType() + _UpdateHelper._build_schema_sku_read(_schema_on_200.sku) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, ) - _UpdateHelper._build_schema_sku_update(_builder.set_prop("kind", AAZObjectType, ".kind")) - _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) - _UpdateHelper._build_schema_sku_update(_builder.set_prop("sku", AAZObjectType, ".sku")) - _builder.set_prop("tags", AAZDictType, ".tags") - - properties = _builder.get(".properties") - if properties is not None: - properties.set_prop("storageAccountName", AAZStrType, ".storage_account_name") - tags = _builder.get(".tags") - if tags is not None: - tags.set_elements(AAZStrType, ".") + properties = cls._schema_on_200.properties + properties.account_domain = AAZStrType( + serialized_name="accountDomain", + flags={"read_only": True}, + ) + properties.account_id = AAZStrType( + serialized_name="accountId", + flags={"read_only": True}, + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) - return _instance_value + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) - class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() - def __call__(self, *args, **kwargs): - self._update_instance_by_generic( - self.ctx.vars.instance, - self.ctx.generic_update_args - ) + return cls._schema_on_200 class _UpdateHelper: @@ -462,104 +401,6 @@ def _build_schema_identity_read(cls, _schema): _schema.tenant_id = cls._schema_identity_read.tenant_id _schema.type = cls._schema_identity_read.type - _schema_remote_rendering_account_read = None - - @classmethod - def _build_schema_remote_rendering_account_read(cls, _schema): - if cls._schema_remote_rendering_account_read is not None: - _schema.id = cls._schema_remote_rendering_account_read.id - _schema.identity = cls._schema_remote_rendering_account_read.identity - _schema.kind = cls._schema_remote_rendering_account_read.kind - _schema.location = cls._schema_remote_rendering_account_read.location - _schema.name = cls._schema_remote_rendering_account_read.name - _schema.plan = cls._schema_remote_rendering_account_read.plan - _schema.properties = cls._schema_remote_rendering_account_read.properties - _schema.sku = cls._schema_remote_rendering_account_read.sku - _schema.system_data = cls._schema_remote_rendering_account_read.system_data - _schema.tags = cls._schema_remote_rendering_account_read.tags - _schema.type = cls._schema_remote_rendering_account_read.type - return - - cls._schema_remote_rendering_account_read = _schema_remote_rendering_account_read = AAZObjectType() - - remote_rendering_account_read = _schema_remote_rendering_account_read - remote_rendering_account_read.id = AAZStrType( - flags={"read_only": True}, - ) - remote_rendering_account_read.identity = AAZObjectType() - cls._build_schema_identity_read(remote_rendering_account_read.identity) - remote_rendering_account_read.kind = AAZObjectType() - cls._build_schema_sku_read(remote_rendering_account_read.kind) - remote_rendering_account_read.location = AAZStrType( - flags={"required": True}, - ) - remote_rendering_account_read.name = AAZStrType( - flags={"read_only": True}, - ) - remote_rendering_account_read.plan = AAZObjectType() - cls._build_schema_identity_read(remote_rendering_account_read.plan) - remote_rendering_account_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - remote_rendering_account_read.sku = AAZObjectType() - cls._build_schema_sku_read(remote_rendering_account_read.sku) - remote_rendering_account_read.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - remote_rendering_account_read.tags = AAZDictType() - remote_rendering_account_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_remote_rendering_account_read.properties - properties.account_domain = AAZStrType( - serialized_name="accountDomain", - flags={"read_only": True}, - ) - properties.account_id = AAZStrType( - serialized_name="accountId", - flags={"read_only": True}, - ) - properties.storage_account_name = AAZStrType( - serialized_name="storageAccountName", - ) - - system_data = _schema_remote_rendering_account_read.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - tags = _schema_remote_rendering_account_read.tags - tags.Element = AAZStrType() - - _schema.id = cls._schema_remote_rendering_account_read.id - _schema.identity = cls._schema_remote_rendering_account_read.identity - _schema.kind = cls._schema_remote_rendering_account_read.kind - _schema.location = cls._schema_remote_rendering_account_read.location - _schema.name = cls._schema_remote_rendering_account_read.name - _schema.plan = cls._schema_remote_rendering_account_read.plan - _schema.properties = cls._schema_remote_rendering_account_read.properties - _schema.sku = cls._schema_remote_rendering_account_read.sku - _schema.system_data = cls._schema_remote_rendering_account_read.system_data - _schema.tags = cls._schema_remote_rendering_account_read.tags - _schema.type = cls._schema_remote_rendering_account_read.type - _schema_sku_read = None @classmethod diff --git a/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_update.py b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_update.py index ba6a4e977d1..f00a3d97f5b 100644 --- a/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_update.py +++ b/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_update.py @@ -29,8 +29,6 @@ class Update(AAZCommand): ] } - AZ_SUPPORT_GENERIC_UPDATE = True - def _handler(self, command_args): super()._handler(command_args) self._execute_operations() @@ -69,7 +67,6 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["--storage-account-name"], arg_group="Properties", help="The name of the storage account associated with this accountId", - nullable=True, ) # define Arg Group "SpatialAnchorsAccount" @@ -79,27 +76,22 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["--kind"], arg_group="SpatialAnchorsAccount", help="The kind of account, if supported", - nullable=True, ) cls._build_args_sku_update(_args_schema.kind) _args_schema.sku = AAZObjectArg( options=["--sku"], arg_group="SpatialAnchorsAccount", help="The sku associated with this account", - nullable=True, ) cls._build_args_sku_update(_args_schema.sku) _args_schema.tags = AAZDictArg( options=["--tags"], arg_group="SpatialAnchorsAccount", help="Resource tags.", - nullable=True, ) tags = cls._args_schema.tags - tags.Element = AAZStrArg( - nullable=True, - ) + tags.Element = AAZStrArg() return cls._args_schema _args_identity_update = None @@ -110,15 +102,12 @@ def _build_args_identity_update(cls, _schema): _schema.type = cls._args_identity_update.type return - cls._args_identity_update = AAZObjectArg( - nullable=True, - ) + cls._args_identity_update = AAZObjectArg() identity_update = cls._args_identity_update identity_update.type = AAZStrArg( options=["type"], help="The identity type.", - nullable=True, enum={"SystemAssigned": "SystemAssigned"}, ) @@ -136,34 +125,29 @@ def _build_args_sku_update(cls, _schema): _schema.tier = cls._args_sku_update.tier return - cls._args_sku_update = AAZObjectArg( - nullable=True, - ) + cls._args_sku_update = AAZObjectArg() sku_update = cls._args_sku_update sku_update.capacity = AAZIntArg( options=["capacity"], help="If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", - nullable=True, ) sku_update.family = AAZStrArg( options=["family"], help="If the service has different generations of hardware, for the same SKU, then that can be captured here.", - nullable=True, ) sku_update.name = AAZStrArg( options=["name"], help="The name of the SKU. Ex - P3. It is typically a letter+number code", + required=True, ) sku_update.size = AAZStrArg( options=["size"], help="The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", - nullable=True, ) sku_update.tier = AAZStrArg( options=["tier"], help="This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", - nullable=True, enum={"Basic": "Basic", "Free": "Free", "Premium": "Premium", "Standard": "Standard"}, ) @@ -175,12 +159,7 @@ def _build_args_sku_update(cls, _schema): def _execute_operations(self): self.pre_operations() - self.SpatialAnchorsAccountsGet(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.SpatialAnchorsAccountsCreate(ctx=self.ctx)() + self.SpatialAnchorsAccountsUpdate(ctx=self.ctx)() self.post_operations() @register_callback @@ -191,19 +170,11 @@ def pre_operations(self): 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 SpatialAnchorsAccountsGet(AAZHttpOperation): + class SpatialAnchorsAccountsUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): @@ -223,90 +194,7 @@ def url(self): @property def method(self): - return "GET" - - @property - def error_format(self): - return "ODataV4Format" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "accountName", 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", "2021-03-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - _UpdateHelper._build_schema_spatial_anchors_account_read(cls._schema_on_200) - - return cls._schema_on_200 - - class SpatialAnchorsAccountsCreate(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200, 201]: - return self.on_200_201(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}", - **self.url_parameters - ) - - @property - def method(self): - return "PUT" + return "PATCH" @property def error_format(self): @@ -356,64 +244,108 @@ def header_parameters(self): def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, - value=self.ctx.vars.instance, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} ) + _UpdateHelper._build_schema_sku_update(_builder.set_prop("kind", AAZObjectType, ".kind")) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _UpdateHelper._build_schema_sku_update(_builder.set_prop("sku", AAZObjectType, ".sku")) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("storageAccountName", AAZStrType, ".storage_account_name") + + 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): + def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, - schema_builder=self._build_schema_on_200_201 + schema_builder=self._build_schema_on_200 ) - _schema_on_200_201 = None + _schema_on_200 = 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_spatial_anchors_account_read(cls._schema_on_200_201) - - return cls._schema_on_200_201 - - class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 - def __call__(self, *args, **kwargs): - self._update_instance(self.ctx.vars.instance) + cls._schema_on_200 = AAZObjectType() - def _update_instance(self, instance): - _instance_value, _builder = self.new_content_builder( - self.ctx.args, - value=instance, - typ=AAZObjectType + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.identity = AAZObjectType() + _UpdateHelper._build_schema_identity_read(_schema_on_200.identity) + _schema_on_200.kind = AAZObjectType() + _UpdateHelper._build_schema_sku_read(_schema_on_200.kind) + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.plan = AAZObjectType() + _UpdateHelper._build_schema_identity_read(_schema_on_200.plan) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.sku = AAZObjectType() + _UpdateHelper._build_schema_sku_read(_schema_on_200.sku) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, ) - _UpdateHelper._build_schema_sku_update(_builder.set_prop("kind", AAZObjectType, ".kind")) - _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) - _UpdateHelper._build_schema_sku_update(_builder.set_prop("sku", AAZObjectType, ".sku")) - _builder.set_prop("tags", AAZDictType, ".tags") - - properties = _builder.get(".properties") - if properties is not None: - properties.set_prop("storageAccountName", AAZStrType, ".storage_account_name") - tags = _builder.get(".tags") - if tags is not None: - tags.set_elements(AAZStrType, ".") + properties = cls._schema_on_200.properties + properties.account_domain = AAZStrType( + serialized_name="accountDomain", + flags={"read_only": True}, + ) + properties.account_id = AAZStrType( + serialized_name="accountId", + flags={"read_only": True}, + ) + properties.storage_account_name = AAZStrType( + serialized_name="storageAccountName", + ) - return _instance_value + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) - class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() - def __call__(self, *args, **kwargs): - self._update_instance_by_generic( - self.ctx.vars.instance, - self.ctx.generic_update_args - ) + return cls._schema_on_200 class _UpdateHelper: @@ -491,103 +423,5 @@ def _build_schema_sku_read(cls, _schema): _schema.size = cls._schema_sku_read.size _schema.tier = cls._schema_sku_read.tier - _schema_spatial_anchors_account_read = None - - @classmethod - def _build_schema_spatial_anchors_account_read(cls, _schema): - if cls._schema_spatial_anchors_account_read is not None: - _schema.id = cls._schema_spatial_anchors_account_read.id - _schema.identity = cls._schema_spatial_anchors_account_read.identity - _schema.kind = cls._schema_spatial_anchors_account_read.kind - _schema.location = cls._schema_spatial_anchors_account_read.location - _schema.name = cls._schema_spatial_anchors_account_read.name - _schema.plan = cls._schema_spatial_anchors_account_read.plan - _schema.properties = cls._schema_spatial_anchors_account_read.properties - _schema.sku = cls._schema_spatial_anchors_account_read.sku - _schema.system_data = cls._schema_spatial_anchors_account_read.system_data - _schema.tags = cls._schema_spatial_anchors_account_read.tags - _schema.type = cls._schema_spatial_anchors_account_read.type - return - - cls._schema_spatial_anchors_account_read = _schema_spatial_anchors_account_read = AAZObjectType() - - spatial_anchors_account_read = _schema_spatial_anchors_account_read - spatial_anchors_account_read.id = AAZStrType( - flags={"read_only": True}, - ) - spatial_anchors_account_read.identity = AAZObjectType() - cls._build_schema_identity_read(spatial_anchors_account_read.identity) - spatial_anchors_account_read.kind = AAZObjectType() - cls._build_schema_sku_read(spatial_anchors_account_read.kind) - spatial_anchors_account_read.location = AAZStrType( - flags={"required": True}, - ) - spatial_anchors_account_read.name = AAZStrType( - flags={"read_only": True}, - ) - spatial_anchors_account_read.plan = AAZObjectType() - cls._build_schema_identity_read(spatial_anchors_account_read.plan) - spatial_anchors_account_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - spatial_anchors_account_read.sku = AAZObjectType() - cls._build_schema_sku_read(spatial_anchors_account_read.sku) - spatial_anchors_account_read.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - spatial_anchors_account_read.tags = AAZDictType() - spatial_anchors_account_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_spatial_anchors_account_read.properties - properties.account_domain = AAZStrType( - serialized_name="accountDomain", - flags={"read_only": True}, - ) - properties.account_id = AAZStrType( - serialized_name="accountId", - flags={"read_only": True}, - ) - properties.storage_account_name = AAZStrType( - serialized_name="storageAccountName", - ) - - system_data = _schema_spatial_anchors_account_read.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - tags = _schema_spatial_anchors_account_read.tags - tags.Element = AAZStrType() - - _schema.id = cls._schema_spatial_anchors_account_read.id - _schema.identity = cls._schema_spatial_anchors_account_read.identity - _schema.kind = cls._schema_spatial_anchors_account_read.kind - _schema.location = cls._schema_spatial_anchors_account_read.location - _schema.name = cls._schema_spatial_anchors_account_read.name - _schema.plan = cls._schema_spatial_anchors_account_read.plan - _schema.properties = cls._schema_spatial_anchors_account_read.properties - _schema.sku = cls._schema_spatial_anchors_account_read.sku - _schema.system_data = cls._schema_spatial_anchors_account_read.system_data - _schema.tags = cls._schema_spatial_anchors_account_read.tags - _schema.type = cls._schema_spatial_anchors_account_read.type - __all__ = ["Update"] diff --git a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_remote_rendering_account_scenario.yaml b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_remote_rendering_account_scenario.yaml index 0f1aae133b6..72678ce2960 100644 --- a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_remote_rendering_account_scenario.yaml +++ b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_remote_rendering_account_scenario.yaml @@ -19,7 +19,7 @@ interactions: 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":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_remote_rendering_account_scenario","date":"2023-06-27T07:42:52Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_remote_rendering_account_scenario","date":"2023-06-27T08:43:42Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -28,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:42:55 GMT + - Tue, 27 Jun 2023 08:43:46 GMT expires: - '-1' pragma: @@ -65,7 +65,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"e0dc2da4-c51d-41a7-9fd9-a1ba89719aba","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus2.mixedreality.azure.com","accountId":"51fca8ad-2387-4baa-a64e-2c53537442e9"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"49dc0050-be1d-49bf-893d-4fdc6be1e957","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus2.mixedreality.azure.com","accountId":"c1d1af68-3f3f-41bb-8086-24f844b4bfe9"}}' headers: cache-control: - no-cache @@ -74,13 +74,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:06 GMT + - Tue, 27 Jun 2023 08:43:59 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name ms-cv: - - Pf339rsXbUOvSVJeawtm+Q.0 + - 1ShchU2Qq0unvT3Oz6ZpMQ.0 pragma: - no-cache strict-transport-security: @@ -112,7 +112,7 @@ interactions: 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":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_remote_rendering_account_scenario","date":"2023-06-27T07:42:52Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_remote_rendering_account_scenario","date":"2023-06-27T08:43:42Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -121,7 +121,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:07 GMT + - Tue, 27 Jun 2023 08:44:00 GMT expires: - '-1' pragma: @@ -160,7 +160,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1","name":"remote-rendering-account-name1","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"f7ced1ad-e98c-4e2e-9910-6d0b76336a0a","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"eastus2.mixedreality.azure.com","accountId":"96fd80e2-ab07-4b5d-aca4-629bffb73964"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1","name":"remote-rendering-account-name1","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4815f0a0-f34d-45f7-a8dd-bc8207371fa7","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"eastus2.mixedreality.azure.com","accountId":"c7498149-f23c-4efd-89a1-939d576e36ee"}}' headers: cache-control: - no-cache @@ -169,13 +169,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:16 GMT + - Tue, 27 Jun 2023 08:44:10 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1 ms-cv: - - VisKNg88xk+GYoVQAIwydQ.0 + - CT8WBjbcuky2qIMtDggcvQ.0 pragma: - no-cache strict-transport-security: @@ -188,54 +188,7 @@ interactions: code: 201 message: Created - request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - remote-rendering-account update - Connection: - - keep-alive - ParameterSetName: - - -g -n --storage-account-name - User-Agent: - - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-03-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"e0dc2da4-c51d-41a7-9fd9-a1ba89719aba","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus2.mixedreality.azure.com","accountId":"51fca8ad-2387-4baa-a64e-2c53537442e9"}}' - headers: - cache-control: - - no-cache - content-length: - - '595' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 27 Jun 2023 07:43:17 GMT - expires: - - '-1' - ms-cv: - - 9FpMHiHi+ESrfUDYQo0OHQ.0 - pragma: - - no-cache - 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: '{"identity": {"type": "SystemAssigned"}, "location": "eastus2", "properties": - {"storageAccountName": "storage_account_name1"}, "tags": {}}' + body: '{"properties": {"storageAccountName": "storage_account_name1"}}' headers: Accept: - application/json @@ -246,18 +199,18 @@ interactions: Connection: - keep-alive Content-Length: - - '138' + - '63' Content-Type: - application/json ParameterSetName: - -g -n --storage-account-name User-Agent: - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) - method: PUT + method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"e0dc2da4-c51d-41a7-9fd9-a1ba89719aba","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"51fca8ad-2387-4baa-a64e-2c53537442e9"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"49dc0050-be1d-49bf-893d-4fdc6be1e957","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"c1d1af68-3f3f-41bb-8086-24f844b4bfe9"}}' headers: cache-control: - no-cache @@ -266,11 +219,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:20 GMT + - Tue, 27 Jun 2023 08:44:12 GMT expires: - '-1' ms-cv: - - miiSHhhLZEG+Zq395y7+xQ.0 + - Ff8oVH1wrk+lH8DHODtlvA.0 pragma: - no-cache strict-transport-security: @@ -282,7 +235,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -305,7 +258,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"e0dc2da4-c51d-41a7-9fd9-a1ba89719aba","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"51fca8ad-2387-4baa-a64e-2c53537442e9"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"49dc0050-be1d-49bf-893d-4fdc6be1e957","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"c1d1af68-3f3f-41bb-8086-24f844b4bfe9"}}' headers: cache-control: - no-cache @@ -314,11 +267,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:22 GMT + - Tue, 27 Jun 2023 08:44:13 GMT expires: - '-1' ms-cv: - - QuGOGzjJAEWukkc6rd7i7A.0 + - dOGV63PZzkyujVygSYSuiA.0 pragma: - no-cache strict-transport-security: @@ -351,7 +304,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"e0dc2da4-c51d-41a7-9fd9-a1ba89719aba","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"51fca8ad-2387-4baa-a64e-2c53537442e9"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1","name":"remote-rendering-account-name1","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"f7ced1ad-e98c-4e2e-9910-6d0b76336a0a","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"eastus2.mixedreality.azure.com","accountId":"96fd80e2-ab07-4b5d-aca4-629bffb73964"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"49dc0050-be1d-49bf-893d-4fdc6be1e957","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"c1d1af68-3f3f-41bb-8086-24f844b4bfe9"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1","name":"remote-rendering-account-name1","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4815f0a0-f34d-45f7-a8dd-bc8207371fa7","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"eastus2.mixedreality.azure.com","accountId":"c7498149-f23c-4efd-89a1-939d576e36ee"}}]}' headers: cache-control: - no-cache @@ -360,11 +313,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:27 GMT + - Tue, 27 Jun 2023 08:44:20 GMT expires: - '-1' ms-cv: - - ki2E6Je7TkaXYiUzOaxD/g.0 + - n0PnRKL3/0Ka+UEpeavarw.0 pragma: - no-cache strict-transport-security: @@ -406,11 +359,11 @@ interactions: content-length: - '0' date: - - Tue, 27 Jun 2023 07:43:32 GMT + - Tue, 27 Jun 2023 08:44:27 GMT expires: - '-1' ms-cv: - - i+b0T+/w5EaKHPjUymjjwg.0 + - Nt7XoCdgCkqVcE81rfM5mw.0 pragma: - no-cache strict-transport-security: @@ -441,7 +394,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"e0dc2da4-c51d-41a7-9fd9-a1ba89719aba","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"51fca8ad-2387-4baa-a64e-2c53537442e9"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"49dc0050-be1d-49bf-893d-4fdc6be1e957","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"c1d1af68-3f3f-41bb-8086-24f844b4bfe9"}}]}' headers: cache-control: - no-cache @@ -450,11 +403,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:37 GMT + - Tue, 27 Jun 2023 08:44:31 GMT expires: - '-1' ms-cv: - - LA4wEJgucUSOG0M8tQR07w.0 + - nybzcVXLY0mKy0EuYC3Zrw.0 pragma: - no-cache strict-transport-security: @@ -498,11 +451,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:40 GMT + - Tue, 27 Jun 2023 08:44:33 GMT expires: - '-1' ms-cv: - - iF6sfEcq8EKeXa8hSrHpQg.0 + - B25sSRaGiU2dUzVusvlmUA.0 pragma: - no-cache strict-transport-security: @@ -550,11 +503,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:42 GMT + - Tue, 27 Jun 2023 08:44:33 GMT expires: - '-1' ms-cv: - - 9w8vzhaT7USYcq6HRsi1JQ.0 + - F1WWKfUMH0yTwMh+jf3vyw.0 pragma: - no-cache strict-transport-security: @@ -566,7 +519,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -602,11 +555,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:45 GMT + - Tue, 27 Jun 2023 08:44:36 GMT expires: - '-1' ms-cv: - - NQURqdL/gEWBGA6yPevbqw.0 + - srFDWkKL+EOcxLHaJvy7jQ.0 pragma: - no-cache strict-transport-security: @@ -618,7 +571,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -654,11 +607,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:47 GMT + - Tue, 27 Jun 2023 08:44:37 GMT expires: - '-1' ms-cv: - - 1mHHIfkK9ES12Q+jANLZsA.0 + - wAktSY9t2Uy0ECE/+vriJA.0 pragma: - no-cache strict-transport-security: diff --git a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml index 3b5609de094..344f1e7cc51 100644 --- a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml +++ b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml @@ -19,7 +19,7 @@ interactions: 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":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-27T07:42:52Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-27T08:43:42Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -28,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:42:58 GMT + - Tue, 27 Jun 2023 08:43:46 GMT expires: - '-1' pragma: @@ -65,7 +65,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"mixedreality.azure.com","accountId":"3d160d1d-7aa3-4fd7-a498-1e0260a2ca3f"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"mixedreality.azure.com","accountId":"d0a291b7-b552-4298-b3c0-a8fdd8327298"}}' headers: cache-control: - no-cache @@ -74,13 +74,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:04 GMT + - Tue, 27 Jun 2023 08:43:53 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name ms-cv: - - 65hVAISA7kWJngJjPRPnLw.0 + - MZfvRf9vBUOeempzUsDheQ.0 pragma: - no-cache strict-transport-security: @@ -112,7 +112,7 @@ interactions: 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":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-27T07:42:52Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-27T08:43:42Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -121,7 +121,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:04 GMT + - Tue, 27 Jun 2023 08:43:53 GMT expires: - '-1' pragma: @@ -159,7 +159,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"fc3550a1-a9f9-487e-b420-f4e7b61dead8"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"174cf242-0ea2-4326-9571-4e9f29851710"}}' headers: cache-control: - no-cache @@ -168,13 +168,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:11 GMT + - Tue, 27 Jun 2023 08:43:58 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1 ms-cv: - - 3ANP01v4Q0W9HKopRnkBsg.0 + - egh79E6cmkeRZ1DbbS2xHg.0 pragma: - no-cache strict-transport-security: @@ -182,59 +182,12 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 201 message: Created - request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - spatial-anchors-account update - Connection: - - keep-alive - ParameterSetName: - - -g -n --storage-account-name - User-Agent: - - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"mixedreality.azure.com","accountId":"3d160d1d-7aa3-4fd7-a498-1e0260a2ca3f"}}' - headers: - cache-control: - - no-cache - content-length: - - '459' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 27 Jun 2023 07:43:13 GMT - expires: - - '-1' - ms-cv: - - YONY/AmlBEmpWf94Xht0eg.0 - pragma: - - no-cache - 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: '{"location": "eastus2", "properties": {"storageAccountName": "storage_account_name1"}, - "tags": {}}' + body: '{"properties": {"storageAccountName": "storage_account_name1"}}' headers: Accept: - application/json @@ -245,18 +198,18 @@ interactions: Connection: - keep-alive Content-Length: - - '98' + - '63' Content-Type: - application/json ParameterSetName: - -g -n --storage-account-name User-Agent: - AZURECLI/2.49.0 (PIP) (AAZ) azsdk-python-core/1.26.0 Python/3.9.6 (Windows-10-10.0.19045-SP0) - method: PUT + method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"3d160d1d-7aa3-4fd7-a498-1e0260a2ca3f"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"d0a291b7-b552-4298-b3c0-a8fdd8327298"}}' headers: cache-control: - no-cache @@ -265,11 +218,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:13 GMT + - Tue, 27 Jun 2023 08:44:00 GMT expires: - '-1' ms-cv: - - pqskHIVtnUyuz62TM9lvEQ.0 + - lQTd884/Gke8e3KcVIn7Cg.0 pragma: - no-cache strict-transport-security: @@ -281,7 +234,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -304,7 +257,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"3d160d1d-7aa3-4fd7-a498-1e0260a2ca3f"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"d0a291b7-b552-4298-b3c0-a8fdd8327298"}}' headers: cache-control: - no-cache @@ -313,11 +266,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:15 GMT + - Tue, 27 Jun 2023 08:44:03 GMT expires: - '-1' ms-cv: - - RSfL4H5vhUqRlpLqv+Puyw.0 + - IvNG80Oh2UKN+j/z9tgtgg.0 pragma: - no-cache strict-transport-security: @@ -350,7 +303,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"3d160d1d-7aa3-4fd7-a498-1e0260a2ca3f"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"fc3550a1-a9f9-487e-b420-f4e7b61dead8"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"d0a291b7-b552-4298-b3c0-a8fdd8327298"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"174cf242-0ea2-4326-9571-4e9f29851710"}}]}' headers: cache-control: - no-cache @@ -359,11 +312,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:18 GMT + - Tue, 27 Jun 2023 08:44:05 GMT expires: - '-1' ms-cv: - - J7K1gL14Y0KQQ0aZnqYBfA.0 + - ip5D4onw2UiiOxf7RPpgnw.0 pragma: - no-cache strict-transport-security: @@ -405,11 +358,11 @@ interactions: content-length: - '0' date: - - Tue, 27 Jun 2023 07:43:23 GMT + - Tue, 27 Jun 2023 08:44:12 GMT expires: - '-1' ms-cv: - - vERm6VfYaEqi7sGZvWnn2g.0 + - 7ba6pOgCdEyGvS14WZ+1+g.0 pragma: - no-cache strict-transport-security: @@ -440,7 +393,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"3d160d1d-7aa3-4fd7-a498-1e0260a2ca3f"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"d0a291b7-b552-4298-b3c0-a8fdd8327298"}}]}' headers: cache-control: - no-cache @@ -449,11 +402,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:24 GMT + - Tue, 27 Jun 2023 08:44:13 GMT expires: - '-1' ms-cv: - - J/ALdfawNEGD6n9j0bK1oA.0 + - Y0ibknw4OkSWG5xwlHuYWw.0 pragma: - no-cache strict-transport-security: @@ -497,11 +450,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:26 GMT + - Tue, 27 Jun 2023 08:44:15 GMT expires: - '-1' ms-cv: - - sZQIR4fgK0OxatlP7wRLzg.0 + - tILLWA1OlkOgQ+lwjj8q/A.0 pragma: - no-cache strict-transport-security: @@ -549,11 +502,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:29 GMT + - Tue, 27 Jun 2023 08:44:18 GMT expires: - '-1' ms-cv: - - pi3QWhZuxE2ceWuahl4ciA.0 + - VJIiZzqhpEmLCdWwu+8xFQ.0 pragma: - no-cache strict-transport-security: @@ -565,7 +518,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -601,11 +554,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:31 GMT + - Tue, 27 Jun 2023 08:44:19 GMT expires: - '-1' ms-cv: - - GhVbLpI/7keCGhv5dsLu4A.0 + - 0kfhVZyGa0urfIAv8H9R+w.0 pragma: - no-cache strict-transport-security: @@ -653,11 +606,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 07:43:32 GMT + - Tue, 27 Jun 2023 08:44:21 GMT expires: - '-1' ms-cv: - - SaCEbxgau0eWqgeUpdVMkA.0 + - XkAsZ//P50WfNkf4AR9d9g.0 pragma: - no-cache strict-transport-security: From 3f667a258ec6a23f9914778af3ad704c513cda6c Mon Sep 17 00:00:00 2001 From: Zhiyi Huang <17182306+calvinhzy@users.noreply.github.com> Date: Tue, 27 Jun 2023 16:57:51 +0800 Subject: [PATCH 7/8] update version to 0.0.5 --- src/mixed-reality/HISTORY.rst | 4 ++++ src/mixed-reality/setup.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mixed-reality/HISTORY.rst b/src/mixed-reality/HISTORY.rst index dd2e6946c16..aa465b826c6 100644 --- a/src/mixed-reality/HISTORY.rst +++ b/src/mixed-reality/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.0.5 +++++++ +* Migrate to CodeGen V2 + 0.0.4 ++++++ * Migrate to track2 SDK diff --git a/src/mixed-reality/setup.py b/src/mixed-reality/setup.py index 957148b010d..968bd348a50 100644 --- a/src/mixed-reality/setup.py +++ b/src/mixed-reality/setup.py @@ -8,7 +8,7 @@ from codecs import open from setuptools import setup, find_packages -VERSION = "0.0.4" +VERSION = "0.0.5" CLASSIFIERS = [ 'Development Status :: 4 - Beta', From 50df4938a779e1d6dbdfe8f5b2492d48b2c96ee5 Mon Sep 17 00:00:00 2001 From: Zhiyi Huang <17182306+calvinhzy@users.noreply.github.com> Date: Wed, 28 Jun 2023 11:58:30 +0800 Subject: [PATCH 8/8] fix PR comments and lint --- .../azext_mixed_reality/_params.py | 1 + .../azext_mixed_reality/commands.py | 5 +- .../azext_mixed_reality/custom.py | 10 ++- ...est_remote_rendering_account_scenario.yaml | 72 +++++++++---------- ...test_spatial_anchors_account_scenario.yaml | 66 ++++++++--------- 5 files changed, 77 insertions(+), 77 deletions(-) diff --git a/src/mixed-reality/azext_mixed_reality/_params.py b/src/mixed-reality/azext_mixed_reality/_params.py index a939a577809..24951195f7f 100644 --- a/src/mixed-reality/azext_mixed_reality/_params.py +++ b/src/mixed-reality/azext_mixed_reality/_params.py @@ -3,5 +3,6 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- + def load_arguments(self, _): pass diff --git a/src/mixed-reality/azext_mixed_reality/commands.py b/src/mixed-reality/azext_mixed_reality/commands.py index e9c4e82bb16..9015fd00cc1 100644 --- a/src/mixed-reality/azext_mixed_reality/commands.py +++ b/src/mixed-reality/azext_mixed_reality/commands.py @@ -3,15 +3,16 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- + # pylint: disable=line-too-long def load_command_table(self, _): - with self.command_group('spatial-anchors-account') as g: + with self.command_group('spatial-anchors-account'): from .custom import SpatialAnchorsCreate, SpatialAnchorsKeyRenew self.command_table['spatial-anchors-account create'] = SpatialAnchorsCreate(loader=self) self.command_table['spatial-anchors-account key renew'] = SpatialAnchorsKeyRenew(loader=self) - with self.command_group('remote-rendering-account') as g: + with self.command_group('remote-rendering-account'): from .custom import RemoteRenderingCreate, RemoteRenderingKeyRenew self.command_table['remote-rendering-account create'] = RemoteRenderingCreate(loader=self) self.command_table['remote-rendering-account key renew'] = RemoteRenderingKeyRenew(loader=self) diff --git a/src/mixed-reality/azext_mixed_reality/custom.py b/src/mixed-reality/azext_mixed_reality/custom.py index 4e83159a99c..c315a2356c5 100644 --- a/src/mixed-reality/azext_mixed_reality/custom.py +++ b/src/mixed-reality/azext_mixed_reality/custom.py @@ -49,9 +49,9 @@ def _build_arguments_schema(cls, *args, **kwargs): args_schema.key = AAZStrArg( options=["--key", "-k"], help="Key to be regenerated.", - default="primary" + default="primary", + enum={"primary": "primary", "secondary": "secondary"} ) - args_schema.key.enum = AAZArgEnum({"primary":"primary", "secondary":"secondary"}) args_schema.serial._registered = False return args_schema @@ -59,7 +59,6 @@ def pre_operations(self): args = self.ctx.args if has_value(args.key): args.serial = 1 if str(args.key).lower() == 'primary' else 2 - del args.key class RemoteRenderingKeyRenew(_RemoteRenderingKeyRenew): @@ -70,9 +69,9 @@ def _build_arguments_schema(cls, *args, **kwargs): args_schema.key = AAZStrArg( options=["--key", "-k"], help="Key to be regenerated.", - default="primary" + default="primary", + enum={"primary": "primary", "secondary": "secondary"} ) - args_schema.key.enum = AAZArgEnum({"primary":"primary", "secondary":"secondary"}) args_schema.serial._registered = False return args_schema @@ -80,4 +79,3 @@ def pre_operations(self): args = self.ctx.args if has_value(args.key): args.serial = 1 if str(args.key).lower() == 'primary' else 2 - del args.key diff --git a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_remote_rendering_account_scenario.yaml b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_remote_rendering_account_scenario.yaml index 72678ce2960..207b01c391a 100644 --- a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_remote_rendering_account_scenario.yaml +++ b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_remote_rendering_account_scenario.yaml @@ -19,7 +19,7 @@ interactions: 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":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_remote_rendering_account_scenario","date":"2023-06-27T08:43:42Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_remote_rendering_account_scenario","date":"2023-06-28T03:55:10Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -28,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:43:46 GMT + - Wed, 28 Jun 2023 03:55:14 GMT expires: - '-1' pragma: @@ -65,7 +65,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"49dc0050-be1d-49bf-893d-4fdc6be1e957","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus2.mixedreality.azure.com","accountId":"c1d1af68-3f3f-41bb-8086-24f844b4bfe9"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"93c02df3-a821-41b1-bf71-75768c3ba7a5","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus2.mixedreality.azure.com","accountId":"01ebe302-0fdf-4dd5-b7c7-fc3fa111a6f1"}}' headers: cache-control: - no-cache @@ -74,13 +74,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:43:59 GMT + - Wed, 28 Jun 2023 03:55:24 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name ms-cv: - - 1ShchU2Qq0unvT3Oz6ZpMQ.0 + - dar1aJT+xUmiNuSyt2pm2A.0 pragma: - no-cache strict-transport-security: @@ -88,7 +88,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 201 message: Created @@ -112,7 +112,7 @@ interactions: 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":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_remote_rendering_account_scenario","date":"2023-06-27T08:43:42Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_remote_rendering_account_scenario","date":"2023-06-28T03:55:10Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -121,7 +121,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:00 GMT + - Wed, 28 Jun 2023 03:55:24 GMT expires: - '-1' pragma: @@ -160,7 +160,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1","name":"remote-rendering-account-name1","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4815f0a0-f34d-45f7-a8dd-bc8207371fa7","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"eastus2.mixedreality.azure.com","accountId":"c7498149-f23c-4efd-89a1-939d576e36ee"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1","name":"remote-rendering-account-name1","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4b8e044c-9978-4a80-bf79-c72aaf5ce4f2","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"eastus2.mixedreality.azure.com","accountId":"87166169-9b62-46eb-ad55-e594f3dd679e"}}' headers: cache-control: - no-cache @@ -169,13 +169,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:10 GMT + - Wed, 28 Jun 2023 03:55:39 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1 ms-cv: - - CT8WBjbcuky2qIMtDggcvQ.0 + - RTIYbVXdjkeWPf2YISxHjA.0 pragma: - no-cache strict-transport-security: @@ -210,7 +210,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"49dc0050-be1d-49bf-893d-4fdc6be1e957","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"c1d1af68-3f3f-41bb-8086-24f844b4bfe9"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"93c02df3-a821-41b1-bf71-75768c3ba7a5","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"01ebe302-0fdf-4dd5-b7c7-fc3fa111a6f1"}}' headers: cache-control: - no-cache @@ -219,11 +219,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:12 GMT + - Wed, 28 Jun 2023 03:55:40 GMT expires: - '-1' ms-cv: - - Ff8oVH1wrk+lH8DHODtlvA.0 + - cEjp1E1sH0Gd9ZvfaEbU3A.0 pragma: - no-cache strict-transport-security: @@ -258,7 +258,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"49dc0050-be1d-49bf-893d-4fdc6be1e957","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"c1d1af68-3f3f-41bb-8086-24f844b4bfe9"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"93c02df3-a821-41b1-bf71-75768c3ba7a5","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"01ebe302-0fdf-4dd5-b7c7-fc3fa111a6f1"}}' headers: cache-control: - no-cache @@ -267,11 +267,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:13 GMT + - Wed, 28 Jun 2023 03:55:43 GMT expires: - '-1' ms-cv: - - dOGV63PZzkyujVygSYSuiA.0 + - TUb2T8dxe0G7GRZRGZ7UFg.0 pragma: - no-cache strict-transport-security: @@ -304,7 +304,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"49dc0050-be1d-49bf-893d-4fdc6be1e957","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"c1d1af68-3f3f-41bb-8086-24f844b4bfe9"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1","name":"remote-rendering-account-name1","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4815f0a0-f34d-45f7-a8dd-bc8207371fa7","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"eastus2.mixedreality.azure.com","accountId":"c7498149-f23c-4efd-89a1-939d576e36ee"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"93c02df3-a821-41b1-bf71-75768c3ba7a5","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"01ebe302-0fdf-4dd5-b7c7-fc3fa111a6f1"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name1","name":"remote-rendering-account-name1","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"4b8e044c-9978-4a80-bf79-c72aaf5ce4f2","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"eastus2.mixedreality.azure.com","accountId":"87166169-9b62-46eb-ad55-e594f3dd679e"}}]}' headers: cache-control: - no-cache @@ -313,11 +313,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:20 GMT + - Wed, 28 Jun 2023 03:55:47 GMT expires: - '-1' ms-cv: - - n0PnRKL3/0Ka+UEpeavarw.0 + - F8eGNICBRE6sTx32xayJng.0 pragma: - no-cache strict-transport-security: @@ -359,11 +359,11 @@ interactions: content-length: - '0' date: - - Tue, 27 Jun 2023 08:44:27 GMT + - Wed, 28 Jun 2023 03:55:53 GMT expires: - '-1' ms-cv: - - Nt7XoCdgCkqVcE81rfM5mw.0 + - 4KLByxqhwE6MoO9YdVfPeA.0 pragma: - no-cache strict-transport-security: @@ -394,7 +394,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"49dc0050-be1d-49bf-893d-4fdc6be1e957","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"c1d1af68-3f3f-41bb-8086-24f844b4bfe9"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/remoteRenderingAccounts/remote-rendering-account-name","name":"remote-rendering-account-name","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"93c02df3-a821-41b1-bf71-75768c3ba7a5","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"eastus2.mixedreality.azure.com","accountId":"01ebe302-0fdf-4dd5-b7c7-fc3fa111a6f1"}}]}' headers: cache-control: - no-cache @@ -403,11 +403,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:31 GMT + - Wed, 28 Jun 2023 03:55:57 GMT expires: - '-1' ms-cv: - - nybzcVXLY0mKy0EuYC3Zrw.0 + - s8JxaDcDIkepC3law9r+qg.0 pragma: - no-cache strict-transport-security: @@ -451,11 +451,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:33 GMT + - Wed, 28 Jun 2023 03:55:59 GMT expires: - '-1' ms-cv: - - B25sSRaGiU2dUzVusvlmUA.0 + - uMOxo2McakO5ZHIBD/d0mQ.0 pragma: - no-cache strict-transport-security: @@ -503,11 +503,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:33 GMT + - Wed, 28 Jun 2023 03:56:01 GMT expires: - '-1' ms-cv: - - F1WWKfUMH0yTwMh+jf3vyw.0 + - Z6qqpRFpJUmTVgiJkqU9Ag.0 pragma: - no-cache strict-transport-security: @@ -519,7 +519,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -555,11 +555,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:36 GMT + - Wed, 28 Jun 2023 03:56:03 GMT expires: - '-1' ms-cv: - - srFDWkKL+EOcxLHaJvy7jQ.0 + - jTPhbgRCik60MlN+ecsTYA.0 pragma: - no-cache strict-transport-security: @@ -571,7 +571,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -607,11 +607,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:37 GMT + - Wed, 28 Jun 2023 03:56:04 GMT expires: - '-1' ms-cv: - - wAktSY9t2Uy0ECE/+vriJA.0 + - qAr9tTNp5UyLGLj16aAOJw.0 pragma: - no-cache strict-transport-security: @@ -623,7 +623,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1197' status: code: 200 message: OK diff --git a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml index 344f1e7cc51..574c303113b 100644 --- a/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml +++ b/src/mixed-reality/azext_mixed_reality/tests/latest/recordings/test_spatial_anchors_account_scenario.yaml @@ -19,7 +19,7 @@ interactions: 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":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-27T08:43:42Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-28T03:55:10Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -28,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:43:46 GMT + - Wed, 28 Jun 2023 03:55:14 GMT expires: - '-1' pragma: @@ -65,7 +65,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"mixedreality.azure.com","accountId":"d0a291b7-b552-4298-b3c0-a8fdd8327298"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"mixedreality.azure.com","accountId":"dd5dd1d8-de66-4c41-ab35-fc21694690e5"}}' headers: cache-control: - no-cache @@ -74,13 +74,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:43:53 GMT + - Wed, 28 Jun 2023 03:55:20 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name ms-cv: - - MZfvRf9vBUOeempzUsDheQ.0 + - H7yy/fHgxUGs0b8UmT5lTw.0 pragma: - no-cache strict-transport-security: @@ -112,7 +112,7 @@ interactions: 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":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-27T08:43:42Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","test":"test_spatial_anchors_account_scenario","date":"2023-06-28T03:55:10Z","module":"mixed-reality"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -121,7 +121,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:43:53 GMT + - Wed, 28 Jun 2023 03:55:21 GMT expires: - '-1' pragma: @@ -159,7 +159,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"174cf242-0ea2-4326-9571-4e9f29851710"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"ec99725e-bb22-4a97-9e96-68b74937e4ae"}}' headers: cache-control: - no-cache @@ -168,13 +168,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:43:58 GMT + - Wed, 28 Jun 2023 03:55:28 GMT expires: - '-1' location: - subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1 ms-cv: - - egh79E6cmkeRZ1DbbS2xHg.0 + - NnCsAZ/OOU+ZTk7sj3G5Bg.0 pragma: - no-cache strict-transport-security: @@ -209,7 +209,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"d0a291b7-b552-4298-b3c0-a8fdd8327298"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"dd5dd1d8-de66-4c41-ab35-fc21694690e5"}}' headers: cache-control: - no-cache @@ -218,11 +218,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:00 GMT + - Wed, 28 Jun 2023 03:55:30 GMT expires: - '-1' ms-cv: - - lQTd884/Gke8e3KcVIn7Cg.0 + - 1YUbAKLi1kGzgfjzYGdz4Q.0 pragma: - no-cache strict-transport-security: @@ -257,7 +257,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"d0a291b7-b552-4298-b3c0-a8fdd8327298"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"dd5dd1d8-de66-4c41-ab35-fc21694690e5"}}' headers: cache-control: - no-cache @@ -266,11 +266,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:03 GMT + - Wed, 28 Jun 2023 03:55:33 GMT expires: - '-1' ms-cv: - - IvNG80Oh2UKN+j/z9tgtgg.0 + - 1K1oe+qhBEyThU+m11jq+w.0 pragma: - no-cache strict-transport-security: @@ -303,7 +303,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"d0a291b7-b552-4298-b3c0-a8fdd8327298"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"174cf242-0ea2-4326-9571-4e9f29851710"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"dd5dd1d8-de66-4c41-ab35-fc21694690e5"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name1","name":"spatial-anchors-account-name1","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{"tag":"tag"},"properties":{"storageAccountName":"storage_account_name","accountDomain":"mixedreality.azure.com","accountId":"ec99725e-bb22-4a97-9e96-68b74937e4ae"}}]}' headers: cache-control: - no-cache @@ -312,11 +312,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:05 GMT + - Wed, 28 Jun 2023 03:55:34 GMT expires: - '-1' ms-cv: - - ip5D4onw2UiiOxf7RPpgnw.0 + - SjvkEVECAkaoI/3Oxy52tA.0 pragma: - no-cache strict-transport-security: @@ -358,11 +358,11 @@ interactions: content-length: - '0' date: - - Tue, 27 Jun 2023 08:44:12 GMT + - Wed, 28 Jun 2023 03:55:41 GMT expires: - '-1' ms-cv: - - 7ba6pOgCdEyGvS14WZ+1+g.0 + - jbEjzy/2qkijOy5bX+yBcA.0 pragma: - no-cache strict-transport-security: @@ -393,7 +393,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts?api-version=2021-03-01-preview response: body: - string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"d0a291b7-b552-4298-b3c0-a8fdd8327298"}}]}' + string: '{"nextLink":null,"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.MixedReality/spatialAnchorsAccounts/spatial-anchors-account-name","name":"spatial-anchors-account-name","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus2","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"storageAccountName":"storage_account_name1","accountDomain":"mixedreality.azure.com","accountId":"dd5dd1d8-de66-4c41-ab35-fc21694690e5"}}]}' headers: cache-control: - no-cache @@ -402,11 +402,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:13 GMT + - Wed, 28 Jun 2023 03:55:43 GMT expires: - '-1' ms-cv: - - Y0ibknw4OkSWG5xwlHuYWw.0 + - 3lXL9sORRUi7lxWkzNyByw.0 pragma: - no-cache strict-transport-security: @@ -450,11 +450,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:15 GMT + - Wed, 28 Jun 2023 03:55:45 GMT expires: - '-1' ms-cv: - - tILLWA1OlkOgQ+lwjj8q/A.0 + - wOPR/u1sTE+Ke4qPdi+HTA.0 pragma: - no-cache strict-transport-security: @@ -502,11 +502,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:18 GMT + - Wed, 28 Jun 2023 03:55:46 GMT expires: - '-1' ms-cv: - - VJIiZzqhpEmLCdWwu+8xFQ.0 + - DEgnu6i7AUOKjedOxHRgMA.0 pragma: - no-cache strict-transport-security: @@ -518,7 +518,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -554,11 +554,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:19 GMT + - Wed, 28 Jun 2023 03:55:49 GMT expires: - '-1' ms-cv: - - 0kfhVZyGa0urfIAv8H9R+w.0 + - zs60bZJaoUaCP8L4ugVXCQ.0 pragma: - no-cache strict-transport-security: @@ -606,11 +606,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 27 Jun 2023 08:44:21 GMT + - Wed, 28 Jun 2023 03:55:50 GMT expires: - '-1' ms-cv: - - XkAsZ//P50WfNkf4AR9d9g.0 + - KA6x5Z37kEW3VpEPSlFYEw.0 pragma: - no-cache strict-transport-security: