Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,17 @@ def models(cls, api_version=DEFAULT_API_VERSION):

* 2019-05-01-preview: :mod:`v2019_05_01_preview.models<azure.mgmt.appplatform.v2019_05_01_preview.models>`
* 2020-07-01: :mod:`v2020_07_01.models<azure.mgmt.appplatform.v2020_07_01.models>`
* 2020-11-01-preview: :mod:`v2020_11_01_preview.models<azure.mgmt.appplatform.v2020_11_01_preview.models>`
"""
if api_version == '2019-05-01-preview':
from .v2019_05_01_preview import models
return models
elif api_version == '2020-07-01':
from .v2020_07_01 import models
return models
elif api_version == '2020-11-01-preview':
from .v2020_11_01_preview import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
Expand All @@ -90,12 +94,15 @@ def apps(self):

* 2019-05-01-preview: :class:`AppsOperations<azure.mgmt.appplatform.v2019_05_01_preview.operations.AppsOperations>`
* 2020-07-01: :class:`AppsOperations<azure.mgmt.appplatform.v2020_07_01.operations.AppsOperations>`
* 2020-11-01-preview: :class:`AppsOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.AppsOperations>`
"""
api_version = self._get_api_version('apps')
if api_version == '2019-05-01-preview':
from .v2019_05_01_preview.operations import AppsOperations as OperationClass
elif api_version == '2020-07-01':
from .v2020_07_01.operations import AppsOperations as OperationClass
elif api_version == '2020-11-01-preview':
from .v2020_11_01_preview.operations import AppsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -106,12 +113,15 @@ def bindings(self):

* 2019-05-01-preview: :class:`BindingsOperations<azure.mgmt.appplatform.v2019_05_01_preview.operations.BindingsOperations>`
* 2020-07-01: :class:`BindingsOperations<azure.mgmt.appplatform.v2020_07_01.operations.BindingsOperations>`
* 2020-11-01-preview: :class:`BindingsOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.BindingsOperations>`
"""
api_version = self._get_api_version('bindings')
if api_version == '2019-05-01-preview':
from .v2019_05_01_preview.operations import BindingsOperations as OperationClass
elif api_version == '2020-07-01':
from .v2020_07_01.operations import BindingsOperations as OperationClass
elif api_version == '2020-11-01-preview':
from .v2020_11_01_preview.operations import BindingsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -122,12 +132,15 @@ def certificates(self):

* 2019-05-01-preview: :class:`CertificatesOperations<azure.mgmt.appplatform.v2019_05_01_preview.operations.CertificatesOperations>`
* 2020-07-01: :class:`CertificatesOperations<azure.mgmt.appplatform.v2020_07_01.operations.CertificatesOperations>`
* 2020-11-01-preview: :class:`CertificatesOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.CertificatesOperations>`
"""
api_version = self._get_api_version('certificates')
if api_version == '2019-05-01-preview':
from .v2019_05_01_preview.operations import CertificatesOperations as OperationClass
elif api_version == '2020-07-01':
from .v2020_07_01.operations import CertificatesOperations as OperationClass
elif api_version == '2020-11-01-preview':
from .v2020_11_01_preview.operations import CertificatesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -137,10 +150,13 @@ def config_servers(self):
"""Instance depends on the API version:

* 2020-07-01: :class:`ConfigServersOperations<azure.mgmt.appplatform.v2020_07_01.operations.ConfigServersOperations>`
* 2020-11-01-preview: :class:`ConfigServersOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.ConfigServersOperations>`
"""
api_version = self._get_api_version('config_servers')
if api_version == '2020-07-01':
from .v2020_07_01.operations import ConfigServersOperations as OperationClass
elif api_version == '2020-11-01-preview':
from .v2020_11_01_preview.operations import ConfigServersOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -151,12 +167,15 @@ def custom_domains(self):

