Skip to content

Commit 4e8d72f

Browse files
Azure CLI BotSDKAutomshimanshuchandelRAY-316msyyc
authored
[AutoRelease] t2-portal-2021-05-21-30513(wave4) (Azure#18850)
* CodeGen from PR 12732 in Azure/azure-rest-api-specs [Hub Generated] Review request for Microsoft.Portal to add version preview/2015-08-01-preview (Azure#12732) * Fixing properties in dashboard parts * Updating Dashboard part metadata * Updating based on prettier fixes Co-authored-by: Himanshu Chandel <hich@microsoft.com> * version,CHANGELOG * changelog config * Update CHANGELOG.md Co-authored-by: SDKAuto <sdkautomation@microsoft.com> Co-authored-by: Himanshu Chandel <hich@microsoft.com> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Zed <601306339@qq.com> Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
1 parent 681abed commit 4e8d72f

18 files changed

+311
-128
lines changed
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Release History
22

3-
## 1.0.0b1 (1970-01-01)
3+
## 1.0.0 (2021-05-21)
4+
5+
**Features**
6+
7+
- Model MarkdownPartMetadata has a new parameter additional_properties
8+
- Model DashboardPartMetadata has a new parameter additional_properties
9+
10+
## 1.0.0b1 (2020-12-17)
411

512
* Initial Release

sdk/portal/azure-mgmt-portal/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
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__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": "603b7448345a960ac28d88664692d1e0aade1864",
8+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9+
"autorest_command": "autorest specification/portal/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/portal/resource-manager/readme.md"
11+
}
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"chosen_version": "2020-09-01-preview",
3+
"total_api_version_list": ["2020-09-01-preview"],
4+
"client": {
5+
"name": "Portal",
6+
"filename": "_portal",
7+
"description": "Allows creation and deletion of Azure Shared Dashboards.",
8+
"base_url": "\u0027https://management.azure.com\u0027",
9+
"custom_base_url": null,
10+
"azure_arm": true,
11+
"has_lro_operations": false,
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\": [\"PortalConfiguration\"]}}, \"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\": [\"PortalConfiguration\"]}}, \"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+
"subscription_id": {
25+
"signature": "subscription_id, # type: str",
26+
"description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).",
27+
"docstring_type": "str",
28+
"required": true
29+
}
30+
},
31+
"async": {
32+
"credential": {
33+
"signature": "credential: \"AsyncTokenCredential\",",
34+
"description": "Credential needed for the client to connect to Azure.",
35+
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
36+
"required": true
37+
},
38+
"subscription_id": {
39+
"signature": "subscription_id: str,",
40+
"description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).",
41+
"docstring_type": "str",
42+
"required": true
43+
}
44+
},
45+
"constant": {
46+
},
47+
"call": "credential, subscription_id",
48+
"service_client_specific": {
49+
"sync": {
50+
"api_version": {
51+
"signature": "api_version=None, # type: Optional[str]",
52+
"description": "API version to use if no profile is provided, or if missing in profile.",
53+
"docstring_type": "str",
54+
"required": false
55+
},
56+
"base_url": {
57+
"signature": "base_url=None, # type: Optional[str]",
58+
"description": "Service URL",
59+
"docstring_type": "str",
60+
"required": false
61+
},
62+
"profile": {
63+
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
64+
"description": "A profile definition, from KnownProfiles to dict.",
65+
"docstring_type": "azure.profiles.KnownProfiles",
66+
"required": false
67+
}
68+
},
69+
"async": {
70+
"api_version": {
71+
"signature": "api_version: Optional[str] = None,",
72+
"description": "API version to use if no profile is provided, or if missing in profile.",
73+
"docstring_type": "str",
74+
"required": false
75+
},
76+
"base_url": {
77+
"signature": "base_url: Optional[str] = None,",
78+
"description": "Service URL",
79+
"docstring_type": "str",
80+
"required": false
81+
},
82+
"profile": {
83+
"signature": "profile: KnownProfiles = KnownProfiles.default,",
84+
"description": "A profile definition, from KnownProfiles to dict.",
85+
"docstring_type": "azure.profiles.KnownProfiles",
86+
"required": false
87+
}
88+
}
89+
}
90+
},
91+
"config": {
92+
"credential": true,
93+
"credential_scopes": ["https://management.azure.com/.default"],
94+
"credential_default_policy_type": "BearerTokenCredentialPolicy",
95+
"credential_default_policy_type_has_async_version": true,
96+
"credential_key_header_name": null,
97+
"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\"]}}}",
98+
"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\"]}}}"
99+
},
100+
"operation_groups": {
101+
"operations": "Operations",
102+
"dashboards": "DashboardsOperations",
103+
"tenant_configurations": "TenantConfigurationsOperations",
104+
"list_tenant_configuration_violations": "ListTenantConfigurationViolationsOperations"
105+
}
106+
}

