Skip to content

Commit 38198a4

Browse files
author
SDKAuto
committed
CodeGen from PR 34326 in Azure/azure-rest-api-specs
Merge 90045ba2c19ad5020d22e0bb2d1915339d270681 into 5db6f4b2219494122de700460988e9f3ef735dc0
1 parent 2c9172e commit 38198a4

File tree

67 files changed

+3602
-3697
lines changed

Some content is hidden

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

67 files changed

+3602
-3697
lines changed

sdk/servicelinker/azure-mgmt-servicelinker/CHANGELOG.md

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

3+
## 1.2.0b4 (2025-04-29)
4+
5+
### Features Added
6+
7+
- Added model `AzureResourceManagerArmResponseDryrunResource`
8+
- Added model `AzureResourceManagerArmResponseValidateOperationResult`
9+
- Method `ConnectorOperations.begin_create_dryrun` has a new overload `def begin_create_dryrun(self: None, resource_group_name: str, location: str, dryrun_name: str, parameters: DryrunResource, content_type: str)`
10+
- Method `ConnectorOperations.begin_create_dryrun` has a new overload `def begin_create_dryrun(self: None, resource_group_name: str, location: str, dryrun_name: str, parameters: IO[bytes], content_type: str)`
11+
- Method `ConnectorOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, location: str, connector_name: str, parameters: LinkerResource, content_type: str)`
12+
- Method `ConnectorOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, location: str, connector_name: str, parameters: IO[bytes], content_type: str)`
13+
- Method `ConnectorOperations.begin_update` has a new overload `def begin_update(self: None, resource_group_name: str, location: str, connector_name: str, parameters: LinkerPatch, content_type: str)`
14+
- Method `ConnectorOperations.begin_update` has a new overload `def begin_update(self: None, resource_group_name: str, location: str, connector_name: str, parameters: IO[bytes], content_type: str)`
15+
- Method `ConnectorOperations.begin_update_dryrun` has a new overload `def begin_update_dryrun(self: None, resource_group_name: str, location: str, dryrun_name: str, parameters: DryrunPatch, content_type: str)`
16+
- Method `ConnectorOperations.begin_update_dryrun` has a new overload `def begin_update_dryrun(self: None, resource_group_name: str, location: str, dryrun_name: str, parameters: IO[bytes], content_type: str)`
17+
- Method `ConnectorOperations.generate_configurations` has a new overload `def generate_configurations(self: None, resource_group_name: str, location: str, connector_name: str, parameters: Optional[ConfigurationInfo], content_type: str)`
18+
- Method `ConnectorOperations.generate_configurations` has a new overload `def generate_configurations(self: None, resource_group_name: str, location: str, connector_name: str, parameters: Optional[IO[bytes]], content_type: str)`
19+
- Method `LinkerOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, providers: str, linkers: str, resource_uri: str, linker_name: str, parameters: LinkerResource, content_type: str)`
20+
- Method `LinkerOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, providers: str, linkers: str, resource_uri: str, linker_name: str, parameters: IO[bytes], content_type: str)`
21+
- Method `LinkerOperations.update` has a new overload `def update(self: None, providers: str, linkers: str, resource_uri: str, linker_name: str, parameters: LinkerPatch, content_type: str)`
22+
- Method `LinkerOperations.update` has a new overload `def update(self: None, providers: str, linkers: str, resource_uri: str, linker_name: str, parameters: IO[bytes], content_type: str)`
23+
- Method `LinkersOperations.begin_create_dryrun` has a new overload `def begin_create_dryrun(self: None, providers: str, dryruns: str, resource_uri: str, dryrun_name: str, parameters: DryrunResource, content_type: str)`
24+
- Method `LinkersOperations.begin_create_dryrun` has a new overload `def begin_create_dryrun(self: None, providers: str, dryruns: str, resource_uri: str, dryrun_name: str, parameters: IO[bytes], content_type: str)`
25+
- Method `LinkersOperations.begin_update_dryrun` has a new overload `def begin_update_dryrun(self: None, providers: str, dryruns: str, resource_uri: str, dryrun_name: str, parameters: DryrunPatch, content_type: str)`
26+
- Method `LinkersOperations.begin_update_dryrun` has a new overload `def begin_update_dryrun(self: None, providers: str, dryruns: str, resource_uri: str, dryrun_name: str, parameters: IO[bytes], content_type: str)`
27+
- Method `LinkersOperations.generate_configurations` has a new overload `def generate_configurations(self: None, providers: str, linkers: str, resource_uri: str, linker_name: str, parameters: Optional[ConfigurationInfo], content_type: str)`
28+
- Method `LinkersOperations.generate_configurations` has a new overload `def generate_configurations(self: None, providers: str, linkers: str, resource_uri: str, linker_name: str, parameters: Optional[IO[bytes]], content_type: str)`
29+
30+
### Breaking Changes
31+
32+
- Method `ServiceLinkerManagementClient.__init__` inserted a `positional_or_keyword` parameter `subscription_id`
33+
- Deleted or renamed enum value `ActionType.ENABLE`
34+
- Deleted or renamed enum value `ActionType.OPT_OUT`
35+
- Method `ConfigurationNameResult.__init__` removed default value `None` from its parameter `value`
36+
- Method `DaprConfigurationList.__init__` removed default value `None` from its parameter `value`
37+
- Method `DryrunList.__init__` removed default value `None` from its parameter `value`
38+
- Method `ResourceList.__init__` removed default value `None` from its parameter `value`
39+
- Deleted or renamed model `DatabaseAadAuthInfo`
40+
- Deleted or renamed model `LinkerProperties`
41+
- Method `ConnectorOperations.begin_create_dryrun` deleted or renamed its parameter `subscription_id` of kind `positional_or_keyword`
42+
- Method `ConnectorOperations.begin_create_or_update` deleted or renamed its parameter `subscription_id` of kind `positional_or_keyword`
43+
- Method `ConnectorOperations.begin_delete` deleted or renamed its parameter `subscription_id` of kind `positional_or_keyword`
44+
- Method `ConnectorOperations.begin_update` deleted or renamed its parameter `subscription_id` of kind `positional_or_keyword`
45+
- Method `ConnectorOperations.begin_update_dryrun` deleted or renamed its parameter `subscription_id` of kind `positional_or_keyword`
46+
- Method `ConnectorOperations.begin_validate` deleted or renamed its parameter `subscription_id` of kind `positional_or_keyword`
47+
- Method `ConnectorOperations.delete_dryrun` deleted or renamed its parameter `subscription_id` of kind `positional_or_keyword`
48+
- Method `ConnectorOperations.generate_configurations` deleted or renamed its parameter `subscription_id` of kind `positional_or_keyword`
49+
- Method `ConnectorOperations.get` deleted or renamed its parameter `subscription_id` of kind `positional_or_keyword`
50+
- Method `ConnectorOperations.get_dryrun` deleted or renamed its parameter `subscription_id` of kind `positional_or_keyword`
51+
- Method `ConnectorOperations.list` deleted or renamed its parameter `subscription_id` of kind `positional_or_keyword`
52+
- Method `ConnectorOperations.list_dryrun` deleted or renamed its parameter `subscription_id` of kind `positional_or_keyword`
53+
- Method `LinkerOperations.begin_create_or_update` inserted a `positional_or_keyword` parameter `providers`
54+
- Method `LinkerOperations.begin_create_or_update` inserted a `positional_or_keyword` parameter `linkers`
55+
- Method `LinkerOperations.begin_delete` inserted a `positional_or_keyword` parameter `providers`
56+
- Method `LinkerOperations.begin_delete` inserted a `positional_or_keyword` parameter `linkers`
57+
- Method `LinkerOperations.begin_validate` inserted a `positional_or_keyword` parameter `providers`
58+
- Method `LinkerOperations.begin_validate` inserted a `positional_or_keyword` parameter `linkers`
59+
- Method `LinkerOperations.get` inserted a `positional_or_keyword` parameter `providers`
60+
- Method `LinkerOperations.get` inserted a `positional_or_keyword` parameter `linkers`
61+
- Method `LinkerOperations.list` inserted a `positional_or_keyword` parameter `providers`
62+
- Method `LinkerOperations.list_configurations` inserted a `positional_or_keyword` parameter `providers`
63+
- Method `LinkerOperations.list_configurations` inserted a `positional_or_keyword` parameter `linkers`
64+
- Deleted or renamed method `LinkerOperations.begin_update`
65+
- Method `LinkersOperations.begin_create_dryrun` inserted a `positional_or_keyword` parameter `providers`
66+
- Method `LinkersOperations.begin_create_dryrun` inserted a `positional_or_keyword` parameter `dryruns`
67+
- Method `LinkersOperations.begin_update_dryrun` inserted a `positional_or_keyword` parameter `providers`
68+
- Method `LinkersOperations.begin_update_dryrun` inserted a `positional_or_keyword` parameter `dryruns`
69+
- Method `LinkersOperations.delete_dryrun` inserted a `positional_or_keyword` parameter `providers`
70+
- Method `LinkersOperations.delete_dryrun` inserted a `positional_or_keyword` parameter `dryruns`
71+
- Method `LinkersOperations.generate_configurations` inserted a `positional_or_keyword` parameter `providers`
72+
- Method `LinkersOperations.generate_configurations` inserted a `positional_or_keyword` parameter `linkers`
73+
- Method `LinkersOperations.get_dryrun` inserted a `positional_or_keyword` parameter `providers`
74+
- Method `LinkersOperations.get_dryrun` inserted a `positional_or_keyword` parameter `dryruns`
75+
- Method `LinkersOperations.list_dryrun` inserted a `positional_or_keyword` parameter `providers`
76+
377
## 1.2.0b3 (2024-10-11)
478