* 2019-05-01-preview: :class:`CustomDomainsOperations<azure.mgmt.appplatform.v2019_05_01_preview.operations.CustomDomainsOperations>`
* 2020-07-01: :class:`CustomDomainsOperations<azure.mgmt.appplatform.v2020_07_01.operations.CustomDomainsOperations>`
* 2020-11-01-preview: :class:`CustomDomainsOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.CustomDomainsOperations>`
"""
api_version = self._get_api_version('custom_domains')
if api_version == '2019-05-01-preview':
from .v2019_05_01_preview.operations import CustomDomainsOperations as OperationClass
elif api_version == '2020-07-01':
from .v2020_07_01.operations import CustomDomainsOperations as OperationClass
elif api_version == '2020-11-01-preview':
from .v2020_11_01_preview.operations import CustomDomainsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -167,12 +186,15 @@ def deployments(self):

* 2019-05-01-preview: :class:`DeploymentsOperations<azure.mgmt.appplatform.v2019_05_01_preview.operations.DeploymentsOperations>`
* 2020-07-01: :class:`DeploymentsOperations<azure.mgmt.appplatform.v2020_07_01.operations.DeploymentsOperations>`
* 2020-11-01-preview: :class:`DeploymentsOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.DeploymentsOperations>`
"""
api_version = self._get_api_version('deployments')
if api_version == '2019-05-01-preview':
from .v2019_05_01_preview.operations import DeploymentsOperations as OperationClass
elif api_version == '2020-07-01':
from .v2020_07_01.operations import DeploymentsOperations as OperationClass
elif api_version == '2020-11-01-preview':
from .v2020_11_01_preview.operations import DeploymentsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -182,10 +204,13 @@ def monitoring_settings(self):
"""Instance depends on the API version:

* 2020-07-01: :class:`MonitoringSettingsOperations<azure.mgmt.appplatform.v2020_07_01.operations.MonitoringSettingsOperations>`
* 2020-11-01-preview: :class:`MonitoringSettingsOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.MonitoringSettingsOperations>`
"""
api_version = self._get_api_version('monitoring_settings')
if api_version == '2020-07-01':
from .v2020_07_01.operations import MonitoringSettingsOperations as OperationClass
elif api_version == '2020-11-01-preview':
from .v2020_11_01_preview.operations import MonitoringSettingsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -196,12 +221,34 @@ def operations(self):