sdk/portal/azure-mgmt-portal/azure/mgmt/portal/_portal.py

Lines changed: 19 additions & 0 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 PortalConfiguration
2122
from .operations import Operations
@@ -70,6 +71,24 @@ def __init__(
7071
self.list_tenant_configuration_violations = ListTenantConfigurationViolationsOperations(
7172
self._client, self._config, self._serialize, self._deserialize)
7273

74+
def _send_request(self, http_request, **kwargs):
75+
# type: (HttpRequest, Any) -> HttpResponse
76+
"""Runs the network request through the client's chained policies.
77+
78+
:param http_request: The network request you want to make. Required.
79+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
80+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
81+
:return: The response of your network call. Does not do error handling on your response.
82+
:rtype: ~azure.core.pipeline.transport.HttpResponse
83+
"""
84+
path_format_arguments = {
85+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
86+
}
87+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
88+
stream = kwargs.pop("stream", True)
89+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
90+
return pipeline_response.http_response
91+
7392
def close(self):
7493
# type: () -> None
7594
self._client.close()

sdk/portal/azure-mgmt-portal/azure/mgmt/portal/_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"

sdk/portal/azure-mgmt-portal/azure/mgmt/portal/aio/_portal.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from typing import Any, Optional, TYPE_CHECKING
1010

11+
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1112
from azure.mgmt.core import AsyncARMPipelineClient
1213
from msrest import Deserializer, Serializer
1314

@@ -67,6 +68,23 @@ def __init__(
6768
self.list_tenant_configuration_violations = ListTenantConfigurationViolationsOperations(
6869
self._client, self._config, self._serialize, self._deserialize)
6970

71+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
72+
"""Runs the network request through the client's chained policies.
73+
74+
:param http_request: The network request you want to make. Required.
75+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
76+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
77+
:return: The response of your network call. Does not do error handling on your response.
78+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
79+
"""
80+
path_format_arguments = {
81+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
82+
}
83+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
84+
stream = kwargs.pop("stream", True)
85+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
86+
return pipeline_response.http_response
87+
7088
async def close(self) -> None:
7189
await self._client.close()
7290

sdk/portal/azure-mgmt-portal/azure/mgmt/portal/aio/operations/_dashboards_operations.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ async def create_or_update(
4646
resource_group_name: str,
4747
dashboard_name: str,
4848
dashboard: "_models.Dashboard",
49-
**kwargs
49+
**kwargs: Any
5050
) -> "_models.Dashboard":
5151
"""Creates or updates a Dashboard.
5252
@@ -97,7 +97,7 @@ async def create_or_update(
9797

9898
if response.status_code not in [200, 201]:
9999
map_error(status_code=response.status_code, response=response, error_map=error_map)
100-
error = self._deserialize(_models.ErrorResponse, response)
100+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
101101
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
102102

103103
if response.status_code == 200:
@@ -116,7 +116,7 @@ async def delete(
116116
self,
117117
resource_group_name: str,
118118
dashboard_name: str,
119-
**kwargs
119+
**kwargs: Any
120120
) -> None:
121121
"""Deletes the Dashboard.
122122
@@ -160,7 +160,7 @@ async def delete(
160160

161161
if response.status_code not in [200, 204]:
162162
map_error(status_code=response.status_code, response=response, error_map=error_map)
163-
error = self._deserialize(_models.ErrorResponse, response)
163+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
164164
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
165165

166166
if cls:
@@ -172,7 +172,7 @@ async def get(
172172
self,
173173
resource_group_name: str,
174174
dashboard_name: str,
175-
**kwargs
175+
**kwargs: Any
176176
) -> Optional["_models.Dashboard"]:
177177
"""Gets the Dashboard.
178178
@@ -216,7 +216,7 @@ async def get(
216216

217217
if response.status_code not in [200, 404]:
218218
map_error(status_code=response.status_code, response=response, error_map=error_map)
219-
error = self._deserialize(_models.ErrorResponse, response)
219+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
220220
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
221221

222222
deserialized = None
@@ -234,7 +234,7 @@ async def update(
234234
resource_group_name: str,
235235
dashboard_name: str,
236236
dashboard: "_models.PatchableDashboard",
237-
**kwargs
237+
**kwargs: Any
238238
) -> Optional["_models.Dashboard"]:
239239
"""Updates an existing Dashboard.
240240
@@ -285,7 +285,7 @@ async def update(
285285

286286
if response.status_code not in [200, 404]:
287287
map_error(status_code=response.status_code, response=response, error_map=error_map)
288-
error = self._deserialize(_models.ErrorResponse, response)
288+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
289289
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
290290

291291
deserialized = None
@@ -301,7 +301,7 @@ async def update(
301301
def list_by_resource_group(
302302
self,
303303
resource_group_name: str,
304-
**kwargs
304+
**kwargs: Any
305305
) -> AsyncIterable["_models.DashboardListResult"]:
306306
"""Gets all the Dashboards within a resource group.
307307
@@ -358,7 +358,7 @@ async def get_next(next_link=None):
358358
response = pipeline_response.http_response
359359

360360
if response.status_code not in [200]:
361-
error = self._deserialize(_models.ErrorResponse, response)
361+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
362362
map_error(status_code=response.status_code, response=response, error_map=error_map)
363363
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
364364

@@ -371,7 +371,7 @@ async def get_next(next_link=None):
371371

372372
def list_by_subscription(
373373
self,
374-
**kwargs
374+
**kwargs: Any
375375
) -> AsyncIterable["_models.DashboardListResult"]:
376376
"""Gets all the dashboards within a subscription.
377377
@@ -425,7 +425,7 @@ async def get_next(next_link=None):
425425
response = pipeline_response.http_response
426426

427427
if response.status_code not in [200]:
428-
error = self._deserialize(_models.ErrorResponse, response)
428+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
429429
map_error(status_code=response.status_code, response=response, error_map=error_map)
430430
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
431431

sdk/portal/azure-mgmt-portal/azure/mgmt/portal/aio/operations/_list_tenant_configuration_violations_operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4343

4444
def list(
4545
self,
46-
**kwargs
46+
**kwargs: Any
4747
) -> AsyncIterable["_models.ViolationsList"]:
4848
"""Gets list of items that violate tenant's configuration.
4949
@@ -93,7 +93,7 @@ async def get_next(next_link=None):
9393
response = pipeline_response.http_response
9494

9595
if response.status_code not in [200]:
96-
error = self._deserialize(_models.ErrorResponse, response)
96+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
9797
map_error(status_code=response.status_code, response=response, error_map=error_map)
9898
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
9999

sdk/portal/azure-mgmt-portal/azure/mgmt/portal/aio/operations/_operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4343

4444
def list(
4545
self,
46-
**kwargs
46+
**kwargs: Any
4747
) -> AsyncIterable["_models.ResourceProviderOperationList"]:
4848
"""The Microsoft Portal operations API.
4949
@@ -93,7 +93,7 @@ async def get_next(next_link=None):
9393
response = pipeline_response.http_response
9494

9595
if response.status_code not in [200]:
96-
error = self._deserialize(_models.ErrorResponse, response)
96+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
9797
map_error(status_code=response.status_code, response=response, error_map=error_map)
9898
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
9999

0 commit comments

Comments
 (0)