Skip to content

Commit 6152171

Browse files
author
SDKAuto
committed
CodeGen from PR 12271 in Azure/azure-rest-api-specs
Merge 736672f3b59fa2f0f89a0672801694561a9bce3a into f48dd77
1 parent 5aa3396 commit 6152171

File tree

11 files changed

+297
-14
lines changed

11 files changed

+297
-14
lines changed

sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_app_platform_management_client.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,17 @@ def models(cls, api_version=DEFAULT_API_VERSION):
7575
7676
* 2019-05-01-preview: :mod:`v2019_05_01_preview.models<azure.mgmt.appplatform.v2019_05_01_preview.models>`
7777
* 2020-07-01: :mod:`v2020_07_01.models<azure.mgmt.appplatform.v2020_07_01.models>`
78+
* 2020-11-01-preview: :mod:`v2020_11_01_preview.models<azure.mgmt.appplatform.v2020_11_01_preview.models>`
7879
"""
7980
if api_version == '2019-05-01-preview':
8081
from .v2019_05_01_preview import models
8182
return models
8283
elif api_version == '2020-07-01':
8384
from .v2020_07_01 import models
8485
return models
86+
elif api_version == '2020-11-01-preview':
87+
from .v2020_11_01_preview import models
88+
return models
8589
raise NotImplementedError("APIVersion {} is not available".format(api_version))
8690

8791
@property
@@ -90,12 +94,15 @@ def apps(self):
9094
9195
* 2019-05-01-preview: :class:`AppsOperations<azure.mgmt.appplatform.v2019_05_01_preview.operations.AppsOperations>`
9296
* 2020-07-01: :class:`AppsOperations<azure.mgmt.appplatform.v2020_07_01.operations.AppsOperations>`
97+
* 2020-11-01-preview: :class:`AppsOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.AppsOperations>`
9398
"""
9499
api_version = self._get_api_version('apps')
95100
if api_version == '2019-05-01-preview':
96101
from .v2019_05_01_preview.operations import AppsOperations as OperationClass
97102
elif api_version == '2020-07-01':
98103
from .v2020_07_01.operations import AppsOperations as OperationClass
104+
elif api_version == '2020-11-01-preview':
105+
from .v2020_11_01_preview.operations import AppsOperations as OperationClass
99106
else:
100107
raise NotImplementedError("APIVersion {} is not available".format(api_version))
101108
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -106,12 +113,15 @@ def bindings(self):
106113
107114
* 2019-05-01-preview: :class:`BindingsOperations<azure.mgmt.appplatform.v2019_05_01_preview.operations.BindingsOperations>`
108115
* 2020-07-01: :class:`BindingsOperations<azure.mgmt.appplatform.v2020_07_01.operations.BindingsOperations>`
116+
* 2020-11-01-preview: :class:`BindingsOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.BindingsOperations>`
109117
"""
110118
api_version = self._get_api_version('bindings')
111119
if api_version == '2019-05-01-preview':
112120
from .v2019_05_01_preview.operations import BindingsOperations as OperationClass
113121
elif api_version == '2020-07-01':
114122
from .v2020_07_01.operations import BindingsOperations as OperationClass
123+
elif api_version == '2020-11-01-preview':
124+
from .v2020_11_01_preview.operations import BindingsOperations as OperationClass
115125
else:
116126
raise NotImplementedError("APIVersion {} is not available".format(api_version))
117127
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -122,12 +132,15 @@ def certificates(self):
122132
123133
* 2019-05-01-preview: :class:`CertificatesOperations<azure.mgmt.appplatform.v2019_05_01_preview.operations.CertificatesOperations>`
124134
* 2020-07-01: :class:`CertificatesOperations<azure.mgmt.appplatform.v2020_07_01.operations.CertificatesOperations>`
135+
* 2020-11-01-preview: :class:`CertificatesOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.CertificatesOperations>`
125136
"""
126137
api_version = self._get_api_version('certificates')
127138
if api_version == '2019-05-01-preview':
128139
from .v2019_05_01_preview.operations import CertificatesOperations as OperationClass
129140
elif api_version == '2020-07-01':
130141
from .v2020_07_01.operations import CertificatesOperations as OperationClass
142+
elif api_version == '2020-11-01-preview':
143+
from .v2020_11_01_preview.operations import CertificatesOperations as OperationClass
131144
else:
132145
raise NotImplementedError("APIVersion {} is not available".format(api_version))
133146
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -137,10 +150,13 @@ def config_servers(self):
137150
"""Instance depends on the API version:
138151
139152
* 2020-07-01: :class:`ConfigServersOperations<azure.mgmt.appplatform.v2020_07_01.operations.ConfigServersOperations>`
153+
* 2020-11-01-preview: :class:`ConfigServersOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.ConfigServersOperations>`
140154
"""
141155
api_version = self._get_api_version('config_servers')
142156
if api_version == '2020-07-01':
143157
from .v2020_07_01.operations import ConfigServersOperations as OperationClass
158+
elif api_version == '2020-11-01-preview':
159+
from .v2020_11_01_preview.operations import ConfigServersOperations as OperationClass
144160
else:
145161
raise NotImplementedError("APIVersion {} is not available".format(api_version))
146162
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -151,12 +167,15 @@ def custom_domains(self):
151167
152168
* 2019-05-01-preview: :class:`CustomDomainsOperations<azure.mgmt.appplatform.v2019_05_01_preview.operations.CustomDomainsOperations>`
153169
* 2020-07-01: :class:`CustomDomainsOperations<azure.mgmt.appplatform.v2020_07_01.operations.CustomDomainsOperations>`
170+
* 2020-11-01-preview: :class:`CustomDomainsOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.CustomDomainsOperations>`
154171
"""
155172
api_version = self._get_api_version('custom_domains')
156173
if api_version == '2019-05-01-preview':
157174
from .v2019_05_01_preview.operations import CustomDomainsOperations as OperationClass
158175
elif api_version == '2020-07-01':
159176
from .v2020_07_01.operations import CustomDomainsOperations as OperationClass
177+
elif api_version == '2020-11-01-preview':
178+
from .v2020_11_01_preview.operations import CustomDomainsOperations as OperationClass
160179
else:
161180
raise NotImplementedError("APIVersion {} is not available".format(api_version))
162181
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -167,12 +186,15 @@ def deployments(self):
167186
168187
* 2019-05-01-preview: :class:`DeploymentsOperations<azure.mgmt.appplatform.v2019_05_01_preview.operations.DeploymentsOperations>`
169188
* 2020-07-01: :class:`DeploymentsOperations<azure.mgmt.appplatform.v2020_07_01.operations.DeploymentsOperations>`
189+
* 2020-11-01-preview: :class:`DeploymentsOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.DeploymentsOperations>`
170190
"""
171191
api_version = self._get_api_version('deployments')
172192
if api_version == '2019-05-01-preview':
173193
from .v2019_05_01_preview.operations import DeploymentsOperations as OperationClass
174194
elif api_version == '2020-07-01':
175195
from .v2020_07_01.operations import DeploymentsOperations as OperationClass
196+
elif api_version == '2020-11-01-preview':
197+
from .v2020_11_01_preview.operations import DeploymentsOperations as OperationClass
176198
else:
177199
raise NotImplementedError("APIVersion {} is not available".format(api_version))
178200
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -182,10 +204,13 @@ def monitoring_settings(self):
182204
"""Instance depends on the API version:
183205
184206
* 2020-07-01: :class:`MonitoringSettingsOperations<azure.mgmt.appplatform.v2020_07_01.operations.MonitoringSettingsOperations>`
207+
* 2020-11-01-preview: :class:`MonitoringSettingsOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.MonitoringSettingsOperations>`
185208
"""
186209
api_version = self._get_api_version('monitoring_settings')
187210
if api_version == '2020-07-01':
188211
from .v2020_07_01.operations import MonitoringSettingsOperations as OperationClass
212+
elif api_version == '2020-11-01-preview':
213+
from .v2020_11_01_preview.operations import MonitoringSettingsOperations as OperationClass
189214
else:
190215
raise NotImplementedError("APIVersion {} is not available".format(api_version))
191216
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -196,12 +221,34 @@ def operations(self):
196221
197222
* 2019-05-01-preview: :class:`Operations<azure.mgmt.appplatform.v2019_05_01_preview.operations.Operations>`
198223
* 2020-07-01: :class:`Operations<azure.mgmt.appplatform.v2020_07_01.operations.Operations>`
224+
* 2020-11-01-preview: :class:`Operations<azure.mgmt.appplatform.v2020_11_01_preview.operations.Operations>`
199225
"""
200226
api_version = self._get_api_version('operations')
201227
if api_version == '2019-05-01-preview':
202228
from .v2019_05_01_preview.operations import Operations as OperationClass
203229
elif api_version == '2020-07-01':
204230
from .v2020_07_01.operations import Operations as OperationClass
231+
elif api_version == '2020-11-01-preview':
232+
from .v2020_11_01_preview.operations import Operations as OperationClass
233+
else:
234+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
235+
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
236+
237+
@property
238+
def runtime_versions(self):
239+
"""Instance depends on the API version:
240+
241+
* 2019-05-01-preview: :class:`RuntimeVersionsOperations<azure.mgmt.appplatform.v2019_05_01_preview.operations.RuntimeVersionsOperations>`
242+
* 2020-07-01: :class:`RuntimeVersionsOperations<azure.mgmt.appplatform.v2020_07_01.operations.RuntimeVersionsOperations>`
243+
* 2020-11-01-preview: :class:`RuntimeVersionsOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.RuntimeVersionsOperations>`
244+
"""
245+
api_version = self._get_api_version('runtime_versions')
246+
if api_version == '2019-05-01-preview':
247+
from .v2019_05_01_preview.operations import RuntimeVersionsOperations as OperationClass
248+
elif api_version == '2020-07-01':
249+
from .v2020_07_01.operations import RuntimeVersionsOperations as OperationClass
250+
elif api_version == '2020-11-01-preview':
251+
from .v2020_11_01_preview.operations import RuntimeVersionsOperations as OperationClass
205252
else:
206253
raise NotImplementedError("APIVersion {} is not available".format(api_version))
207254
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -212,12 +259,15 @@ def services(self):
212259
213260
* 2019-05-01-preview: :class:`ServicesOperations<azure.mgmt.appplatform.v2019_05_01_preview.operations.ServicesOperations>`
214261
* 2020-07-01: :class:`ServicesOperations<azure.mgmt.appplatform.v2020_07_01.operations.ServicesOperations>`
262+
* 2020-11-01-preview: :class:`ServicesOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.ServicesOperations>`
215263
"""
216264
api_version = self._get_api_version('services')
217265
if api_version == '2019-05-01-preview':
218266
from .v2019_05_01_preview.operations import ServicesOperations as OperationClass
219267
elif api_version == '2020-07-01':
220268
from .v2020_07_01.operations import ServicesOperations as OperationClass
269+
elif api_version == '2020-11-01-preview':
270+
from .v2020_11_01_preview.operations import ServicesOperations as OperationClass
221271
else:
222272
raise NotImplementedError("APIVersion {} is not available".format(api_version))
223273
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -240,10 +290,13 @@ def skus(self):
240290
"""Instance depends on the API version:
241291
242292
* 2020-07-01: :class:`SkusOperations<azure.mgmt.appplatform.v2020_07_01.operations.SkusOperations>`
293+
* 2020-11-01-preview: :class:`SkusOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.SkusOperations>`
243294
"""
244295
api_version = self._get_api_version('skus')
245296
if api_version == '2020-07-01':
246297
from .v2020_07_01.operations import SkusOperations as OperationClass
298+
elif api_version == '2020-11-01-preview':
299+
from .v2020_11_01_preview.operations import SkusOperations as OperationClass
247300
else:
248301
raise NotImplementedError("APIVersion {} is not available".format(api_version))
249302
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
from ._models_py3 import PersistentDisk
4747
from ._models_py3 import ProxyResource
4848
from ._models_py3 import RegenerateTestKeyRequestPayload
49+
from ._models_py3 import RequiredTraffic
4950
from ._models_py3 import Resource
5051
from ._models_py3 import ResourceSku
5152
from ._models_py3 import ResourceSkuCapabilities
@@ -101,6 +102,7 @@
101102
from ._models import PersistentDisk
102103
from ._models import ProxyResource
103104
from ._models import RegenerateTestKeyRequestPayload
105+
from ._models import RequiredTraffic
104106
from ._models import Resource
105107
from ._models import ResourceSku
106108
from ._models import ResourceSkuCapabilities
@@ -131,6 +133,7 @@
131133
ProvisioningState,
132134
ConfigServerState,
133135
TraceProxyState,
136+
TrafficDirection,
134137
ManagedIdentityType,
135138
TestKeyType,
136139
AppResourceProvisioningState,
@@ -182,6 +185,7 @@
182185
'PersistentDisk',
183186
'ProxyResource',
184187
'RegenerateTestKeyRequestPayload',
188+
'RequiredTraffic',
185189
'Resource',
186190
'ResourceSku',
187191
'ResourceSkuCapabilities',
@@ -211,6 +215,7 @@
211215
'ProvisioningState',
212216
'ConfigServerState',
213217
'TraceProxyState',
218+
'TrafficDirection',
214219
'ManagedIdentityType',
215220
'TestKeyType',
216221
'AppResourceProvisioningState',

sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/_app_platform_management_client_enums.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ class TraceProxyState(str, Enum):
4242
updating = "Updating"
4343

4444

45+
class TrafficDirection(str, Enum):
46+
47+
inbound = "Inbound"
48+
outbound = "Outbound"
49+
50+
4551
class ManagedIdentityType(str, Enum):
4652

4753
none = "None"

sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/_models.py

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,10 +1238,15 @@ class NetworkProfile(Model):
12381238
instance.
12391239
:vartype outbound_ips:
12401240
~azure.mgmt.appplatform.v2019_05_01_preview.models.NetworkProfileOutboundIPs
1241+
:ivar required_traffics: Required inbound or outbound traffics for Azure
1242+
Spring Cloud instance.
1243+
:vartype required_traffics:
1244+
list[~azure.mgmt.appplatform.v2019_05_01_preview.models.RequiredTraffic]
12411245
"""
12421246

12431247
_validation = {
12441248
'outbound_ips': {'readonly': True},
1249+
'required_traffics': {'readonly': True},
12451250
}
12461251

12471252
_attribute_map = {
@@ -1251,6 +1256,7 @@ class NetworkProfile(Model):
12511256
'service_runtime_network_resource_group': {'key': 'serviceRuntimeNetworkResourceGroup', 'type': 'str'},
12521257
'app_network_resource_group': {'key': 'appNetworkResourceGroup', 'type': 'str'},
12531258
'outbound_ips': {'key': 'outboundIPs', 'type': 'NetworkProfileOutboundIPs'},
1259+
'required_traffics': {'key': 'requiredTraffics', 'type': '[RequiredTraffic]'},
12541260
}
12551261

12561262
def __init__(self, **kwargs):
@@ -1261,6 +1267,7 @@ def __init__(self, **kwargs):
12611267
self.service_runtime_network_resource_group = kwargs.get('service_runtime_network_resource_group', None)
12621268
self.app_network_resource_group = kwargs.get('app_network_resource_group', None)
12631269
self.outbound_ips = None
1270+
self.required_traffics = None
12641271

12651272

12661273
class NetworkProfileOutboundIPs(Model):
@@ -1421,6 +1428,51 @@ def __init__(self, **kwargs):
14211428
self.key_type = kwargs.get('key_type', None)
14221429

14231430

1431+
class RequiredTraffic(Model):
1432+
"""Required inbound or outbound traffic for Azure Spring Cloud instance.
1433+
1434+
Variables are only populated by the server, and will be ignored when
1435+
sending a request.
1436+
1437+
:ivar protocol: The protocol of required traffic
1438+
:vartype protocol: str
1439+
:ivar port: The port of required traffic
1440+
:vartype port: int
1441+
:ivar ips: The ip list of required traffic
1442+
:vartype ips: list[str]
1443+
:ivar fqdns: The FQDN list of required traffic
1444+
:vartype fqdns: list[str]
1445+
:ivar direction: The direction of required traffic. Possible values
1446+
include: 'Inbound', 'Outbound'
1447+
:vartype direction: str or
1448+
~azure.mgmt.appplatform.v2019_05_01_preview.models.TrafficDirection
1449+
"""
1450+
1451+
_validation = {
1452+
'protocol': {'readonly': True},
1453+
'port': {'readonly': True},
1454+
'ips': {'readonly': True},
1455+
'fqdns': {'readonly': True},
1456+
'direction': {'readonly': True},
1457+
}
1458+
1459+
_attribute_map = {
1460+
'protocol': {'key': 'protocol', 'type': 'str'},
1461+
'port': {'key': 'port', 'type': 'int'},
1462+
'ips': {'key': 'ips', 'type': '[str]'},
1463+
'fqdns': {'key': 'fqdns', 'type': '[str]'},
1464+
'direction': {'key': 'direction', 'type': 'str'},
1465+
}
1466+
1467+
def __init__(self, **kwargs):
1468+
super(RequiredTraffic, self).__init__(**kwargs)
1469+
self.protocol = None
1470+
self.port = None
1471+
self.ips = None
1472+
self.fqdns = None
1473+
self.direction = None
1474+
1475+
14241476
class ResourceSku(Model):
14251477
"""Describes an available Azure Spring Cloud SKU.
14261478
@@ -1724,9 +1776,9 @@ def __init__(self, **kwargs):
17241776
class Sku(Model):
17251777
"""Sku of Azure Spring Cloud.
17261778
1727-
:param name: Name of the Sku
1779+
:param name: Name of the Sku. Default value: "S0" .
17281780
:type name: str
1729-
:param tier: Tier of the Sku
1781+
:param tier: Tier of the Sku. Default value: "Standard" .
17301782
:type tier: str
17311783
:param capacity: Current capacity of the target resource
17321784
:type capacity: int
@@ -1740,8 +1792,8 @@ class Sku(Model):
17401792

17411793
def __init__(self, **kwargs):
17421794
super(Sku, self).__init__(**kwargs)
1743-
self.name = kwargs.get('name', None)
1744-
self.tier = kwargs.get('tier', None)
1795+
self.name = kwargs.get('name', "S0")
1796+
self.tier = kwargs.get('tier', "Standard")
17451797
self.capacity = kwargs.get('capacity', None)
17461798

17471799

0 commit comments

Comments
 (0)