Skip to content

Commit 681abed

Browse files
Azure CLI BotSDKAutoYan Zhang (WICRESOFT NORTH AMERICA LTD)RAY-316
authored
[AutoRelease] t2-managementgroups-2021-05-21-31239(wave4) (Azure#18851)
* CodeGen from PR 14271 in Azure/azure-rest-api-specs managementgroup wave4 (Azure#14271) Co-authored-by: Yan Zhang (WICRESOFT NORTH AMERICA LTD) <v-yanzhang@microsoft.com> * version,CHANGELOG * changelog config Co-authored-by: SDKAuto <sdkautomation@microsoft.com> Co-authored-by: Yan Zhang (WICRESOFT NORTH AMERICA LTD) <v-yanzhang@microsoft.com> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Zed <601306339@qq.com>
1 parent dfd9ccd commit 681abed

26 files changed

+484
-228
lines changed

sdk/managementgroups/azure-mgmt-managementgroups/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Release History
22

3+
## 1.0.0 (2021-05-21)
4+
5+
**Features**
6+
7+
- Model ManagementGroupDetails has a new parameter path
8+
- Model ManagementGroupDetails has a new parameter management_group_ancestors
9+
- Model ManagementGroupDetails has a new parameter management_group_ancestors_chain
10+
11+
**Breaking changes**
12+
13+
- Operation ManagementGroupSubscriptionsOperations.get_subscriptions_under_management_group has a new signature
14+
- Operation ManagementGroupsOperations.list has a new signature
15+
- Operation EntitiesOperations.list has a new signature
16+
- Operation ManagementGroupsOperations.get_descendants has a new signature
17+
- Model ManagementGroup no longer has parameter path
18+
319
## 1.0.0b1 (2020-12-09)
420

521
This is beta preview version.

sdk/managementgroups/azure-mgmt-managementgroups/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
include *.md
23
include azure/__init__.py
34
include azure/mgmt/__init__.py
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"autorest": "3.4.2",
3+
"use": [
4+
"@autorest/python@5.8.0",
5+
"@autorest/modelerfour@4.19.1"
6+
],
7+
"commit": "e5bdbb00cf31e34dfaffe74432b80a110f86e06a",
8+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9+
"autorest_command": "autorest specification/managementgroups/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.0 --use=@autorest/modelerfour@4.19.1 --version=3.4.2",
10+
"readme": "specification/managementgroups/resource-manager/readme.md"
11+
}

sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/_configuration.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
if TYPE_CHECKING:
1818
# pylint: disable=unused-import,ungrouped-imports
19-
from typing import Any, Optional
19+
from typing import Any
2020

2121
from azure.core.credentials import TokenCredential
2222

@@ -29,21 +29,11 @@ class ManagementGroupsAPIConfiguration(Configuration):
2929
3030
:param credential: Credential needed for the client to connect to Azure.
3131
:type credential: ~azure.core.credentials.TokenCredential
32-
:param skip: Number of entities to skip over when retrieving results. Passing this in will override $skipToken.
33-
:type skip: int
34-
:param top: Number of elements to return when retrieving results. Passing this in will override $skipToken.
35-
:type top: int
36-
:param skiptoken: Page continuation token is only used if a previous operation returned a partial result.
37-
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.
38-
:type skiptoken: str
3932
"""
4033

4134
def __init__(
4235
self,
4336
credential, # type: "TokenCredential"
44-
skip=None, # type: Optional[int]
45-
top=None, # type: Optional[int]
46-
skiptoken=None, # type: Optional[str]
4737
**kwargs # type: Any
4838
):
4939
# type: (...) -> None
@@ -52,10 +42,7 @@ def __init__(
5242
super(ManagementGroupsAPIConfiguration, self).__init__(**kwargs)
5343

5444
self.credential = credential
55-
self.skip = skip
56-
self.top = top
57-
self.skiptoken = skiptoken
58-
self.api_version = "2020-05-01"
45+
self.api_version = "2021-04-01"
5946
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
6047
kwargs.setdefault('sdk_moniker', 'mgmt-managementgroups/{}'.format(VERSION))
6148
self._configure(**kwargs)

sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/_management_groups_api.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from typing import Any, Optional
1717

1818
from azure.core.credentials import TokenCredential
19+
from azure.core.pipeline.transport import HttpRequest, HttpResponse
1920

2021
from ._configuration import ManagementGroupsAPIConfiguration
2122
from .operations import ManagementGroupsOperations
@@ -44,30 +45,20 @@ class ManagementGroupsAPI(ManagementGroupsAPIOperationsMixin):
4445
:vartype entities: azure.mgmt.managementgroups.operations.EntitiesOperations
4546
:param credential: Credential needed for the client to connect to Azure.
4647
:type credential: ~azure.core.credentials.TokenCredential
47-
:param skip: Number of entities to skip over when retrieving results. Passing this in will override $skipToken.
48-
:type skip: int
49-
:param top: Number of elements to return when retrieving results. Passing this in will override $skipToken.
50-
:type top: int
51-
:param skiptoken: Page continuation token is only used if a previous operation returned a partial result.
52-
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.
53-
:type skiptoken: str
5448
:param str base_url: Service URL
5549
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
5650
"""
5751

5852
def __init__(
5953
self,
6054
credential, # type: "TokenCredential"
61-
skip=None, # type: Optional[int]
62-
top=None, # type: Optional[int]
63-
skiptoken=None, # type: Optional[str]
6455
base_url=None, # type: Optional[str]
6556
**kwargs # type: Any
6657
):
6758
# type: (...) -> None
6859
if not base_url:
6960
base_url = 'https://management.azure.com'
70-
self._config = ManagementGroupsAPIConfiguration(credential, skip, top, skiptoken, **kwargs)
61+
self._config = ManagementGroupsAPIConfiguration(credential, **kwargs)
7162
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
7263

7364
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
@@ -86,6 +77,21 @@ def __init__(
8677
self.entities = EntitiesOperations(
8778
self._client, self._config, self._serialize, self._deserialize)
8879

80+
def _send_request(self, http_request, **kwargs):
81+
# type: (HttpRequest, Any) -> HttpResponse
82+
"""Runs the network request through the client's chained policies.
83+
84+
:param http_request: The network request you want to make. Required.
85+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
86+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
87+
:return: The response of your network call. Does not do error handling on your response.
88+
:rtype: ~azure.core.pipeline.transport.HttpResponse
89+
"""
90+
http_request.url = self._client.format_url(http_request.url)
91+
stream = kwargs.pop("stream", True)
92+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
93+
return pipeline_response.http_response
94+
8995
def close(self):
9096
# type: () -> None
9197
self._client.close()
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
{
2+
"chosen_version": "2021-04-01",
3+
"total_api_version_list": ["2021-04-01"],
4+
"client": {
5+
"name": "ManagementGroupsAPI",
6+
"filename": "_management_groups_api",
7+
"description": "The Azure Management Groups API enables consolidation of multiple \nsubscriptions/resources into an organizational hierarchy and centrally \nmanage access control, policies, alerting and reporting for those resources.",
8+
"base_url": "\u0027https://management.azure.com\u0027",
9+
"custom_base_url": null,
10+
"azure_arm": true,
11+
"has_lro_operations": true,
12+
"client_side_validation": false,
13+
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ManagementGroupsAPIConfiguration\"], \"._operations_mixin\": [\"ManagementGroupsAPIOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ManagementGroupsAPIConfiguration\"], \"._operations_mixin\": [\"ManagementGroupsAPIOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
15+
},
16+
"global_parameters": {
17+
"sync": {
18+
"credential": {
19+
"signature": "credential, # type: \"TokenCredential\"",
20+
"description": "Credential needed for the client to connect to Azure.",
21+
"docstring_type": "~azure.core.credentials.TokenCredential",
22+
"required": true
23+
}
24+
},
25+
"async": {
26+
"credential": {
27+
"signature": "credential: \"AsyncTokenCredential\",",
28+
"description": "Credential needed for the client to connect to Azure.",
29+
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
30+
"required": true
31+
}
32+
},
33+
"constant": {
34+
},
35+
"call": "credential",
36+
"service_client_specific": {
37+
"sync": {
38+
"api_version": {
39+
"signature": "api_version=None, # type: Optional[str]",
40+
"description": "API version to use if no profile is provided, or if missing in profile.",
41+
"docstring_type": "str",
42+
"required": false
43+
},
44+
"base_url": {
45+
"signature": "base_url=None, # type: Optional[str]",
46+
"description": "Service URL",
47+
"docstring_type": "str",
48+
"required": false
49+
},
50+
"profile": {
51+
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
52+
"description": "A profile definition, from KnownProfiles to dict.",
53+
"docstring_type": "azure.profiles.KnownProfiles",
54+
"required": false
55+
}
56+
},
57+
"async": {
58+
"api_version": {
59+
"signature": "api_version: Optional[str] = None,",
60+
"description": "API version to use if no profile is provided, or if missing in profile.",
61+
"docstring_type": "str",
62+
"required": false
63+
},
64+
"base_url": {
65+
"signature": "base_url: Optional[str] = None,",
66+
"description": "Service URL",
67+
"docstring_type": "str",
68+
"required": false
69+
},
70+
"profile": {
71+
"signature": "profile: KnownProfiles = KnownProfiles.default,",
72+
"description": "A profile definition, from KnownProfiles to dict.",
73+
"docstring_type": "azure.profiles.KnownProfiles",
74+
"required": false
75+
}
76+
}
77+
}
78+
},
79+
"config": {
80+
"credential": true,
81+
"credential_scopes": ["https://management.azure.com/.default"],
82+
"credential_default_policy_type": "BearerTokenCredentialPolicy",
83+
"credential_default_policy_type_has_async_version": true,
84+
"credential_key_header_name": null,
85+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
86+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
87+
},
88+
"operation_groups": {
89+
"management_groups": "ManagementGroupsOperations",
90+
"management_group_subscriptions": "ManagementGroupSubscriptionsOperations",
91+
"hierarchy_settings": "HierarchySettingsOperations",
92+
"operations": "Operations",
93+
"entities": "EntitiesOperations"
94+
},
95+
"operation_mixins": {
96+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}",
97+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}",
98+
"operations": {
99+
"check_name_availability" : {
100+
"sync": {
101+
"signature": "def check_name_availability(\n self,\n check_name_availability_request, # type: \"_models.CheckNameAvailabilityRequest\"\n **kwargs # type: Any\n):\n",
102+
"doc": "\"\"\"Checks if the specified management group name is valid and unique.\n\n:param check_name_availability_request: Management group name availability check parameters.\n:type check_name_availability_request: ~azure.mgmt.managementgroups.models.CheckNameAvailabilityRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityResult, or the result of cls(response)\n:rtype: ~azure.mgmt.managementgroups.models.CheckNameAvailabilityResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
103+
},
104+
"async": {
105+
"coroutine": true,
106+
"signature": "async def check_name_availability(\n self,\n check_name_availability_request: \"_models.CheckNameAvailabilityRequest\",\n **kwargs: Any\n) -\u003e \"_models.CheckNameAvailabilityResult\":\n",
107+
"doc": "\"\"\"Checks if the specified management group name is valid and unique.\n\n:param check_name_availability_request: Management group name availability check parameters.\n:type check_name_availability_request: ~azure.mgmt.managementgroups.models.CheckNameAvailabilityRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityResult, or the result of cls(response)\n:rtype: ~azure.mgmt.managementgroups.models.CheckNameAvailabilityResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
108+
},
109+
"call": "check_name_availability_request"
110+
},
111+
"start_tenant_backfill" : {
112+
"sync": {
113+
"signature": "def start_tenant_backfill(\n self,\n **kwargs # type: Any\n):\n",
114+
"doc": "\"\"\"Starts backfilling subscriptions for the Tenant.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: TenantBackfillStatusResult, or the result of cls(response)\n:rtype: ~azure.mgmt.managementgroups.models.TenantBackfillStatusResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
115+
},
116+
"async": {
117+
"coroutine": true,
118+
"signature": "async def start_tenant_backfill(\n self,\n **kwargs: Any\n) -\u003e \"_models.TenantBackfillStatusResult\":\n",
119+
"doc": "\"\"\"Starts backfilling subscriptions for the Tenant.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: TenantBackfillStatusResult, or the result of cls(response)\n:rtype: ~azure.mgmt.managementgroups.models.TenantBackfillStatusResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
120+
},
121+
"call": ""
122+
},
123+
"tenant_backfill_status" : {
124+
"sync": {
125+
"signature": "def tenant_backfill_status(\n self,\n **kwargs # type: Any\n):\n",
126+
"doc": "\"\"\"Gets tenant backfill status.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: TenantBackfillStatusResult, or the result of cls(response)\n:rtype: ~azure.mgmt.managementgroups.models.TenantBackfillStatusResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
127+
},
128+
"async": {
129+
"coroutine": true,
130+
"signature": "async def tenant_backfill_status(\n self,\n **kwargs: Any\n) -\u003e \"_models.TenantBackfillStatusResult\":\n",
131+
"doc": "\"\"\"Gets tenant backfill status.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: TenantBackfillStatusResult, or the result of cls(response)\n:rtype: ~azure.mgmt.managementgroups.models.TenantBackfillStatusResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
132+
},
133+
"call": ""
134+
}
135+
}
136+
}
137+
}

sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0b1"
9+
VERSION = "1.0.0"

0 commit comments

Comments
 (0)