Skip to content

Commit 9dede66

Browse files
azclibotmsyyc
andauthored
[AutoRelease] t2-servicelinker-2022-04-14-37802(Do not merge) (Azure#23998)
* code and test * Update CHANGELOG.md Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Yuchao Yan <[email protected]>
1 parent 7d577fa commit 9dede66

17 files changed

+987
-334
lines changed

sdk/servicelinker/azure-mgmt-servicelinker/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+
## 1.0.0 (2022-04-22)
4+
5+
**Features**
6+
7+
- Model LinkerPatch has a new parameter scope
8+
- Model LinkerPatch has a new parameter target_service
9+
- Model LinkerResource has a new parameter scope
10+
- Model LinkerResource has a new parameter target_service
11+
- Model SecretAuthInfo has a new parameter secret_info
12+
- Model ValidateResult has a new parameter is_connection_available
13+
- Model ValidateResult has a new parameter linker_name
14+
- Model ValidateResult has a new parameter source_id
15+
- Model ValidateResult has a new parameter validation_detail
16+
17+
**Breaking changes**
18+
19+
- Model LinkerPatch no longer has parameter target_id
20+
- Model LinkerResource no longer has parameter target_id
21+
- Model SecretAuthInfo no longer has parameter secret
22+
- Model ValidateResult no longer has parameter linker_status
23+
- Model ValidateResult no longer has parameter name
24+
- Model ValidateResult no longer has parameter reason
25+
326
## 1.0.0b2 (2022-02-24)
427

528
**Features**
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"autorest": "3.7.2",
33
"use": [
4-
"@autorest/python@5.12.0",
4+
"@autorest/python@5.13.0",
55
"@autorest/[email protected]"
66
],
7-
"commit": "429a7ea873cc1bbd4df133f71427162e15e258b1",
7+
"commit": "9d8640319ef481ae301b67b033d6ae0bd30422c3",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/servicelinker/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/[email protected] --version=3.7.2",
9+
"autorest_command": "autorest specification/servicelinker/resource-manager/readme.md --multiapi --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.13.0 --use=@autorest/[email protected] --version=3.7.2",
1010
"readme": "specification/servicelinker/resource-manager/readme.md"
1111
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from ._microsoft_service_linker import MicrosoftServiceLinker
9+
from ._service_linker_management_client import ServiceLinkerManagementClient
1010
from ._version import VERSION
1111

1212
__version__ = VERSION
13-
__all__ = ['MicrosoftServiceLinker']
13+
__all__ = ['ServiceLinkerManagementClient']
1414

1515
# `._patch.py` is used for handwritten extensions to the generated code
1616
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,32 @@
1919
from azure.core.credentials import TokenCredential
2020

2121

22-
class MicrosoftServiceLinkerConfiguration(Configuration):
23-
"""Configuration for MicrosoftServiceLinker.
22+
class ServiceLinkerManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
23+
"""Configuration for ServiceLinkerManagementClient.
2424
2525
Note that all parameters used to create this instance are saved as instance
2626
attributes.
2727
2828
:param credential: Credential needed for the client to connect to Azure.
2929
:type credential: ~azure.core.credentials.TokenCredential
30+
:keyword api_version: Api Version. Default value is "2022-05-01". Note that overriding this
31+
default value may result in unsupported behavior.
32+
:paramtype api_version: str
3033
"""
3134

3235
def __init__(
3336
self,
3437
credential: "TokenCredential",
3538
**kwargs: Any
3639
) -> None:
37-
super(MicrosoftServiceLinkerConfiguration, self).__init__(**kwargs)
40+
super(ServiceLinkerManagementClientConfiguration, self).__init__(**kwargs)
41+
api_version = kwargs.pop('api_version', "2022-05-01") # type: str
42+
3843
if credential is None:
3944
raise ValueError("Parameter 'credential' must not be None.")
4045

4146
self.credential = credential
42-
self.api_version = "2021-11-01-preview"
47+
self.api_version = api_version
4348
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
4449
kwargs.setdefault('sdk_moniker', 'mgmt-servicelinker/{}'.format(VERSION))
4550
self._configure(**kwargs)

sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_metadata.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"chosen_version": "2021-11-01-preview",
3-
"total_api_version_list": ["2021-11-01-preview"],
2+
"chosen_version": "2022-05-01",
3+
"total_api_version_list": ["2022-05-01"],
44
"client": {
5-
"name": "MicrosoftServiceLinker",
6-
"filename": "_microsoft_service_linker",
5+
"name": "ServiceLinkerManagementClient",
6+
"filename": "_service_linker_management_client",
77
"description": "Microsoft.ServiceLinker provider.",
88
"host_value": "\"https://management.azure.com\"",
99
"parameterized_host_template": null,
1010
"azure_arm": true,
1111
"has_lro_operations": true,
1212
"client_side_validation": false,
13-
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MicrosoftServiceLinkerConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
14-
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MicrosoftServiceLinkerConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
13+
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ServiceLinkerManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ServiceLinkerManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
1515
},
1616
"global_parameters": {
1717
"sync": {

sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_microsoft_service_linker.py renamed to sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_service_linker_management_client.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,35 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, Optional, TYPE_CHECKING
10+
from typing import Any, TYPE_CHECKING
11+
12+
from msrest import Deserializer, Serializer
1113

1214
from azure.core.rest import HttpRequest, HttpResponse
1315
from azure.mgmt.core import ARMPipelineClient
14-
from msrest import Deserializer, Serializer
1516

1617
from . import models
17-
from ._configuration import MicrosoftServiceLinkerConfiguration
18+
from ._configuration import ServiceLinkerManagementClientConfiguration
1819
from .operations import LinkerOperations, Operations
1920

2021
if TYPE_CHECKING:
2122
# pylint: disable=unused-import,ungrouped-imports
2223
from azure.core.credentials import TokenCredential
2324

24-
class MicrosoftServiceLinker:
25+
class ServiceLinkerManagementClient:
2526
"""Microsoft.ServiceLinker provider.
2627
2728
:ivar linker: LinkerOperations operations
28-
:vartype linker: microsoft_service_linker.operations.LinkerOperations
29+
:vartype linker: azure.mgmt.servicelinker.operations.LinkerOperations
2930
:ivar operations: Operations operations
30-
:vartype operations: microsoft_service_linker.operations.Operations
31+
:vartype operations: azure.mgmt.servicelinker.operations.Operations
3132
:param credential: Credential needed for the client to connect to Azure.
3233
:type credential: ~azure.core.credentials.TokenCredential
33-
:param base_url: Service URL. Default value is 'https://management.azure.com'.
34+
:param base_url: Service URL. Default value is "https://management.azure.com".
3435
:type base_url: str
36+
:keyword api_version: Api Version. Default value is "2022-05-01". Note that overriding this
37+
default value may result in unsupported behavior.
38+
:paramtype api_version: str
3539
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
3640
Retry-After header is present.
3741
"""
@@ -42,7 +46,7 @@ def __init__(
4246
base_url: str = "https://management.azure.com",
4347
**kwargs: Any
4448
) -> None:
45-
self._config = MicrosoftServiceLinkerConfiguration(credential=credential, **kwargs)
49+
self._config = ServiceLinkerManagementClientConfiguration(credential=credential, **kwargs)
4650
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
4751

4852
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
@@ -55,7 +59,7 @@ def __init__(
5559

5660
def _send_request(
5761
self,
58-
request, # type: HttpRequest
62+
request: HttpRequest,
5963
**kwargs: Any
6064
) -> HttpResponse:
6165
"""Runs the network request through the client's chained policies.
@@ -84,7 +88,7 @@ def close(self):
8488
self._client.close()
8589

8690
def __enter__(self):
87-
# type: () -> MicrosoftServiceLinker
91+
# type: () -> ServiceLinkerManagementClient
8892
self._client.__enter__()
8993
return self
9094

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0b2"
9+
VERSION = "1.0.0"

sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/aio/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from ._microsoft_service_linker import MicrosoftServiceLinker
10-
__all__ = ['MicrosoftServiceLinker']
9+
from ._service_linker_management_client import ServiceLinkerManagementClient
10+
__all__ = ['ServiceLinkerManagementClient']
1111

1212
# `._patch.py` is used for handwritten extensions to the generated code
1313
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md

sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/aio/_configuration.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,32 @@
1919
from azure.core.credentials_async import AsyncTokenCredential
2020

2121

22-
class MicrosoftServiceLinkerConfiguration(Configuration):
23-
"""Configuration for MicrosoftServiceLinker.
22+
class ServiceLinkerManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
23+
"""Configuration for ServiceLinkerManagementClient.
2424
2525
Note that all parameters used to create this instance are saved as instance
2626
attributes.
2727
2828
:param credential: Credential needed for the client to connect to Azure.
2929
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
30+
:keyword api_version: Api Version. Default value is "2022-05-01". Note that overriding this
31+
default value may result in unsupported behavior.
32+
:paramtype api_version: str
3033
"""
3134

3235
def __init__(
3336
self,
3437
credential: "AsyncTokenCredential",
3538
**kwargs: Any
3639
) -> None:
37-
super(MicrosoftServiceLinkerConfiguration, self).__init__(**kwargs)
40+
super(ServiceLinkerManagementClientConfiguration, self).__init__(**kwargs)
41+
api_version = kwargs.pop('api_version', "2022-05-01") # type: str
42+
3843
if credential is None:
3944
raise ValueError("Parameter 'credential' must not be None.")
4045

4146
self.credential = credential
42-
self.api_version = "2021-11-01-preview"
47+
self.api_version = api_version
4348
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
4449
kwargs.setdefault('sdk_moniker', 'mgmt-servicelinker/{}'.format(VERSION))
4550
self._configure(**kwargs)

sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/aio/_microsoft_service_linker.py renamed to sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/aio/_service_linker_management_client.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,35 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, Awaitable, Optional, TYPE_CHECKING
10+
from typing import Any, Awaitable, TYPE_CHECKING
11+
12+
from msrest import Deserializer, Serializer
1113

1214
from azure.core.rest import AsyncHttpResponse, HttpRequest
1315
from azure.mgmt.core import AsyncARMPipelineClient
14-
from msrest import Deserializer, Serializer
1516

1617
from .. import models
17-
from ._configuration import MicrosoftServiceLinkerConfiguration
18+
from ._configuration import ServiceLinkerManagementClientConfiguration
1819
from .operations import LinkerOperations, Operations
1920

2021
if TYPE_CHECKING:
2122
# pylint: disable=unused-import,ungrouped-imports
2223
from azure.core.credentials_async import AsyncTokenCredential
2324

24-
class MicrosoftServiceLinker:
25+
class ServiceLinkerManagementClient:
2526
"""Microsoft.ServiceLinker provider.
2627
2728
:ivar linker: LinkerOperations operations
28-
:vartype linker: microsoft_service_linker.aio.operations.LinkerOperations
29+
:vartype linker: azure.mgmt.servicelinker.aio.operations.LinkerOperations
2930
:ivar operations: Operations operations
30-
:vartype operations: microsoft_service_linker.aio.operations.Operations
31+
:vartype operations: azure.mgmt.servicelinker.aio.operations.Operations
3132
:param credential: Credential needed for the client to connect to Azure.
3233
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
33-
:param base_url: Service URL. Default value is 'https://management.azure.com'.
34+
:param base_url: Service URL. Default value is "https://management.azure.com".
3435
:type base_url: str
36+
:keyword api_version: Api Version. Default value is "2022-05-01". Note that overriding this
37+
default value may result in unsupported behavior.
38+
:paramtype api_version: str
3539
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
3640
Retry-After header is present.
3741
"""
@@ -42,7 +46,7 @@ def __init__(
4246
base_url: str = "https://management.azure.com",
4347
**kwargs: Any
4448
) -> None:
45-
self._config = MicrosoftServiceLinkerConfiguration(credential=credential, **kwargs)
49+
self._config = ServiceLinkerManagementClientConfiguration(credential=credential, **kwargs)
4650
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
4751

4852
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
@@ -82,7 +86,7 @@ def _send_request(
8286
async def close(self) -> None:
8387
await self._client.close()
8488

85-
async def __aenter__(self) -> "MicrosoftServiceLinker":
89+
async def __aenter__(self) -> "ServiceLinkerManagementClient":
8690
await self._client.__aenter__()
8791
return self
8892

0 commit comments

Comments
 (0)