From 607232b59a9dc3444bc866ef06d67b1b07aa4781 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 22 Apr 2021 08:26:36 +0000 Subject: [PATCH 1/4] CodeGen from PR 14064 in Azure/azure-rest-api-specs managedservices t2 onfig (#14064) Co-authored-by: Yan Zhang (WICRESOFT NORTH AMERICA LTD) --- .../azure-mgmt-managedservices/MANIFEST.in | 1 + .../azure-mgmt-managedservices/_meta.json | 8 + .../_managed_services_client.py | 21 +++ .../azure/mgmt/managedservices/_metadata.json | 95 ++++++++++ .../azure/mgmt/managedservices/_version.py | 3 +- .../aio/_managed_services_client.py | 20 ++ .../aio/operations/__init__.py | 2 + ...ace_registration_definitions_operations.py | 6 +- ...on_definitions_without_scope_operations.py | 167 +++++++++++++++++ .../aio/operations/_operations.py | 2 +- .../_registration_assignments_operations.py | 16 +- .../_registration_definitions_operations.py | 12 +- .../managedservices/operations/__init__.py | 2 + ...ace_registration_definitions_operations.py | 6 +- ...on_definitions_without_scope_operations.py | 173 ++++++++++++++++++ .../managedservices/operations/_operations.py | 2 +- .../_registration_assignments_operations.py | 16 +- .../_registration_definitions_operations.py | 12 +- 18 files changed, 526 insertions(+), 38 deletions(-) create mode 100644 sdk/managedservices/azure-mgmt-managedservices/_meta.json create mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_metadata.json create mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_without_scope_operations.py create mode 100644 sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_without_scope_operations.py diff --git a/sdk/managedservices/azure-mgmt-managedservices/MANIFEST.in b/sdk/managedservices/azure-mgmt-managedservices/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/MANIFEST.in +++ b/sdk/managedservices/azure-mgmt-managedservices/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/managedservices/azure-mgmt-managedservices/_meta.json b/sdk/managedservices/azure-mgmt-managedservices/_meta.json new file mode 100644 index 000000000000..54ee6fe946b4 --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "3.3.0", + "use": "@autorest/python@5.6.6", + "commit": "528c0cffd4de3d4acdf451a1ea5f7cf6f3cb790c", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/managedservices/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.3.0", + "readme": "specification/managedservices/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_managed_services_client.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_managed_services_client.py index e5dd30eac6d6..fe7680c90761 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_managed_services_client.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_managed_services_client.py @@ -16,11 +16,13 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import ManagedServicesClientConfiguration from .operations import RegistrationDefinitionsOperations from .operations import RegistrationAssignmentsOperations from .operations import MarketplaceRegistrationDefinitionsOperations +from .operations import MarketplaceRegistrationDefinitionsWithoutScopeOperations from .operations import Operations from . import models @@ -34,6 +36,8 @@ class ManagedServicesClient(object): :vartype registration_assignments: azure.mgmt.managedservices.operations.RegistrationAssignmentsOperations :ivar marketplace_registration_definitions: MarketplaceRegistrationDefinitionsOperations operations :vartype marketplace_registration_definitions: azure.mgmt.managedservices.operations.MarketplaceRegistrationDefinitionsOperations + :ivar marketplace_registration_definitions_without_scope: MarketplaceRegistrationDefinitionsWithoutScopeOperations operations + :vartype marketplace_registration_definitions_without_scope: azure.mgmt.managedservices.operations.MarketplaceRegistrationDefinitionsWithoutScopeOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.managedservices.operations.Operations :param credential: Credential needed for the client to connect to Azure. @@ -65,9 +69,26 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.marketplace_registration_definitions = MarketplaceRegistrationDefinitionsOperations( self._client, self._config, self._serialize, self._deserialize) + self.marketplace_registration_definitions_without_scope = MarketplaceRegistrationDefinitionsWithoutScopeOperations( + self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( 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 + """ + http_request.url = self._client.format_url(http_request.url) + 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() diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_metadata.json b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_metadata.json new file mode 100644 index 000000000000..669a7cbee049 --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_metadata.json @@ -0,0 +1,95 @@ +{ + "chosen_version": "2020-02-01-preview", + "total_api_version_list": ["2020-02-01-preview"], + "client": { + "name": "ManagedServicesClient", + "filename": "_managed_services_client", + "description": "Specification for ManagedServices.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ManagedServicesClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ManagedServicesClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + } + }, + "constant": { + }, + "call": "credential", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "registration_definitions": "RegistrationDefinitionsOperations", + "registration_assignments": "RegistrationAssignmentsOperations", + "marketplace_registration_definitions": "MarketplaceRegistrationDefinitionsOperations", + "marketplace_registration_definitions_without_scope": "MarketplaceRegistrationDefinitionsWithoutScopeOperations", + "operations": "Operations" + } +} \ No newline at end of file diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_version.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_version.py index a35cca02914a..eae7c95b6fbd 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_version.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_version.py @@ -6,5 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0b1" - +VERSION = "0.1.0" diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/_managed_services_client.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/_managed_services_client.py index 7a5c7f23e921..17ff8623156c 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/_managed_services_client.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/_managed_services_client.py @@ -8,6 +8,7 @@ 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 @@ -19,6 +20,7 @@ from .operations import RegistrationDefinitionsOperations from .operations import RegistrationAssignmentsOperations from .operations import MarketplaceRegistrationDefinitionsOperations +from .operations import MarketplaceRegistrationDefinitionsWithoutScopeOperations from .operations import Operations from .. import models @@ -32,6 +34,8 @@ class ManagedServicesClient(object): :vartype registration_assignments: azure.mgmt.managedservices.aio.operations.RegistrationAssignmentsOperations :ivar marketplace_registration_definitions: MarketplaceRegistrationDefinitionsOperations operations :vartype marketplace_registration_definitions: azure.mgmt.managedservices.aio.operations.MarketplaceRegistrationDefinitionsOperations + :ivar marketplace_registration_definitions_without_scope: MarketplaceRegistrationDefinitionsWithoutScopeOperations operations + :vartype marketplace_registration_definitions_without_scope: azure.mgmt.managedservices.aio.operations.MarketplaceRegistrationDefinitionsWithoutScopeOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.managedservices.aio.operations.Operations :param credential: Credential needed for the client to connect to Azure. @@ -62,9 +66,25 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.marketplace_registration_definitions = MarketplaceRegistrationDefinitionsOperations( self._client, self._config, self._serialize, self._deserialize) + self.marketplace_registration_definitions_without_scope = MarketplaceRegistrationDefinitionsWithoutScopeOperations( + self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( 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 + """ + http_request.url = self._client.format_url(http_request.url) + 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() diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/__init__.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/__init__.py index d386e22a7a69..e52c6c86461f 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/__init__.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/__init__.py @@ -9,11 +9,13 @@ from ._registration_definitions_operations import RegistrationDefinitionsOperations from ._registration_assignments_operations import RegistrationAssignmentsOperations from ._marketplace_registration_definitions_operations import MarketplaceRegistrationDefinitionsOperations +from ._marketplace_registration_definitions_without_scope_operations import MarketplaceRegistrationDefinitionsWithoutScopeOperations from ._operations import Operations __all__ = [ 'RegistrationDefinitionsOperations', 'RegistrationAssignmentsOperations', 'MarketplaceRegistrationDefinitionsOperations', + 'MarketplaceRegistrationDefinitionsWithoutScopeOperations', 'Operations', ] diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_operations.py index 1ea75f8c856c..1358ed0dde29 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_operations.py @@ -106,7 +106,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -127,7 +127,7 @@ async def get( :param scope: Scope of the resource. :type scope: str - :param marketplace_identifier: Market place identifer. Expected Formats - + :param marketplace_identifier: Market place identifier. Expected Formats - {publisher}.{product[-preview]}.{planName}.{version} or {publisher}.{product[-preview]}.{planName} or {publisher}.{product[-preview]} or {publisher}). :type marketplace_identifier: str @@ -166,7 +166,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MarketplaceRegistrationDefinition', pipeline_response) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_without_scope_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_without_scope_operations.py new file mode 100644 index 000000000000..0c1b77114e06 --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_without_scope_operations.py @@ -0,0 +1,167 @@ +# 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 MarketplaceRegistrationDefinitionsWithoutScopeOperations: + """MarketplaceRegistrationDefinitionsWithoutScopeOperations 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.managedservices.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, + filter: Optional[str] = None, + **kwargs + ) -> AsyncIterable["_models.MarketplaceRegistrationDefinitionList"]: + """Gets a list of the marketplace registration definitions for the marketplace identifier. + + :param filter: The filter query parameter. Might be used to filter marketplace registration + definition by plan identifier, publisher, version etc. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MarketplaceRegistrationDefinitionList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managedservices.models.MarketplaceRegistrationDefinitionList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MarketplaceRegistrationDefinitionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-02-01-preview" + 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] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + 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('MarketplaceRegistrationDefinitionList', 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]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions'} # type: ignore + + async def get( + self, + marketplace_identifier: str, + **kwargs + ) -> "_models.MarketplaceRegistrationDefinition": + """Get the marketplace registration definition for the marketplace identifier. + + :param marketplace_identifier: Market place identifier. Expected Formats - + {publisher}.{product[-preview]}.{planName}.{version} or + {publisher}.{product[-preview]}.{planName} or {publisher}.{product[-preview]} or {publisher}). + :type marketplace_identifier: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MarketplaceRegistrationDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.managedservices.models.MarketplaceRegistrationDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MarketplaceRegistrationDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'marketplaceIdentifier': self._serialize.url("marketplace_identifier", marketplace_identifier, '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') + + # 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MarketplaceRegistrationDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions/{marketplaceIdentifier}'} # type: ignore diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_operations.py index 72e85af56aab..f87b95beb0d7 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_operations.py @@ -76,7 +76,7 @@ async def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('OperationList', pipeline_response) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_registration_assignments_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_registration_assignments_operations.py index 8c4808929cfe..fd0f198794e3 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_registration_assignments_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_registration_assignments_operations.py @@ -96,7 +96,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RegistrationAssignment', pipeline_response) @@ -143,7 +143,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -165,8 +165,8 @@ async def begin_delete( :type registration_assignment_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -256,7 +256,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -288,8 +288,8 @@ async def begin_create_or_update( :type request_body: ~azure.mgmt.managedservices.models.RegistrationAssignment :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either RegistrationAssignment or the result of cls(response) @@ -406,7 +406,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_registration_definitions_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_registration_definitions_operations.py index 49a600324f74..7603275c230a 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_registration_definitions_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_registration_definitions_operations.py @@ -90,7 +90,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RegistrationDefinition', pipeline_response) @@ -148,7 +148,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -198,7 +198,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -230,8 +230,8 @@ async def begin_create_or_update( :type request_body: ~azure.mgmt.managedservices.models.RegistrationDefinition :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either RegistrationDefinition or the result of cls(response) @@ -342,7 +342,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/__init__.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/__init__.py index d386e22a7a69..e52c6c86461f 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/__init__.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/__init__.py @@ -9,11 +9,13 @@ from ._registration_definitions_operations import RegistrationDefinitionsOperations from ._registration_assignments_operations import RegistrationAssignmentsOperations from ._marketplace_registration_definitions_operations import MarketplaceRegistrationDefinitionsOperations +from ._marketplace_registration_definitions_without_scope_operations import MarketplaceRegistrationDefinitionsWithoutScopeOperations from ._operations import Operations __all__ = [ 'RegistrationDefinitionsOperations', 'RegistrationAssignmentsOperations', 'MarketplaceRegistrationDefinitionsOperations', + 'MarketplaceRegistrationDefinitionsWithoutScopeOperations', 'Operations', ] diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_operations.py index 44a82a73bf98..870efd9901ce 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_operations.py @@ -111,7 +111,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -133,7 +133,7 @@ def get( :param scope: Scope of the resource. :type scope: str - :param marketplace_identifier: Market place identifer. Expected Formats - + :param marketplace_identifier: Market place identifier. Expected Formats - {publisher}.{product[-preview]}.{planName}.{version} or {publisher}.{product[-preview]}.{planName} or {publisher}.{product[-preview]} or {publisher}). :type marketplace_identifier: str @@ -172,7 +172,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MarketplaceRegistrationDefinition', pipeline_response) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_without_scope_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_without_scope_operations.py new file mode 100644 index 000000000000..2ef4e26064c1 --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_without_scope_operations.py @@ -0,0 +1,173 @@ +# 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 MarketplaceRegistrationDefinitionsWithoutScopeOperations(object): + """MarketplaceRegistrationDefinitionsWithoutScopeOperations 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.managedservices.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, + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.MarketplaceRegistrationDefinitionList"] + """Gets a list of the marketplace registration definitions for the marketplace identifier. + + :param filter: The filter query parameter. Might be used to filter marketplace registration + definition by plan identifier, publisher, version etc. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MarketplaceRegistrationDefinitionList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managedservices.models.MarketplaceRegistrationDefinitionList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MarketplaceRegistrationDefinitionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-02-01-preview" + 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] + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + 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('MarketplaceRegistrationDefinitionList', 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]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions'} # type: ignore + + def get( + self, + marketplace_identifier, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MarketplaceRegistrationDefinition" + """Get the marketplace registration definition for the marketplace identifier. + + :param marketplace_identifier: Market place identifier. Expected Formats - + {publisher}.{product[-preview]}.{planName}.{version} or + {publisher}.{product[-preview]}.{planName} or {publisher}.{product[-preview]} or {publisher}). + :type marketplace_identifier: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MarketplaceRegistrationDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.managedservices.models.MarketplaceRegistrationDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MarketplaceRegistrationDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'marketplaceIdentifier': self._serialize.url("marketplace_identifier", marketplace_identifier, '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') + + # 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MarketplaceRegistrationDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions/{marketplaceIdentifier}'} # type: ignore diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_operations.py index 2caffd3e83e4..416060e95be0 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_operations.py @@ -81,7 +81,7 @@ def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('OperationList', pipeline_response) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_assignments_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_assignments_operations.py index bb3032cf1441..2acf9413aeba 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_assignments_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_assignments_operations.py @@ -101,7 +101,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RegistrationAssignment', pipeline_response) @@ -149,7 +149,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -172,8 +172,8 @@ def begin_delete( :type registration_assignment_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -264,7 +264,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -297,8 +297,8 @@ def begin_create_or_update( :type request_body: ~azure.mgmt.managedservices.models.RegistrationAssignment :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either RegistrationAssignment or the result of cls(response) @@ -416,7 +416,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_definitions_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_definitions_operations.py index c32f66811b94..4b644ac1a0c2 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_definitions_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_definitions_operations.py @@ -95,7 +95,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RegistrationDefinition', pipeline_response) @@ -154,7 +154,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -205,7 +205,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -238,8 +238,8 @@ def begin_create_or_update( :type request_body: ~azure.mgmt.managedservices.models.RegistrationDefinition :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either RegistrationDefinition or the result of cls(response) @@ -351,7 +351,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) From 9507f55b9d3f55a4ad236e918579bd2985667eba Mon Sep 17 00:00:00 2001 From: PythonSdkPipelines Date: Thu, 22 Apr 2021 08:54:40 +0000 Subject: [PATCH 2/4] version,CHANGELOG --- sdk/managedservices/azure-mgmt-managedservices/CHANGELOG.md | 6 ++++++ .../azure/mgmt/managedservices/_version.py | 2 +- sdk/managedservices/azure-mgmt-managedservices/setup.py | 2 +- shared_requirements.txt | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sdk/managedservices/azure-mgmt-managedservices/CHANGELOG.md b/sdk/managedservices/azure-mgmt-managedservices/CHANGELOG.md index 516c6957a4cc..9d50b64a1656 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/CHANGELOG.md +++ b/sdk/managedservices/azure-mgmt-managedservices/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 6.0.0b2 (2021-04-22) + +**Features** + + - Added operation group MarketplaceRegistrationDefinitionsWithoutScopeOperations + ## 6.0.0b1 (2020-12-07) This is beta preview version. diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_version.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_version.py index eae7c95b6fbd..2608e125b8d9 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_version.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "6.0.0b2" diff --git a/sdk/managedservices/azure-mgmt-managedservices/setup.py b/sdk/managedservices/azure-mgmt-managedservices/setup.py index 3e9607bbfe14..9f904f226cf8 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/setup.py +++ b/sdk/managedservices/azure-mgmt-managedservices/setup.py @@ -77,7 +77,7 @@ 'azure.mgmt', ]), install_requires=[ - 'msrest>=0.5.0', + 'msrest>=0.6.21', 'azure-common~=1.1', 'azure-mgmt-core>=1.2.0,<2.0.0', ], diff --git a/shared_requirements.txt b/shared_requirements.txt index 1d205e9c3f63..9a644ca22274 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -248,3 +248,4 @@ opentelemetry-sdk<2.0.0,>=1.0.0 #override azure-mgmt-keyvault msrest>=0.6.21 #override azure-mgmt-resource msrest>=0.6.21 #override azure-template azure-core<2.0.0,>=1.10.0 +#override azure-mgmt-managedservices msrest>=0.6.21 From 86575fcf3900af67903acf3151a2fa7ac54b1b84 Mon Sep 17 00:00:00 2001 From: PythonSdkPipelines Date: Thu, 22 Apr 2021 08:55:05 +0000 Subject: [PATCH 3/4] test --- ...gedservices.test_managedservices_crud.yaml | 490 ------------------ 1 file changed, 490 deletions(-) delete mode 100644 sdk/managedservices/azure-mgmt-managedservices/tests/recordings/test_mgmt_managedservices.test_managedservices_crud.yaml diff --git a/sdk/managedservices/azure-mgmt-managedservices/tests/recordings/test_mgmt_managedservices.test_managedservices_crud.yaml b/sdk/managedservices/azure-mgmt-managedservices/tests/recordings/test_mgmt_managedservices.test_managedservices_crud.yaml deleted file mode 100644 index 5cd1a08b69ce..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/tests/recordings/test_mgmt_managedservices.test_managedservices_crud.yaml +++ /dev/null @@ -1,490 +0,0 @@ -interactions: -- request: - body: '{"properties": {"description": "dpp", "authorizations": [{"principalId": - "d6f6c88a-5b7a-455e-ba40-ce146d4d3671", "roleDefinitionId": "acdd72a7-3385-48ef-bd42-f606fba81ae7"}], - "registrationDefinitionName": "Registration Test", "managedByTenantId": "bab3375b-6197-4a15-a44b-16c41faa91d7"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '287' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.4.34 - azure-mgmt-managedservices/1.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/8daec8c7-7567-47ff-9009-f0a4ec429a3c?api-version=2019-06-01 - response: - body: - string: '{"properties":{"registrationDefinitionName":"Registration Test","description":"dpp","managedByTenantId":"bab3375b-6197-4a15-a44b-16c41faa91d7","authorizations":[{"principalId":"d6f6c88a-5b7a-455e-ba40-ce146d4d3671","roleDefinitionId":"acdd72a7-3385-48ef-bd42-f606fba81ae7"}],"provisioningState":"Succeeded","managedByTenantName":"Default - Directory"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/8daec8c7-7567-47ff-9009-f0a4ec429a3c","type":"Microsoft.ManagedServices/registrationDefinitions","name":"8daec8c7-7567-47ff-9009-f0a4ec429a3c"}' - headers: - cache-control: - - no-cache - content-length: - - '611' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 04 Jul 2019 02:17:49 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created -- request: - body: 'b''{"properties": {"registrationDefinitionId": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/8daec8c7-7567-47ff-9009-f0a4ec429a3c"}}''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '195' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.4.34 - azure-mgmt-managedservices/1.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationAssignments/c0d5f994-63a1-484d-8c1e-a2ac825efd60?api-version=2019-06-01 - response: - body: - string: '{"properties":{"registrationDefinitionId":"subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/8daec8c7-7567-47ff-9009-f0a4ec429a3c","provisioningState":"Accepted"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationAssignments/c0d5f994-63a1-484d-8c1e-a2ac825efd60","type":"Microsoft.ManagedServices/registrationAssignments","name":"c0d5f994-63a1-484d-8c1e-a2ac825efd60"}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/operationStatuses/eyJmdWxseVF1YWxpZmllZFJlc291cmNlSWQiOiIvc3Vic2NyaXB0aW9ucy8wMDJiMzQ3Ny1iZmJmLTQ0MDItYjM3Ny02MDAzMTY4Yjc1ZDMvcHJvdmlkZXJzL01pY3Jvc29mdC5NYW5hZ2VkU2VydmljZXMvcmVnaXN0cmF0aW9uQXNzaWdubWVudHMvYzBkNWY5OTQtNjNhMS00ODRkLThjMWUtYTJhYzgyNWVmZDYwIiwiam9iSWQiOiJSZWdpc3RyYXRpb25Bc3NpZ25tZW50UHJvdmlzaW9uaW5nSm9iOjJEU046MkQxN0QzRUU3ODUwMzY3QjE0QTUyMTIyQjAyOEVBQzc4MjoyREMwRDVGOTk0OjNBMkQ2M0ExOjNBMkQ0ODREOjNBMkR8Q0VGM0RERUZFRUEyQUNFQiJ9?api-version=2019-06-01 - cache-control: - - no-cache - content-length: - - '485' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 04 Jul 2019 02:17:51 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.4.34 - azure-mgmt-managedservices/1.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/operationStatuses/eyJmdWxseVF1YWxpZmllZFJlc291cmNlSWQiOiIvc3Vic2NyaXB0aW9ucy8wMDJiMzQ3Ny1iZmJmLTQ0MDItYjM3Ny02MDAzMTY4Yjc1ZDMvcHJvdmlkZXJzL01pY3Jvc29mdC5NYW5hZ2VkU2VydmljZXMvcmVnaXN0cmF0aW9uQXNzaWdubWVudHMvYzBkNWY5OTQtNjNhMS00ODRkLThjMWUtYTJhYzgyNWVmZDYwIiwiam9iSWQiOiJSZWdpc3RyYXRpb25Bc3NpZ25tZW50UHJvdmlzaW9uaW5nSm9iOjJEU046MkQxN0QzRUU3ODUwMzY3QjE0QTUyMTIyQjAyOEVBQzc4MjoyREMwRDVGOTk0OjNBMkQ2M0ExOjNBMkQ0ODREOjNBMkR8Q0VGM0RERUZFRUEyQUNFQiJ9?api-version=2019-06-01 - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-cache - content-length: - - '22' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 04 Jul 2019 02:18:06 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,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.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.4.34 - azure-mgmt-managedservices/1.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationAssignments/c0d5f994-63a1-484d-8c1e-a2ac825efd60?api-version=2019-06-01 - response: - body: - string: '{"properties":{"registrationDefinitionId":"subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/8daec8c7-7567-47ff-9009-f0a4ec429a3c","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationAssignments/c0d5f994-63a1-484d-8c1e-a2ac825efd60","type":"Microsoft.ManagedServices/registrationAssignments","name":"c0d5f994-63a1-484d-8c1e-a2ac825efd60"}' - headers: - cache-control: - - no-cache - content-length: - - '486' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 04 Jul 2019 02:18:07 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,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.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.4.34 - azure-mgmt-managedservices/1.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/8daec8c7-7567-47ff-9009-f0a4ec429a3c?api-version=2019-06-01 - response: - body: - string: '{"properties":{"registrationDefinitionName":"Registration Test","description":"dpp","managedByTenantId":"bab3375b-6197-4a15-a44b-16c41faa91d7","authorizations":[{"principalId":"d6f6c88a-5b7a-455e-ba40-ce146d4d3671","roleDefinitionId":"acdd72a7-3385-48ef-bd42-f606fba81ae7"}],"provisioningState":"Succeeded","managedByTenantName":"Default - Directory"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/8daec8c7-7567-47ff-9009-f0a4ec429a3c","type":"Microsoft.ManagedServices/registrationDefinitions","name":"8daec8c7-7567-47ff-9009-f0a4ec429a3c"}' - headers: - cache-control: - - no-cache - content-length: - - '611' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 04 Jul 2019 02:18:08 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,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.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.4.34 - azure-mgmt-managedservices/1.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationAssignments/c0d5f994-63a1-484d-8c1e-a2ac825efd60?api-version=2019-06-01 - response: - body: - string: '{"properties":{"registrationDefinitionId":"subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/8daec8c7-7567-47ff-9009-f0a4ec429a3c","provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationAssignments/c0d5f994-63a1-484d-8c1e-a2ac825efd60","type":"Microsoft.ManagedServices/registrationAssignments","name":"c0d5f994-63a1-484d-8c1e-a2ac825efd60"}' - headers: - cache-control: - - no-cache - content-length: - - '486' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 04 Jul 2019 02:18:09 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,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.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.4.34 - azure-mgmt-managedservices/1.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationAssignments/c0d5f994-63a1-484d-8c1e-a2ac825efd60?api-version=2019-06-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 04 Jul 2019 02:18:10 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/operationStatuses/eyJmdWxseVF1YWxpZmllZFJlc291cmNlSWQiOiIvc3Vic2NyaXB0aW9ucy8wMDJiMzQ3Ny1iZmJmLTQ0MDItYjM3Ny02MDAzMTY4Yjc1ZDMvcHJvdmlkZXJzL01pY3Jvc29mdC5NYW5hZ2VkU2VydmljZXMvcmVnaXN0cmF0aW9uQXNzaWdubWVudHMvYzBkNWY5OTQtNjNhMS00ODRkLThjMWUtYTJhYzgyNWVmZDYwIiwiam9iSWQiOiJSZWdpc3RyYXRpb25Bc3NpZ25tZW50RGVwcm92aXNpb25pbmdKb2I6MkRTTjoyRDE3RDNFRTc4NTAzNjdCMTRBNTIxMjJCMDI4RUFDNzgyOjJEQzBENUY5OTQ6M0EyRDYzQTE6M0EyRDQ4NEQ6M0F8NEY3MkVBODVDRDg5NEQyOCJ9?api-version=2019-06-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14997' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.4.34 - azure-mgmt-managedservices/1.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/operationStatuses/eyJmdWxseVF1YWxpZmllZFJlc291cmNlSWQiOiIvc3Vic2NyaXB0aW9ucy8wMDJiMzQ3Ny1iZmJmLTQ0MDItYjM3Ny02MDAzMTY4Yjc1ZDMvcHJvdmlkZXJzL01pY3Jvc29mdC5NYW5hZ2VkU2VydmljZXMvcmVnaXN0cmF0aW9uQXNzaWdubWVudHMvYzBkNWY5OTQtNjNhMS00ODRkLThjMWUtYTJhYzgyNWVmZDYwIiwiam9iSWQiOiJSZWdpc3RyYXRpb25Bc3NpZ25tZW50RGVwcm92aXNpb25pbmdKb2I6MkRTTjoyRDE3RDNFRTc4NTAzNjdCMTRBNTIxMjJCMDI4RUFDNzgyOjJEQzBENUY5OTQ6M0EyRDYzQTE6M0EyRDQ4NEQ6M0F8NEY3MkVBODVDRDg5NEQyOCJ9?api-version=2019-06-01 - response: - body: - string: '{"status":"Succeeded"}' - headers: - cache-control: - - no-cache - content-length: - - '22' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 04 Jul 2019 02:18:25 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,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.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.4.34 - azure-mgmt-managedservices/1.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/8daec8c7-7567-47ff-9009-f0a4ec429a3c?api-version=2019-06-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 04 Jul 2019 02:18:27 GMT - expires: - - '-1' - 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 - User-Agent: - - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.4.34 - azure-mgmt-managedservices/1.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationAssignments?api-version=2019-06-01 - response: - body: - string: '{"value":[]}' - headers: - cache-control: - - no-cache - content-length: - - '12' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 04 Jul 2019 02:18:27 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,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.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.4.34 - azure-mgmt-managedservices/1.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions?api-version=2019-06-01 - response: - body: - string: '{"value":[{"properties":{"registrationDefinitionName":"cliredisuutqb6goqwftvakd","managedByTenantId":"bab3375b-6197-4a15-a44b-16c41faa91d7","authorizations":[{"principalId":"d6f6c88a-5b7a-455e-ba40-ce146d4d3671","roleDefinitionId":"acdd72a7-3385-48ef-bd42-f606fba81ae7"}],"provisioningState":"Succeeded","managedByTenantName":"Default - Directory"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/0709a568-e9bd-4ca4-b9e1-904bb4c6909a","type":"Microsoft.ManagedServices/registrationDefinitions","name":"0709a568-e9bd-4ca4-b9e1-904bb4c6909a"},{"properties":{"registrationDefinitionName":"name","description":"mydef","managedByTenantId":"bab3375b-6197-4a15-a44b-16c41faa91d7","authorizations":[{"principalId":"d6f6c88a-5b7a-455e-ba40-ce146d4d3671","roleDefinitionId":"acdd72a7-3385-48ef-bd42-f606fba81ae7"}],"provisioningState":"Succeeded","managedByTenantName":"Default - Directory"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/08c145ff-8039-4ba3-8b3a-9adc1aca182c","type":"Microsoft.ManagedServices/registrationDefinitions","name":"08c145ff-8039-4ba3-8b3a-9adc1aca182c"},{"properties":{"registrationDefinitionName":"clirediss6fqq6tfq7hzhtk7","managedByTenantId":"bab3375b-6197-4a15-a44b-16c41faa91d7","authorizations":[{"principalId":"d6f6c88a-5b7a-455e-ba40-ce146d4d3671","roleDefinitionId":"acdd72a7-3385-48ef-bd42-f606fba81ae7"}],"provisioningState":"Succeeded","managedByTenantName":"Default - Directory"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/491653b2-657e-4ba7-aab9-b6d03de5026a","type":"Microsoft.ManagedServices/registrationDefinitions","name":"491653b2-657e-4ba7-aab9-b6d03de5026a"},{"properties":{"registrationDefinitionName":"rajivnan-Registration - Test","description":"dpp","managedByTenantId":"bab3375b-6197-4a15-a44b-16c41faa91d7","authorizations":[{"principalId":"d6f6c88a-5b7a-455e-ba40-ce146d4d3671","roleDefinitionId":"acdd72a7-3385-48ef-bd42-f606fba81ae7"}],"provisioningState":"Succeeded","managedByTenantName":"Default - Directory"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/4abd19b9-6156-4b13-866b-6d2dad11706c","type":"Microsoft.ManagedServices/registrationDefinitions","name":"4abd19b9-6156-4b13-866b-6d2dad11706c"},{"properties":{"registrationDefinitionName":"name","description":"mydef","managedByTenantId":"bab3375b-6197-4a15-a44b-16c41faa91d7","authorizations":[{"principalId":"d6f6c88a-5b7a-455e-ba40-ce146d4d3671","roleDefinitionId":"acdd72a7-3385-48ef-bd42-f606fba81ae7"}],"provisioningState":"Succeeded","managedByTenantName":"Default - Directory"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/62375e93-2886-4116-9efc-c19a3177f3c8","type":"Microsoft.ManagedServices/registrationDefinitions","name":"62375e93-2886-4116-9efc-c19a3177f3c8"},{"properties":{"registrationDefinitionName":"cliredis7r6wjswfg3ggl4aq","managedByTenantId":"bab3375b-6197-4a15-a44b-16c41faa91d7","authorizations":[{"principalId":"d6f6c88a-5b7a-455e-ba40-ce146d4d3671","roleDefinitionId":"acdd72a7-3385-48ef-bd42-f606fba81ae7"}],"provisioningState":"Succeeded","managedByTenantName":"Default - Directory"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/7eddbcf1-0ada-4d80-b3fe-320ab2831a86","type":"Microsoft.ManagedServices/registrationDefinitions","name":"7eddbcf1-0ada-4d80-b3fe-320ab2831a86"},{"properties":{"registrationDefinitionName":"noname","description":"nonnamemydef","managedByTenantId":"bab3375b-6197-4a15-a44b-16c41faa91d7","authorizations":[{"principalId":"d6f6c88a-5b7a-455e-ba40-ce146d4d3671","roleDefinitionId":"acdd72a7-3385-48ef-bd42-f606fba81ae7"}],"provisioningState":"Succeeded","managedByTenantName":"Default - Directory"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/81261177-454c-4a10-a445-7b449d293fd8","type":"Microsoft.ManagedServices/registrationDefinitions","name":"81261177-454c-4a10-a445-7b449d293fd8"},{"properties":{"registrationDefinitionName":"cliredisxfnlkfaj7choibwx","managedByTenantId":"bab3375b-6197-4a15-a44b-16c41faa91d7","authorizations":[{"principalId":"d6f6c88a-5b7a-455e-ba40-ce146d4d3671","roleDefinitionId":"acdd72a7-3385-48ef-bd42-f606fba81ae7"}],"provisioningState":"Succeeded","managedByTenantName":"Default - Directory"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/81f2df6e-3da5-4626-8fb3-21bc40caa30a","type":"Microsoft.ManagedServices/registrationDefinitions","name":"81f2df6e-3da5-4626-8fb3-21bc40caa30a"},{"properties":{"registrationDefinitionName":"name","description":"mydef","managedByTenantId":"bab3375b-6197-4a15-a44b-16c41faa91d7","authorizations":[{"principalId":"d6f6c88a-5b7a-455e-ba40-ce146d4d3671","roleDefinitionId":"acdd72a7-3385-48ef-bd42-f606fba81ae7"}],"provisioningState":"Succeeded","managedByTenantName":"Default - Directory"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/a477c862-c865-4856-8f62-859442d118d4","type":"Microsoft.ManagedServices/registrationDefinitions","name":"a477c862-c865-4856-8f62-859442d118d4"},{"properties":{"registrationDefinitionName":"cliredisu42pcho5qfzeoea4","managedByTenantId":"bab3375b-6197-4a15-a44b-16c41faa91d7","authorizations":[{"principalId":"d6f6c88a-5b7a-455e-ba40-ce146d4d3671","roleDefinitionId":"acdd72a7-3385-48ef-bd42-f606fba81ae7"}],"provisioningState":"Succeeded","managedByTenantName":"Default - Directory"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/afee244e-9a4d-41c9-a64d-8d7fc7124717","type":"Microsoft.ManagedServices/registrationDefinitions","name":"afee244e-9a4d-41c9-a64d-8d7fc7124717"},{"properties":{"registrationDefinitionName":"name","description":"mydef","managedByTenantId":"bab3375b-6197-4a15-a44b-16c41faa91d7","authorizations":[{"principalId":"d6f6c88a-5b7a-455e-ba40-ce146d4d3671","roleDefinitionId":"acdd72a7-3385-48ef-bd42-f606fba81ae7"}],"provisioningState":"Succeeded","managedByTenantName":"Default - Directory"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/b6519b57-48ab-4c81-a1f8-fd1219401021","type":"Microsoft.ManagedServices/registrationDefinitions","name":"b6519b57-48ab-4c81-a1f8-fd1219401021"},{"properties":{"registrationDefinitionName":"name","description":"mydef","managedByTenantId":"bab3375b-6197-4a15-a44b-16c41faa91d7","authorizations":[{"principalId":"d6f6c88a-5b7a-455e-ba40-ce146d4d3671","roleDefinitionId":"acdd72a7-3385-48ef-bd42-f606fba81ae7"}],"provisioningState":"Succeeded","managedByTenantName":"Default - Directory"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/ece4cad8-1ad8-4c55-be0b-eb2950871172","type":"Microsoft.ManagedServices/registrationDefinitions","name":"ece4cad8-1ad8-4c55-be0b-eb2950871172"}]}' - headers: - cache-control: - - no-cache - content-length: - - '7242' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 04 Jul 2019 02:18:28 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -version: 1 From ba85ffede8db3f5b9b0546da30cde1b719102eee Mon Sep 17 00:00:00 2001 From: "Yan Zhang (WICRESOFT NORTH AMERICA LTD)" Date: Thu, 22 Apr 2021 17:42:53 +0800 Subject: [PATCH 4/4] modify version --- sdk/managedservices/azure-mgmt-managedservices/CHANGELOG.md | 2 +- .../azure/mgmt/managedservices/_version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/managedservices/azure-mgmt-managedservices/CHANGELOG.md b/sdk/managedservices/azure-mgmt-managedservices/CHANGELOG.md index 9d50b64a1656..b214ebcf9ffc 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/CHANGELOG.md +++ b/sdk/managedservices/azure-mgmt-managedservices/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 6.0.0b2 (2021-04-22) +## 6.0.0 (2021-04-22) **Features** diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_version.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_version.py index 2608e125b8d9..caf312bd2d0b 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_version.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0b2" +VERSION = "6.0.0"