From d3d5b26be4aae6235a8c8b32abdcecf5720e8c3c Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 22 Feb 2021 14:45:34 +0000 Subject: [PATCH 1/3] CodeGen from PR 13077 in Azure/azure-rest-api-specs Fixed order of operations parameters (#13077) Co-authored-by: Raymond Ononiwu --- .../mixedreality/_mixed_reality_client.py | 7 +- .../mgmt/mixedreality/models/__init__.py | 8 + .../azure/mgmt/mixedreality/models/_models.py | 194 ++++-- .../mgmt/mixedreality/models/_models_py3.py | 194 ++++-- .../mgmt/mixedreality/models/_paged_models.py | 13 + .../mgmt/mixedreality/operations/__init__.py | 2 + .../_object_anchors_accounts_operations.py | 557 ++++++++++++++++++ .../mixedreality/operations/_operations.py | 4 +- .../_remote_rendering_accounts_operations.py | 6 +- .../_spatial_anchors_accounts_operations.py | 6 +- 10 files changed, 884 insertions(+), 107 deletions(-) create mode 100644 sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_object_anchors_accounts_operations.py diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/_mixed_reality_client.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/_mixed_reality_client.py index be21d356ce62e..f49b168c9858f 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/_mixed_reality_client.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/_mixed_reality_client.py @@ -17,6 +17,7 @@ from .operations import Operations from .operations import SpatialAnchorsAccountsOperations from .operations import RemoteRenderingAccountsOperations +from .operations import ObjectAnchorsAccountsOperations from . import models @@ -32,6 +33,8 @@ class MixedRealityClient(MixedRealityClientOperationsMixin, SDKClient): :vartype spatial_anchors_accounts: azure.mgmt.mixedreality.operations.SpatialAnchorsAccountsOperations :ivar remote_rendering_accounts: RemoteRenderingAccounts operations :vartype remote_rendering_accounts: azure.mgmt.mixedreality.operations.RemoteRenderingAccountsOperations + :ivar object_anchors_accounts: ObjectAnchorsAccounts operations + :vartype object_anchors_accounts: azure.mgmt.mixedreality.operations.ObjectAnchorsAccountsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -49,7 +52,7 @@ def __init__( super(MixedRealityClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2021-01-01' + self.api_version = '2021-03-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -59,3 +62,5 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.remote_rendering_accounts = RemoteRenderingAccountsOperations( self._client, self.config, self._serialize, self._deserialize) + self.object_anchors_accounts = ObjectAnchorsAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/__init__.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/__init__.py index b7348202f5efe..3378aa802fadd 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/__init__.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/__init__.py @@ -19,6 +19,8 @@ from ._models_py3 import LogSpecification from ._models_py3 import MetricDimension from ._models_py3 import MetricSpecification + from ._models_py3 import ObjectAnchorsAccount + from ._models_py3 import ObjectAnchorsAccountIdentity from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import OperationProperties @@ -45,6 +47,8 @@ from ._models import LogSpecification from ._models import MetricDimension from ._models import MetricSpecification + from ._models import ObjectAnchorsAccount + from ._models import ObjectAnchorsAccountIdentity from ._models import Operation from ._models import OperationDisplay from ._models import OperationProperties @@ -61,6 +65,7 @@ from ._models import SpatialAnchorsAccount from ._models import SystemData from ._models import TrackedResource +from ._paged_models import ObjectAnchorsAccountPaged from ._paged_models import OperationPaged from ._paged_models import RemoteRenderingAccountPaged from ._paged_models import SpatialAnchorsAccountPaged @@ -81,6 +86,8 @@ 'LogSpecification', 'MetricDimension', 'MetricSpecification', + 'ObjectAnchorsAccount', + 'ObjectAnchorsAccountIdentity', 'Operation', 'OperationDisplay', 'OperationProperties', @@ -100,6 +107,7 @@ 'OperationPaged', 'SpatialAnchorsAccountPaged', 'RemoteRenderingAccountPaged', + 'ObjectAnchorsAccountPaged', 'NameUnavailableReason', 'ResourceIdentityType', 'SkuTier', diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_models.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_models.py index d6eec8f495369..380d1a17762f1 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_models.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_models.py @@ -16,7 +16,7 @@ class AccountKeyRegenerateRequest(Model): """Request for account key regeneration. - :param serial: serial of key to be regenerated. Default value: 1 . + :param serial: Serial of key to be regenerated. Default value: 1 . :type serial: int """ @@ -374,6 +374,149 @@ def __init__(self, **kwargs): self.dimensions = kwargs.get('dimensions', None) +class TrackedResource(Resource): + """Tracked 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: 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.get('location', None) + + +class ObjectAnchorsAccount(TrackedResource): + """ObjectAnchorsAccount 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: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param identity: + :type identity: + ~azure.mgmt.mixedreality.models.ObjectAnchorsAccountIdentity + :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 + :ivar system_data: The system metadata related to an object anchors + account. + :vartype system_data: ~azure.mgmt.mixedreality.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'account_id': {'readonly': True}, + 'account_domain': {'readonly': True}, + 'system_data': {'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': 'ObjectAnchorsAccountIdentity'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'account_id': {'key': 'properties.accountId', 'type': 'str'}, + 'account_domain': {'key': 'properties.accountDomain', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, **kwargs): + super(ObjectAnchorsAccount, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.account_id = None + self.account_domain = None + self.system_data = None + + +class ObjectAnchorsAccountIdentity(Identity): + """ObjectAnchorsAccountIdentity. + + 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 + :param type: The identity type. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.mixedreality.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, **kwargs): + super(ObjectAnchorsAccountIdentity, self).__init__(**kwargs) + + class Operation(Model): """REST API operation. @@ -541,52 +684,6 @@ def __init__(self, **kwargs): super(ProxyResource, self).__init__(**kwargs) -class TrackedResource(Resource): - """Tracked 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: 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.get('location', None) - - class RemoteRenderingAccount(TrackedResource): """RemoteRenderingAccount Response. @@ -1022,8 +1119,7 @@ class SystemData(Model): 'ManagedIdentity', 'Key' :type last_modified_by_type: str or ~azure.mgmt.mixedreality.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. + :param last_modified_at: The timestamp of resource last modification (UTC) :type last_modified_at: datetime """ diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_models_py3.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_models_py3.py index c09201c395204..94a67e5a96aaa 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_models_py3.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_models_py3.py @@ -16,7 +16,7 @@ class AccountKeyRegenerateRequest(Model): """Request for account key regeneration. - :param serial: serial of key to be regenerated. Default value: 1 . + :param serial: Serial of key to be regenerated. Default value: 1 . :type serial: int """ @@ -374,6 +374,149 @@ def __init__(self, *, name: str=None, display_name: str=None, display_descriptio self.dimensions = dimensions +class TrackedResource(Resource): + """Tracked 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: 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=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location + + +class ObjectAnchorsAccount(TrackedResource): + """ObjectAnchorsAccount 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: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param identity: + :type identity: + ~azure.mgmt.mixedreality.models.ObjectAnchorsAccountIdentity + :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 + :ivar system_data: The system metadata related to an object anchors + account. + :vartype system_data: ~azure.mgmt.mixedreality.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'account_id': {'readonly': True}, + 'account_domain': {'readonly': True}, + 'system_data': {'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': 'ObjectAnchorsAccountIdentity'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'account_id': {'key': 'properties.accountId', 'type': 'str'}, + 'account_domain': {'key': 'properties.accountDomain', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, storage_account_name: str=None, **kwargs) -> None: + super(ObjectAnchorsAccount, self).__init__(tags=tags, location=location, **kwargs) + self.identity = identity + self.storage_account_name = storage_account_name + self.account_id = None + self.account_domain = None + self.system_data = None + + +class ObjectAnchorsAccountIdentity(Identity): + """ObjectAnchorsAccountIdentity. + + 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 + :param type: The identity type. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.mixedreality.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(ObjectAnchorsAccountIdentity, self).__init__(type=type, **kwargs) + + class Operation(Model): """REST API operation. @@ -541,52 +684,6 @@ def __init__(self, **kwargs) -> None: super(ProxyResource, self).__init__(**kwargs) -class TrackedResource(Resource): - """Tracked 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: 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=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.tags = tags - self.location = location - - class RemoteRenderingAccount(TrackedResource): """RemoteRenderingAccount Response. @@ -1022,8 +1119,7 @@ class SystemData(Model): 'ManagedIdentity', 'Key' :type last_modified_by_type: str or ~azure.mgmt.mixedreality.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. + :param last_modified_at: The timestamp of resource last modification (UTC) :type last_modified_at: datetime """ diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_paged_models.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_paged_models.py index 114d06454de2a..3654bee6a11f7 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_paged_models.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_paged_models.py @@ -51,3 +51,16 @@ class RemoteRenderingAccountPaged(Paged): def __init__(self, *args, **kwargs): super(RemoteRenderingAccountPaged, self).__init__(*args, **kwargs) +class ObjectAnchorsAccountPaged(Paged): + """ + A paging container for iterating over a list of :class:`ObjectAnchorsAccount ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ObjectAnchorsAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(ObjectAnchorsAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/__init__.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/__init__.py index c631f886e3ad0..d8948e2fa5b78 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/__init__.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/__init__.py @@ -12,11 +12,13 @@ from ._operations import Operations from ._spatial_anchors_accounts_operations import SpatialAnchorsAccountsOperations from ._remote_rendering_accounts_operations import RemoteRenderingAccountsOperations +from ._object_anchors_accounts_operations import ObjectAnchorsAccountsOperations from ._mixed_reality_client_operations import MixedRealityClientOperationsMixin __all__ = [ 'Operations', 'SpatialAnchorsAccountsOperations', 'RemoteRenderingAccountsOperations', + 'ObjectAnchorsAccountsOperations', 'MixedRealityClientOperationsMixin', ] diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_object_anchors_accounts_operations.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_object_anchors_accounts_operations.py new file mode 100644 index 0000000000000..cddf6e7f9f3bc --- /dev/null +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_object_anchors_accounts_operations.py @@ -0,0 +1,557 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ObjectAnchorsAccountsOperations(object): + """ObjectAnchorsAccountsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2021-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-03-01-preview" + + self.config = config + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """List Object Anchors Accounts by Subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ObjectAnchorsAccount + :rtype: + ~azure.mgmt.mixedreality.models.ObjectAnchorsAccountPaged[~azure.mgmt.mixedreality.models.ObjectAnchorsAccount] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ObjectAnchorsAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/objectAnchorsAccounts'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """List Resources by Resource Group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ObjectAnchorsAccount + :rtype: + ~azure.mgmt.mixedreality.models.ObjectAnchorsAccountPaged[~azure.mgmt.mixedreality.models.ObjectAnchorsAccount] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ObjectAnchorsAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/objectAnchorsAccounts'} + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Delete an Object 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/objectAnchorsAccounts/{accountName}'} + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieve an Object 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ObjectAnchorsAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.mixedreality.models.ObjectAnchorsAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ObjectAnchorsAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/objectAnchorsAccounts/{accountName}'} + + def update( + self, resource_group_name, account_name, object_anchors_account, custom_headers=None, raw=False, **operation_config): + """Updating an Object 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 object_anchors_account: Object Anchors Account parameter. + :type object_anchors_account: + ~azure.mgmt.mixedreality.models.ObjectAnchorsAccount + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ObjectAnchorsAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.mixedreality.models.ObjectAnchorsAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(object_anchors_account, 'ObjectAnchorsAccount') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ObjectAnchorsAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/objectAnchorsAccounts/{accountName}'} + + def create( + self, resource_group_name, account_name, object_anchors_account, custom_headers=None, raw=False, **operation_config): + """Creating or Updating an object 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 object_anchors_account: Object Anchors Account parameter. + :type object_anchors_account: + ~azure.mgmt.mixedreality.models.ObjectAnchorsAccount + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ObjectAnchorsAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.mixedreality.models.ObjectAnchorsAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(object_anchors_account, 'ObjectAnchorsAccount') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ObjectAnchorsAccount', response) + if response.status_code == 201: + deserialized = self._deserialize('ObjectAnchorsAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/objectAnchorsAccounts/{accountName}'} + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """List Both of the 2 Keys of an object 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AccountKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.mixedreality.models.AccountKeys or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_keys.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AccountKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/objectAnchorsAccounts/{accountName}/listKeys'} + + def regenerate_keys( + self, resource_group_name, account_name, serial=1, custom_headers=None, raw=False, **operation_config): + """Regenerate specified Key of an object 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 serial: Serial of key to be regenerated + :type serial: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AccountKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.mixedreality.models.AccountKeys or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + regenerate = models.AccountKeyRegenerateRequest(serial=serial) + + # Construct URL + url = self.regenerate_keys.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(regenerate, 'AccountKeyRegenerateRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AccountKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/objectAnchorsAccounts/{accountName}/regenerateKeys'} diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_operations.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_operations.py index d29760a92c169..b9f5d64fbd0e6 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_operations.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_operations.py @@ -25,7 +25,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2021-01-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2021-03-01-preview". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-01-01" + self.api_version = "2021-03-01-preview" self.config = config diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_remote_rendering_accounts_operations.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_remote_rendering_accounts_operations.py index 9bf4307951456..cff9eb2c97d61 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_remote_rendering_accounts_operations.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_remote_rendering_accounts_operations.py @@ -25,7 +25,7 @@ class RemoteRenderingAccountsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2021-01-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2021-03-01-preview". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-01-01" + self.api_version = "2021-03-01-preview" self.config = config @@ -495,7 +495,7 @@ def regenerate_keys( :type resource_group_name: str :param account_name: Name of an Mixed Reality Account. :type account_name: str - :param serial: serial of key to be regenerated + :param serial: Serial of key to be regenerated :type serial: int :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_spatial_anchors_accounts_operations.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_spatial_anchors_accounts_operations.py index c822f10035e56..f0b7a257962a7 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_spatial_anchors_accounts_operations.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_spatial_anchors_accounts_operations.py @@ -25,7 +25,7 @@ class SpatialAnchorsAccountsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2021-01-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2021-03-01-preview". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-01-01" + self.api_version = "2021-03-01-preview" self.config = config @@ -495,7 +495,7 @@ def regenerate_keys( :type resource_group_name: str :param account_name: Name of an Mixed Reality Account. :type account_name: str - :param serial: serial of key to be regenerated + :param serial: Serial of key to be regenerated :type serial: int :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the From f1846bd41fa35ef4a1bcc051e6b0f717e24751e4 Mon Sep 17 00:00:00 2001 From: 00Kai0 Date: Tue, 23 Feb 2021 11:43:11 +0800 Subject: [PATCH 2/3] test,version,CHANGELOG --- .../azure-mgmt-mixedreality/CHANGELOG.md | 6 + .../azure/mgmt/mixedreality/version.py | 2 +- ...i_mgmt_mixedreality.test_mixedreality.yaml | 506 +----------------- 3 files changed, 21 insertions(+), 493 deletions(-) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/CHANGELOG.md b/sdk/mixedreality/azure-mgmt-mixedreality/CHANGELOG.md index f3b08fc356595..70f3b2208aae5 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/CHANGELOG.md +++ b/sdk/mixedreality/azure-mgmt-mixedreality/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 0.4.0 (2021-02-23) + +**Features** + + - Added operation group ObjectAnchorsAccountsOperations + ## 0.3.0 (2021-02-07) **Features** diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/version.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/version.py index 3e682bbd5fb15..85da2c00c1a62 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/version.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.3.0" +VERSION = "0.4.0" diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/tests/recordings/test_cli_mgmt_mixedreality.test_mixedreality.yaml b/sdk/mixedreality/azure-mgmt-mixedreality/tests/recordings/test_cli_mgmt_mixedreality.test_mixedreality.yaml index 0fb382ee2e1fc..db5241d64f1a3 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/tests/recordings/test_cli_mgmt_mixedreality.test_mixedreality.yaml +++ b/sdk/mixedreality/azure-mgmt-mixedreality/tests/recordings/test_cli_mgmt_mixedreality.test_mixedreality.yaml @@ -14,517 +14,39 @@ interactions: - application/json; charset=utf-8 User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-mixedreality/0.3.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-mixedreality/0.4.0 Azure-SDK-For-Python accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount?api-version=2021-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount?api-version=2021-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount","name":"myAccount","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus.mixedreality.azure.com","accountId":"d4407a0d-bee5-4a1c-9be8-7835fc8e7afb"}}' + string: '{"error":{"code":"NoRegisteredProviderFound","message":"No registered + resource provider found for location ''eastus'' and API version ''2021-03-01-preview'' + for type ''spatialAnchorsAccounts''. The supported api-versions are ''2021-01-01, + 2020-05-01, 2019-12-02-preview, 2019-02-28-preview''. The supported locations + are ''australiaeast, eastus, eastus2, koreacentral, northeurope, westeurope, + southcentralus, uksouth, southeastasia''."}}' headers: cache-control: - no-cache content-length: - - '463' + - '428' content-type: - application/json; charset=utf-8 date: - - Sun, 07 Feb 2021 06:11:49 GMT + - Tue, 23 Feb 2021 03:41:17 GMT expires: - '-1' - location: - - subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount - ms-cv: - - XNGHaHuXyU+Cg3/YxjZ14g.0 pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' + x-ms-failure-cause: + - gateway status: - code: 201 - message: Created -- request: - body: '{"location": "eastus", "identity": {"type": "SystemAssigned"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '62' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-mixedreality/0.3.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount?api-version=2021-01-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount","name":"myAccount","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"7c987da4-0f85-457a-90ac-9a933c93cc40","tenantId":"00000000-0000-0000-0000-000000000000"},"location":"eastus","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus.mixedreality.azure.com","accountId":"28096da6-261b-43ca-aa1e-d42f70242e38"}}' - headers: - cache-control: - - no-cache - content-length: - - '589' - content-type: - - application/json; charset=utf-8 - date: - - Sun, 07 Feb 2021 06:11:56 GMT - expires: - - '-1' - location: - - subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount - ms-cv: - - kO5+KshK9k2DKmaGcFaJzA.0 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-mixedreality/0.3.0 Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount?api-version=2021-01-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount","name":"myAccount","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"7c987da4-0f85-457a-90ac-9a933c93cc40","tenantId":"00000000-0000-0000-0000-000000000000"},"location":"eastus","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus.mixedreality.azure.com","accountId":"28096da6-261b-43ca-aa1e-d42f70242e38"}}' - headers: - cache-control: - - no-cache - content-length: - - '589' - content-type: - - application/json; charset=utf-8 - date: - - Sun, 07 Feb 2021 06:11:57 GMT - expires: - - '-1' - ms-cv: - - 1eAQK0DVH0KstSfCKx7EcQ.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: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-mixedreality/0.3.0 Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount?api-version=2021-01-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount","name":"myAccount","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus.mixedreality.azure.com","accountId":"d4407a0d-bee5-4a1c-9be8-7835fc8e7afb"}}' - headers: - cache-control: - - no-cache - content-length: - - '463' - content-type: - - application/json; charset=utf-8 - date: - - Sun, 07 Feb 2021 06:11:57 GMT - expires: - - '-1' - ms-cv: - - NimCKzcxZkevGIvB7rgI2A.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: '{"serial": 1}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '13' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-mixedreality/0.3.0 Azure-SDK-For-Python - accept-language: - - en-US - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount/regenerateKeys?api-version=2021-01-01 - response: - body: - string: '{"primaryKey":"tl+kpGFfU1JbcZ2eiGHqtUL1Q8q1TuAoBsD/7MPgFzE=","secondaryKey":"3dhV0+AtZC9giC9onez9fI9Ce/wu3cQCIAoltrHOtFM="}' - headers: - cache-control: - - no-cache - content-length: - - '123' - content-type: - - application/json; charset=utf-8 - date: - - Sun, 07 Feb 2021 06:11:58 GMT - expires: - - '-1' - ms-cv: - - 8lq1MpnNAEyDZ2900UcJAQ.0 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: OK -- request: - body: '{"serial": 1}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '13' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-mixedreality/0.3.0 Azure-SDK-For-Python - accept-language: - - en-US - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount/regenerateKeys?api-version=2021-01-01 - response: - body: - string: '{"primaryKey":"p3Hy6VgteaZMMmzR6X7N4FHq+o+9iFhtasP98DEsGas=","secondaryKey":"aLXVSKMyjFvDPS48xJNc6eXtgIWO2GzOVWvHKT4coTA="}' - headers: - cache-control: - - no-cache - content-length: - - '123' - content-type: - - application/json; charset=utf-8 - date: - - Sun, 07 Feb 2021 06:11:59 GMT - expires: - - '-1' - ms-cv: - - GsLrT/IH80iqcFGOfpLYeA.0 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 200 - message: OK -- request: - body: '{"tags": {"heroine": "juliet", "hero": "romeo"}, "location": "eastus", - "identity": {"type": "SystemAssigned"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '110' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-mixedreality/0.3.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount?api-version=2021-01-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount","name":"myAccount","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"7c987da4-0f85-457a-90ac-9a933c93cc40","tenantId":"00000000-0000-0000-0000-000000000000"},"location":"eastus","plan":null,"sku":null,"kind":null,"tags":{"heroine":"juliet","hero":"romeo"},"properties":{"accountDomain":"eastus.mixedreality.azure.com","accountId":"28096da6-261b-43ca-aa1e-d42f70242e38"}}' - headers: - cache-control: - - no-cache - content-length: - - '622' - content-type: - - application/json; charset=utf-8 - date: - - Sun, 07 Feb 2021 06:12:02 GMT - expires: - - '-1' - ms-cv: - - p+SvAk+V3U6ms5yVcOgLCw.0 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 200 - message: OK -- request: - body: '{"tags": {"heroine": "juliet", "hero": "romeo"}, "location": "eastus"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '70' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-mixedreality/0.3.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount?api-version=2021-01-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount","name":"myAccount","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus","plan":null,"sku":null,"kind":null,"tags":{"heroine":"juliet","hero":"romeo"},"properties":{"accountDomain":"eastus.mixedreality.azure.com","accountId":"d4407a0d-bee5-4a1c-9be8-7835fc8e7afb"}}' - headers: - cache-control: - - no-cache - content-length: - - '496' - content-type: - - application/json; charset=utf-8 - date: - - Sun, 07 Feb 2021 06:12:05 GMT - expires: - - '-1' - ms-cv: - - KFrbGkh8akKLhrWXg7srtQ.0 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1196' - status: - code: 200 - message: OK -- request: - body: '{"name": "MyAccount", "type": "Microsoft.MixedReality/spatialAnchorsAccounts"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '78' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-mixedreality/0.3.0 Azure-SDK-For-Python - accept-language: - - en-US - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MixedReality/locations/eastus/checkNameAvailability?api-version=2021-01-01 - response: - body: - string: '{"nameAvailable":true,"reason":null,"message":null}' - headers: - cache-control: - - no-cache - content-length: - - '51' - content-type: - - application/json; charset=utf-8 - date: - - Sun, 07 Feb 2021 06:12:07 GMT - expires: - - '-1' - ms-cv: - - pB12QbxjoUW0q4vQjBAXcg.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: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-mixedreality/0.3.0 Azure-SDK-For-Python - accept-language: - - en-US - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount?api-version=2021-01-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Sun, 07 Feb 2021 06:12:10 GMT - expires: - - '-1' - ms-cv: - - M/GCmEC0PkmDypkHeVKS5w.0 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-mixedreality/0.3.0 Azure-SDK-For-Python - accept-language: - - en-US - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount?api-version=2021-01-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Sun, 07 Feb 2021 06:12:14 GMT - expires: - - '-1' - ms-cv: - - IJyq4GBOSEaDQdwmppQLjg.0 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14998' - status: - code: 200 - message: OK + code: 400 + message: Bad Request version: 1 From 0dfd10829dde1b806427a9ca1847eaf5752d80b4 Mon Sep 17 00:00:00 2001 From: 00Kai0 Date: Wed, 24 Feb 2021 09:58:24 +0800 Subject: [PATCH 3/3] fix test --- ...i_mgmt_mixedreality.test_mixedreality.yaml | 502 +++++++++++++++++- 1 file changed, 490 insertions(+), 12 deletions(-) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/tests/recordings/test_cli_mgmt_mixedreality.test_mixedreality.yaml b/sdk/mixedreality/azure-mgmt-mixedreality/tests/recordings/test_cli_mgmt_mixedreality.test_mixedreality.yaml index db5241d64f1a3..36600dcb4c96f 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/tests/recordings/test_cli_mgmt_mixedreality.test_mixedreality.yaml +++ b/sdk/mixedreality/azure-mgmt-mixedreality/tests/recordings/test_cli_mgmt_mixedreality.test_mixedreality.yaml @@ -21,32 +21,510 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount?api-version=2021-03-01-preview response: body: - string: '{"error":{"code":"NoRegisteredProviderFound","message":"No registered - resource provider found for location ''eastus'' and API version ''2021-03-01-preview'' - for type ''spatialAnchorsAccounts''. The supported api-versions are ''2021-01-01, - 2020-05-01, 2019-12-02-preview, 2019-02-28-preview''. The supported locations - are ''australiaeast, eastus, eastus2, koreacentral, northeurope, westeurope, - southcentralus, uksouth, southeastasia''."}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount","name":"myAccount","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus.mixedreality.azure.com","accountId":"353d4182-0047-48b1-bc09-169d616b4673"}}' headers: cache-control: - no-cache content-length: - - '428' + - '463' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Feb 2021 03:41:17 GMT + - Wed, 24 Feb 2021 01:57:38 GMT expires: - '-1' + location: + - subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount + ms-cv: + - kMj2BEHPp0GzjYSNZ4Uytg.0 pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-ms-failure-cause: - - gateway + x-ms-ratelimit-remaining-subscription-writes: + - '1199' status: - code: 400 - message: Bad Request + code: 201 + message: Created +- request: + body: '{"location": "eastus", "identity": {"type": "SystemAssigned"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '62' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-mixedreality/0.4.0 Azure-SDK-For-Python + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount?api-version=2021-03-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount","name":"myAccount","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"be85f72f-b8be-4dcd-b6b9-2365c617a906","tenantId":"00000000-0000-0000-0000-000000000000"},"location":"eastus","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus.mixedreality.azure.com","accountId":"fa41bb1f-031f-4fd6-91c4-fe223cdfce42"}}' + headers: + cache-control: + - no-cache + content-length: + - '589' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 24 Feb 2021 01:57:46 GMT + expires: + - '-1' + location: + - subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount + ms-cv: + - ayk6hVqrqkSB34PioYhFyA.0 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-mixedreality/0.4.0 Azure-SDK-For-Python + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount?api-version=2021-03-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount","name":"myAccount","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"be85f72f-b8be-4dcd-b6b9-2365c617a906","tenantId":"00000000-0000-0000-0000-000000000000"},"location":"eastus","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus.mixedreality.azure.com","accountId":"fa41bb1f-031f-4fd6-91c4-fe223cdfce42"}}' + headers: + cache-control: + - no-cache + content-length: + - '589' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 24 Feb 2021 01:57:46 GMT + expires: + - '-1' + ms-cv: + - ev8gwtl7vUOdDouyQNO+QA.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: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-mixedreality/0.4.0 Azure-SDK-For-Python + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount?api-version=2021-03-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount","name":"myAccount","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus","plan":null,"sku":null,"kind":null,"tags":{},"properties":{"accountDomain":"eastus.mixedreality.azure.com","accountId":"353d4182-0047-48b1-bc09-169d616b4673"}}' + headers: + cache-control: + - no-cache + content-length: + - '463' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 24 Feb 2021 01:57:46 GMT + expires: + - '-1' + ms-cv: + - Ms9eVFRBokSInvvGnuJFnQ.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: '{"serial": 1}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '13' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-mixedreality/0.4.0 Azure-SDK-For-Python + accept-language: + - en-US + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount/regenerateKeys?api-version=2021-03-01-preview + response: + body: + string: '{"primaryKey":"pO/3+ppEIRLIes5sf7fLrlkYyn7m8sngruR0JSy0MII=","secondaryKey":"+WQgRgW6I2MOMSbbUZlk2H2v5FDJbq4PcaZkVDKL3uw="}' + headers: + cache-control: + - no-cache + content-length: + - '123' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 24 Feb 2021 01:57:47 GMT + expires: + - '-1' + ms-cv: + - 3PKmuQCzqk6O9IUtMgPXPA.0 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: '{"serial": 1}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '13' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-mixedreality/0.4.0 Azure-SDK-For-Python + accept-language: + - en-US + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount/regenerateKeys?api-version=2021-03-01-preview + response: + body: + string: '{"primaryKey":"q0ucK8QAO9m/FDB2o67eYA70HF4BvvrKFPnFhVrROzs=","secondaryKey":"INieTMuub3n6jqywrj5ykVRj/PpHJ3/e2+cUbn2n/4A="}' + headers: + cache-control: + - no-cache + content-length: + - '123' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 24 Feb 2021 01:57:48 GMT + expires: + - '-1' + ms-cv: + - 54+KEx2aDEegkx/QNjbyQw.0 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: '{"tags": {"heroine": "juliet", "hero": "romeo"}, "location": "eastus", + "identity": {"type": "SystemAssigned"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '110' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-mixedreality/0.4.0 Azure-SDK-For-Python + accept-language: + - en-US + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount?api-version=2021-03-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount","name":"myAccount","type":"Microsoft.MixedReality/remoteRenderingAccounts","identity":{"type":"SystemAssigned","principalId":"be85f72f-b8be-4dcd-b6b9-2365c617a906","tenantId":"00000000-0000-0000-0000-000000000000"},"location":"eastus","plan":null,"sku":null,"kind":null,"tags":{"heroine":"juliet","hero":"romeo"},"properties":{"accountDomain":"eastus.mixedreality.azure.com","accountId":"fa41bb1f-031f-4fd6-91c4-fe223cdfce42"}}' + headers: + cache-control: + - no-cache + content-length: + - '622' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 24 Feb 2021 01:57:51 GMT + expires: + - '-1' + ms-cv: + - 55+fW+ZTY02eODhzPyLdFg.0 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 200 + message: OK +- request: + body: '{"tags": {"heroine": "juliet", "hero": "romeo"}, "location": "eastus"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '70' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-mixedreality/0.4.0 Azure-SDK-For-Python + accept-language: + - en-US + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount?api-version=2021-03-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount","name":"myAccount","type":"Microsoft.MixedReality/spatialAnchorsAccounts","identity":null,"location":"eastus","plan":null,"sku":null,"kind":null,"tags":{"heroine":"juliet","hero":"romeo"},"properties":{"accountDomain":"eastus.mixedreality.azure.com","accountId":"353d4182-0047-48b1-bc09-169d616b4673"}}' + headers: + cache-control: + - no-cache + content-length: + - '496' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 24 Feb 2021 01:57:53 GMT + expires: + - '-1' + ms-cv: + - UByXNPZjV0OLg1ylSqiwEw.0 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1196' + status: + code: 200 + message: OK +- request: + body: '{"name": "MyAccount", "type": "Microsoft.MixedReality/spatialAnchorsAccounts"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '78' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-mixedreality/0.4.0 Azure-SDK-For-Python + accept-language: + - en-US + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MixedReality/locations/eastus/checkNameAvailability?api-version=2021-03-01-preview + response: + body: + string: '{"nameAvailable":true,"reason":null,"message":null}' + headers: + cache-control: + - no-cache + content-length: + - '51' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 24 Feb 2021 01:57:54 GMT + expires: + - '-1' + ms-cv: + - ntIKNOcY5ESXcHQsvvYpyg.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: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-mixedreality/0.4.0 Azure-SDK-For-Python + accept-language: + - en-US + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/remoteRenderingAccounts/myAccount?api-version=2021-03-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 24 Feb 2021 01:57:58 GMT + expires: + - '-1' + ms-cv: + - Rk0rMifc/0yL8hWGmk+FpA.0 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-mixedreality/0.4.0 Azure-SDK-For-Python + accept-language: + - en-US + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mixedreality_test_mixedreality9961123a/providers/Microsoft.MixedReality/spatialAnchorsAccounts/myAccount?api-version=2021-03-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 24 Feb 2021 01:58:01 GMT + expires: + - '-1' + ms-cv: + - cYbxvZsbQ0yISYvS7+hZIg.0 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + status: + code: 200 + message: OK version: 1