Skip to content

Commit 347325f

Browse files
author
SDKAuto
committed
CodeGen from PR 34520 in Azure/azure-rest-api-specs
Merge 29da7fb8112366ce7d4d53d289b5e767457fbdb9 into f2b5251fc9e3ba978b64a090c7530825a48dabf2
1 parent a9b5cac commit 347325f

File tree

165 files changed

+1336
-878
lines changed

Some content is hidden

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

165 files changed

+1336
-878
lines changed

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

+3-3
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 Data Factory Management Client Library.
4-
This package has been tested with Python 3.8+.
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.8+ 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.
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "8056e0ba6bbe2f00ad0aca066236871ae5e04c23",
2+
"commit": "53f8e559c30951c01cefab53cd5c2f38818ac014",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.27.4",
6+
"@autorest/python@6.34.1",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/datafactory/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/azure-sdk-for-python/sdk --use=@autorest/python@6.27.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/datafactory/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.34.1 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/datafactory/resource-manager/readme.md"
1111
}

sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_data_factory_management_client.py

+14-10
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, TYPE_CHECKING
10+
from typing import Any, Optional, TYPE_CHECKING, cast
1111
from typing_extensions import Self
1212

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
1516
from azure.mgmt.core import ARMPipelineClient
1617
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1719

1820
from . import models as _models
1921
from ._configuration import DataFactoryManagementClientConfiguration
20-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2123
from .operations import (
2224
ActivityRunsOperations,
2325
ChangeDataCaptureOperations,
@@ -112,7 +114,7 @@ class DataFactoryManagementClient: # pylint: disable=too-many-instance-attribut
112114
:type credential: ~azure.core.credentials.TokenCredential
113115
:param subscription_id: The subscription identifier. Required.
114116
:type subscription_id: str
115-
:param base_url: Service URL. Default value is "https://management.azure.com".
117+
:param base_url: Service URL. Default value is None.
116118
:type base_url: str
117119
:keyword api_version: Api Version. Default value is "2018-06-01". Note that overriding this
118120
default value may result in unsupported behavior.
@@ -122,15 +124,17 @@ class DataFactoryManagementClient: # pylint: disable=too-many-instance-attribut
122124
"""
123125

124126
def __init__(
125-
self,
126-
credential: "TokenCredential",
127-
subscription_id: str,
128-
base_url: str = "https://management.azure.com",
129-
**kwargs: Any
127+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
130128
) -> None:
129+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
130+
_endpoints = get_arm_endpoints(_cloud)
131+
if not base_url:
132+
base_url = _endpoints["resource_manager"]
133+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
131134
self._config = DataFactoryManagementClientConfiguration(
132-
credential=credential, subscription_id=subscription_id, **kwargs
135+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
133136
)
137+
134138
_policies = kwargs.pop("policies", None)
135139
if _policies is None:
136140
_policies = [
@@ -149,7 +153,7 @@ def __init__(
149153
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
150154
self._config.http_logging_policy,
151155
]
152-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
156+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
153157

154158
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
155159
self._serialize = Serializer(client_models)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)