Skip to content

Commit ee918ed

Browse files
author
SDKAuto
committed
CodeGen from PR 22354 in Azure/azure-rest-api-specs
Merge b9d3fed756a3416c0d8cbb4b6e6466c7d0aae3ac into 630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f
1 parent 1e4d4ad commit ee918ed

File tree

81 files changed

+6547
-3476
lines changed

Some content is hidden

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

81 files changed

+6547
-3476
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.7.2",
2+
"commit": "a29cb9769123ba1922ce8585c7f2cda0827edb40",
3+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4+
"autorest": "3.9.2",
35
"use": [
4-
"@autorest/python@5.16.0",
5-
"@autorest/modelerfour@4.19.3"
6+
"@autorest/python@6.2.16",
7+
"@autorest/modelerfour@4.24.3"
68
],
7-
"commit": "fda2db441da3f1fab31bb235e97da3e33c8e3903",
8-
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/msi/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
9+
"autorest_command": "autorest specification/msi/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/msi/resource-manager/readme.md"
1111
}

sdk/resources/azure-mgmt-msi/azure/mgmt/msi/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@
1414
patch_sdk()
1515
except ImportError:
1616
pass
17+
18+
from ._version import VERSION
19+
20+
__version__ = VERSION

sdk/resources/azure-mgmt-msi/azure/mgmt/msi/_configuration.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Changes may cause incorrect behavior and will be lost if the code is
99
# regenerated.
1010
# --------------------------------------------------------------------------
11-
from typing import TYPE_CHECKING
11+
from typing import Any, TYPE_CHECKING
1212

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
@@ -18,8 +18,6 @@
1818

1919
if TYPE_CHECKING:
2020
# pylint: disable=unused-import,ungrouped-imports
21-
from typing import Any
22-
2321
from azure.core.credentials import TokenCredential
2422

2523
class ManagedServiceIdentityClientConfiguration(Configuration):
@@ -28,19 +26,18 @@ class ManagedServiceIdentityClientConfiguration(Configuration):
2826
Note that all parameters used to create this instance are saved as instance
2927
attributes.
3028
31-
:param credential: Credential needed for the client to connect to Azure.
29+
:param credential: Credential needed for the client to connect to Azure. Required.
3230
:type credential: ~azure.core.credentials.TokenCredential
33-
:param subscription_id: The Id of the Subscription to which the identity belongs.
31+
:param subscription_id: The Id of the Subscription to which the identity belongs. Required.
3432
:type subscription_id: str
3533
"""
3634

3735
def __init__(
3836
self,
39-
credential, # type: "TokenCredential"
40-
subscription_id, # type: str
41-
**kwargs # type: Any
37+
credential: "TokenCredential",
38+
subscription_id: str,
39+
**kwargs: Any
4240
):
43-
# type: (...) -> None
4441
if credential is None:
4542
raise ValueError("Parameter 'credential' must not be None.")
4643
if subscription_id is None:
@@ -55,9 +52,8 @@ def __init__(
5552

5653
def _configure(
5754
self,
58-
**kwargs # type: Any
55+
**kwargs: Any
5956
):
60-
# type: (...) -> None
6157
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
6258
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
6359
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)

sdk/resources/azure-mgmt-msi/azure/mgmt/msi/_managed_service_identity_client.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,17 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from typing import TYPE_CHECKING
13-
14-
from msrest import Deserializer, Serializer
12+
from typing import Any, Optional, TYPE_CHECKING
1513

1614
from azure.mgmt.core import ARMPipelineClient
1715
from azure.profiles import KnownProfiles, ProfileDefinition
1816
from azure.profiles.multiapiclient import MultiApiClientMixin
1917

2018
from ._configuration import ManagedServiceIdentityClientConfiguration
19+
from ._serialization import Deserializer, Serializer
2120

2221
if TYPE_CHECKING:
2322
# pylint: disable=unused-import,ungrouped-imports
24-
from typing import Any, Optional
25-
2623
from azure.core.credentials import TokenCredential
2724

2825
class _SDKClient(object):
@@ -43,9 +40,9 @@ class ManagedServiceIdentityClient(MultiApiClientMixin, _SDKClient):
4340
The api-version parameter sets the default API version if the operation
4441
group is not described in the profile.
4542
46-
:param credential: Credential needed for the client to connect to Azure.
43+
:param credential: Credential needed for the client to connect to Azure. Required.
4744
:type credential: ~azure.core.credentials.TokenCredential
48-
:param subscription_id: The Id of the Subscription to which the identity belongs.
45+
:param subscription_id: The Id of the Subscription to which the identity belongs. Required.
4946
:type subscription_id: str
5047
:param api_version: API version to use if no profile is provided, or if missing in profile.
5148
:type api_version: str
@@ -66,12 +63,12 @@ class ManagedServiceIdentityClient(MultiApiClientMixin, _SDKClient):
6663

6764
def __init__(
6865
self,
69-
credential, # type: "TokenCredential"
70-
subscription_id, # type: str
71-
api_version=None, # type: Optional[str]
72-
base_url="https://management.azure.com", # type: str
73-
profile=KnownProfiles.default, # type: KnownProfiles
74-
**kwargs # type: Any
66+
credential: "TokenCredential",
67+
subscription_id: str,
68+
api_version: Optional[str]=None,
69+
base_url: str = "https://management.azure.com",
70+
profile: KnownProfiles=KnownProfiles.default,
71+
**kwargs: Any
7572
):
7673
self._config = ManagedServiceIdentityClientConfiguration(credential, subscription_id, **kwargs)
7774
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
@@ -114,6 +111,7 @@ def federated_identity_credentials(self):
114111
from .v2022_01_31_preview.operations import FederatedIdentityCredentialsOperations as OperationClass
115112
else:
116113
raise ValueError("API version {} does not have operation group 'federated_identity_credentials'".format(api_version))
114+
self._config.api_version = api_version
117115
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
118116

119117
@property
@@ -133,6 +131,7 @@ def operations(self):
133131
from .v2022_01_31_preview.operations import Operations as OperationClass
134132
else:
135133
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
134+
self._config.api_version = api_version
136135
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
137136

138137
@property
@@ -152,6 +151,7 @@ def system_assigned_identities(self):
152151
from .v2022_01_31_preview.operations import SystemAssignedIdentitiesOperations as OperationClass
153152
else:
154153
raise ValueError("API version {} does not have operation group 'system_assigned_identities'".format(api_version))
154+
self._config.api_version = api_version
155155
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
156156

157157
@property
@@ -171,6 +171,7 @@ def user_assigned_identities(self):
171171
from .v2022_01_31_preview.operations import UserAssignedIdentitiesOperations as OperationClass
172172
else:
173173
raise ValueError("API version {} does not have operation group 'user_assigned_identities'".format(api_version))
174+
self._config.api_version = api_version
174175
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
175176

176177
def close(self):

0 commit comments

Comments
 (0)