7
7
# --------------------------------------------------------------------------
8
8
9
9
from copy import deepcopy
10
- from typing import Any , Optional , TYPE_CHECKING
10
+ from typing import Any , TYPE_CHECKING
11
11
12
12
from azure .core .rest import HttpRequest , HttpResponse
13
13
from azure .mgmt .core import ARMPipelineClient
14
- from msrest import Deserializer , Serializer
15
14
16
15
from . import models
17
16
from ._configuration import ContainerAppsAPIClientConfiguration
18
- from .operations import CertificatesOperations , ContainerAppsAuthConfigsOperations , ContainerAppsOperations , ContainerAppsRevisionReplicasOperations , ContainerAppsRevisionsOperations , ContainerAppsSourceControlsOperations , DaprComponentsOperations , ManagedEnvironmentsOperations , ManagedEnvironmentsStoragesOperations , Operations
17
+ from ._serialization import Deserializer , Serializer
18
+ from .operations import (
19
+ CertificatesOperations ,
20
+ ConnectedEnvironmentsCertificatesOperations ,
21
+ ConnectedEnvironmentsDaprComponentsOperations ,
22
+ ConnectedEnvironmentsOperations ,
23
+ ConnectedEnvironmentsStoragesOperations ,
24
+ ContainerAppsAuthConfigsOperations ,
25
+ ContainerAppsDiagnosticsOperations ,
26
+ ContainerAppsOperations ,
27
+ ContainerAppsRevisionReplicasOperations ,
28
+ ContainerAppsRevisionsOperations ,
29
+ ContainerAppsSourceControlsOperations ,
30
+ DaprComponentsOperations ,
31
+ ManagedEnvironmentDiagnosticsOperations ,
32
+ ManagedEnvironmentsDiagnosticsOperations ,
33
+ ManagedEnvironmentsOperations ,
34
+ ManagedEnvironmentsStoragesOperations ,
35
+ NamespacesOperations ,
36
+ Operations ,
37
+ )
19
38
20
39
if TYPE_CHECKING :
21
40
# pylint: disable=unused-import,ungrouped-imports
22
41
from azure .core .credentials import TokenCredential
23
42
24
- class ContainerAppsAPIClient :
43
+
44
+ class ContainerAppsAPIClient : # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
25
45
"""ContainerAppsAPIClient.
26
46
47
+ :ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations
48
+ :vartype container_apps_auth_configs:
49
+ azure.mgmt.app.operations.ContainerAppsAuthConfigsOperations
27
50
:ivar container_apps: ContainerAppsOperations operations
28
- :vartype container_apps: container_apps_api_client .operations.ContainerAppsOperations
51
+ :vartype container_apps: azure.mgmt.app .operations.ContainerAppsOperations
29
52
:ivar container_apps_revisions: ContainerAppsRevisionsOperations operations
30
- :vartype container_apps_revisions:
31
- container_apps_api_client.operations.ContainerAppsRevisionsOperations
53
+ :vartype container_apps_revisions: azure.mgmt.app.operations.ContainerAppsRevisionsOperations
32
54
:ivar container_apps_revision_replicas: ContainerAppsRevisionReplicasOperations operations
33
55
:vartype container_apps_revision_replicas:
34
- container_apps_api_client.operations.ContainerAppsRevisionReplicasOperations
56
+ azure.mgmt.app.operations.ContainerAppsRevisionReplicasOperations
57
+ :ivar dapr_components: DaprComponentsOperations operations
58
+ :vartype dapr_components: azure.mgmt.app.operations.DaprComponentsOperations
59
+ :ivar container_apps_diagnostics: ContainerAppsDiagnosticsOperations operations
60
+ :vartype container_apps_diagnostics:
61
+ azure.mgmt.app.operations.ContainerAppsDiagnosticsOperations
62
+ :ivar managed_environment_diagnostics: ManagedEnvironmentDiagnosticsOperations operations
63
+ :vartype managed_environment_diagnostics:
64
+ azure.mgmt.app.operations.ManagedEnvironmentDiagnosticsOperations
65
+ :ivar managed_environments_diagnostics: ManagedEnvironmentsDiagnosticsOperations operations
66
+ :vartype managed_environments_diagnostics:
67
+ azure.mgmt.app.operations.ManagedEnvironmentsDiagnosticsOperations
68
+ :ivar operations: Operations operations
69
+ :vartype operations: azure.mgmt.app.operations.Operations
35
70
:ivar managed_environments: ManagedEnvironmentsOperations operations
36
- :vartype managed_environments:
37
- container_apps_api_client.operations.ManagedEnvironmentsOperations
71
+ :vartype managed_environments: azure.mgmt.app.operations.ManagedEnvironmentsOperations
38
72
:ivar certificates: CertificatesOperations operations
39
- :vartype certificates: container_apps_api_client.operations.CertificatesOperations
40
- :ivar operations: Operations operations
41
- :vartype operations: container_apps_api_client.operations.Operations
42
- :ivar container_apps_source_controls: ContainerAppsSourceControlsOperations operations
43
- :vartype container_apps_source_controls:
44
- container_apps_api_client.operations.ContainerAppsSourceControlsOperations
45
- :ivar dapr_components: DaprComponentsOperations operations
46
- :vartype dapr_components: container_apps_api_client.operations.DaprComponentsOperations
47
- :ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations
48
- :vartype container_apps_auth_configs:
49
- container_apps_api_client.operations.ContainerAppsAuthConfigsOperations
73
+ :vartype certificates: azure.mgmt.app.operations.CertificatesOperations
74
+ :ivar namespaces: NamespacesOperations operations
75
+ :vartype namespaces: azure.mgmt.app.operations.NamespacesOperations
50
76
:ivar managed_environments_storages: ManagedEnvironmentsStoragesOperations operations
51
77
:vartype managed_environments_storages:
52
- container_apps_api_client.operations.ManagedEnvironmentsStoragesOperations
53
- :param credential: Credential needed for the client to connect to Azure.
78
+ azure.mgmt.app.operations.ManagedEnvironmentsStoragesOperations
79
+ :ivar container_apps_source_controls: ContainerAppsSourceControlsOperations operations
80
+ :vartype container_apps_source_controls:
81
+ azure.mgmt.app.operations.ContainerAppsSourceControlsOperations
82
+ :ivar connected_environments: ConnectedEnvironmentsOperations operations
83
+ :vartype connected_environments: azure.mgmt.app.operations.ConnectedEnvironmentsOperations
84
+ :ivar connected_environments_certificates: ConnectedEnvironmentsCertificatesOperations
85
+ operations
86
+ :vartype connected_environments_certificates:
87
+ azure.mgmt.app.operations.ConnectedEnvironmentsCertificatesOperations
88
+ :ivar connected_environments_dapr_components: ConnectedEnvironmentsDaprComponentsOperations
89
+ operations
90
+ :vartype connected_environments_dapr_components:
91
+ azure.mgmt.app.operations.ConnectedEnvironmentsDaprComponentsOperations
92
+ :ivar connected_environments_storages: ConnectedEnvironmentsStoragesOperations operations
93
+ :vartype connected_environments_storages:
94
+ azure.mgmt.app.operations.ConnectedEnvironmentsStoragesOperations
95
+ :param credential: Credential needed for the client to connect to Azure. Required.
54
96
:type credential: ~azure.core.credentials.TokenCredential
55
- :param subscription_id: The ID of the target subscription.
97
+ :param subscription_id: The ID of the target subscription. Required.
56
98
:type subscription_id: str
57
- :param base_url: Service URL. Default value is ' https://management.azure.com' .
99
+ :param base_url: Service URL. Default value is " https://management.azure.com" .
58
100
:type base_url: str
101
+ :keyword api_version: Api Version. Default value is "2022-06-01-preview". Note that overriding
102
+ this default value may result in unsupported behavior.
103
+ :paramtype api_version: str
59
104
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
60
105
Retry-After header is present.
61
106
"""
@@ -67,30 +112,61 @@ def __init__(
67
112
base_url : str = "https://management.azure.com" ,
68
113
** kwargs : Any
69
114
) -> None :
70
- self ._config = ContainerAppsAPIClientConfiguration (credential = credential , subscription_id = subscription_id , ** kwargs )
115
+ self ._config = ContainerAppsAPIClientConfiguration (
116
+ credential = credential , subscription_id = subscription_id , ** kwargs
117
+ )
71
118
self ._client = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
72
119
73
120
client_models = {k : v for k , v in models .__dict__ .items () if isinstance (v , type )}
74
121
self ._serialize = Serializer (client_models )
75
122
self ._deserialize = Deserializer (client_models )
76
123
self ._serialize .client_side_validation = False
124
+ self .container_apps_auth_configs = ContainerAppsAuthConfigsOperations (
125
+ self ._client , self ._config , self ._serialize , self ._deserialize
126
+ )
77
127
self .container_apps = ContainerAppsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
78
- self .container_apps_revisions = ContainerAppsRevisionsOperations (self . _client , self . _config , self . _serialize , self . _deserialize )
79
- self . container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations ( self ._client , self ._config , self ._serialize , self ._deserialize )
80
- self . managed_environments = ManagedEnvironmentsOperations ( self . _client , self . _config , self . _serialize , self . _deserialize )
81
- self .certificates = CertificatesOperations ( self . _client , self . _config , self . _serialize , self . _deserialize )
82
- self . operations = Operations ( self ._client , self ._config , self ._serialize , self ._deserialize )
83
- self . container_apps_source_controls = ContainerAppsSourceControlsOperations ( self . _client , self . _config , self . _serialize , self . _deserialize )
128
+ self .container_apps_revisions = ContainerAppsRevisionsOperations (
129
+ self ._client , self ._config , self ._serialize , self ._deserialize
130
+ )
131
+ self .container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations (
132
+ self ._client , self ._config , self ._serialize , self ._deserialize
133
+ )
84
134
self .dapr_components = DaprComponentsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
85
- self .container_apps_auth_configs = ContainerAppsAuthConfigsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
86
- self .managed_environments_storages = ManagedEnvironmentsStoragesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
87
-
88
-
89
- def _send_request (
90
- self ,
91
- request , # type: HttpRequest
92
- ** kwargs : Any
93
- ) -> HttpResponse :
135
+ self .container_apps_diagnostics = ContainerAppsDiagnosticsOperations (
136
+ self ._client , self ._config , self ._serialize , self ._deserialize
137
+ )
138
+ self .managed_environment_diagnostics = ManagedEnvironmentDiagnosticsOperations (
139
+ self ._client , self ._config , self ._serialize , self ._deserialize
140
+ )
141
+ self .managed_environments_diagnostics = ManagedEnvironmentsDiagnosticsOperations (
142
+ self ._client , self ._config , self ._serialize , self ._deserialize
143
+ )
144
+ self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
145
+ self .managed_environments = ManagedEnvironmentsOperations (
146
+ self ._client , self ._config , self ._serialize , self ._deserialize
147
+ )
148
+ self .certificates = CertificatesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
149
+ self .namespaces = NamespacesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
150
+ self .managed_environments_storages = ManagedEnvironmentsStoragesOperations (
151
+ self ._client , self ._config , self ._serialize , self ._deserialize
152
+ )
153
+ self .container_apps_source_controls = ContainerAppsSourceControlsOperations (
154
+ self ._client , self ._config , self ._serialize , self ._deserialize
155
+ )
156
+ self .connected_environments = ConnectedEnvironmentsOperations (
157
+ self ._client , self ._config , self ._serialize , self ._deserialize
158
+ )
159
+ self .connected_environments_certificates = ConnectedEnvironmentsCertificatesOperations (
160
+ self ._client , self ._config , self ._serialize , self ._deserialize
161
+ )
162
+ self .connected_environments_dapr_components = ConnectedEnvironmentsDaprComponentsOperations (
163
+ self ._client , self ._config , self ._serialize , self ._deserialize
164
+ )
165
+ self .connected_environments_storages = ConnectedEnvironmentsStoragesOperations (
166
+ self ._client , self ._config , self ._serialize , self ._deserialize
167
+ )
168
+
169
+ def _send_request (self , request : HttpRequest , ** kwargs : Any ) -> HttpResponse :
94
170
"""Runs the network request through the client's chained policies.
95
171
96
172
>>> from azure.core.rest import HttpRequest
@@ -99,7 +175,7 @@ def _send_request(
99
175
>>> response = client._send_request(request)
100
176
<HttpResponse: 200 OK>
101
177
102
- For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
178
+ For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/ python/send_request
103
179
104
180
:param request: The network request you want to make. Required.
105
181
:type request: ~azure.core.rest.HttpRequest
0 commit comments