Skip to content

Commit 4fc06da

Browse files
author
SDKAuto
committed
CodeGen from PR 33988 in Azure/azure-rest-api-specs
Merge 1522e0f61d37aaaa9cdb5c143b6ffdf1643eac13 into 4f6ba43a83ed4f80863e1fe698ac10b89e8c48a0
1 parent 6d22700 commit 4fc06da

File tree

479 files changed

+14154
-16419
lines changed

Some content is hidden

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

479 files changed

+14154
-16419
lines changed

sdk/authorization/azure-mgmt-authorization/README.md

Lines changed: 3 additions & 6 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 Authorization Management Client Library.
4-
This package has been tested with Python 3.7+.
4+
This package has been tested with Python 3.9+.
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.9+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.
@@ -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-
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "1af2861030243b06ee35172c95899f4809eedfc7",
2+
"commit": "e7f52891d98eba629a54a20c75f81b0537bdf5fa",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.2",
4+
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.6.0",
7-
"@autorest/modelerfour@4.24.3"
6+
"@autorest/python@6.32.3",
7+
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/authorization/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/python@6.6.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/authorization/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.32.3 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/authorization/resource-manager/readme.md"
1111
}

sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/_authorization_management_client.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010
# --------------------------------------------------------------------------
1111

1212
from typing import Any, Optional, TYPE_CHECKING
13+
from typing_extensions import Self
1314

15+
from azure.core.pipeline import policies
1416
from azure.mgmt.core import ARMPipelineClient
17+
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
1518
from azure.profiles import KnownProfiles, ProfileDefinition
1619
from azure.profiles.multiapiclient import MultiApiClientMixin
1720

@@ -24,7 +27,7 @@
2427

2528
class _SDKClient(object):
2629
def __init__(self, *args, **kwargs):
27-
"""This is a fake class to support current implemetation of MultiApiClientMixin."
30+
"""This is a fake class to support current implementation of MultiApiClientMixin."
2831
Will be removed in final version of multiapi azure-core based client
2932
"""
3033
pass
@@ -117,7 +120,25 @@ def __init__(
117120
if api_version:
118121
kwargs.setdefault('api_version', api_version)
119122
self._config = AuthorizationManagementClientConfiguration(credential, subscription_id, **kwargs)
120-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
123+
_policies = kwargs.pop("policies", None)
124+
if _policies is None:
125+
_policies = [
126+
policies.RequestIdPolicy(**kwargs),
127+
self._config.headers_policy,
128+
self._config.user_agent_policy,
129+
self._config.proxy_policy,
130+
policies.ContentDecodePolicy(**kwargs),
131+
ARMAutoResourceProviderRegistrationPolicy(),
132+
self._config.redirect_policy,
133+
self._config.retry_policy,
134+
self._config.authentication_policy,
135+
self._config.custom_hook_policy,
136+
self._config.logging_policy,
137+
policies.DistributedTracingPolicy(**kwargs),
138+
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
139+
self._config.http_logging_policy,
140+
]
141+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
121142
super(AuthorizationManagementClient, self).__init__(
122143
api_version=api_version,
123144
profile=profile

sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/_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 AuthorizationManagementClientConfiguration(Configuration):
22+
class AuthorizationManagementClientConfiguration:
2423
"""Configuration for AuthorizationManagementClient.
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(AuthorizationManagementClientConfiguration, 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-authorization/{}'.format(VERSION))
49+
self.polling_interval = kwargs.get("polling_interval", 30)
5150
self._configure(**kwargs)
5251

5352
def _configure(

0 commit comments

Comments
 (0)