Skip to content

Commit 0396fd3

Browse files
author
SDKAuto
committed
CodeGen from PR 11669 in Azure/azure-rest-api-specs
[T2] containerservice python automation fix (Azure#11669) * python automation fix * Update readme.python.md
1 parent d0d46ed commit 0396fd3

16 files changed

+9103
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from ._configuration import ContainerServiceClientConfiguration
13+
from ._container_service_client import ContainerServiceClient
14+
__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration']
15+
16+
from .version import VERSION
17+
18+
__version__ = VERSION
19+
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
from msrestazure import AzureConfiguration
12+
13+
from .version import VERSION
14+
15+
16+
class ContainerServiceClientConfiguration(AzureConfiguration):
17+
"""Configuration for ContainerServiceClient
18+
Note that all parameters used to create this instance are saved as instance
19+
attributes.
20+
21+
:param credentials: Credentials needed for the client to connect to Azure.
22+
:type credentials: :mod:`A msrestazure Credentials
23+
object<msrestazure.azure_active_directory>`
24+
:param subscription_id: Subscription credentials which uniquely identify
25+
Microsoft Azure subscription. The subscription ID forms part of the URI
26+
for every service call.
27+
:type subscription_id: str
28+
:param str base_url: Service URL
29+
"""
30+
31+
def __init__(
32+
self, credentials, subscription_id, base_url=None):
33+
34+
if credentials is None:
35+
raise ValueError("Parameter 'credentials' must not be None.")
36+
if subscription_id is None:
37+
raise ValueError("Parameter 'subscription_id' must not be None.")
38+
if not base_url:
39+
base_url = 'https://management.azure.com'
40+
41+
super(ContainerServiceClientConfiguration, self).__init__(base_url)
42+
43+
# Starting Autorest.Python 4.0.64, make connection pool activated by default
44+
self.keep_alive = True
45+
46+
self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION))
47+
self.add_user_agent('Azure-SDK-For-Python')
48+
49+
self.credentials = credentials
50+
self.subscription_id = subscription_id
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.service_client import SDKClient
13+
from msrest import Serializer, Deserializer
14+
15+
from ._configuration import ContainerServiceClientConfiguration
16+
from .operations import Operations
17+
from .operations import ManagedClustersOperations
18+
from .operations import AgentPoolsOperations
19+
from .operations import PrivateEndpointConnectionsOperations
20+
from .operations import PrivateLinkResourcesOperations
21+
from .operations import ResolvePrivateLinkServiceIdOperations
22+
from . import models
23+
24+
25+
class ContainerServiceClient(SDKClient):
26+
"""The Container Service Client.
27+
28+
:ivar config: Configuration for client.
29+
:vartype config: ContainerServiceClientConfiguration
30+
31+
:ivar operations: Operations operations
32+
:vartype operations: azure.mgmt.containerservice.v2020_11_01.operations.Operations
33+
:ivar managed_clusters: ManagedClusters operations
34+
:vartype managed_clusters: azure.mgmt.containerservice.v2020_11_01.operations.ManagedClustersOperations
35+
:ivar agent_pools: AgentPools operations
36+
:vartype agent_pools: azure.mgmt.containerservice.v2020_11_01.operations.AgentPoolsOperations
37+
:ivar private_endpoint_connections: PrivateEndpointConnections operations
38+
:vartype private_endpoint_connections: azure.mgmt.containerservice.v2020_11_01.operations.PrivateEndpointConnectionsOperations
39+
:ivar private_link_resources: PrivateLinkResources operations
40+
:vartype private_link_resources: azure.mgmt.containerservice.v2020_11_01.operations.PrivateLinkResourcesOperations
41+
:ivar resolve_private_link_service_id: ResolvePrivateLinkServiceId operations
42+
:vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2020_11_01.operations.ResolvePrivateLinkServiceIdOperations
43+
44+
:param credentials: Credentials needed for the client to connect to Azure.
45+
:type credentials: :mod:`A msrestazure Credentials
46+
object<msrestazure.azure_active_directory>`
47+
:param subscription_id: Subscription credentials which uniquely identify
48+
Microsoft Azure subscription. The subscription ID forms part of the URI
49+
for every service call.
50+
:type subscription_id: str
51+
:param str base_url: Service URL
52+
"""
53+
54+
def __init__(
55+
self, credentials, subscription_id, base_url=None):
56+
57+
self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url)
58+
super(ContainerServiceClient, self).__init__(self.config.credentials, self.config)
59+
60+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
61+
self.api_version = '2020-11-01'
62+
self._serialize = Serializer(client_models)
63+
self._deserialize = Deserializer(client_models)
64+
65+
self.operations = Operations(
66+
self._client, self.config, self._serialize, self._deserialize)
67+
self.managed_clusters = ManagedClustersOperations(
68+
self._client, self.config, self._serialize, self._deserialize)
69+
self.agent_pools = AgentPoolsOperations(
70+
self._client, self.config, self._serialize, self._deserialize)
71+
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
72+
self._client, self.config, self._serialize, self._deserialize)
73+
self.private_link_resources = PrivateLinkResourcesOperations(
74+
self._client, self.config, self._serialize, self._deserialize)
75+
self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations(
76+
self._client, self.config, self._serialize, self._deserialize)
Lines changed: 244 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,244 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
try:
13+
from ._models_py3 import AgentPool
14+
from ._models_py3 import AgentPoolAvailableVersions
15+
from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem
16+
from ._models_py3 import AgentPoolUpgradeProfile
17+
from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem
18+
from ._models_py3 import AgentPoolUpgradeSettings
19+
from ._models_py3 import ContainerServiceDiagnosticsProfile
20+
from ._models_py3 import ContainerServiceLinuxProfile
21+
from ._models_py3 import ContainerServiceMasterProfile
22+
from ._models_py3 import ContainerServiceNetworkProfile
23+
from ._models_py3 import ContainerServiceSshConfiguration
24+
from ._models_py3 import ContainerServiceSshPublicKey
25+
from ._models_py3 import ContainerServiceVMDiagnostics
26+
from ._models_py3 import CredentialResult
27+
from ._models_py3 import CredentialResults
28+
from ._models_py3 import KubeletConfig
29+
from ._models_py3 import LinuxOSConfig
30+
from ._models_py3 import ManagedCluster
31+
from ._models_py3 import ManagedClusterAADProfile
32+
from ._models_py3 import ManagedClusterAccessProfile
33+
from ._models_py3 import ManagedClusterAddonProfile
34+
from ._models_py3 import ManagedClusterAddonProfileIdentity
35+
from ._models_py3 import ManagedClusterAgentPoolProfile
36+
from ._models_py3 import ManagedClusterAgentPoolProfileProperties
37+
from ._models_py3 import ManagedClusterAPIServerAccessProfile
38+
from ._models_py3 import ManagedClusterAutoUpgradeProfile
39+
from ._models_py3 import ManagedClusterIdentity
40+
from ._models_py3 import ManagedClusterIdentityUserAssignedIdentitiesValue
41+
from ._models_py3 import ManagedClusterLoadBalancerProfile
42+
from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs
43+
from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes
44+
from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs
45+
from ._models_py3 import ManagedClusterPodIdentity
46+
from ._models_py3 import ManagedClusterPodIdentityException
47+
from ._models_py3 import ManagedClusterPodIdentityProfile
48+
from ._models_py3 import ManagedClusterPodIdentityProvisioningInfo
49+
from ._models_py3 import ManagedClusterPoolUpgradeProfile
50+
from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem
51+
from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile
52+
from ._models_py3 import ManagedClusterPropertiesIdentityProfileValue
53+
from ._models_py3 import ManagedClusterServicePrincipalProfile
54+
from ._models_py3 import ManagedClusterSKU
55+
from ._models_py3 import ManagedClusterUpgradeProfile
56+
from ._models_py3 import ManagedClusterWindowsProfile
57+
from ._models_py3 import OperationValue
58+
from ._models_py3 import PowerState
59+
from ._models_py3 import PrivateEndpoint
60+
from ._models_py3 import PrivateEndpointConnection
61+
from ._models_py3 import PrivateEndpointConnectionListResult
62+
from ._models_py3 import PrivateLinkResource
63+
from ._models_py3 import PrivateLinkResourcesListResult
64+
from ._models_py3 import PrivateLinkServiceConnectionState
65+
from ._models_py3 import Resource
66+
from ._models_py3 import ResourceReference
67+
from ._models_py3 import SubResource
68+
from ._models_py3 import SysctlConfig
69+
from ._models_py3 import TagsObject
70+
from ._models_py3 import UserAssignedIdentity
71+
except (SyntaxError, ImportError):
72+
from ._models import AgentPool
73+
from ._models import AgentPoolAvailableVersions
74+
from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem
75+
from ._models import AgentPoolUpgradeProfile
76+
from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem
77+
from ._models import AgentPoolUpgradeSettings
78+
from ._models import ContainerServiceDiagnosticsProfile
79+
from ._models import ContainerServiceLinuxProfile
80+
from ._models import ContainerServiceMasterProfile
81+
from ._models import ContainerServiceNetworkProfile
82+
from ._models import ContainerServiceSshConfiguration
83+
from ._models import ContainerServiceSshPublicKey
84+
from ._models import ContainerServiceVMDiagnostics
85+
from ._models import CredentialResult
86+
from ._models import CredentialResults
87+
from ._models import KubeletConfig
88+
from ._models import LinuxOSConfig
89+
from ._models import ManagedCluster
90+
from ._models import ManagedClusterAADProfile
91+
from ._models import ManagedClusterAccessProfile
92+
from ._models import ManagedClusterAddonProfile
93+
from ._models import ManagedClusterAddonProfileIdentity
94+
from ._models import ManagedClusterAgentPoolProfile
95+
from ._models import ManagedClusterAgentPoolProfileProperties
96+
from ._models import ManagedClusterAPIServerAccessProfile
97+
from ._models import ManagedClusterAutoUpgradeProfile
98+
from ._models import ManagedClusterIdentity
99+
from ._models import ManagedClusterIdentityUserAssignedIdentitiesValue
100+
from ._models import ManagedClusterLoadBalancerProfile
101+
from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs
102+
from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes
103+
from ._models import ManagedClusterLoadBalancerProfileOutboundIPs
104+
from ._models import ManagedClusterPodIdentity
105+
from ._models import ManagedClusterPodIdentityException
106+
from ._models import ManagedClusterPodIdentityProfile
107+
from ._models import ManagedClusterPodIdentityProvisioningInfo
108+
from ._models import ManagedClusterPoolUpgradeProfile
109+
from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem
110+
from ._models import ManagedClusterPropertiesAutoScalerProfile
111+
from ._models import ManagedClusterPropertiesIdentityProfileValue
112+
from ._models import ManagedClusterServicePrincipalProfile
113+
from ._models import ManagedClusterSKU
114+
from ._models import ManagedClusterUpgradeProfile
115+
from ._models import ManagedClusterWindowsProfile
116+
from ._models import OperationValue
117+
from ._models import PowerState
118+
from ._models import PrivateEndpoint
119+
from ._models import PrivateEndpointConnection
120+
from ._models import PrivateEndpointConnectionListResult
121+
from ._models import PrivateLinkResource
122+
from ._models import PrivateLinkResourcesListResult
123+
from ._models import PrivateLinkServiceConnectionState
124+
from ._models import Resource
125+
from ._models import ResourceReference
126+
from ._models import SubResource
127+
from ._models import SysctlConfig
128+
from ._models import TagsObject
129+
from ._models import UserAssignedIdentity
130+
from ._paged_models import AgentPoolPaged
131+
from ._paged_models import ManagedClusterPaged
132+
from ._paged_models import OperationValuePaged
133+
from ._container_service_client_enums import (
134+
ContainerServiceStorageProfileTypes,
135+
ContainerServiceVMSizeTypes,
136+
OSDiskType,
137+
OSType,
138+
AgentPoolType,
139+
AgentPoolMode,
140+
Code,
141+
ScaleSetPriority,
142+
ScaleSetEvictionPolicy,
143+
LicenseType,
144+
NetworkPlugin,
145+
NetworkPolicy,
146+
NetworkMode,
147+
OutboundType,
148+
LoadBalancerSku,
149+
ManagedClusterPodIdentityProvisioningState,
150+
UpgradeChannel,
151+
Expander,
152+
ResourceIdentityType,
153+
ManagedClusterSKUName,
154+
ManagedClusterSKUTier,
155+
PrivateEndpointConnectionProvisioningState,
156+
ConnectionStatus,
157+
)
158+
159+
__all__ = [
160+
'AgentPool',
161+
'AgentPoolAvailableVersions',
162+
'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem',
163+
'AgentPoolUpgradeProfile',
164+
'AgentPoolUpgradeProfilePropertiesUpgradesItem',
165+
'AgentPoolUpgradeSettings',
166+
'ContainerServiceDiagnosticsProfile',
167+
'ContainerServiceLinuxProfile',
168+
'ContainerServiceMasterProfile',
169+
'ContainerServiceNetworkProfile',
170+
'ContainerServiceSshConfiguration',
171+
'ContainerServiceSshPublicKey',
172+
'ContainerServiceVMDiagnostics',
173+
'CredentialResult',
174+
'CredentialResults',
175+
'KubeletConfig',
176+
'LinuxOSConfig',
177+
'ManagedCluster',
178+
'ManagedClusterAADProfile',
179+
'ManagedClusterAccessProfile',
180+
'ManagedClusterAddonProfile',
181+
'ManagedClusterAddonProfileIdentity',
182+
'ManagedClusterAgentPoolProfile',
183+
'ManagedClusterAgentPoolProfileProperties',
184+
'ManagedClusterAPIServerAccessProfile',
185+
'ManagedClusterAutoUpgradeProfile',
186+
'ManagedClusterIdentity',
187+
'ManagedClusterIdentityUserAssignedIdentitiesValue',
188+
'ManagedClusterLoadBalancerProfile',
189+
'ManagedClusterLoadBalancerProfileManagedOutboundIPs',
190+
'ManagedClusterLoadBalancerProfileOutboundIPPrefixes',
191+
'ManagedClusterLoadBalancerProfileOutboundIPs',
192+
'ManagedClusterPodIdentity',
193+
'ManagedClusterPodIdentityException',
194+
'ManagedClusterPodIdentityProfile',
195+
'ManagedClusterPodIdentityProvisioningInfo',
196+
'ManagedClusterPoolUpgradeProfile',
197+
'ManagedClusterPoolUpgradeProfileUpgradesItem',
198+
'ManagedClusterPropertiesAutoScalerProfile',
199+
'ManagedClusterPropertiesIdentityProfileValue',
200+
'ManagedClusterServicePrincipalProfile',
201+
'ManagedClusterSKU',
202+
'ManagedClusterUpgradeProfile',
203+
'ManagedClusterWindowsProfile',
204+
'OperationValue',
205+
'PowerState',
206+
'PrivateEndpoint',
207+
'PrivateEndpointConnection',
208+
'PrivateEndpointConnectionListResult',
209+
'PrivateLinkResource',
210+
'PrivateLinkResourcesListResult',
211+
'PrivateLinkServiceConnectionState',
212+
'Resource',
213+
'ResourceReference',
214+
'SubResource',
215+
'SysctlConfig',
216+
'TagsObject',
217+
'UserAssignedIdentity',
218+
'OperationValuePaged',
219+
'ManagedClusterPaged',
220+
'AgentPoolPaged',
221+
'ContainerServiceStorageProfileTypes',
222+
'ContainerServiceVMSizeTypes',
223+
'OSDiskType',
224+
'OSType',
225+
'AgentPoolType',
226+
'AgentPoolMode',
227+
'Code',
228+
'ScaleSetPriority',
229+
'ScaleSetEvictionPolicy',
230+
'LicenseType',
231+
'NetworkPlugin',
232+
'NetworkPolicy',
233+
'NetworkMode',
234+
'OutboundType',
235+
'LoadBalancerSku',
236+
'ManagedClusterPodIdentityProvisioningState',
237+
'UpgradeChannel',
238+
'Expander',
239+
'ResourceIdentityType',
240+
'ManagedClusterSKUName',
241+
'ManagedClusterSKUTier',
242+
'PrivateEndpointConnectionProvisioningState',
243+
'ConnectionStatus',
244+
]

0 commit comments

Comments
 (0)