Skip to content

Commit 02e9c9c

Browse files
authored
code and test (#35489)
Co-authored-by: azure-sdk <PythonSdkPipelines>
1 parent b8671d6 commit 02e9c9c

File tree

892 files changed

+74959
-73015
lines changed

Some content is hidden

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

892 files changed

+74959
-73015
lines changed

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

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

3+
## 23.1.0 (2024-05-06)
4+
5+
### Features Added
6+
7+
- Added operation group DeploymentStacksOperations
8+
- Added operation group PolicyDefinitionVersionsOperations
9+
- Added operation group PolicySetDefinitionVersionsOperations
10+
- Model ContainerConfiguration has a new parameter subnet_ids
11+
- Model Location has a new parameter availability_zone_mappings
12+
- Model LocationMetadata has a new parameter geography
13+
- Model Operation has a new parameter action_type
14+
- Model Operation has a new parameter is_data_action
15+
- Model Operation has a new parameter origin
16+
- Model OperationAutoGenerated has a new parameter action_type
17+
- Model OperationAutoGenerated has a new parameter is_data_action
18+
- Model OperationAutoGenerated has a new parameter origin
19+
- Model OperationDisplayAutoGenerated has a new parameter description
20+
- Model ParameterDefinitionsValue has a new parameter schema
21+
- Model PolicyDefinition has a new parameter version
22+
- Model PolicyDefinition has a new parameter versions
23+
- Model PolicySetDefinition has a new parameter version
24+
- Model PolicySetDefinition has a new parameter versions
25+
326
## 23.1.0b2 (2023-06-16)
427

528
### Breaking Changes

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Resource Management Client Library.
4-
This package has been tested with Python 3.7+.
4+
This package has been tested with Python 3.8+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313
### Prerequisites
1414

15-
- Python 3.7+ is required to use this package.
15+
- Python 3.8+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -59,6 +59,3 @@ Code samples for this package can be found at:
5959
If you encounter any bugs or have suggestions, please file an issue in the
6060
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
6161
section of the project.
62-
63-
64-
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-resource%2FREADME.png)
Lines changed: 61 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,66 @@
11
{
2-
"commit": "7211edbf5b76865549fcfaf35942cd50484fed74",
2+
"commit": "3940cd77b8d74b58d4a8b3a80388ff890052be67",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.2",
4+
"autorest": "3.9.7",
55
"use": [
6-
"@autorest/python@6.5.0",
7-
"@autorest/modelerfour@4.24.3"
6+
"@autorest/python@6.13.7",
7+
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/resources/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
10-
"readme": "specification/resources/resource-manager/readme.md"
9+
"autorest_command": "autorest specification/resources/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.9.7 --version-tolerant=False",
10+
"readme": "specification/resources/resource-manager/readme.md",
11+
"package-privatelinks-2020-05": "2022-03-18 16:14:07 -0700 2c68b6f0c9566d97d9d590a31b0d46997622eef7 Microsoft.Authorization/stable/2020-05-01/privateLinks.json",
12+
"package-features-2021-07": "2022-03-06 17:36:42 -0800 6a57e9cedc87cafd2dc9e4f3e8af62b5725e3d22 Microsoft.Features/stable/2021-07-01/features.json",
13+
"package-features-2015-12": "2020-03-23 19:43:44 -0700 53dd5c1278de960b38ea5cbdf69be99d4d4bfd0f Microsoft.Features/stable/2015-12-01/features.json",
14+
"package-links-2016-09": "2022-03-06 17:36:42 -0800 6a57e9cedc87cafd2dc9e4f3e8af62b5725e3d22 Microsoft.Resources/stable/2016-09-01/links.json",
15+
"package-locks-2016-09": "2021-03-16 20:01:32 -0700 be1d938d548060ffe4dea422b32a6932b168ec18 Microsoft.Authorization/stable/2016-09-01/locks.json",
16+
"package-locks-2015-01": "2018-06-04 10:10:25 -0700 a9675b1e5a9b0e694bea4e417365f74657b8903a Microsoft.Authorization/stable/2015-01-01/locks.json",
17+
"package-managedapplications-2019-07": "2022-02-17 23:42:24 -0800 67223eb5be65114df664bb5ae28e6e14ff62e84f Microsoft.Solutions/stable/2019-07-01/managedapplications.json",
18+
"package-policy-2023-04-only": "2023-09-12 11:41:29 -0700 b1f57e54d560d162ff7c715103158aa020dad2c9 Microsoft.Authorization/stable/2023-04-01/policySetDefinitions.json",
19+
"package-policy-2022-08-preview-only": "2022-11-15 18:35:20 -0800 fa7609844bc20b126037dfb180ef7155c2174f7b Microsoft.Authorization/preview/2022-08-01-preview/policyVariables.json",
20+
"package-policy-2022-07-preview-only": "2022-10-10 18:10:12 -0700 1cb05f075f2d061686fa8a9e45c72d1fafff9e3f Microsoft.Authorization/preview/2022-07-01-preview/policyExemptions.json",
21+
"package-policy-2022-06-only": "2022-10-10 18:10:12 -0700 1cb05f075f2d061686fa8a9e45c72d1fafff9e3f Microsoft.Authorization/stable/2022-06-01/policyAssignments.json",
22+
"package-policy-2021-06-only": "2022-11-15 18:35:20 -0800 fa7609844bc20b126037dfb180ef7155c2174f7b Microsoft.Authorization/stable/2021-06-01/policySetDefinitions.json",
23+
"package-policy-2020-09-only": "2022-11-15 18:35:20 -0800 fa7609844bc20b126037dfb180ef7155c2174f7b Microsoft.Authorization/stable/2020-09-01/dataPolicyManifests.json",
24+
"package-policy-2020-07-preview-only": "2021-02-01 17:30:20 -0800 76fb4a0f3187990b6cc487a9b45ce7e37dd479a6 Microsoft.Authorization/preview/2020-07-01-preview/policyExemptions.json",
25+
"package-policy-2019-09": "2020-01-12 18:45:11 -0800 d960c6cfad5edcd47d7573d935ff0bd7f6bdfe04 Microsoft.Authorization/stable/2019-09-01/policyAssignments.json",
26+
"package-policy-2019-06": "2019-08-28 02:16:00 -0400 35b484b592948aa81f9c95d2ec7425cf08fd15a2 Microsoft.Authorization/stable/2019-06-01/policyAssignments.json",
27+
"package-policy-2019-01": "2019-07-11 14:36:23 -0400 568b944dd2b19b35b7c06f917d0166c046a85851 Microsoft.Authorization/stable/2019-01-01/policySetDefinitions.json",
28+
"package-policy-2018-05": "2019-07-04 18:31:46 -0700 f6e96392dd7f1069b6d600cfda549bf786d009b0 Microsoft.Authorization/stable/2018-05-01/policyAssignments.json",
29+
"package-policy-2018-03": "2019-07-04 18:31:46 -0700 f6e96392dd7f1069b6d600cfda549bf786d009b0 Microsoft.Authorization/stable/2018-03-01/policyAssignments.json",
30+
"package-policy-2017-06-preview-only": "2019-06-12 19:24:50 -0400 c7a6b470d7bb65a240739e99a4d123ed1a3ca7e9 Microsoft.Authorization/preview/2017-06-01-preview/policySetDefinitions.json",
31+
"package-policy-2016-12": "2019-06-12 19:24:50 -0400 c7a6b470d7bb65a240739e99a4d123ed1a3ca7e9 Microsoft.Authorization/stable/2016-12-01/policyAssignments.json",
32+
"package-policy-2016-04": "2018-12-10 12:22:37 -0500 3a0278ee2f92ca2fbb5c6bedf54607133bd4f8be Microsoft.Authorization/stable/2016-04-01/policy.json",
33+
"package-policy-2015-10": "2018-12-10 12:22:37 -0500 3a0278ee2f92ca2fbb5c6bedf54607133bd4f8be Microsoft.Authorization/preview/2015-10-01-preview/policy.json",
34+
"package-resources-2022-09": "2023-06-14 18:50:13 -0700 49401294370eed6ed25de57fce89ac901c671cf4 Microsoft.Resources/stable/2022-09-01/resources.json",
35+
"package-resources-2021-04": "2022-08-21 21:31:53 -0700 81cd88a080c4bf4bb251afbe62892a6e220cb2b4 Microsoft.Resources/stable/2021-04-01/resources.json",
36+
"package-resources-2021-01": "2021-12-05 18:06:52 -0800 3b2f85d320fac5b282bc80240f9e5c2c57753bad Microsoft.Resources/stable/2021-01-01/resources.json",
37+
"package-resources-2020-10": "2023-08-31 10:22:11 +0530 215d86e8a195c08274acb9004be7adaa191f11ce Microsoft.Resources/stable/2020-10-01/resources.json",
38+
"package-resources-2020-06": "2022-03-06 17:36:42 -0800 6a57e9cedc87cafd2dc9e4f3e8af62b5725e3d22 Microsoft.Resources/stable/2020-06-01/resources.json",
39+
"package-resources-2019-10": "2021-10-07 18:41:27 -0700 23b8c3e5ecc0a90bc89f93517d7f45ca0b6881d5 Microsoft.Resources/stable/2019-10-01/resources.json",
40+
"package-resources-2019-08": "2022-03-31 18:32:58 -0700 d55f30f41f04e712de101fc9c17a591ca410bfed Microsoft.Resources/stable/2019-08-01/resources.json",
41+
"package-resources-2019-07": "2022-03-31 18:32:58 -0700 d55f30f41f04e712de101fc9c17a591ca410bfed Microsoft.Resources/stable/2019-07-01/resources.json",
42+
"package-resources-2019-0510": "2022-03-31 18:32:58 -0700 d55f30f41f04e712de101fc9c17a591ca410bfed Microsoft.Resources/stable/2019-05-10/resources.json",
43+
"package-resources-2019-05": "2022-03-31 18:32:58 -0700 d55f30f41f04e712de101fc9c17a591ca410bfed Microsoft.Resources/stable/2019-05-10/resources.json",
44+
"package-resources-2019-03": "2022-03-31 18:32:58 -0700 d55f30f41f04e712de101fc9c17a591ca410bfed Microsoft.Resources/stable/2019-03-01/resources.json",
45+
"package-resources-2018-05": "2022-03-31 18:32:58 -0700 d55f30f41f04e712de101fc9c17a591ca410bfed Microsoft.Resources/stable/2018-05-01/resources.json",
46+
"package-resources-2018-02": "2022-03-31 18:32:58 -0700 d55f30f41f04e712de101fc9c17a591ca410bfed Microsoft.Resources/stable/2018-02-01/resources.json",
47+
"package-resources-2017-05": "2022-03-31 18:32:58 -0700 d55f30f41f04e712de101fc9c17a591ca410bfed Microsoft.Resources/stable/2017-05-10/resources.json",
48+
"package-resources-2016-09": "2022-03-31 18:32:58 -0700 d55f30f41f04e712de101fc9c17a591ca410bfed Microsoft.Resources/stable/2016-09-01/resources.json",
49+
"package-resources-2016-02": "2022-03-31 18:32:58 -0700 d55f30f41f04e712de101fc9c17a591ca410bfed Microsoft.Resources/stable/2016-02-01/resources.json",
50+
"package-subscriptions-2022-12": "2023-05-23 14:08:27 +0800 c183bb012de8e9e1d0d2e67a0994748df4747d2c Microsoft.Resources/stable/2022-12-01/subscriptions.json",
51+
"package-subscriptions-2021-01": "2022-03-06 17:36:42 -0800 6a57e9cedc87cafd2dc9e4f3e8af62b5725e3d22 Microsoft.Resources/stable/2021-01-01/subscriptions.json",
52+
"package-subscriptions-2019-11": "2022-01-11 17:53:40 -0800 5d117a8c7686fe2b2940114f6866a3958ccca6e0 Microsoft.Resources/stable/2019-11-01/subscriptions.json",
53+
"package-subscriptions-2019-06": "2022-01-11 17:53:40 -0800 5d117a8c7686fe2b2940114f6866a3958ccca6e0 Microsoft.Resources/stable/2019-06-01/subscriptions.json",
54+
"package-subscriptions-2018-06": "2022-01-11 17:53:40 -0800 5d117a8c7686fe2b2940114f6866a3958ccca6e0 Microsoft.Resources/stable/2018-06-01/subscriptions.json",
55+
"package-subscriptions-2016-06": "2022-01-11 17:53:40 -0800 5d117a8c7686fe2b2940114f6866a3958ccca6e0 Microsoft.Resources/stable/2016-06-01/subscriptions.json",
56+
"package-deploymentscripts-2023-08": "2023-10-05 20:21:56 -0700 75fe114f1abd9d9269591123eb96ac4660e7a095 Microsoft.Resources/stable/2023-08-01/deploymentScripts.json",
57+
"package-deploymentscripts-2020-10": "2022-03-06 17:36:42 -0800 6a57e9cedc87cafd2dc9e4f3e8af62b5725e3d22 Microsoft.Resources/stable/2020-10-01/deploymentScripts.json",
58+
"package-deploymentscripts-2019-10-preview": "2021-03-02 01:33:38 -0800 61fa39c7434b2058085bd10c4d66877db5d7f5c7 Microsoft.Resources/preview/2019-10-01-preview/deploymentScripts.json",
59+
"package-templatespecs-2022-02": "2022-04-18 03:28:00 -0700 f5b15e812e6e5228eaebf3b629a682a088afebd6 Microsoft.Resources/stable/2022-02-01/templateSpecs.json",
60+
"package-templatespecs-2021-05": "2022-03-06 17:36:42 -0800 6a57e9cedc87cafd2dc9e4f3e8af62b5725e3d22 Microsoft.Resources/stable/2021-05-01/templateSpecs.json",
61+
"package-templatespecs-2021-03-preview": "2021-04-08 22:14:47 -0700 02014ccbf8f7e4ae156713583252c9492b540527 Microsoft.Resources/preview/2021-03-01-preview/templateSpecs.json",
62+
"package-templatespecs-2019-06-preview": "2020-10-19 17:06:28 -0700 86d04dae5f34cbe19217e546cbc14d67664c7124 Microsoft.Resources/preview/2019-06-01-preview/templateSpecs.json",
63+
"package-deploymentstacks-2024-03": "2024-05-02 13:16:57 -0400 88cc082d66e2b481ed99a17d44edffaeb6254eec Microsoft.Resources/stable/2024-03-01/deploymentStacks.json",
64+
"package-deploymentstacks-2022-08-preview": "2024-05-02 13:16:57 -0400 88cc082d66e2b481ed99a17d44edffaeb6254eec Microsoft.Resources/preview/2022-08-01-preview/deploymentStacks.json",
65+
"package-changes-2022-05": "2022-04-24 21:43:30 -0700 91b36e26db23dffc149d968333c29f9a2f131702 Microsoft.Resources/stable/2022-05-01/changes.json"
1166
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# license information.
66
# --------------------------------------------------------------------------
77

8-
VERSION = "23.1.0b2"
8+
VERSION = "23.1.0"

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/_changes_client.py

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
from typing import Any, Optional, TYPE_CHECKING
1313

14+
from azure.core.pipeline import policies
1415
from azure.mgmt.core import ARMPipelineClient
16+
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
1517
from azure.profiles import KnownProfiles, ProfileDefinition
1618
from azure.profiles.multiapiclient import MultiApiClientMixin
1719

@@ -70,8 +72,28 @@ def __init__(
7072
profile: KnownProfiles=KnownProfiles.default,
7173
**kwargs: Any
7274
):
75+
if api_version:
76+
kwargs.setdefault('api_version', api_version)
7377
self._config = ChangesClientConfiguration(credential, subscription_id, **kwargs)
74-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
78+
_policies = kwargs.pop("policies", None)
79+
if _policies is None:
80+
_policies = [
81+
policies.RequestIdPolicy(**kwargs),
82+
self._config.headers_policy,
83+
self._config.user_agent_policy,
84+
self._config.proxy_policy,
85+
policies.ContentDecodePolicy(**kwargs),
86+
ARMAutoResourceProviderRegistrationPolicy(),
87+
self._config.redirect_policy,
88+
self._config.retry_policy,
89+
self._config.authentication_policy,
90+
self._config.custom_hook_policy,
91+
self._config.logging_policy,
92+
policies.DistributedTracingPolicy(**kwargs),
93+
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
94+
self._config.http_logging_policy,
95+
]
96+
self._client = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
7597
super(ChangesClient, self).__init__(
7698
api_version=api_version,
7799
profile=profile
@@ -104,7 +126,7 @@ def changes(self):
104126
else:
105127
raise ValueError("API version {} does not have operation group 'changes'".format(api_version))
106128
self._config.api_version = api_version
107-
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
129+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
108130

109131
def close(self):
110132
self._client.close()

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/_configuration.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
# --------------------------------------------------------------------------
1111
from typing import Any, TYPE_CHECKING
1212

13-
from azure.core.configuration import Configuration
1413
from azure.core.pipeline import policies
1514
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1615

@@ -20,7 +19,7 @@
2019
# pylint: disable=unused-import,ungrouped-imports
2120
from azure.core.credentials import TokenCredential
2221

23-
class ChangesClientConfiguration(Configuration):
22+
class ChangesClientConfiguration:
2423
"""Configuration for ChangesClient.
2524
2625
Note that all parameters used to create this instance are saved as instance
@@ -42,12 +41,12 @@ def __init__(
4241
raise ValueError("Parameter 'credential' must not be None.")
4342
if subscription_id is None:
4443
raise ValueError("Parameter 'subscription_id' must not be None.")
45-
super(ChangesClientConfiguration, self).__init__(**kwargs)
4644

4745
self.credential = credential
4846
self.subscription_id = subscription_id
4947
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5048
kwargs.setdefault('sdk_moniker', 'azure-mgmt-resource/{}'.format(VERSION))
49+
self.polling_interval = kwargs.get("polling_interval", 30)
5150
self._configure(**kwargs)
5251

5352
def _configure(

0 commit comments

Comments
 (0)