Skip to content

Commit 79d9f53

Browse files
00Kai0SDKAuto
and
SDKAuto
authored
T2 resource 2021 02 26 (#16961)
* CodeGen from PR 13128 in Azure/azure-rest-api-specs Revert "[Hub Generated] Review request for Microsoft.Resources to add version stable/2021-01-01 (#13000)" (#13128) This reverts commit 231d094. * test,version,CHANGELOG * fix testcases Co-authored-by: SDKAuto <[email protected]>
1 parent c6580d9 commit 79d9f53

File tree

509 files changed

+65346
-45780
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

509 files changed

+65346
-45780
lines changed

sdk/resources/azure-mgmt-resource/CHANGELOG.md

+38
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# Release History
22

3+
## 16.0.0 (2021-02-26)
4+
5+
**Features**
6+
7+
- Model ParameterDefinitionsValueMetadata has a new parameter strong_type
8+
- Model ParameterDefinitionsValueMetadata has a new parameter assign_permissions
9+
- Model ProviderResourceType has a new parameter location_mappings
10+
- Model DeploymentProperties has a new parameter expression_evaluation_options
11+
- Model PolicyAssignment has a new parameter non_compliance_messages
12+
- Model TemplateLink has a new parameter query_string
13+
- Model TemplateSpec has a new parameter versions
14+
- Model DeploymentWhatIfProperties has a new parameter expression_evaluation_options
15+
- Added operation ApplicationDefinitionsOperations.get_by_id
16+
- Added operation ApplicationDefinitionsOperations.begin_create_or_update_by_id
17+
- Added operation ApplicationDefinitionsOperations.begin_delete_by_id
18+
- Added operation ProvidersOperations.register_at_management_group_scope
19+
- Added operation PolicySetDefinitionsOperations.list_by_management_group
20+
- Added operation PolicyDefinitionsOperations.list_by_management_group
21+
- Added operation group ProviderResourceTypesOperations
22+
- Added operation group DataPolicyManifestsOperations
23+
- Added operation group ApplicationClientOperationsMixin
24+
- Added operation group PolicyExemptionsOperations
25+
26+
**Breaking changes**
27+
28+
- Operation PolicyAssignmentsOperations.list has a new signature
29+
- Operation PolicyAssignmentsOperations.list_for_management_group has a new signature
30+
- Operation PolicyAssignmentsOperations.list_for_resource has a new signature
31+
- Operation PolicyAssignmentsOperations.list_for_resource_group has a new signature
32+
- Operation TemplateSpecsOperations.get has a new signature
33+
- Operation TemplateSpecsOperations.list_by_resource_group has a new signature
34+
- Operation TemplateSpecsOperations.list_by_subscription has a new signature
35+
- Model PolicyAssignment no longer has parameter sku
36+
- Operation PolicySetDefinitionsOperations.list_built_in has a new signature
37+
- Operation PolicySetDefinitionsOperations.list has a new signature
38+
- Operation PolicyDefinitionsOperations.list_built_in has a new signature
39+
- Operation PolicyDefinitionsOperations.list has a new signature
40+
341
## 15.0.0 (2020-09-17)
442

543
**Features**

sdk/resources/azure-mgmt-resource/README.md

+10
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,13 @@ section of the project.
1919

2020

2121
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-resource%2FREADME.png)
22+
# Usage
23+
24+
25+
To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)
26+
27+
28+
29+
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
30+
Code samples for this package can be found at [Resource Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
31+
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# license information.
66
# --------------------------------------------------------------------------
77

8-
VERSION = "15.0.0"
8+
VERSION = "16.0.0"

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# license information.
66
# --------------------------------------------------------------------------
77

8-
VERSION = "0.1.0"
8+
VERSION = "16.0.0"

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_deployment_scripts_client.py

-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def __init__(
5050

5151
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
5252
self._serialize = Serializer(client_models)
53-
self._serialize.client_side_validation = False
5453
self._deserialize = Deserializer(client_models)
5554

5655
self.deployment_scripts = DeploymentScriptsOperations(

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_metadata.json

+8-7
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,33 @@
88
"base_url": "\u0027https://management.azure.com\u0027",
99
"custom_base_url": null,
1010
"azure_arm": true,
11-
"has_lro_operations": true
11+
"has_lro_operations": true,
12+
"client_side_validation": true
1213
},
1314
"global_parameters": {
14-
"sync_method": {
15+
"sync": {
1516
"credential": {
16-
"method_signature": "credential, # type: \"TokenCredential\"",
17+
"signature": "credential, # type: \"TokenCredential\"",
1718
"description": "Credential needed for the client to connect to Azure.",
1819
"docstring_type": "~azure.core.credentials.TokenCredential",
1920
"required": true
2021
},
2122
"subscription_id": {
22-
"method_signature": "subscription_id, # type: str",
23+
"signature": "subscription_id, # type: str",
2324
"description": "Subscription Id which forms part of the URI for every service call.",
2425
"docstring_type": "str",
2526
"required": true
2627
}
2728
},
28-
"async_method": {
29+
"async": {
2930
"credential": {
30-
"method_signature": "credential, # type: \"AsyncTokenCredential\"",
31+
"signature": "credential, # type: \"AsyncTokenCredential\"",
3132
"description": "Credential needed for the client to connect to Azure.",
3233
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
3334
"required": true
3435
},
3536
"subscription_id": {
36-
"method_signature": "subscription_id, # type: str",
37+
"signature": "subscription_id, # type: str",
3738
"description": "Subscription Id which forms part of the URI for every service call.",
3839
"docstring_type": "str",
3940
"required": true

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/aio/_deployment_scripts_client.py

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ def __init__(
4747

4848
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
4949
self._serialize = Serializer(client_models)
50-
self._serialize.client_side_validation = False
5150
self._deserialize = Deserializer(client_models)
5251

5352
self.deployment_scripts = DeploymentScriptsOperations(

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/aio/operations/_deployment_scripts_operations.py

+36-30
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from azure.mgmt.core.exceptions import ARMErrorFormat
1717
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
1818

19-
from ... import models
19+
from ... import models as _models
2020

2121
T = TypeVar('T')
2222
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -35,7 +35,7 @@ class DeploymentScriptsOperations:
3535
:param deserializer: An object model deserializer.
3636
"""
3737

38-
models = models
38+
models = _models
3939

4040
def __init__(self, client, config, serializer, deserializer) -> None:
4141
self._client = client
@@ -47,10 +47,10 @@ async def _create_initial(
4747
self,
4848
resource_group_name: str,
4949
script_name: str,
50-
deployment_script: "models.DeploymentScript",
50+
deployment_script: "_models.DeploymentScript",
5151
**kwargs
52-
) -> "models.DeploymentScript":
53-
cls = kwargs.pop('cls', None) # type: ClsType["models.DeploymentScript"]
52+
) -> "_models.DeploymentScript":
53+
cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentScript"]
5454
error_map = {
5555
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
5656
}
@@ -86,7 +86,7 @@ async def _create_initial(
8686

8787
if response.status_code not in [200, 201]:
8888
map_error(status_code=response.status_code, response=response, error_map=error_map)
89-
error = self._deserialize(models.DeploymentScriptsError, response)
89+
error = self._deserialize(_models.DeploymentScriptsError, response)
9090
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
9191

9292
if response.status_code == 200:
@@ -105,9 +105,9 @@ async def begin_create(
105105
self,
106106
resource_group_name: str,
107107
script_name: str,
108-
deployment_script: "models.DeploymentScript",
108+
deployment_script: "_models.DeploymentScript",
109109
**kwargs
110-
) -> AsyncLROPoller["models.DeploymentScript"]:
110+
) -> AsyncLROPoller["_models.DeploymentScript"]:
111111
"""Creates a deployment script.
112112
113113
:param resource_group_name: The name of the resource group. The name is case insensitive.
@@ -127,7 +127,7 @@ async def begin_create(
127127
:raises ~azure.core.exceptions.HttpResponseError:
128128
"""
129129
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
130-
cls = kwargs.pop('cls', None) # type: ClsType["models.DeploymentScript"]
130+
cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentScript"]
131131
lro_delay = kwargs.pop(
132132
'polling_interval',
133133
self._config.polling_interval
@@ -152,7 +152,13 @@ def get_long_running_output(pipeline_response):
152152
return cls(pipeline_response, deserialized, {})
153153
return deserialized
154154

155-
if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
155+
path_format_arguments = {
156+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
157+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
158+
'scriptName': self._serialize.url("script_name", script_name, 'str', max_length=90, min_length=1),
159+
}
160+
161+
if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
156162
elif polling is False: polling_method = AsyncNoPolling()
157163
else: polling_method = polling
158164
if cont_token:
@@ -170,9 +176,9 @@ async def update(
170176
self,
171177
resource_group_name: str,
172178
script_name: str,
173-
deployment_script: Optional["models.DeploymentScriptUpdateParameter"] = None,
179+
deployment_script: Optional["_models.DeploymentScriptUpdateParameter"] = None,
174180
**kwargs
175-
) -> "models.DeploymentScript":
181+
) -> "_models.DeploymentScript":
176182
"""Updates deployment script tags with specified values.
177183
178184
:param resource_group_name: The name of the resource group. The name is case insensitive.
@@ -186,7 +192,7 @@ async def update(
186192
:rtype: ~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.DeploymentScript
187193
:raises: ~azure.core.exceptions.HttpResponseError
188194
"""
189-
cls = kwargs.pop('cls', None) # type: ClsType["models.DeploymentScript"]
195+
cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentScript"]
190196
error_map = {
191197
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
192198
}
@@ -225,7 +231,7 @@ async def update(
225231

226232
if response.status_code not in [200]:
227233
map_error(status_code=response.status_code, response=response, error_map=error_map)
228-
error = self._deserialize(models.DeploymentScriptsError, response)
234+
error = self._deserialize(_models.DeploymentScriptsError, response)
229235
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
230236

231237
deserialized = self._deserialize('DeploymentScript', pipeline_response)
@@ -241,7 +247,7 @@ async def get(
241247
resource_group_name: str,
242248
script_name: str,
243249
**kwargs
244-
) -> "models.DeploymentScript":
250+
) -> "_models.DeploymentScript":
245251
"""Gets a deployment script with a given name.
246252
247253
:param resource_group_name: The name of the resource group. The name is case insensitive.
@@ -253,7 +259,7 @@ async def get(
253259
:rtype: ~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.DeploymentScript
254260
:raises: ~azure.core.exceptions.HttpResponseError
255261
"""
256-
cls = kwargs.pop('cls', None) # type: ClsType["models.DeploymentScript"]
262+
cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentScript"]
257263
error_map = {
258264
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
259265
}
@@ -284,7 +290,7 @@ async def get(
284290

285291
if response.status_code not in [200]:
286292
map_error(status_code=response.status_code, response=response, error_map=error_map)
287-
error = self._deserialize(models.DeploymentScriptsError, response)
293+
error = self._deserialize(_models.DeploymentScriptsError, response)
288294
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
289295

290296
deserialized = self._deserialize('DeploymentScript', pipeline_response)
@@ -344,7 +350,7 @@ async def delete(
344350

345351
if response.status_code not in [200, 204]:
346352
map_error(status_code=response.status_code, response=response, error_map=error_map)
347-
error = self._deserialize(models.DeploymentScriptsError, response)
353+
error = self._deserialize(_models.DeploymentScriptsError, response)
348354
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
349355

350356
if cls:
@@ -355,15 +361,15 @@ async def delete(
355361
def list_by_subscription(
356362
self,
357363
**kwargs
358-
) -> AsyncIterable["models.DeploymentScriptListResult"]:
364+
) -> AsyncIterable["_models.DeploymentScriptListResult"]:
359365
"""Lists all deployment scripts for a given subscription.
360366
361367
:keyword callable cls: A custom type or function that will be passed the direct response
362368
:return: An iterator like instance of either DeploymentScriptListResult or the result of cls(response)
363369
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.DeploymentScriptListResult]
364370
:raises: ~azure.core.exceptions.HttpResponseError
365371
"""
366-
cls = kwargs.pop('cls', None) # type: ClsType["models.DeploymentScriptListResult"]
372+
cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentScriptListResult"]
367373
error_map = {
368374
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
369375
}
@@ -408,7 +414,7 @@ async def get_next(next_link=None):
408414
response = pipeline_response.http_response
409415

410416
if response.status_code not in [200]:
411-
error = self._deserialize(models.DeploymentScriptsError, response)
417+
error = self._deserialize(_models.DeploymentScriptsError, response)
412418
map_error(status_code=response.status_code, response=response, error_map=error_map)
413419
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
414420

@@ -424,7 +430,7 @@ async def get_logs(
424430
resource_group_name: str,
425431
script_name: str,
426432
**kwargs
427-
) -> "models.ScriptLogsList":
433+
) -> "_models.ScriptLogsList":
428434
"""Gets deployment script logs for a given deployment script name.
429435
430436
:param resource_group_name: The name of the resource group. The name is case insensitive.
@@ -436,7 +442,7 @@ async def get_logs(
436442
:rtype: ~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.ScriptLogsList
437443
:raises: ~azure.core.exceptions.HttpResponseError
438444
"""
439-
cls = kwargs.pop('cls', None) # type: ClsType["models.ScriptLogsList"]
445+
cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptLogsList"]
440446
error_map = {
441447
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
442448
}
@@ -467,7 +473,7 @@ async def get_logs(
467473

468474
if response.status_code not in [200]:
469475
map_error(status_code=response.status_code, response=response, error_map=error_map)
470-
error = self._deserialize(models.DeploymentScriptsError, response)
476+
error = self._deserialize(_models.DeploymentScriptsError, response)
471477
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
472478

473479
deserialized = self._deserialize('ScriptLogsList', pipeline_response)
@@ -484,7 +490,7 @@ async def get_logs_default(
484490
script_name: str,
485491
tail: Optional[int] = None,
486492
**kwargs
487-
) -> "models.ScriptLog":
493+
) -> "_models.ScriptLog":
488494
"""Gets deployment script logs for a given deployment script name.
489495
490496
:param resource_group_name: The name of the resource group. The name is case insensitive.
@@ -500,7 +506,7 @@ async def get_logs_default(
500506
:rtype: ~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.ScriptLog
501507
:raises: ~azure.core.exceptions.HttpResponseError
502508
"""
503-
cls = kwargs.pop('cls', None) # type: ClsType["models.ScriptLog"]
509+
cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptLog"]
504510
error_map = {
505511
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
506512
}
@@ -533,7 +539,7 @@ async def get_logs_default(
533539

534540
if response.status_code not in [200]:
535541
map_error(status_code=response.status_code, response=response, error_map=error_map)
536-
error = self._deserialize(models.DeploymentScriptsError, response)
542+
error = self._deserialize(_models.DeploymentScriptsError, response)
537543
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
538544

539545
deserialized = self._deserialize('ScriptLog', pipeline_response)
@@ -548,7 +554,7 @@ def list_by_resource_group(
548554
self,
549555
resource_group_name: str,
550556
**kwargs
551-
) -> AsyncIterable["models.DeploymentScriptListResult"]:
557+
) -> AsyncIterable["_models.DeploymentScriptListResult"]:
552558
"""Lists deployments scripts.
553559
554560
:param resource_group_name: The name of the resource group. The name is case insensitive.
@@ -558,7 +564,7 @@ def list_by_resource_group(
558564
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.DeploymentScriptListResult]
559565
:raises: ~azure.core.exceptions.HttpResponseError
560566
"""
561-
cls = kwargs.pop('cls', None) # type: ClsType["models.DeploymentScriptListResult"]
567+
cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentScriptListResult"]
562568
error_map = {
563569
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
564570
}
@@ -604,7 +610,7 @@ async def get_next(next_link=None):
604610
response = pipeline_response.http_response
605611

606612
if response.status_code not in [200]:
607-
error = self._deserialize(models.DeploymentScriptsError, response)
613+
error = self._deserialize(_models.DeploymentScriptsError, response)
608614
map_error(status_code=response.status_code, response=response, error_map=error_map)
609615
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
610616

0 commit comments

Comments
 (0)