579
### Features Added

sdk/servicelinker/azure-mgmt-servicelinker/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 Service Linker 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,11 +1,11 @@
11
{
2-
"commit": "b61dcef24c4dbd9d1c26e321c9ea67465a5d8be7",
2+
"commit": "eafaf370430997529c1b447442e0d920aa08bf87",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.19.0",
6+
"@autorest/python@6.34.1",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/servicelinker/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.19.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/servicelinker/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/servicelinker/resource-manager/readme.md"
1111
}

sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/__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 ._service_linker_management_client import ServiceLinkerManagementClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._service_linker_management_client import ServiceLinkerManagementClient # 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
"ServiceLinkerManagementClient",
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/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_configuration.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
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

@@ -26,18 +25,23 @@ class ServiceLinkerManagementClientConfiguration: # pylint: disable=too-many-in
2625
2726
:param credential: Credential needed for the client to connect to Azure. Required.
2827
:type credential: ~azure.core.credentials.TokenCredential
28+
:param subscription_id: The ID of the target subscription. Required.
29+
:type subscription_id: str
2930
:keyword api_version: Api Version. Default value is "2024-07-01-preview". Note that overriding
3031
this default value may result in unsupported behavior.
3132
:paramtype api_version: str
3233
"""
3334

34-
def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None:
35+
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
3536
api_version: str = kwargs.pop("api_version", "2024-07-01-preview")
3637

3738
if credential is None:
3839
raise ValueError("Parameter 'credential' must not be None.")
40+
if subscription_id is None:
41+
raise ValueError("Parameter 'subscription_id' must not be None.")
3942

4043
self.credential = credential
44+
self.subscription_id = subscription_id
4145
self.api_version = api_version
4246
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
4347
kwargs.setdefault("sdk_moniker", "mgmt-servicelinker/{}".format(VERSION))

sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_service_linker_management_client.py

Lines changed: 25 additions & 14 deletions
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 ServiceLinkerManagementClientConfiguration
20-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2123
from .operations import (
2224
ConfigurationNamesOperations,
2325
ConnectorOperations,
@@ -27,26 +29,27 @@
2729
)
2830

2931
if TYPE_CHECKING:
30-
# pylint: disable=unused-import,ungrouped-imports
3132
from azure.core.credentials import TokenCredential
3233

3334

34-
class ServiceLinkerManagementClient: # pylint: disable=client-accepts-api-version-keyword
35+
class ServiceLinkerManagementClient:
3536
"""Microsoft.ServiceLinker provider.
3637
37-
:ivar connector: ConnectorOperations operations
38-
:vartype connector: azure.mgmt.servicelinker.operations.ConnectorOperations
3938
:ivar linker: LinkerOperations operations
4039
:vartype linker: azure.mgmt.servicelinker.operations.LinkerOperations
4140
:ivar linkers: LinkersOperations operations
4241
:vartype linkers: azure.mgmt.servicelinker.operations.LinkersOperations
43-
:ivar operations: Operations operations
44-
:vartype operations: azure.mgmt.servicelinker.operations.Operations
4542
:ivar configuration_names: ConfigurationNamesOperations operations
4643
:vartype configuration_names: azure.mgmt.servicelinker.operations.ConfigurationNamesOperations
44+
:ivar operations: Operations operations
45+
:vartype operations: azure.mgmt.servicelinker.operations.Operations
46+
:ivar connector: ConnectorOperations operations
47+
:vartype connector: azure.mgmt.servicelinker.operations.ConnectorOperations
4748
:param credential: Credential needed for the client to connect to Azure. Required.
4849
:type credential: ~azure.core.credentials.TokenCredential
49-
:param base_url: Service URL. Default value is "https://management.azure.com".
50+
:param subscription_id: The ID of the target subscription. Required.
51+
:type subscription_id: str
52+
:param base_url: Service URL. Default value is None.
5053
:type base_url: str
5154
:keyword api_version: Api Version. Default value is "2024-07-01-preview". Note that overriding
5255
this default value may result in unsupported behavior.
@@ -56,9 +59,17 @@ class ServiceLinkerManagementClient: # pylint: disable=client-accepts-api-versi
5659
"""
5760

5861
def __init__(
59-
self, credential: "TokenCredential", base_url: str = "https://management.azure.com", **kwargs: Any
62+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
6063
) -> None:
61-
self._config = ServiceLinkerManagementClientConfiguration(credential=credential, **kwargs)
64+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
65+
_endpoints = get_arm_endpoints(_cloud)
66+
if not base_url:
67+
base_url = _endpoints["resource_manager"]
68+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
69+
self._config = ServiceLinkerManagementClientConfiguration(
70+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
71+
)
72+
6273
_policies = kwargs.pop("policies", None)
6374
if _policies is None:
6475
_policies = [
@@ -77,19 +88,19 @@ def __init__(
7788
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
7889
self._config.http_logging_policy,
7990
]
80-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
91+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
8192

8293
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
8394
self._serialize = Serializer(client_models)
8495
self._deserialize = Deserializer(client_models)
8596
self._serialize.client_side_validation = False
86-
self.connector = ConnectorOperations(self._client, self._config, self._serialize, self._deserialize)
8797
self.linker = LinkerOperations(self._client, self._config, self._serialize, self._deserialize)
8898
self.linkers = LinkersOperations(self._client, self._config, self._serialize, self._deserialize)
89-
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
9099
self.configuration_names = ConfigurationNamesOperations(
91100
self._client, self._config, self._serialize, self._deserialize
92101
)
102+
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
103+
self.connector = ConnectorOperations(self._client, self._config, self._serialize, self._deserialize)
93104

94105
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
95106
"""Runs the network request through the client's chained policies.
Lines changed: 6 additions & 0 deletions
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)