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 faf059052d45..46f344c5e711 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/management_groups_api.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/management_groups_api.py @@ -32,25 +32,14 @@ class ManagementGroupsAPIConfiguration(AzureConfiguration): :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param operation_result_id: The id of the operation result. Possible - values include: 'create', 'delete' - :type operation_result_id: 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. - :type skiptoken: str :param str base_url: Service URL """ def __init__( - self, credentials, operation_result_id, skiptoken=None, base_url=None): + self, credentials, base_url=None): if credentials is None: raise ValueError("Parameter 'credentials' must not be None.") - if operation_result_id is None: - raise ValueError("Parameter 'operation_result_id' must not be None.") if not base_url: base_url = 'https://management.azure.com' @@ -60,14 +49,10 @@ def __init__( self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials - self.operation_result_id = operation_result_id - self.skiptoken = skiptoken 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. + """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 @@ -84,26 +69,17 @@ class ManagementGroupsAPI(SDKClient): :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param operation_result_id: The id of the operation result. Possible - values include: 'create', 'delete' - :type operation_result_id: 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. - :type skiptoken: str :param str base_url: Service URL """ def __init__( - self, credentials, operation_result_id, skiptoken=None, base_url=None): + self, credentials, base_url=None): - self.config = ManagementGroupsAPIConfiguration(credentials, operation_result_id, skiptoken, base_url) + self.config = ManagementGroupsAPIConfiguration(credentials, base_url) 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 = '2018-01-01-preview' + self.api_version = '2018-03-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -175,3 +151,105 @@ def check_name_availability( 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 bb90a0080312..72c19c0a5a09 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/__init__.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/__init__.py @@ -15,6 +15,7 @@ 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 @@ -36,6 +37,7 @@ 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 @@ -56,6 +58,7 @@ from .entity_info_paged import EntityInfoPaged from .management_groups_api_enums import ( Reason, + Status, Type, ) @@ -65,6 +68,7 @@ 'OperationDisplayProperties', 'Operation', 'CheckNameAvailabilityResult', + 'TenantBackfillStatusResult', 'ManagementGroupInfo', 'ParentGroupInfo', 'ManagementGroupDetails', @@ -84,5 +88,6 @@ '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 index 9bc8379bb94f..200dec243a78 100644 --- 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 @@ -19,7 +19,7 @@ class CheckNameAvailabilityRequest(Model): :type name: str :param type: fully qualified resource type which includes provider namespace. Possible values include: - '/providers/Microsoft.Management/managementGroups' + '/providers/Microsoft.Management/managementGroup' :type type: str or ~azure.mgmt.managementgroups.models.Type """ 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 index 2b020be13871..4bece1fb943b 100644 --- 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 @@ -19,7 +19,7 @@ class CheckNameAvailabilityRequest(Model): :type name: str :param type: fully qualified resource type which includes provider namespace. Possible values include: - '/providers/Microsoft.Management/managementGroups' + '/providers/Microsoft.Management/managementGroup' :type type: str or ~azure.mgmt.managementgroups.models.Type """ diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info.py index 80b32ec9fa89..5444b8975f55 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info.py @@ -37,6 +37,18 @@ class EntityInfo(Model): :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 = { @@ -53,6 +65,10 @@ class EntityInfo(Model): '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): @@ -64,3 +80,7 @@ def __init__(self, **kwargs): 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_py3.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_py3.py index 77e858ea8642..8949d968d284 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_py3.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/entity_info_py3.py @@ -37,6 +37,18 @@ class EntityInfo(Model): :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 = { @@ -53,9 +65,13 @@ class EntityInfo(Model): '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, **kwargs) -> None: + 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 @@ -64,3 +80,7 @@ def __init__(self, *, tenant_id: str=None, display_name: str=None, parent=None, 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/management_groups_api_enums.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/management_groups_api_enums.py index 0a2dc6963ad1..3bb23cecff07 100644 --- 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 @@ -18,6 +18,16 @@ class Reason(str, Enum): 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" + providers_microsoft_managementmanagement_group = "/providers/Microsoft.Management/managementGroup" 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/entities_operations.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/entities_operations.py index b0b7b0e817db..2b2f7fb8ebd6 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/entities_operations.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/entities_operations.py @@ -22,7 +22,7 @@ class EntitiesOperations(object): :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-01-01-preview". + :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,18 +32,60 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01-preview" + self.api_version = "2018-03-01-preview" self.config = config def list( - self, group_name=None, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): + 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 group_name: A filter which allows the call to be filtered for a - specific group. + :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. @@ -68,8 +110,20 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if self.config.skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("self.config.skiptoken", self.config.skiptoken, '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') 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 14b8b9124c11..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 @@ -22,7 +22,7 @@ class ManagementGroupSubscriptionsOperations(object): :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-01-01-preview". + :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 = "2018-01-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 @@ -97,7 +96,6 @@ def create( 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 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 e1127e3e642c..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 @@ -24,7 +24,7 @@ class ManagementGroupsOperations(object): :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-01-01-preview". + :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 @@ -34,18 +34,23 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-01-preview" + self.api_version = "2018-03-01-preview" self.config = config def list( - self, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): + 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. + :type skiptoken: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -66,8 +71,8 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if self.config.skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("self.config.skiptoken", self.config.skiptoken, 'str') + if skiptoken is not None: + query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') else: url = next_link @@ -109,7 +114,6 @@ def internal_paging(next_link=None, raw=False): def get( 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 @@ -239,11 +243,9 @@ def _create_or_update_initial( 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. - . + """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 @@ -296,7 +298,6 @@ def get_long_running_output(response): 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 @@ -409,9 +410,8 @@ def _delete_initial( 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. - . + """Delete management group. If a management group contains child + resources, the request will fail. :param group_id: Management Group ID. :type group_id: str diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py index 7cd07ce41a7d..ac619d5b0b6b 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/operations.py @@ -22,7 +22,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2018-01-01-preview. Constant value: "2018-01-01-preview". + :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 = "2018-01-01-preview" + self.api_version = "2018-03-01-preview" self.config = config diff --git a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/version.py b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/version.py index af6bf850c40f..623d610ecc13 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/managementgroups/version.py +++ b/azure-mgmt-managementgroups/azure/mgmt/managementgroups/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2018-01-01-preview" +VERSION = "2018-03-01-preview"