diff --git a/azure-mgmt-managementgroups/HISTORY.rst b/azure-mgmt-managementgroups/HISTORY.rst index 8924d5d6c445..9f05fb2833bd 100644 --- a/azure-mgmt-managementgroups/HISTORY.rst +++ b/azure-mgmt-managementgroups/HISTORY.rst @@ -3,7 +3,7 @@ Release History =============== -0.1.0 (1970-01-01) +0.1.0 (2018-05-31) ++++++++++++++++++ * Initial Release diff --git a/azure-mgmt-managementgroups/README.rst b/azure-mgmt-managementgroups/README.rst index f1037e9f39de..972b9e4942b3 100644 --- a/azure-mgmt-managementgroups/README.rst +++ b/azure-mgmt-managementgroups/README.rst @@ -37,7 +37,7 @@ Usage ===== For code examples, see `Management Groups -`__ +`__ on docs.microsoft.com. diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/management_groups_api.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/management_groups_api.py index b69c12875600..46f344c5e711 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/management_groups_api.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/management_groups_api.py @@ -9,13 +9,18 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling +import uuid from .operations.management_groups_operations import ManagementGroupsOperations from .operations.management_group_subscriptions_operations import ManagementGroupSubscriptionsOperations from .operations.operations import Operations +from .operations.entities_operations import EntitiesOperations from . import models @@ -46,10 +51,8 @@ def __init__( self.credentials = credentials -class ManagementGroupsAPI(object): - """The Azure Management Groups API enables consolidation of multiple - subscriptions/resources into an organizational hierarchy and centrally - manage access control, policies, alerting and reporting for those resources. +class ManagementGroupsAPI(SDKClient): + """The Azure Management Groups API enables consolidation of multiple subscriptions/resources into an organizational hierarchy and centrally manage access control, policies, alerting and reporting for those resources. :ivar config: Configuration for client. :vartype config: ManagementGroupsAPIConfiguration @@ -60,6 +63,8 @@ class ManagementGroupsAPI(object): :vartype management_group_subscriptions: azure.mgmt.managementgroups.operations.ManagementGroupSubscriptionsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.managementgroups.operations.Operations + :ivar entities: Entities operations + :vartype entities: azure.mgmt.managementgroups.operations.EntitiesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -71,10 +76,10 @@ def __init__( self, credentials, base_url=None): self.config = ManagementGroupsAPIConfiguration(credentials, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(ManagementGroupsAPI, 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 = '2017-11-01-preview' + self.api_version = '2018-03-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -84,3 +89,167 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) + self.entities = EntitiesOperations( + self._client, self.config, self._serialize, self._deserialize) + + def check_name_availability( + self, check_name_availability_request, custom_headers=None, raw=False, **operation_config): + """Checks if the specified management group name is valid and unique. + + :param check_name_availability_request: Management group name + availability check parameters. + :type check_name_availability_request: + ~azure.mgmt.managementgroups.models.CheckNameAvailabilityRequest + :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: CheckNameAvailabilityResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.managementgroups.models.CheckNameAvailabilityResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.check_name_availability.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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(check_name_availability_request, 'CheckNameAvailabilityRequest') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CheckNameAvailabilityResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/providers/Microsoft.Management/checkNameAvailability'} + + def start_tenant_backfill( + self, custom_headers=None, raw=False, **operation_config): + """Starts backfilling subscriptions for the Tenant. + + :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: TenantBackfillStatusResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.managementgroups.models.TenantBackfillStatusResult + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.start_tenant_backfill.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('TenantBackfillStatusResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + start_tenant_backfill.metadata = {'url': '/providers/Microsoft.Management/startTenantBackfill'} + + def tenant_backfill_status( + self, custom_headers=None, raw=False, **operation_config): + """Gets tenant backfill status. + + :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: TenantBackfillStatusResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.managementgroups.models.TenantBackfillStatusResult + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.tenant_backfill_status.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('TenantBackfillStatusResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + tenant_backfill_status.metadata = {'url': '/providers/Microsoft.Management/tenantBackfillStatus'} diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/__init__.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/__init__.py index 941635d07c58..72c19c0a5a09 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/__init__.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/__init__.py @@ -9,30 +9,85 @@ # regenerated. # -------------------------------------------------------------------------- -from .error_details import ErrorDetails -from .error_response import ErrorResponse, ErrorResponseException -from .operation_display import OperationDisplay -from .operation import Operation -from .management_group_info import ManagementGroupInfo -from .parent_group_info import ParentGroupInfo -from .management_group_details import ManagementGroupDetails -from .management_group_child_info import ManagementGroupChildInfo -from .management_group import ManagementGroup -from .create_management_group_request import CreateManagementGroupRequest +try: + from .error_details_py3 import ErrorDetails + from .error_response_py3 import ErrorResponse, ErrorResponseException + from .operation_display_properties_py3 import OperationDisplayProperties + from .operation_py3 import Operation + from .check_name_availability_result_py3 import CheckNameAvailabilityResult + from .tenant_backfill_status_result_py3 import TenantBackfillStatusResult + from .management_group_info_py3 import ManagementGroupInfo + from .parent_group_info_py3 import ParentGroupInfo + from .management_group_details_py3 import ManagementGroupDetails + from .management_group_child_info_py3 import ManagementGroupChildInfo + from .management_group_py3 import ManagementGroup + from .operation_results_py3 import OperationResults + from .entity_parent_group_info_py3 import EntityParentGroupInfo + from .entity_info_py3 import EntityInfo + from .entity_hierarchy_item_py3 import EntityHierarchyItem + from .patch_management_group_request_py3 import PatchManagementGroupRequest + from .create_parent_group_info_py3 import CreateParentGroupInfo + from .create_management_group_details_py3 import CreateManagementGroupDetails + from .create_management_group_child_info_py3 import CreateManagementGroupChildInfo + from .create_management_group_request_py3 import CreateManagementGroupRequest + from .check_name_availability_request_py3 import CheckNameAvailabilityRequest +except (SyntaxError, ImportError): + from .error_details import ErrorDetails + from .error_response import ErrorResponse, ErrorResponseException + from .operation_display_properties import OperationDisplayProperties + from .operation import Operation + from .check_name_availability_result import CheckNameAvailabilityResult + from .tenant_backfill_status_result import TenantBackfillStatusResult + from .management_group_info import ManagementGroupInfo + from .parent_group_info import ParentGroupInfo + from .management_group_details import ManagementGroupDetails + from .management_group_child_info import ManagementGroupChildInfo + from .management_group import ManagementGroup + from .operation_results import OperationResults + from .entity_parent_group_info import EntityParentGroupInfo + from .entity_info import EntityInfo + from .entity_hierarchy_item import EntityHierarchyItem + from .patch_management_group_request import PatchManagementGroupRequest + from .create_parent_group_info import CreateParentGroupInfo + from .create_management_group_details import CreateManagementGroupDetails + from .create_management_group_child_info import CreateManagementGroupChildInfo + from .create_management_group_request import CreateManagementGroupRequest + from .check_name_availability_request import CheckNameAvailabilityRequest from .management_group_info_paged import ManagementGroupInfoPaged from .operation_paged import OperationPaged +from .entity_info_paged import EntityInfoPaged +from .management_groups_api_enums import ( + Reason, + Status, + Type, +) __all__ = [ 'ErrorDetails', 'ErrorResponse', 'ErrorResponseException', - 'OperationDisplay', + 'OperationDisplayProperties', 'Operation', + 'CheckNameAvailabilityResult', + 'TenantBackfillStatusResult', 'ManagementGroupInfo', 'ParentGroupInfo', 'ManagementGroupDetails', 'ManagementGroupChildInfo', 'ManagementGroup', + 'OperationResults', + 'EntityParentGroupInfo', + 'EntityInfo', + 'EntityHierarchyItem', + 'PatchManagementGroupRequest', + 'CreateParentGroupInfo', + 'CreateManagementGroupDetails', + 'CreateManagementGroupChildInfo', 'CreateManagementGroupRequest', + 'CheckNameAvailabilityRequest', 'ManagementGroupInfoPaged', 'OperationPaged', + 'EntityInfoPaged', + 'Reason', + 'Status', + 'Type', ] diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_request.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_request.py new file mode 100644 index 000000000000..9bc8379bb94f --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_request.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class CheckNameAvailabilityRequest(Model): + """Management group name availability check parameters. + + :param name: the name to check for availability + :type name: str + :param type: fully qualified resource type which includes provider + namespace. Possible values include: + '/providers/Microsoft.Management/managementGroups' + :type type: str or ~azure.mgmt.managementgroups.models.Type + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'Type'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_request_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_request_py3.py new file mode 100644 index 000000000000..2b020be13871 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_request_py3.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class CheckNameAvailabilityRequest(Model): + """Management group name availability check parameters. + + :param name: the name to check for availability + :type name: str + :param type: fully qualified resource type which includes provider + namespace. Possible values include: + '/providers/Microsoft.Management/managementGroups' + :type type: str or ~azure.mgmt.managementgroups.models.Type + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'Type'}, + } + + def __init__(self, *, name: str=None, type=None, **kwargs) -> None: + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.type = type diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_result.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_result.py new file mode 100644 index 000000000000..f6cd42f2279e --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_result.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class CheckNameAvailabilityResult(Model): + """Describes the result of the request to check management group name + availability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: Required. True indicates name is valid and + available. False indicates the name is invalid, unavailable, or both. + :vartype name_available: bool + :ivar reason: Required if nameAvailable == false. Invalid indicates the + name provided does not match the resource provider's naming requirements + (incorrect length, unsupported characters, etc.) AlreadyExists indicates + that the name is already in use and is therefore unavailable. Possible + values include: 'Invalid', 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.managementgroups.models.Reason + :ivar message: Required if nameAvailable == false. Localized. If reason == + invalid, provide the user with the reason why the given name is invalid, + and provide the resource naming requirements so that the user can select a + valid name. If reason == AlreadyExists, explain that is already in use, + and direct them to select a different name. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'Reason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_result_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_result_py3.py new file mode 100644 index 000000000000..94a0cbc8ae0b --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/check_name_availability_result_py3.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class CheckNameAvailabilityResult(Model): + """Describes the result of the request to check management group name + availability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: Required. True indicates name is valid and + available. False indicates the name is invalid, unavailable, or both. + :vartype name_available: bool + :ivar reason: Required if nameAvailable == false. Invalid indicates the + name provided does not match the resource provider's naming requirements + (incorrect length, unsupported characters, etc.) AlreadyExists indicates + that the name is already in use and is therefore unavailable. Possible + values include: 'Invalid', 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.managementgroups.models.Reason + :ivar message: Required if nameAvailable == false. Localized. If reason == + invalid, provide the user with the reason why the given name is invalid, + and provide the resource naming requirements so that the user can select a + valid name. If reason == AlreadyExists, explain that is already in use, + and direct them to select a different name. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'Reason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_child_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_child_info.py new file mode 100644 index 000000000000..05c0e10b664e --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_child_info.py @@ -0,0 +1,67 @@ +# 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 msrest.serialization import Model + + +class CreateManagementGroupChildInfo(Model): + """The child information of a management group used during creation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of child resource. The fully qualified resource type + which includes provider namespace (e.g. + /providers/Microsoft.Management/managementGroups). Possible values + include: '/providers/Microsoft.Management/managementGroups', + '/subscriptions' + :vartype type: str or ~azure.mgmt.managementgroups.models.enum + :ivar id: The fully qualified ID for the child resource (management group + or subscription). For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar name: The name of the child entity. + :vartype name: str + :ivar display_name: The friendly name of the child resource. + :vartype display_name: str + :ivar roles: The roles definitions associated with the management group. + :vartype roles: list[str] + :ivar children: The list of children. + :vartype children: + list[~azure.mgmt.managementgroups.models.CreateManagementGroupChildInfo] + """ + + _validation = { + 'type': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'roles': {'readonly': True}, + 'children': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + 'children': {'key': 'children', 'type': '[CreateManagementGroupChildInfo]'}, + } + + def __init__(self, **kwargs): + super(CreateManagementGroupChildInfo, self).__init__(**kwargs) + self.type = None + self.id = None + self.name = None + self.display_name = None + self.roles = None + self.children = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_child_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_child_info_py3.py new file mode 100644 index 000000000000..9a9850a4edf6 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_child_info_py3.py @@ -0,0 +1,67 @@ +# 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 msrest.serialization import Model + + +class CreateManagementGroupChildInfo(Model): + """The child information of a management group used during creation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of child resource. The fully qualified resource type + which includes provider namespace (e.g. + /providers/Microsoft.Management/managementGroups). Possible values + include: '/providers/Microsoft.Management/managementGroups', + '/subscriptions' + :vartype type: str or ~azure.mgmt.managementgroups.models.enum + :ivar id: The fully qualified ID for the child resource (management group + or subscription). For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar name: The name of the child entity. + :vartype name: str + :ivar display_name: The friendly name of the child resource. + :vartype display_name: str + :ivar roles: The roles definitions associated with the management group. + :vartype roles: list[str] + :ivar children: The list of children. + :vartype children: + list[~azure.mgmt.managementgroups.models.CreateManagementGroupChildInfo] + """ + + _validation = { + 'type': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'roles': {'readonly': True}, + 'children': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + 'children': {'key': 'children', 'type': '[CreateManagementGroupChildInfo]'}, + } + + def __init__(self, **kwargs) -> None: + super(CreateManagementGroupChildInfo, self).__init__(**kwargs) + self.type = None + self.id = None + self.name = None + self.display_name = None + self.roles = None + self.children = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_details.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_details.py new file mode 100644 index 000000000000..1c35ff148136 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_details.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class CreateManagementGroupDetails(Model): + """The details of a management group used during creation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar version: The version number of the object. + :vartype version: float + :ivar updated_time: The date and time when this object was last updated. + :vartype updated_time: datetime + :ivar updated_by: The identity of the principal or process that updated + the object. + :vartype updated_by: str + :param parent: Parent. + :type parent: ~azure.mgmt.managementgroups.models.CreateParentGroupInfo + """ + + _validation = { + 'version': {'readonly': True}, + 'updated_time': {'readonly': True}, + 'updated_by': {'readonly': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'float'}, + 'updated_time': {'key': 'updatedTime', 'type': 'iso-8601'}, + 'updated_by': {'key': 'updatedBy', 'type': 'str'}, + 'parent': {'key': 'parent', 'type': 'CreateParentGroupInfo'}, + } + + def __init__(self, **kwargs): + super(CreateManagementGroupDetails, self).__init__(**kwargs) + self.version = None + self.updated_time = None + self.updated_by = None + self.parent = kwargs.get('parent', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_details_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_details_py3.py new file mode 100644 index 000000000000..d0b2dab1aacf --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_details_py3.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class CreateManagementGroupDetails(Model): + """The details of a management group used during creation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar version: The version number of the object. + :vartype version: float + :ivar updated_time: The date and time when this object was last updated. + :vartype updated_time: datetime + :ivar updated_by: The identity of the principal or process that updated + the object. + :vartype updated_by: str + :param parent: Parent. + :type parent: ~azure.mgmt.managementgroups.models.CreateParentGroupInfo + """ + + _validation = { + 'version': {'readonly': True}, + 'updated_time': {'readonly': True}, + 'updated_by': {'readonly': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'float'}, + 'updated_time': {'key': 'updatedTime', 'type': 'iso-8601'}, + 'updated_by': {'key': 'updatedBy', 'type': 'str'}, + 'parent': {'key': 'parent', 'type': 'CreateParentGroupInfo'}, + } + + def __init__(self, *, parent=None, **kwargs) -> None: + super(CreateManagementGroupDetails, self).__init__(**kwargs) + self.version = None + self.updated_time = None + self.updated_by = None + self.parent = parent diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request.py index 78ec7516aede..ac64070a79c4 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request.py @@ -15,20 +15,60 @@ class CreateManagementGroupRequest(Model): """Management group creation parameters. - :param display_name: The friendly name of the management group. - :type display_name: str - :param parent_id: (Optional) The fully qualified ID for the parent - management group. For example, + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - :type parent_id: str + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :param name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :type name: str + :ivar tenant_id: The AAD Tenant ID associated with the management group. + For example, 00000000-0000-0000-0000-000000000000 + :vartype tenant_id: str + :param display_name: The friendly name of the management group. If no + value is passed then this field will be set to the groupId. + :type display_name: str + :ivar roles: The roles definitions associated with the management group. + :vartype roles: list[str] + :param details: Details. + :type details: + ~azure.mgmt.managementgroups.models.CreateManagementGroupDetails + :ivar children: The list of children. + :vartype children: + list[~azure.mgmt.managementgroups.models.CreateManagementGroupChildInfo] """ + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'roles': {'readonly': True}, + 'children': {'readonly': True}, + } + _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'parent_id': {'key': 'parentId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'roles': {'key': 'properties.roles', 'type': '[str]'}, + 'details': {'key': 'properties.details', 'type': 'CreateManagementGroupDetails'}, + 'children': {'key': 'properties.children', 'type': '[CreateManagementGroupChildInfo]'}, } - def __init__(self, display_name=None, parent_id=None): - super(CreateManagementGroupRequest, self).__init__() - self.display_name = display_name - self.parent_id = parent_id + def __init__(self, **kwargs): + super(CreateManagementGroupRequest, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = kwargs.get('name', None) + self.tenant_id = None + self.display_name = kwargs.get('display_name', None) + self.roles = None + self.details = kwargs.get('details', None) + self.children = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request_py3.py new file mode 100644 index 000000000000..dfbcaa65a532 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_management_group_request_py3.py @@ -0,0 +1,74 @@ +# 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 msrest.serialization import Model + + +class CreateManagementGroupRequest(Model): + """Management group creation parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :param name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :type name: str + :ivar tenant_id: The AAD Tenant ID associated with the management group. + For example, 00000000-0000-0000-0000-000000000000 + :vartype tenant_id: str + :param display_name: The friendly name of the management group. If no + value is passed then this field will be set to the groupId. + :type display_name: str + :ivar roles: The roles definitions associated with the management group. + :vartype roles: list[str] + :param details: Details. + :type details: + ~azure.mgmt.managementgroups.models.CreateManagementGroupDetails + :ivar children: The list of children. + :vartype children: + list[~azure.mgmt.managementgroups.models.CreateManagementGroupChildInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'roles': {'readonly': True}, + 'children': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'roles': {'key': 'properties.roles', 'type': '[str]'}, + 'details': {'key': 'properties.details', 'type': 'CreateManagementGroupDetails'}, + 'children': {'key': 'properties.children', 'type': '[CreateManagementGroupChildInfo]'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, details=None, **kwargs) -> None: + super(CreateManagementGroupRequest, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = name + self.tenant_id = None + self.display_name = display_name + self.roles = None + self.details = details + self.children = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_parent_group_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_parent_group_info.py new file mode 100644 index 000000000000..34f31e6efcff --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_parent_group_info.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class CreateParentGroupInfo(Model): + """(Optional) The ID of the parent management group used during creation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: The fully qualified ID for the parent management group. For + example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type id: str + :ivar name: The name of the parent management group + :vartype name: str + :ivar display_name: The friendly name of the parent management group. + :vartype display_name: str + """ + + _validation = { + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreateParentGroupInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = None + self.display_name = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_parent_group_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_parent_group_info_py3.py new file mode 100644 index 000000000000..d71815c12e1b --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/create_parent_group_info_py3.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class CreateParentGroupInfo(Model): + """(Optional) The ID of the parent management group used during creation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: The fully qualified ID for the parent management group. For + example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type id: str + :ivar name: The name of the parent management group + :vartype name: str + :ivar display_name: The friendly name of the parent management group. + :vartype display_name: str + """ + + _validation = { + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(CreateParentGroupInfo, self).__init__(**kwargs) + self.id = id + self.name = None + self.display_name = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_hierarchy_item.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_hierarchy_item.py new file mode 100644 index 000000000000..9ea06db4eecf --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_hierarchy_item.py @@ -0,0 +1,62 @@ +# 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 msrest.serialization import Model + + +class EntityHierarchyItem(Model): + """The management group details for the hierarchy view. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param display_name: The friendly name of the management group. + :type display_name: str + :param permissions: Permissions. Possible values include: 'noaccess', + 'view', 'edit', 'delete' + :type permissions: str or ~azure.mgmt.managementgroups.models.enum + :param children: The list of children. + :type children: + list[~azure.mgmt.managementgroups.models.EntityHierarchyItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'permissions': {'key': 'properties.permissions', 'type': 'str'}, + 'children': {'key': 'properties.children', 'type': '[EntityHierarchyItem]'}, + } + + def __init__(self, **kwargs): + super(EntityHierarchyItem, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.display_name = kwargs.get('display_name', None) + self.permissions = kwargs.get('permissions', None) + self.children = kwargs.get('children', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_hierarchy_item_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_hierarchy_item_py3.py new file mode 100644 index 000000000000..a1c51a63ae21 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_hierarchy_item_py3.py @@ -0,0 +1,62 @@ +# 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 msrest.serialization import Model + + +class EntityHierarchyItem(Model): + """The management group details for the hierarchy view. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param display_name: The friendly name of the management group. + :type display_name: str + :param permissions: Permissions. Possible values include: 'noaccess', + 'view', 'edit', 'delete' + :type permissions: str or ~azure.mgmt.managementgroups.models.enum + :param children: The list of children. + :type children: + list[~azure.mgmt.managementgroups.models.EntityHierarchyItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'permissions': {'key': 'properties.permissions', 'type': 'str'}, + 'children': {'key': 'properties.children', 'type': '[EntityHierarchyItem]'}, + } + + def __init__(self, *, display_name: str=None, permissions=None, children=None, **kwargs) -> None: + super(EntityHierarchyItem, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.display_name = display_name + self.permissions = permissions + self.children = children diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info.py new file mode 100644 index 000000000000..5444b8975f55 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info.py @@ -0,0 +1,86 @@ +# 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 msrest.serialization import Model + + +class EntityInfo(Model): + """The entity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the entity. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the entity. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param tenant_id: The AAD Tenant ID associated with the entity. For + example, 00000000-0000-0000-0000-000000000000 + :type tenant_id: str + :param display_name: The friendly name of the management group. + :type display_name: str + :param parent: Parent. + :type parent: ~azure.mgmt.managementgroups.models.EntityParentGroupInfo + :param permissions: Permissions. Possible values include: 'noaccess', + 'view', 'edit', 'delete' + :type permissions: str or ~azure.mgmt.managementgroups.models.enum + :param inherited_permissions: Inherited Permissions. Possible values + include: 'noaccess', 'view', 'edit', 'delete' + :type inherited_permissions: str or + ~azure.mgmt.managementgroups.models.enum + :param number_of_descendants: Number of Descendants. + :type number_of_descendants: int + :param parent_display_name_chain: The parent display name chain from the + root group to the immediate parent + :type parent_display_name_chain: list[str] + :param parent_name_chain: The parent name chain from the root group to the + immediate parent + :type parent_name_chain: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'parent': {'key': 'properties.parent', 'type': 'EntityParentGroupInfo'}, + 'permissions': {'key': 'properties.permissions', 'type': 'str'}, + 'inherited_permissions': {'key': 'properties.inheritedPermissions', 'type': 'str'}, + 'number_of_descendants': {'key': 'properties.numberOfDescendants', 'type': 'int'}, + 'parent_display_name_chain': {'key': 'properties.parentDisplayNameChain', 'type': '[str]'}, + 'parent_name_chain': {'key': 'properties.parentNameChain', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(EntityInfo, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tenant_id = kwargs.get('tenant_id', None) + self.display_name = kwargs.get('display_name', None) + self.parent = kwargs.get('parent', None) + self.permissions = kwargs.get('permissions', None) + self.inherited_permissions = kwargs.get('inherited_permissions', None) + self.number_of_descendants = kwargs.get('number_of_descendants', None) + self.parent_display_name_chain = kwargs.get('parent_display_name_chain', None) + self.parent_name_chain = kwargs.get('parent_name_chain', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_paged.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_paged.py new file mode 100644 index 000000000000..0bcfc102560d --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class EntityInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`EntityInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[EntityInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(EntityInfoPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_py3.py new file mode 100644 index 000000000000..8949d968d284 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_py3.py @@ -0,0 +1,86 @@ +# 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 msrest.serialization import Model + + +class EntityInfo(Model): + """The entity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the entity. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the entity. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param tenant_id: The AAD Tenant ID associated with the entity. For + example, 00000000-0000-0000-0000-000000000000 + :type tenant_id: str + :param display_name: The friendly name of the management group. + :type display_name: str + :param parent: Parent. + :type parent: ~azure.mgmt.managementgroups.models.EntityParentGroupInfo + :param permissions: Permissions. Possible values include: 'noaccess', + 'view', 'edit', 'delete' + :type permissions: str or ~azure.mgmt.managementgroups.models.enum + :param inherited_permissions: Inherited Permissions. Possible values + include: 'noaccess', 'view', 'edit', 'delete' + :type inherited_permissions: str or + ~azure.mgmt.managementgroups.models.enum + :param number_of_descendants: Number of Descendants. + :type number_of_descendants: int + :param parent_display_name_chain: The parent display name chain from the + root group to the immediate parent + :type parent_display_name_chain: list[str] + :param parent_name_chain: The parent name chain from the root group to the + immediate parent + :type parent_name_chain: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'parent': {'key': 'properties.parent', 'type': 'EntityParentGroupInfo'}, + 'permissions': {'key': 'properties.permissions', 'type': 'str'}, + 'inherited_permissions': {'key': 'properties.inheritedPermissions', 'type': 'str'}, + 'number_of_descendants': {'key': 'properties.numberOfDescendants', 'type': 'int'}, + 'parent_display_name_chain': {'key': 'properties.parentDisplayNameChain', 'type': '[str]'}, + 'parent_name_chain': {'key': 'properties.parentNameChain', 'type': '[str]'}, + } + + def __init__(self, *, tenant_id: str=None, display_name: str=None, parent=None, permissions=None, inherited_permissions=None, number_of_descendants: int=None, parent_display_name_chain=None, parent_name_chain=None, **kwargs) -> None: + super(EntityInfo, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tenant_id = tenant_id + self.display_name = display_name + self.parent = parent + self.permissions = permissions + self.inherited_permissions = inherited_permissions + self.number_of_descendants = number_of_descendants + self.parent_display_name_chain = parent_display_name_chain + self.parent_name_chain = parent_name_chain diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_parent_group_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_parent_group_info.py new file mode 100644 index 000000000000..7e26dca6f12c --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_parent_group_info.py @@ -0,0 +1,30 @@ +# 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 msrest.serialization import Model + + +class EntityParentGroupInfo(Model): + """(Optional) The ID of the parent management group. + + :param id: The fully qualified ID for the parent management group. For + example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EntityParentGroupInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_parent_group_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_parent_group_info_py3.py new file mode 100644 index 000000000000..b0275df6a41f --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_parent_group_info_py3.py @@ -0,0 +1,30 @@ +# 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 msrest.serialization import Model + + +class EntityParentGroupInfo(Model): + """(Optional) The ID of the parent management group. + + :param id: The fully qualified ID for the parent management group. For + example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(EntityParentGroupInfo, self).__init__(**kwargs) + self.id = id diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details.py index 97dff2a08156..11dab3905b6e 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details.py @@ -19,14 +19,18 @@ class ErrorDetails(Model): :type code: str :param message: A human-readable representation of the error. :type message: str + :param details: A human-readable representation of the error's details. + :type details: str """ _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, } - def __init__(self, code=None, message=None): - super(ErrorDetails, self).__init__() - self.code = code - self.message = message + def __init__(self, **kwargs): + super(ErrorDetails, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details_py3.py new file mode 100644 index 000000000000..e5d31f18a57b --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_details_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class ErrorDetails(Model): + """The details of the error. + + :param code: One of a server-defined set of error codes. + :type code: str + :param message: A human-readable representation of the error. + :type message: str + :param details: A human-readable representation of the error's details. + :type details: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, details: str=None, **kwargs) -> None: + super(ErrorDetails, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response.py index a0367d3aaa7c..206717b3e423 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response.py @@ -24,9 +24,9 @@ class ErrorResponse(Model): 'error': {'key': 'error', 'type': 'ErrorDetails'}, } - def __init__(self, error=None): - super(ErrorResponse, self).__init__() - self.error = error + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) class ErrorResponseException(HttpOperationError): diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response_py3.py new file mode 100644 index 000000000000..f371695bb4c6 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/error_response_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """The error object. + + :param error: Error. + :type error: ~azure.mgmt.managementgroups.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group.py index 29cfa5bb6b1a..6c77afda9581 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group.py @@ -32,6 +32,8 @@ class ManagementGroup(Model): :type tenant_id: str :param display_name: The friendly name of the management group. :type display_name: str + :param roles: The role definitions associated with the management group. + :type roles: list[str] :param details: Details. :type details: ~azure.mgmt.managementgroups.models.ManagementGroupDetails :param children: The list of children. @@ -51,16 +53,18 @@ class ManagementGroup(Model): 'name': {'key': 'name', 'type': 'str'}, 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'roles': {'key': 'properties.roles', 'type': '[str]'}, 'details': {'key': 'properties.details', 'type': 'ManagementGroupDetails'}, 'children': {'key': 'properties.children', 'type': '[ManagementGroupChildInfo]'}, } - def __init__(self, tenant_id=None, display_name=None, details=None, children=None): - super(ManagementGroup, self).__init__() + def __init__(self, **kwargs): + super(ManagementGroup, self).__init__(**kwargs) self.id = None self.type = None self.name = None - self.tenant_id = tenant_id - self.display_name = display_name - self.details = details - self.children = children + self.tenant_id = kwargs.get('tenant_id', None) + self.display_name = kwargs.get('display_name', None) + self.roles = kwargs.get('roles', None) + self.details = kwargs.get('details', None) + self.children = kwargs.get('children', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info.py index 209af58e80ff..a5f0ca517200 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info.py @@ -15,30 +15,41 @@ class ManagementGroupChildInfo(Model): """The child information of a management group. - :param child_type: The type of child resource. Possible values include: - 'ManagementGroup', 'Subscription' - :type child_type: str or ~azure.mgmt.managementgroups.models.enum - :param child_id: The fully qualified ID for the child resource (management - group or subscription). For example, + :param type: The type of child resource. The fully qualified resource type + which includes provider namespace (e.g. + /providers/Microsoft.Management/managementGroups). Possible values + include: '/providers/Microsoft.Management/managementGroups', + '/subscriptions' + :type type: str or ~azure.mgmt.managementgroups.models.enum + :param id: The fully qualified ID for the child resource (management group + or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - :type child_id: str + :type id: str + :param name: The name of the child entity. + :type name: str :param display_name: The friendly name of the child resource. :type display_name: str + :param roles: The roles definitions associated with the management group. + :type roles: list[str] :param children: The list of children. :type children: list[~azure.mgmt.managementgroups.models.ManagementGroupChildInfo] """ _attribute_map = { - 'child_type': {'key': 'childType', 'type': 'str'}, - 'child_id': {'key': 'childId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, 'children': {'key': 'children', 'type': '[ManagementGroupChildInfo]'}, } - def __init__(self, child_type=None, child_id=None, display_name=None, children=None): - super(ManagementGroupChildInfo, self).__init__() - self.child_type = child_type - self.child_id = child_id - self.display_name = display_name - self.children = children + def __init__(self, **kwargs): + super(ManagementGroupChildInfo, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.roles = kwargs.get('roles', None) + self.children = kwargs.get('children', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info_py3.py new file mode 100644 index 000000000000..fd0917339900 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_child_info_py3.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class ManagementGroupChildInfo(Model): + """The child information of a management group. + + :param type: The type of child resource. The fully qualified resource type + which includes provider namespace (e.g. + /providers/Microsoft.Management/managementGroups). Possible values + include: '/providers/Microsoft.Management/managementGroups', + '/subscriptions' + :type type: str or ~azure.mgmt.managementgroups.models.enum + :param id: The fully qualified ID for the child resource (management group + or subscription). For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type id: str + :param name: The name of the child entity. + :type name: str + :param display_name: The friendly name of the child resource. + :type display_name: str + :param roles: The roles definitions associated with the management group. + :type roles: list[str] + :param children: The list of children. + :type children: + list[~azure.mgmt.managementgroups.models.ManagementGroupChildInfo] + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + 'children': {'key': 'children', 'type': '[ManagementGroupChildInfo]'}, + } + + def __init__(self, *, type=None, id: str=None, name: str=None, display_name: str=None, roles=None, children=None, **kwargs) -> None: + super(ManagementGroupChildInfo, self).__init__(**kwargs) + self.type = type + self.id = id + self.name = name + self.display_name = display_name + self.roles = roles + self.children = children diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details.py index 7618834b6a08..499faa92f9c7 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details.py @@ -33,9 +33,9 @@ class ManagementGroupDetails(Model): 'parent': {'key': 'parent', 'type': 'ParentGroupInfo'}, } - def __init__(self, version=None, updated_time=None, updated_by=None, parent=None): - super(ManagementGroupDetails, self).__init__() - self.version = version - self.updated_time = updated_time - self.updated_by = updated_by - self.parent = parent + def __init__(self, **kwargs): + super(ManagementGroupDetails, self).__init__(**kwargs) + self.version = kwargs.get('version', None) + self.updated_time = kwargs.get('updated_time', None) + self.updated_by = kwargs.get('updated_by', None) + self.parent = kwargs.get('parent', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details_py3.py new file mode 100644 index 000000000000..1d47be815022 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_details_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class ManagementGroupDetails(Model): + """The details of a management group. + + :param version: The version number of the object. + :type version: float + :param updated_time: The date and time when this object was last updated. + :type updated_time: datetime + :param updated_by: The identity of the principal or process that updated + the object. + :type updated_by: str + :param parent: Parent. + :type parent: ~azure.mgmt.managementgroups.models.ParentGroupInfo + """ + + _attribute_map = { + 'version': {'key': 'version', 'type': 'float'}, + 'updated_time': {'key': 'updatedTime', 'type': 'iso-8601'}, + 'updated_by': {'key': 'updatedBy', 'type': 'str'}, + 'parent': {'key': 'parent', 'type': 'ParentGroupInfo'}, + } + + def __init__(self, *, version: float=None, updated_time=None, updated_by: str=None, parent=None, **kwargs) -> None: + super(ManagementGroupDetails, self).__init__(**kwargs) + self.version = version + self.updated_time = updated_time + self.updated_by = updated_by + self.parent = parent diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info.py index 27f1b74f2293..7e016651bf34 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info.py @@ -48,10 +48,10 @@ class ManagementGroupInfo(Model): 'display_name': {'key': 'properties.displayName', 'type': 'str'}, } - def __init__(self, tenant_id=None, display_name=None): - super(ManagementGroupInfo, self).__init__() + def __init__(self, **kwargs): + super(ManagementGroupInfo, self).__init__(**kwargs) self.id = None self.type = None self.name = None - self.tenant_id = tenant_id - self.display_name = display_name + self.tenant_id = kwargs.get('tenant_id', None) + self.display_name = kwargs.get('display_name', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info_py3.py new file mode 100644 index 000000000000..b9d250177747 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_info_py3.py @@ -0,0 +1,57 @@ +# 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 msrest.serialization import Model + + +class ManagementGroupInfo(Model): + """The management group resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param tenant_id: The AAD Tenant ID associated with the management group. + For example, 00000000-0000-0000-0000-000000000000 + :type tenant_id: str + :param display_name: The friendly name of the management group. + :type display_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, display_name: str=None, **kwargs) -> None: + super(ManagementGroupInfo, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tenant_id = tenant_id + self.display_name = display_name diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_py3.py new file mode 100644 index 000000000000..21f12f9bc209 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_group_py3.py @@ -0,0 +1,70 @@ +# 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 msrest.serialization import Model + + +class ManagementGroup(Model): + """The management group details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param tenant_id: The AAD Tenant ID associated with the management group. + For example, 00000000-0000-0000-0000-000000000000 + :type tenant_id: str + :param display_name: The friendly name of the management group. + :type display_name: str + :param roles: The role definitions associated with the management group. + :type roles: list[str] + :param details: Details. + :type details: ~azure.mgmt.managementgroups.models.ManagementGroupDetails + :param children: The list of children. + :type children: + list[~azure.mgmt.managementgroups.models.ManagementGroupChildInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'roles': {'key': 'properties.roles', 'type': '[str]'}, + 'details': {'key': 'properties.details', 'type': 'ManagementGroupDetails'}, + 'children': {'key': 'properties.children', 'type': '[ManagementGroupChildInfo]'}, + } + + def __init__(self, *, tenant_id: str=None, display_name: str=None, roles=None, details=None, children=None, **kwargs) -> None: + super(ManagementGroup, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tenant_id = tenant_id + self.display_name = display_name + self.roles = roles + self.details = details + self.children = children diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_groups_api_enums.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_groups_api_enums.py new file mode 100644 index 000000000000..3fa750f98cf8 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_groups_api_enums.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class Reason(str, Enum): + + invalid = "Invalid" + already_exists = "AlreadyExists" + + +class Status(str, Enum): + + not_started = "NotStarted" + not_started_but_groups_exist = "NotStartedButGroupsExist" + started = "Started" + failed = "Failed" + cancelled = "Cancelled" + completed = "Completed" + + +class Type(str, Enum): + + providers_microsoft_managementmanagement_groups = "/providers/Microsoft.Management/managementGroups" diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation.py index 832260c9ce06..3114ff739ced 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation.py @@ -20,8 +20,9 @@ class Operation(Model): :ivar name: Operation name: {provider}/{resource}/{operation}. :vartype name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.managementgroups.models.OperationDisplay + :param display: Display. + :type display: + ~azure.mgmt.managementgroups.models.OperationDisplayProperties """ _validation = { @@ -30,10 +31,10 @@ class Operation(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'display': {'key': 'display', 'type': 'OperationDisplayProperties'}, } - def __init__(self, display=None): - super(Operation, self).__init__() + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) self.name = None - self.display = display + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display_properties.py similarity index 91% rename from azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display.py rename to azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display_properties.py index 1c60d0d60eb9..cd3859eddd07 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display_properties.py @@ -12,7 +12,7 @@ from msrest.serialization import Model -class OperationDisplay(Model): +class OperationDisplayProperties(Model): """The object that represents the operation. Variables are only populated by the server, and will be ignored when @@ -42,8 +42,8 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self): - super(OperationDisplay, self).__init__() + def __init__(self, **kwargs): + super(OperationDisplayProperties, self).__init__(**kwargs) self.provider = None self.resource = None self.operation = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display_properties_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display_properties_py3.py new file mode 100644 index 000000000000..9e10f38005c8 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_display_properties_py3.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class OperationDisplayProperties(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The name of the provider. + :vartype provider: str + :ivar resource: The resource on which the operation is performed. + :vartype resource: str + :ivar operation: The operation that can be performed. + :vartype operation: str + :ivar description: Operation description. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplayProperties, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_py3.py new file mode 100644 index 000000000000..af5129cb8f7c --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class Operation(Model): + """Operation supported by the Microsoft.Management resource provider. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :param display: Display. + :type display: + ~azure.mgmt.managementgroups.models.OperationDisplayProperties + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplayProperties'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_results.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_results.py new file mode 100644 index 000000000000..e4503472bdaa --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_results.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class OperationResults(Model): + """The results of an asynchronous operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param provisioning_state: Provisioning State. Possible values include: + 'Updating' + :type provisioning_state: str or ~azure.mgmt.managementgroups.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationResults, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.provisioning_state = kwargs.get('provisioning_state', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_results_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_results_py3.py new file mode 100644 index 000000000000..04308fb22f02 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/operation_results_py3.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class OperationResults(Model): + """The results of an asynchronous operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :vartype id: str + :ivar type: The type of the resource. For example, + /providers/Microsoft.Management/managementGroups + :vartype type: str + :ivar name: The name of the management group. For example, + 00000000-0000-0000-0000-000000000000 + :vartype name: str + :param provisioning_state: Provisioning State. Possible values include: + 'Updating' + :type provisioning_state: str or ~azure.mgmt.managementgroups.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, provisioning_state=None, **kwargs) -> None: + super(OperationResults, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.provisioning_state = provisioning_state diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info.py index fb4b8942975b..4f6672a63570 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info.py @@ -15,20 +15,24 @@ class ParentGroupInfo(Model): """(Optional) The ID of the parent management group. - :param parent_id: The fully qualified ID for the parent management group. - For example, + :param id: The fully qualified ID for the parent management group. For + example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - :type parent_id: str + :type id: str + :param name: The name of the parent management group + :type name: str :param display_name: The friendly name of the parent management group. :type display_name: str """ _attribute_map = { - 'parent_id': {'key': 'parentId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, } - def __init__(self, parent_id=None, display_name=None): - super(ParentGroupInfo, self).__init__() - self.parent_id = parent_id - self.display_name = display_name + def __init__(self, **kwargs): + super(ParentGroupInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info_py3.py new file mode 100644 index 000000000000..16ed06de5838 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/parent_group_info_py3.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class ParentGroupInfo(Model): + """(Optional) The ID of the parent management group. + + :param id: The fully qualified ID for the parent management group. For + example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type id: str + :param name: The name of the parent management group + :type name: str + :param display_name: The friendly name of the parent management group. + :type display_name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, display_name: str=None, **kwargs) -> None: + super(ParentGroupInfo, self).__init__(**kwargs) + self.id = id + self.name = name + self.display_name = display_name diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/patch_management_group_request.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/patch_management_group_request.py new file mode 100644 index 000000000000..a48de68753cd --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/patch_management_group_request.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class PatchManagementGroupRequest(Model): + """Management group patch parameters. + + :param display_name: The friendly name of the management group. + :type display_name: str + :param parent_id: (Optional) The fully qualified ID for the parent + management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type parent_id: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'parent_id': {'key': 'parentId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PatchManagementGroupRequest, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.parent_id = kwargs.get('parent_id', None) diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/patch_management_group_request_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/patch_management_group_request_py3.py new file mode 100644 index 000000000000..5a5b4cc26d76 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/patch_management_group_request_py3.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class PatchManagementGroupRequest(Model): + """Management group patch parameters. + + :param display_name: The friendly name of the management group. + :type display_name: str + :param parent_id: (Optional) The fully qualified ID for the parent + management group. For example, + /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + :type parent_id: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'parent_id': {'key': 'parentId', 'type': 'str'}, + } + + def __init__(self, *, display_name: str=None, parent_id: str=None, **kwargs) -> None: + super(PatchManagementGroupRequest, self).__init__(**kwargs) + self.display_name = display_name + self.parent_id = parent_id diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/tenant_backfill_status_result.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/tenant_backfill_status_result.py new file mode 100644 index 000000000000..e13bbd7119dc --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/tenant_backfill_status_result.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class TenantBackfillStatusResult(Model): + """The tenant backfill status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tenant_id: The AAD Tenant ID associated with the management group. + For example, 00000000-0000-0000-0000-000000000000 + :vartype tenant_id: str + :ivar status: The status of the Tenant Backfill. Possible values include: + 'NotStarted', 'NotStartedButGroupsExist', 'Started', 'Failed', + 'Cancelled', 'Completed' + :vartype status: str or ~azure.mgmt.managementgroups.models.Status + """ + + _validation = { + 'tenant_id': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'Status'}, + } + + def __init__(self, **kwargs): + super(TenantBackfillStatusResult, self).__init__(**kwargs) + self.tenant_id = None + self.status = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/tenant_backfill_status_result_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/tenant_backfill_status_result_py3.py new file mode 100644 index 000000000000..61dddcc78e84 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/tenant_backfill_status_result_py3.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class TenantBackfillStatusResult(Model): + """The tenant backfill status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tenant_id: The AAD Tenant ID associated with the management group. + For example, 00000000-0000-0000-0000-000000000000 + :vartype tenant_id: str + :ivar status: The status of the Tenant Backfill. Possible values include: + 'NotStarted', 'NotStartedButGroupsExist', 'Started', 'Failed', + 'Cancelled', 'Completed' + :vartype status: str or ~azure.mgmt.managementgroups.models.Status + """ + + _validation = { + 'tenant_id': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'Status'}, + } + + def __init__(self, **kwargs) -> None: + super(TenantBackfillStatusResult, self).__init__(**kwargs) + self.tenant_id = None + self.status = None diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/__init__.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/__init__.py index f2f0ee70fdd6..3baf43e0f0a7 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/__init__.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/__init__.py @@ -12,9 +12,11 @@ from .management_groups_operations import ManagementGroupsOperations from .management_group_subscriptions_operations import ManagementGroupSubscriptionsOperations from .operations import Operations +from .entities_operations import EntitiesOperations __all__ = [ 'ManagementGroupsOperations', 'ManagementGroupSubscriptionsOperations', 'Operations', + 'EntitiesOperations', ] diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/entities_operations.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/entities_operations.py new file mode 100644 index 000000000000..2b2f7fb8ebd6 --- /dev/null +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/entities_operations.py @@ -0,0 +1,165 @@ +# 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 .. import models + + +class EntitiesOperations(object): + """EntitiesOperations operations. + + :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: Version of the API to be used with the client request. The current version is 2018-01-01-preview. Constant value: "2018-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-03-01-preview" + + self.config = config + + def list( + self, skiptoken=None, skip=None, top=None, select=None, search=None, filter=None, view=None, group_name=None, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): + """List all entities (Management Groups, Subscriptions, etc.) for the + authenticated user. + + :param skiptoken: Page continuation token is only used if a previous + operation returned a partial result. If a previous response contains a + nextLink element, the value of the nextLink element will include a + token parameter that specifies a starting point to use for subsequent + calls. + :type skiptoken: str + :param skip: Number of entities to skip over when retrieving results. + Passing this in will override $skipToken. + :type skip: int + :param top: Number of elements to return when retrieving results. + Passing this in will override $skipToken. + :type top: int + :param select: This parameter specifies the fields to include in the + response. Can include any combination of + Name,DisplayName,Type,ParentDisplayNameChain,ParentChain, e.g. + '$select=Name,DisplayName,Type,ParentDisplayNameChain,ParentNameChain'. + When specified the $select parameter can override select in + $skipToken. + :type select: str + :param search: The $search parameter is used in conjunction with the + $filter parameter to return three different outputs depending on the + parameter passed in. With $search=AllowedParents the API will return + the entity info of all groups that the requested entity will be able + to reparent to as determined by the user's permissions. With + $search=AllowedChildren the API will return the entity info of all + entities that can be added as children of the requested entity. With + $search=ParentAndFirstLevelChildren the API will return the parent and + first level of children that the user has either direct access to or + indirect access via one of their descendants. Possible values include: + 'AllowedParents', 'AllowedChildren', 'ParentAndFirstLevelChildren' + :type search: str + :param filter: The filter parameter allows you to filter on the the + name or display name fields. You can check for equality on the name + field (e.g. name eq '{entityName}') and you can check for substrings + on either the name or display name fields(e.g. contains(name, + '{substringToSearch}'), contains(displayName, '{substringToSearch')). + Note that the '{entityName}' and '{substringToSearch}' fields are + checked case insensitively. + :type filter: str + :param view: The view parameter allows clients to filter the type of + data that is returned by the getEntities call. Possible values + include: 'FullHierarchy', 'GroupsOnly', 'SubscriptionsOnly', 'Audit' + :type view: str + :param group_name: A filter which allows the get entities call to + focus on a particular group (i.e. "$filter=name eq 'groupName'") + :type group_name: str + :param cache_control: Indicates that the request shouldn't utilize any + caches. + :type cache_control: 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 EntityInfo + :rtype: + ~azure.mgmt.managementgroups.models.EntityInfoPaged[~azure.mgmt.managementgroups.models.EntityInfo] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skiptoken is not None: + query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if search is not None: + query_parameters['$search'] = self._serialize.query("search", search, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if view is not None: + query_parameters['$view'] = self._serialize.query("view", view, 'str') + if group_name is not None: + query_parameters['groupName'] = self._serialize.query("group_name", group_name, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 cache_control is not None: + header_parameters['Cache-Control'] = self._serialize.header("cache_control", cache_control, 'str') + 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) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.EntityInfoPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.EntityInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Management/getEntities'} diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_group_subscriptions_operations.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_group_subscriptions_operations.py index 0f196aefeb6d..1e78f9d5157f 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_group_subscriptions_operations.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_group_subscriptions_operations.py @@ -21,8 +21,8 @@ class ManagementGroupSubscriptionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2017-11-01-preview. Constant value: "2017-11-01-preview". + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-01-01-preview. Constant value: "2018-03-01-preview". """ models = models @@ -32,14 +32,13 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-11-01-preview" + self.api_version = "2018-03-01-preview" self.config = config def create( self, group_id, subscription_id, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): """Associates existing subscription with the management group. - . :param group_id: Management Group ID. :type group_id: str @@ -59,7 +58,7 @@ def create( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}' + url = self.create.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str'), 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str') @@ -92,11 +91,11 @@ def create( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + create.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}'} def delete( self, group_id, subscription_id, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): """De-associates subscription from the management group. - . :param group_id: Management Group ID. :type group_id: str @@ -116,7 +115,7 @@ def delete( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}' + url = self.delete.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str'), 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str') @@ -149,3 +148,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}'} diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_groups_operations.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_groups_operations.py index 85636fbb5010..e9e08d746243 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_groups_operations.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/management_groups_operations.py @@ -11,6 +11,8 @@ import uuid from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -21,8 +23,8 @@ class ManagementGroupsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2017-11-01-preview. Constant value: "2017-11-01-preview". + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-01-01-preview. Constant value: "2018-03-01-preview". """ models = models @@ -32,23 +34,22 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-11-01-preview" + self.api_version = "2018-03-01-preview" self.config = config def list( self, cache_control="no-cache", skiptoken=None, custom_headers=None, raw=False, **operation_config): """List management groups for the authenticated user. - . :param cache_control: Indicates that the request shouldn't utilize any caches. :type cache_control: str :param skiptoken: Page continuation token is only used if a previous - operation returned a partial result. - If a previous response contains a nextLink element, the value of the - nextLink element will include a token parameter that specifies a - starting point to use for subsequent calls. + operation returned a partial result. If a previous response contains a + nextLink element, the value of the nextLink element will include a + token parameter that specifies a starting point to use for subsequent + calls. :type skiptoken: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -65,7 +66,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.Management/managementGroups' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -108,11 +109,11 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.Management/managementGroups'} def get( - self, group_id, expand=None, recurse=None, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): + self, group_id, expand=None, recurse=None, filter=None, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): """Get the details of the management group. - . :param group_id: Management Group ID. :type group_id: str @@ -122,8 +123,12 @@ def get( :type expand: str :param recurse: The $recurse=true query string parameter allows clients to request inclusion of entire hierarchy in the response - payload. + payload. Note that $expand=children must be passed up if $recurse is + set to true. :type recurse: bool + :param filter: A filter which allows the exclusion of subscriptions + from results (i.e. '$filter=children.childType ne Subscription') + :type filter: str :param cache_control: Indicates that the request shouldn't utilize any caches. :type cache_control: str @@ -139,7 +144,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}' + url = self.get.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str') } @@ -152,6 +157,8 @@ def get( query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') if recurse is not None: query_parameters['$recurse'] = self._serialize.query("recurse", recurse, 'bool') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') # Construct headers header_parameters = {} @@ -182,37 +189,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}'} - def create_or_update( - self, group_id, create_management_group_request, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): - """Create or update a management group. - If a management group is already created and a subsequent create - request is issued with different properties, the management group - properties will be updated. - . - :param group_id: Management Group ID. - :type group_id: str - :param create_management_group_request: Management group creation - parameters. - :type create_management_group_request: - ~azure.mgmt.managementgroups.models.CreateManagementGroupRequest - :param cache_control: Indicates that the request shouldn't utilize any - caches. - :type cache_control: 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: ManagementGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.managementgroups.models.ManagementGroup or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ + def _create_or_update_initial( + self, group_id, create_management_group_request, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str') } @@ -242,13 +225,15 @@ def create_or_update( response = self._client.send( request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize('ManagementGroup', response) + if response.status_code == 202: + deserialized = self._deserialize('OperationResults', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -256,10 +241,11 @@ def create_or_update( return deserialized - def update( - self, group_id, create_management_group_request, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): - """Update a management group. - . + def create_or_update( + self, group_id, create_management_group_request, cache_control="no-cache", custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a management group. If a management group is already + created and a subsequent create request is issued with different + properties, the management group properties will be updated. :param group_id: Management Group ID. :type group_id: str @@ -271,6 +257,57 @@ def update( caches. :type cache_control: str :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns object or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_or_update_initial( + group_id=group_id, + create_management_group_request=create_management_group_request, + cache_control=cache_control, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}'} + + def update( + self, group_id, patch_group_request, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): + """Update a management group. + + :param group_id: Management Group ID. + :type group_id: str + :param patch_group_request: Management group patch parameters. + :type patch_group_request: + ~azure.mgmt.managementgroups.models.PatchManagementGroupRequest + :param cache_control: Indicates that the request shouldn't utilize any + caches. + :type cache_control: 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 @@ -282,7 +319,7 @@ def update( :class:`ErrorResponseException` """ # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}' + url = self.update.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str') } @@ -305,7 +342,7 @@ def update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(create_management_group_request, 'CreateManagementGroupRequest') + body_content = self._serialize.body(patch_group_request, 'PatchManagementGroupRequest') # Construct and send request request = self._client.patch(url, query_parameters) @@ -325,30 +362,13 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}'} - def delete( - self, group_id, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): - """Delete management group. - If a management group contains child resources, the request will fail. - . - :param group_id: Management Group ID. - :type group_id: str - :param cache_control: Indicates that the request shouldn't utilize any - caches. - :type cache_control: 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:`ErrorResponseException` - """ + def _delete_initial( + self, group_id, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/providers/Microsoft.Management/managementGroups/{groupId}' + url = self.delete.metadata['url'] path_format_arguments = { 'groupId': self._serialize.url("group_id", group_id, 'str') } @@ -374,9 +394,66 @@ def delete( request = self._client.delete(url, query_parameters) response = self._client.send(request, header_parameters, stream=False, **operation_config) - if response.status_code not in [200, 204]: + if response.status_code not in [202, 204]: raise models.ErrorResponseException(self._deserialize, response) + deserialized = None + + if response.status_code == 202: + deserialized = self._deserialize('OperationResults', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + + return deserialized + + def delete( + self, group_id, cache_control="no-cache", custom_headers=None, raw=False, polling=True, **operation_config): + """Delete management group. If a management group contains child + resources, the request will fail. + + :param group_id: Management Group ID. + :type group_id: str + :param cache_control: Indicates that the request shouldn't utilize any + caches. + :type cache_control: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.managementgroups.models.OperationResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.managementgroups.models.OperationResults]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._delete_initial( + group_id=group_id, + cache_control=cache_control, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{groupId}'} diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py index 184c6c83b1b1..ac619d5b0b6b 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py @@ -21,8 +21,8 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2017-11-01-preview. Constant value: "2017-11-01-preview". + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-01-01-preview. Constant value: "2018-03-01-preview". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-11-01-preview" + self.api_version = "2018-03-01-preview" self.config = config @@ -55,7 +55,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.Management/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -94,3 +94,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.Management/operations'} diff --git a/azure-mgmt-managementgroups/sdk_packaging.toml b/azure-mgmt-managementgroups/sdk_packaging.toml new file mode 100644 index 000000000000..9f7667e15cdd --- /dev/null +++ b/azure-mgmt-managementgroups/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-managementgroups" +package_pprint_name = "Management Groups" +package_doc_id = "" +is_stable = false diff --git a/azure-mgmt-managementgroups/setup.py b/azure-mgmt-managementgroups/setup.py index 37df7d143eb5..0149e4864dfa 100644 --- a/azure-mgmt-managementgroups/setup.py +++ b/azure-mgmt-managementgroups/setup.py @@ -77,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure>=0.4.20,<2.0.0', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/package_service_mapping.json b/package_service_mapping.json index 07bbfc31ced9..b175024d3bc4 100644 --- a/package_service_mapping.json +++ b/package_service_mapping.json @@ -334,6 +334,13 @@ ], "service_name": "Machine Learning Compute" }, + "azure-mgmt-managementgroups": { + "category ": "Management", + "namespaces": [ + "azure.mgmt.managementgroups" + ], + "service_name": "Management Groups" + }, "azure-mgmt-media": { "category ": "Management", "namespaces": [