* 2019-05-01-preview: :class:`Operations<azure.mgmt.appplatform.v2019_05_01_preview.operations.Operations>`
* 2020-07-01: :class:`Operations<azure.mgmt.appplatform.v2020_07_01.operations.Operations>`
* 2020-11-01-preview: :class:`Operations<azure.mgmt.appplatform.v2020_11_01_preview.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2019-05-01-preview':
from .v2019_05_01_preview.operations import Operations as OperationClass
elif api_version == '2020-07-01':
from .v2020_07_01.operations import Operations as OperationClass
elif api_version == '2020-11-01-preview':
from .v2020_11_01_preview.operations import Operations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def runtime_versions(self):
"""Instance depends on the API version:

* 2019-05-01-preview: :class:`RuntimeVersionsOperations<azure.mgmt.appplatform.v2019_05_01_preview.operations.RuntimeVersionsOperations>`
* 2020-07-01: :class:`RuntimeVersionsOperations<azure.mgmt.appplatform.v2020_07_01.operations.RuntimeVersionsOperations>`
* 2020-11-01-preview: :class:`RuntimeVersionsOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.RuntimeVersionsOperations>`
"""
api_version = self._get_api_version('runtime_versions')
if api_version == '2019-05-01-preview':
from .v2019_05_01_preview.operations import RuntimeVersionsOperations as OperationClass
elif api_version == '2020-07-01':
from .v2020_07_01.operations import RuntimeVersionsOperations as OperationClass
elif api_version == '2020-11-01-preview':
from .v2020_11_01_preview.operations import RuntimeVersionsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -212,12 +259,15 @@ def services(self):

* 2019-05-01-preview: :class:`ServicesOperations<azure.mgmt.appplatform.v2019_05_01_preview.operations.ServicesOperations>`
* 2020-07-01: :class:`ServicesOperations<azure.mgmt.appplatform.v2020_07_01.operations.ServicesOperations>`
* 2020-11-01-preview: :class:`ServicesOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.ServicesOperations>`
"""
api_version = self._get_api_version('services')
if api_version == '2019-05-01-preview':
from .v2019_05_01_preview.operations import ServicesOperations as OperationClass
elif api_version == '2020-07-01':
from .v2020_07_01.operations import ServicesOperations as OperationClass
elif api_version == '2020-11-01-preview':
from .v2020_11_01_preview.operations import ServicesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -240,10 +290,13 @@ def skus(self):
"""Instance depends on the API version:

* 2020-07-01: :class:`SkusOperations<azure.mgmt.appplatform.v2020_07_01.operations.SkusOperations>`
* 2020-11-01-preview: :class:`SkusOperations<azure.mgmt.appplatform.v2020_11_01_preview.operations.SkusOperations>`
"""
api_version = self._get_api_version('skus')
if api_version == '2020-07-01':
from .v2020_07_01.operations import SkusOperations as OperationClass
elif api_version == '2020-11-01-preview':
from .v2020_11_01_preview.operations import SkusOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
from ._models_py3 import PersistentDisk
from ._models_py3 import ProxyResource
from ._models_py3 import RegenerateTestKeyRequestPayload
from ._models_py3 import RequiredTraffic
from ._models_py3 import Resource
from ._models_py3 import ResourceSku
from ._models_py3 import ResourceSkuCapabilities
Expand Down Expand Up @@ -101,6 +102,7 @@
from ._models import PersistentDisk
from ._models import ProxyResource
from ._models import RegenerateTestKeyRequestPayload
from ._models import RequiredTraffic
from ._models import Resource
from ._models import ResourceSku
from ._models import ResourceSkuCapabilities
Expand Down Expand Up @@ -131,6 +133,7 @@
ProvisioningState,
ConfigServerState,
TraceProxyState,
TrafficDirection,
ManagedIdentityType,
TestKeyType,
AppResourceProvisioningState,
Expand Down Expand Up @@ -182,6 +185,7 @@
'PersistentDisk',
'ProxyResource',
'RegenerateTestKeyRequestPayload',
'RequiredTraffic',
'Resource',
'ResourceSku',
'ResourceSkuCapabilities',
Expand Down Expand Up @@ -211,6 +215,7 @@
'ProvisioningState',
'ConfigServerState',
'TraceProxyState',
'TrafficDirection',
'ManagedIdentityType',
'TestKeyType',
'AppResourceProvisioningState',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ class TraceProxyState(str, Enum):
updating = "Updating"


class TrafficDirection(str, Enum):

inbound = "Inbound"
outbound = "Outbound"


class ManagedIdentityType(str, Enum):

none = "None"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1238,10 +1238,15 @@ class NetworkProfile(Model):
instance.
:vartype outbound_ips:
~azure.mgmt.appplatform.v2019_05_01_preview.models.NetworkProfileOutboundIPs
:ivar required_traffics: Required inbound or outbound traffics for Azure
Spring Cloud instance.
:vartype required_traffics:
list[~azure.mgmt.appplatform.v2019_05_01_preview.models.RequiredTraffic]
"""

_validation = {
'outbound_ips': {'readonly': True},
'required_traffics': {'readonly': True},
}

_attribute_map = {
Expand All @@ -1251,6 +1256,7 @@ class NetworkProfile(Model):
'service_runtime_network_resource_group': {'key': 'serviceRuntimeNetworkResourceGroup', 'type': 'str'},
'app_network_resource_group': {'key': 'appNetworkResourceGroup', 'type': 'str'},
'outbound_ips': {'key': 'outboundIPs', 'type': 'NetworkProfileOutboundIPs'},
'required_traffics': {'key': 'requiredTraffics', 'type': '[RequiredTraffic]'},
}

def __init__(self, **kwargs):
Expand All @@ -1261,6 +1267,7 @@ def __init__(self, **kwargs):
self.service_runtime_network_resource_group = kwargs.get('service_runtime_network_resource_group', None)
self.app_network_resource_group = kwargs.get('app_network_resource_group', None)
self.outbound_ips = None
self.required_traffics = None


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


class RequiredTraffic(Model):
"""Required inbound or outbound traffic for Azure Spring Cloud instance.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar protocol: The protocol of required traffic
:vartype protocol: str
:ivar port: The port of required traffic
:vartype port: int
:ivar ips: The ip list of required traffic
:vartype ips: list[str]
:ivar fqdns: The FQDN list of required traffic
:vartype fqdns: list[str]
:ivar direction: The direction of required traffic. Possible values
include: 'Inbound', 'Outbound'
:vartype direction: str or
~azure.mgmt.appplatform.v2019_05_01_preview.models.TrafficDirection
"""

_validation = {
'protocol': {'readonly': True},
'port': {'readonly': True},
'ips': {'readonly': True},
'fqdns': {'readonly': True},
'direction': {'readonly': True},
}

_attribute_map = {
'protocol': {'key': 'protocol', 'type': 'str'},
'port': {'key': 'port', 'type': 'int'},
'ips': {'key': 'ips', 'type': '[str]'},
'fqdns': {'key': 'fqdns', 'type': '[str]'},
'direction': {'key': 'direction', 'type': 'str'},
}

def __init__(self, **kwargs):
super(RequiredTraffic, self).__init__(**kwargs)
self.protocol = None
self.port = None
self.ips = None
self.fqdns = None
self.direction = None


class ResourceSku(Model):
"""Describes an available Azure Spring Cloud SKU.

Expand Down Expand Up @@ -1724,9 +1776,9 @@ def __init__(self, **kwargs):
class Sku(Model):
"""Sku of Azure Spring Cloud.

:param name: Name of the Sku
:param name: Name of the Sku. Default value: "S0" .
:type name: str
:param tier: Tier of the Sku
:param tier: Tier of the Sku. Default value: "Standard" .
:type tier: str
:param capacity: Current capacity of the target resource
:type capacity: int
Expand All @@ -1740,8 +1792,8 @@ class Sku(Model):

def __init__(self, **kwargs):
super(Sku, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.tier = kwargs.get('tier', None)
self.name = kwargs.get('name', "S0")
self.tier = kwargs.get('tier', "Standard")
self.capacity = kwargs.get('capacity', None)


Expand Down
Loading