Skip to content

Commit f953c93

Browse files
author
SDKAuto
committed
CodeGen from PR 34242 in Azure/azure-rest-api-specs
Merge 0858faa965d694793386c33b5ded46b3f657b1df into 31869e6038974dbd20dd5028feaec2c402835cad
1 parent ebf29c4 commit f953c93

File tree

56 files changed

+720
-621
lines changed

Some content is hidden

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

56 files changed

+720
-621
lines changed

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

Lines changed: 3 additions & 3 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 Informaticadatamanagement 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.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"commit": "40390d1f34a8f74584a272d4da55f12827972357",
2+
"commit": "8b1d8291b0bdd7759b788d13065c29ef328a4dd4",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/informatica/Informatica.DataManagement",
55
"@azure-tools/typespec-python": "0.23.11",
66
"@autorest/python": "6.13.17",
77
"autorest": "3.10.2",
88
"use": [
9-
"@autorest/python@6.15.0",
9+
"@autorest/python@6.34.1",
1010
"@autorest/[email protected]"
1111
],
12-
"autorest_command": "autorest specification/informatica/resource-manager/readme.md --generate-sample=True --generate-test=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.15.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
12+
"autorest_command": "autorest specification/informatica/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",
1313
"readme": "specification/informatica/resource-manager/readme.md"
1414
}

sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._informatica_data_mgmt_client import InformaticaDataMgmtClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._informatica_data_mgmt_client import InformaticaDataMgmtClient # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"InformaticaDataMgmtClient",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/_configuration.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials import TokenCredential
1918

2019

21-
class InformaticaDataMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class InformaticaDataMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for InformaticaDataMgmtClient.
2322
2423
Note that all parameters used to create this instance are saved as instance

sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/_informatica_data_mgmt_client.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,26 @@
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 InformaticaDataMgmtClientConfiguration
20-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2123
from .operations import Operations, OrganizationsOperations, ServerlessRuntimesOperations
2224

2325
if TYPE_CHECKING:
24-
# pylint: disable=unused-import,ungrouped-imports
2526
from azure.core.credentials import TokenCredential
2627

2728

28-
class InformaticaDataMgmtClient: # pylint: disable=client-accepts-api-version-keyword
29+
class InformaticaDataMgmtClient:
2930
"""InformaticaDataMgmtClient.
3031
3132
:ivar operations: Operations operations
@@ -39,7 +40,7 @@ class InformaticaDataMgmtClient: # pylint: disable=client-accepts-api-version-k
3940
:type credential: ~azure.core.credentials.TokenCredential
4041
:param subscription_id: The ID of the target subscription. Required.
4142
:type subscription_id: str
42-
:param base_url: Service URL. Default value is "https://management.azure.com".
43+
:param base_url: Service URL. Default value is None.
4344
:type base_url: str
4445
:keyword api_version: Api Version. Default value is "2024-05-08". Note that overriding this
4546
default value may result in unsupported behavior.
@@ -49,15 +50,17 @@ class InformaticaDataMgmtClient: # pylint: disable=client-accepts-api-version-k
4950
"""
5051

5152
def __init__(
52-
self,
53-
credential: "TokenCredential",
54-
subscription_id: str,
55-
base_url: str = "https://management.azure.com",
56-
**kwargs: Any
53+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
5754
) -> None:
55+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
56+
_endpoints = get_arm_endpoints(_cloud)
57+
if not base_url:
58+
base_url = _endpoints["resource_manager"]
59+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
5860
self._config = InformaticaDataMgmtClientConfiguration(
59-
credential=credential, subscription_id=subscription_id, **kwargs
61+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
6062
)
63+
6164
_policies = kwargs.pop("policies", None)
6265
if _policies is None:
6366
_policies = [
@@ -76,7 +79,7 @@ def __init__(
7679
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
7780
self._config.http_logging_policy,
7881
]
79-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
82+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
8083

8184
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
8285
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)