From 8488394881868eb5a141e56c80b64741aaa2fb5c Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 7 Sep 2020 03:19:50 +0000 Subject: [PATCH] Generated from 30c61d8afc9a5c1cc6e5b4a553811171a01352a9 Update samples --- .../_app_platform_management_client.py | 16 +++ .../_app_platform_management_client.py | 5 + .../v2019_05_01_preview/models/__init__.py | 13 +++ .../_app_platform_management_client_enums.py | 15 +++ .../v2019_05_01_preview/models/_models.py | 102 ++++++++++++++++- .../v2019_05_01_preview/models/_models_py3.py | 104 +++++++++++++++++- .../operations/__init__.py | 2 + .../_runtime_versions_operations.py | 93 ++++++++++++++++ .../_app_platform_management_client.py | 5 + .../v2020_07_01/models/__init__.py | 13 +++ .../_app_platform_management_client_enums.py | 15 +++ .../appplatform/v2020_07_01/models/_models.py | 102 ++++++++++++++++- .../v2020_07_01/models/_models_py3.py | 104 +++++++++++++++++- .../v2020_07_01/operations/__init__.py | 2 + .../_runtime_versions_operations.py | 93 ++++++++++++++++ 15 files changed, 674 insertions(+), 10 deletions(-) create mode 100644 sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/operations/_runtime_versions_operations.py create mode 100644 sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/operations/_runtime_versions_operations.py diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_app_platform_management_client.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_app_platform_management_client.py index 565924158358f..d737dcdb6d286 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_app_platform_management_client.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_app_platform_management_client.py @@ -206,6 +206,22 @@ def operations(self): 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` + * 2020-07-01: :class:`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 + 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 services(self): """Instance depends on the API version: diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/_app_platform_management_client.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/_app_platform_management_client.py index 2836eaee34310..a0ff01ceabf3d 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/_app_platform_management_client.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/_app_platform_management_client.py @@ -20,6 +20,7 @@ from .operations import CustomDomainsOperations from .operations import DeploymentsOperations from .operations import Operations +from .operations import RuntimeVersionsOperations from .operations import SkuOperations from . import models @@ -44,6 +45,8 @@ class AppPlatformManagementClient(SDKClient): :vartype deployments: azure.mgmt.appplatform.v2019_05_01_preview.operations.DeploymentsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.appplatform.v2019_05_01_preview.operations.Operations + :ivar runtime_versions: RuntimeVersions operations + :vartype runtime_versions: azure.mgmt.appplatform.v2019_05_01_preview.operations.RuntimeVersionsOperations :ivar sku: Sku operations :vartype sku: azure.mgmt.appplatform.v2019_05_01_preview.operations.SkuOperations @@ -82,5 +85,7 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) + self.runtime_versions = RuntimeVersionsOperations( + self._client, self.config, self._serialize, self._deserialize) self.sku = SkuOperations( self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/__init__.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/__init__.py index fd6e2ee703f59..01baac5491d7e 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/__init__.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/__init__.py @@ -12,6 +12,7 @@ try: from ._models_py3 import AppResource from ._models_py3 import AppResourceProperties + from ._models_py3 import AvailableRuntimeVersions from ._models_py3 import BindingResource from ._models_py3 import BindingResourceProperties from ._models_py3 import CertificateProperties @@ -38,6 +39,7 @@ from ._models_py3 import NameAvailability from ._models_py3 import NameAvailabilityParameters from ._models_py3 import NetworkProfile + from ._models_py3 import NetworkProfileOutboundIPs from ._models_py3 import OperationDetail from ._models_py3 import OperationDisplay from ._models_py3 import OperationProperties @@ -56,6 +58,7 @@ from ._models_py3 import ServiceSpecification from ._models_py3 import Sku from ._models_py3 import SkuCapacity + from ._models_py3 import SupportedRuntimeVersion1 from ._models_py3 import TemporaryDisk from ._models_py3 import TestKeys from ._models_py3 import TraceProperties @@ -64,6 +67,7 @@ except (SyntaxError, ImportError): from ._models import AppResource from ._models import AppResourceProperties + from ._models import AvailableRuntimeVersions from ._models import BindingResource from ._models import BindingResourceProperties from ._models import CertificateProperties @@ -90,6 +94,7 @@ from ._models import NameAvailability from ._models import NameAvailabilityParameters from ._models import NetworkProfile + from ._models import NetworkProfileOutboundIPs from ._models import OperationDetail from ._models import OperationDisplay from ._models import OperationProperties @@ -108,6 +113,7 @@ from ._models import ServiceSpecification from ._models import Sku from ._models import SkuCapacity + from ._models import SupportedRuntimeVersion1 from ._models import TemporaryDisk from ._models import TestKeys from ._models import TraceProperties @@ -135,11 +141,14 @@ SkuScaleType, ResourceSkuRestrictionsType, ResourceSkuRestrictionsReasonCode, + SupportedRuntimeVersion, + SupportedRuntimePlatform, ) __all__ = [ 'AppResource', 'AppResourceProperties', + 'AvailableRuntimeVersions', 'BindingResource', 'BindingResourceProperties', 'CertificateProperties', @@ -166,6 +175,7 @@ 'NameAvailability', 'NameAvailabilityParameters', 'NetworkProfile', + 'NetworkProfileOutboundIPs', 'OperationDetail', 'OperationDisplay', 'OperationProperties', @@ -184,6 +194,7 @@ 'ServiceSpecification', 'Sku', 'SkuCapacity', + 'SupportedRuntimeVersion1', 'TemporaryDisk', 'TestKeys', 'TraceProperties', @@ -210,4 +221,6 @@ 'SkuScaleType', 'ResourceSkuRestrictionsType', 'ResourceSkuRestrictionsReasonCode', + 'SupportedRuntimeVersion', + 'SupportedRuntimePlatform', ] diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/_app_platform_management_client_enums.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/_app_platform_management_client_enums.py index 43b052634d0f6..7d465315e2805 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/_app_platform_management_client_enums.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/_app_platform_management_client_enums.py @@ -67,6 +67,7 @@ class AppResourceProvisioningState(str, Enum): class UserSourceType(str, Enum): jar = "Jar" + net_core_zip = "NetCoreZip" source = "Source" @@ -74,6 +75,7 @@ class RuntimeVersion(str, Enum): java_8 = "Java_8" java_11 = "Java_11" + net_core_31 = "NetCore_31" class DeploymentResourceProvisioningState(str, Enum): @@ -112,3 +114,16 @@ class ResourceSkuRestrictionsReasonCode(str, Enum): quota_id = "QuotaId" not_available_for_subscription = "NotAvailableForSubscription" + + +class SupportedRuntimeVersion(str, Enum): + + java_8 = "Java_8" + java_11 = "Java_11" + net_core_31 = "NetCore_31" + + +class SupportedRuntimePlatform(str, Enum): + + java = "Java" + net_core = ".NET Core" diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/_models.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/_models.py index 2a7fe772dfd3a..d6829b53483ce 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/_models.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/_models.py @@ -183,6 +183,30 @@ def __init__(self, **kwargs): self.persistent_disk = kwargs.get('persistent_disk', None) +class AvailableRuntimeVersions(Model): + """AvailableRuntimeVersions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A list of all supported runtime versions. + :vartype value: + list[~azure.mgmt.appplatform.v2019_05_01_preview.models.SupportedRuntimeVersion1] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SupportedRuntimeVersion1]'}, + } + + def __init__(self, **kwargs): + super(AvailableRuntimeVersions, self).__init__(**kwargs) + self.value = None + + class BindingResource(ProxyResource): """Binding resource payload. @@ -725,6 +749,8 @@ class DeploymentInstance(Model): :vartype reason: str :ivar discovery_status: Discovery status of the deployment instance :vartype discovery_status: str + :ivar start_time: Start time of the deployment instance + :vartype start_time: str """ _validation = { @@ -732,6 +758,7 @@ class DeploymentInstance(Model): 'status': {'readonly': True}, 'reason': {'readonly': True}, 'discovery_status': {'readonly': True}, + 'start_time': {'readonly': True}, } _attribute_map = { @@ -739,6 +766,7 @@ class DeploymentInstance(Model): 'status': {'key': 'status', 'type': 'str'}, 'reason': {'key': 'reason', 'type': 'str'}, 'discovery_status': {'key': 'discoveryStatus', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, } def __init__(self, **kwargs): @@ -747,6 +775,7 @@ def __init__(self, **kwargs): self.status = None self.reason = None self.discovery_status = None + self.start_time = None class DeploymentResource(ProxyResource): @@ -859,13 +888,16 @@ class DeploymentSettings(Model): :type memory_in_gb: int :param jvm_options: JVM parameter :type jvm_options: str + :param net_core_main_entry_path: The path to the .NET executable relative + to zip root + :type net_core_main_entry_path: str :param instance_count: Instance count, basic tier should be in range (1, 25), standard tier should be in range (1, 500). Default value: 1 . :type instance_count: int :param environment_variables: Collection of environment variables :type environment_variables: dict[str, str] :param runtime_version: Runtime version. Possible values include: - 'Java_8', 'Java_11' + 'Java_8', 'Java_11', 'NetCore_31' :type runtime_version: str or ~azure.mgmt.appplatform.v2019_05_01_preview.models.RuntimeVersion """ @@ -874,6 +906,7 @@ class DeploymentSettings(Model): 'cpu': {'key': 'cpu', 'type': 'int'}, 'memory_in_gb': {'key': 'memoryInGB', 'type': 'int'}, 'jvm_options': {'key': 'jvmOptions', 'type': 'str'}, + 'net_core_main_entry_path': {'key': 'netCoreMainEntryPath', 'type': 'str'}, 'instance_count': {'key': 'instanceCount', 'type': 'int'}, 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, @@ -884,6 +917,7 @@ def __init__(self, **kwargs): self.cpu = kwargs.get('cpu', 1) self.memory_in_gb = kwargs.get('memory_in_gb', 1) self.jvm_options = kwargs.get('jvm_options', None) + self.net_core_main_entry_path = kwargs.get('net_core_main_entry_path', None) self.instance_count = kwargs.get('instance_count', 1) self.environment_variables = kwargs.get('environment_variables', None) self.runtime_version = kwargs.get('runtime_version', None) @@ -1174,6 +1208,9 @@ def __init__(self, **kwargs): class NetworkProfile(Model): """Service network profile payload. + Variables are only populated by the server, and will be ignored when + sending a request. + :param service_runtime_subnet_id: Fully qualified resource Id of the subnet to host Azure Spring Cloud Service Runtime :type service_runtime_subnet_id: str @@ -1188,14 +1225,23 @@ class NetworkProfile(Model): :param app_network_resource_group: Name of the resource group containing network resources of Azure Spring Cloud Apps :type app_network_resource_group: str + :ivar outbound_ips: Desired outbound IP resources for Azure Spring Cloud + instance. + :vartype outbound_ips: + ~azure.mgmt.appplatform.v2019_05_01_preview.models.NetworkProfileOutboundIPs """ + _validation = { + 'outbound_ips': {'readonly': True}, + } + _attribute_map = { 'service_runtime_subnet_id': {'key': 'serviceRuntimeSubnetId', 'type': 'str'}, 'app_subnet_id': {'key': 'appSubnetId', 'type': 'str'}, 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, 'service_runtime_network_resource_group': {'key': 'serviceRuntimeNetworkResourceGroup', 'type': 'str'}, 'app_network_resource_group': {'key': 'appNetworkResourceGroup', 'type': 'str'}, + 'outbound_ips': {'key': 'outboundIPs', 'type': 'NetworkProfileOutboundIPs'}, } def __init__(self, **kwargs): @@ -1205,6 +1251,30 @@ def __init__(self, **kwargs): self.service_cidr = kwargs.get('service_cidr', None) 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 + + +class NetworkProfileOutboundIPs(Model): + """Desired outbound IP resources for Azure Spring Cloud instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar public_ips: A list of public IP addresses. + :vartype public_ips: list[str] + """ + + _validation = { + 'public_ips': {'readonly': True}, + } + + _attribute_map = { + 'public_ips': {'key': 'publicIPs', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(NetworkProfileOutboundIPs, self).__init__(**kwargs) + self.public_ips = None class OperationDetail(Model): @@ -1702,6 +1772,34 @@ def __init__(self, **kwargs): self.scale_type = kwargs.get('scale_type', None) +class SupportedRuntimeVersion1(Model): + """Supported deployment runtime version descriptor. + + :param value: The raw value which could be passed to deployment CRUD + operations. Possible values include: 'Java_8', 'Java_11', 'NetCore_31' + :type value: str or + ~azure.mgmt.appplatform.v2019_05_01_preview.models.SupportedRuntimeVersion + :param platform: The platform of this runtime version (possible values: + "Java" or ".NET"). Possible values include: 'Java', '.NET Core' + :type platform: str or + ~azure.mgmt.appplatform.v2019_05_01_preview.models.SupportedRuntimePlatform + :param version: The detailed version (major.minor) of the platform. + :type version: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'platform': {'key': 'platform', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SupportedRuntimeVersion1, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.platform = kwargs.get('platform', None) + self.version = kwargs.get('version', None) + + class TemporaryDisk(Model): """Temporary disk payload. @@ -1800,7 +1898,7 @@ class UserSourceInfo(Model): """Source information for a deployment. :param type: Type of the source uploaded. Possible values include: 'Jar', - 'Source' + 'NetCoreZip', 'Source' :type type: str or ~azure.mgmt.appplatform.v2019_05_01_preview.models.UserSourceType :param relative_path: Relative path of the storage which stores the source diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/_models_py3.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/_models_py3.py index 665c35cb7822e..8b3d495689626 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/_models_py3.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/models/_models_py3.py @@ -183,6 +183,30 @@ def __init__(self, *, public: bool=None, active_deployment_name: str=None, fqdn: self.persistent_disk = persistent_disk +class AvailableRuntimeVersions(Model): + """AvailableRuntimeVersions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A list of all supported runtime versions. + :vartype value: + list[~azure.mgmt.appplatform.v2019_05_01_preview.models.SupportedRuntimeVersion1] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SupportedRuntimeVersion1]'}, + } + + def __init__(self, **kwargs) -> None: + super(AvailableRuntimeVersions, self).__init__(**kwargs) + self.value = None + + class BindingResource(ProxyResource): """Binding resource payload. @@ -725,6 +749,8 @@ class DeploymentInstance(Model): :vartype reason: str :ivar discovery_status: Discovery status of the deployment instance :vartype discovery_status: str + :ivar start_time: Start time of the deployment instance + :vartype start_time: str """ _validation = { @@ -732,6 +758,7 @@ class DeploymentInstance(Model): 'status': {'readonly': True}, 'reason': {'readonly': True}, 'discovery_status': {'readonly': True}, + 'start_time': {'readonly': True}, } _attribute_map = { @@ -739,6 +766,7 @@ class DeploymentInstance(Model): 'status': {'key': 'status', 'type': 'str'}, 'reason': {'key': 'reason', 'type': 'str'}, 'discovery_status': {'key': 'discoveryStatus', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, } def __init__(self, **kwargs) -> None: @@ -747,6 +775,7 @@ def __init__(self, **kwargs) -> None: self.status = None self.reason = None self.discovery_status = None + self.start_time = None class DeploymentResource(ProxyResource): @@ -859,13 +888,16 @@ class DeploymentSettings(Model): :type memory_in_gb: int :param jvm_options: JVM parameter :type jvm_options: str + :param net_core_main_entry_path: The path to the .NET executable relative + to zip root + :type net_core_main_entry_path: str :param instance_count: Instance count, basic tier should be in range (1, 25), standard tier should be in range (1, 500). Default value: 1 . :type instance_count: int :param environment_variables: Collection of environment variables :type environment_variables: dict[str, str] :param runtime_version: Runtime version. Possible values include: - 'Java_8', 'Java_11' + 'Java_8', 'Java_11', 'NetCore_31' :type runtime_version: str or ~azure.mgmt.appplatform.v2019_05_01_preview.models.RuntimeVersion """ @@ -874,16 +906,18 @@ class DeploymentSettings(Model): 'cpu': {'key': 'cpu', 'type': 'int'}, 'memory_in_gb': {'key': 'memoryInGB', 'type': 'int'}, 'jvm_options': {'key': 'jvmOptions', 'type': 'str'}, + 'net_core_main_entry_path': {'key': 'netCoreMainEntryPath', 'type': 'str'}, 'instance_count': {'key': 'instanceCount', 'type': 'int'}, 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, } - def __init__(self, *, cpu: int=1, memory_in_gb: int=1, jvm_options: str=None, instance_count: int=1, environment_variables=None, runtime_version=None, **kwargs) -> None: + def __init__(self, *, cpu: int=1, memory_in_gb: int=1, jvm_options: str=None, net_core_main_entry_path: str=None, instance_count: int=1, environment_variables=None, runtime_version=None, **kwargs) -> None: super(DeploymentSettings, self).__init__(**kwargs) self.cpu = cpu self.memory_in_gb = memory_in_gb self.jvm_options = jvm_options + self.net_core_main_entry_path = net_core_main_entry_path self.instance_count = instance_count self.environment_variables = environment_variables self.runtime_version = runtime_version @@ -1174,6 +1208,9 @@ def __init__(self, *, type: str, name: str, **kwargs) -> None: class NetworkProfile(Model): """Service network profile payload. + Variables are only populated by the server, and will be ignored when + sending a request. + :param service_runtime_subnet_id: Fully qualified resource Id of the subnet to host Azure Spring Cloud Service Runtime :type service_runtime_subnet_id: str @@ -1188,14 +1225,23 @@ class NetworkProfile(Model): :param app_network_resource_group: Name of the resource group containing network resources of Azure Spring Cloud Apps :type app_network_resource_group: str + :ivar outbound_ips: Desired outbound IP resources for Azure Spring Cloud + instance. + :vartype outbound_ips: + ~azure.mgmt.appplatform.v2019_05_01_preview.models.NetworkProfileOutboundIPs """ + _validation = { + 'outbound_ips': {'readonly': True}, + } + _attribute_map = { 'service_runtime_subnet_id': {'key': 'serviceRuntimeSubnetId', 'type': 'str'}, 'app_subnet_id': {'key': 'appSubnetId', 'type': 'str'}, 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, 'service_runtime_network_resource_group': {'key': 'serviceRuntimeNetworkResourceGroup', 'type': 'str'}, 'app_network_resource_group': {'key': 'appNetworkResourceGroup', 'type': 'str'}, + 'outbound_ips': {'key': 'outboundIPs', 'type': 'NetworkProfileOutboundIPs'}, } def __init__(self, *, service_runtime_subnet_id: str=None, app_subnet_id: str=None, service_cidr: str=None, service_runtime_network_resource_group: str=None, app_network_resource_group: str=None, **kwargs) -> None: @@ -1205,6 +1251,30 @@ def __init__(self, *, service_runtime_subnet_id: str=None, app_subnet_id: str=No self.service_cidr = service_cidr self.service_runtime_network_resource_group = service_runtime_network_resource_group self.app_network_resource_group = app_network_resource_group + self.outbound_ips = None + + +class NetworkProfileOutboundIPs(Model): + """Desired outbound IP resources for Azure Spring Cloud instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar public_ips: A list of public IP addresses. + :vartype public_ips: list[str] + """ + + _validation = { + 'public_ips': {'readonly': True}, + } + + _attribute_map = { + 'public_ips': {'key': 'publicIPs', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(NetworkProfileOutboundIPs, self).__init__(**kwargs) + self.public_ips = None class OperationDetail(Model): @@ -1702,6 +1772,34 @@ def __init__(self, *, minimum: int, maximum: int=None, default: int=None, scale_ self.scale_type = scale_type +class SupportedRuntimeVersion1(Model): + """Supported deployment runtime version descriptor. + + :param value: The raw value which could be passed to deployment CRUD + operations. Possible values include: 'Java_8', 'Java_11', 'NetCore_31' + :type value: str or + ~azure.mgmt.appplatform.v2019_05_01_preview.models.SupportedRuntimeVersion + :param platform: The platform of this runtime version (possible values: + "Java" or ".NET"). Possible values include: 'Java', '.NET Core' + :type platform: str or + ~azure.mgmt.appplatform.v2019_05_01_preview.models.SupportedRuntimePlatform + :param version: The detailed version (major.minor) of the platform. + :type version: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'platform': {'key': 'platform', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, value=None, platform=None, version: str=None, **kwargs) -> None: + super(SupportedRuntimeVersion1, self).__init__(**kwargs) + self.value = value + self.platform = platform + self.version = version + + class TemporaryDisk(Model): """Temporary disk payload. @@ -1800,7 +1898,7 @@ class UserSourceInfo(Model): """Source information for a deployment. :param type: Type of the source uploaded. Possible values include: 'Jar', - 'Source' + 'NetCoreZip', 'Source' :type type: str or ~azure.mgmt.appplatform.v2019_05_01_preview.models.UserSourceType :param relative_path: Relative path of the storage which stores the source diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/operations/__init__.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/operations/__init__.py index 45301a531c0ea..de8f71f38f04a 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/operations/__init__.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/operations/__init__.py @@ -16,6 +16,7 @@ from ._custom_domains_operations import CustomDomainsOperations from ._deployments_operations import DeploymentsOperations from ._operations import Operations +from ._runtime_versions_operations import RuntimeVersionsOperations from ._sku_operations import SkuOperations __all__ = [ @@ -26,5 +27,6 @@ 'CustomDomainsOperations', 'DeploymentsOperations', 'Operations', + 'RuntimeVersionsOperations', 'SkuOperations', ] diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/operations/_runtime_versions_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/operations/_runtime_versions_operations.py new file mode 100644 index 0000000000000..d3eaac0f5b06b --- /dev/null +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2019_05_01_preview/operations/_runtime_versions_operations.py @@ -0,0 +1,93 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RuntimeVersionsOperations(object): + """RuntimeVersionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-01-preview" + + self.config = config + + def list_runtime_versions( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available runtime versions supported by + Microsoft.AppPlatform provider. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailableRuntimeVersions or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.appplatform.v2019_05_01_preview.models.AvailableRuntimeVersions + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_runtime_versions.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailableRuntimeVersions', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_runtime_versions.metadata = {'url': '/providers/Microsoft.AppPlatform/runtimeVersions'} diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/_app_platform_management_client.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/_app_platform_management_client.py index 4bd86311153c5..ca5a03e81bd90 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/_app_platform_management_client.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/_app_platform_management_client.py @@ -22,6 +22,7 @@ from .operations import CustomDomainsOperations from .operations import DeploymentsOperations from .operations import Operations +from .operations import RuntimeVersionsOperations from .operations import SkusOperations from . import models @@ -50,6 +51,8 @@ class AppPlatformManagementClient(SDKClient): :vartype deployments: azure.mgmt.appplatform.v2020_07_01.operations.DeploymentsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.appplatform.v2020_07_01.operations.Operations + :ivar runtime_versions: RuntimeVersions operations + :vartype runtime_versions: azure.mgmt.appplatform.v2020_07_01.operations.RuntimeVersionsOperations :ivar skus: Skus operations :vartype skus: azure.mgmt.appplatform.v2020_07_01.operations.SkusOperations @@ -92,5 +95,7 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) + self.runtime_versions = RuntimeVersionsOperations( + self._client, self.config, self._serialize, self._deserialize) self.skus = SkusOperations( self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/models/__init__.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/models/__init__.py index f344f11ac6f38..5607e813363b8 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/models/__init__.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/models/__init__.py @@ -12,6 +12,7 @@ try: from ._models_py3 import AppResource from ._models_py3 import AppResourceProperties + from ._models_py3 import AvailableRuntimeVersions from ._models_py3 import BindingResource from ._models_py3 import BindingResourceProperties from ._models_py3 import CertificateProperties @@ -41,6 +42,7 @@ from ._models_py3 import NameAvailability from ._models_py3 import NameAvailabilityParameters from ._models_py3 import NetworkProfile + from ._models_py3 import NetworkProfileOutboundIPs from ._models_py3 import OperationDetail from ._models_py3 import OperationDisplay from ._models_py3 import OperationProperties @@ -59,6 +61,7 @@ from ._models_py3 import ServiceSpecification from ._models_py3 import Sku from ._models_py3 import SkuCapacity + from ._models_py3 import SupportedRuntimeVersion1 from ._models_py3 import TemporaryDisk from ._models_py3 import TestKeys from ._models_py3 import TrackedResource @@ -66,6 +69,7 @@ except (SyntaxError, ImportError): from ._models import AppResource from ._models import AppResourceProperties + from ._models import AvailableRuntimeVersions from ._models import BindingResource from ._models import BindingResourceProperties from ._models import CertificateProperties @@ -95,6 +99,7 @@ from ._models import NameAvailability from ._models import NameAvailabilityParameters from ._models import NetworkProfile + from ._models import NetworkProfileOutboundIPs from ._models import OperationDetail from ._models import OperationDisplay from ._models import OperationProperties @@ -113,6 +118,7 @@ from ._models import ServiceSpecification from ._models import Sku from ._models import SkuCapacity + from ._models import SupportedRuntimeVersion1 from ._models import TemporaryDisk from ._models import TestKeys from ._models import TrackedResource @@ -139,11 +145,14 @@ SkuScaleType, ResourceSkuRestrictionsType, ResourceSkuRestrictionsReasonCode, + SupportedRuntimeVersion, + SupportedRuntimePlatform, ) __all__ = [ 'AppResource', 'AppResourceProperties', + 'AvailableRuntimeVersions', 'BindingResource', 'BindingResourceProperties', 'CertificateProperties', @@ -173,6 +182,7 @@ 'NameAvailability', 'NameAvailabilityParameters', 'NetworkProfile', + 'NetworkProfileOutboundIPs', 'OperationDetail', 'OperationDisplay', 'OperationProperties', @@ -191,6 +201,7 @@ 'ServiceSpecification', 'Sku', 'SkuCapacity', + 'SupportedRuntimeVersion1', 'TemporaryDisk', 'TestKeys', 'TrackedResource', @@ -216,4 +227,6 @@ 'SkuScaleType', 'ResourceSkuRestrictionsType', 'ResourceSkuRestrictionsReasonCode', + 'SupportedRuntimeVersion', + 'SupportedRuntimePlatform', ] diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/models/_app_platform_management_client_enums.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/models/_app_platform_management_client_enums.py index bff22e8421120..fa21e2e8bb1d9 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/models/_app_platform_management_client_enums.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/models/_app_platform_management_client_enums.py @@ -67,6 +67,7 @@ class AppResourceProvisioningState(str, Enum): class UserSourceType(str, Enum): jar = "Jar" + net_core_zip = "NetCoreZip" source = "Source" @@ -74,6 +75,7 @@ class RuntimeVersion(str, Enum): java_8 = "Java_8" java_11 = "Java_11" + net_core_31 = "NetCore_31" class DeploymentResourceProvisioningState(str, Enum): @@ -112,3 +114,16 @@ class ResourceSkuRestrictionsReasonCode(str, Enum): quota_id = "QuotaId" not_available_for_subscription = "NotAvailableForSubscription" + + +class SupportedRuntimeVersion(str, Enum): + + java_8 = "Java_8" + java_11 = "Java_11" + net_core_31 = "NetCore_31" + + +class SupportedRuntimePlatform(str, Enum): + + java = "Java" + net_core = ".NET Core" diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/models/_models.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/models/_models.py index b8da605188fa8..7befff644b35d 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/models/_models.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/models/_models.py @@ -183,6 +183,30 @@ def __init__(self, **kwargs): self.persistent_disk = kwargs.get('persistent_disk', None) +class AvailableRuntimeVersions(Model): + """AvailableRuntimeVersions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A list of all supported runtime versions. + :vartype value: + list[~azure.mgmt.appplatform.v2020_07_01.models.SupportedRuntimeVersion1] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SupportedRuntimeVersion1]'}, + } + + def __init__(self, **kwargs): + super(AvailableRuntimeVersions, self).__init__(**kwargs) + self.value = None + + class BindingResource(ProxyResource): """Binding resource payload. @@ -748,6 +772,8 @@ class DeploymentInstance(Model): :vartype reason: str :ivar discovery_status: Discovery status of the deployment instance :vartype discovery_status: str + :ivar start_time: Start time of the deployment instance + :vartype start_time: str """ _validation = { @@ -755,6 +781,7 @@ class DeploymentInstance(Model): 'status': {'readonly': True}, 'reason': {'readonly': True}, 'discovery_status': {'readonly': True}, + 'start_time': {'readonly': True}, } _attribute_map = { @@ -762,6 +789,7 @@ class DeploymentInstance(Model): 'status': {'key': 'status', 'type': 'str'}, 'reason': {'key': 'reason', 'type': 'str'}, 'discovery_status': {'key': 'discoveryStatus', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, } def __init__(self, **kwargs): @@ -770,6 +798,7 @@ def __init__(self, **kwargs): self.status = None self.reason = None self.discovery_status = None + self.start_time = None class DeploymentResource(ProxyResource): @@ -885,10 +914,13 @@ class DeploymentSettings(Model): :type memory_in_gb: int :param jvm_options: JVM parameter :type jvm_options: str + :param net_core_main_entry_path: The path to the .NET executable relative + to zip root + :type net_core_main_entry_path: str :param environment_variables: Collection of environment variables :type environment_variables: dict[str, str] :param runtime_version: Runtime version. Possible values include: - 'Java_8', 'Java_11' + 'Java_8', 'Java_11', 'NetCore_31' :type runtime_version: str or ~azure.mgmt.appplatform.v2020_07_01.models.RuntimeVersion """ @@ -897,6 +929,7 @@ class DeploymentSettings(Model): 'cpu': {'key': 'cpu', 'type': 'int'}, 'memory_in_gb': {'key': 'memoryInGB', 'type': 'int'}, 'jvm_options': {'key': 'jvmOptions', 'type': 'str'}, + 'net_core_main_entry_path': {'key': 'netCoreMainEntryPath', 'type': 'str'}, 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, } @@ -906,6 +939,7 @@ def __init__(self, **kwargs): self.cpu = kwargs.get('cpu', 1) self.memory_in_gb = kwargs.get('memory_in_gb', 1) self.jvm_options = kwargs.get('jvm_options', None) + self.net_core_main_entry_path = kwargs.get('net_core_main_entry_path', None) self.environment_variables = kwargs.get('environment_variables', None) self.runtime_version = kwargs.get('runtime_version', None) @@ -1268,6 +1302,9 @@ def __init__(self, **kwargs): class NetworkProfile(Model): """Service network profile payload. + Variables are only populated by the server, and will be ignored when + sending a request. + :param service_runtime_subnet_id: Fully qualified resource Id of the subnet to host Azure Spring Cloud Service Runtime :type service_runtime_subnet_id: str @@ -1282,14 +1319,23 @@ class NetworkProfile(Model): :param app_network_resource_group: Name of the resource group containing network resources of Azure Spring Cloud Apps :type app_network_resource_group: str + :ivar outbound_ips: Desired outbound IP resources for Azure Spring Cloud + instance. + :vartype outbound_ips: + ~azure.mgmt.appplatform.v2020_07_01.models.NetworkProfileOutboundIPs """ + _validation = { + 'outbound_ips': {'readonly': True}, + } + _attribute_map = { 'service_runtime_subnet_id': {'key': 'serviceRuntimeSubnetId', 'type': 'str'}, 'app_subnet_id': {'key': 'appSubnetId', 'type': 'str'}, 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, 'service_runtime_network_resource_group': {'key': 'serviceRuntimeNetworkResourceGroup', 'type': 'str'}, 'app_network_resource_group': {'key': 'appNetworkResourceGroup', 'type': 'str'}, + 'outbound_ips': {'key': 'outboundIPs', 'type': 'NetworkProfileOutboundIPs'}, } def __init__(self, **kwargs): @@ -1299,6 +1345,30 @@ def __init__(self, **kwargs): self.service_cidr = kwargs.get('service_cidr', None) 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 + + +class NetworkProfileOutboundIPs(Model): + """Desired outbound IP resources for Azure Spring Cloud instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar public_ips: A list of public IP addresses. + :vartype public_ips: list[str] + """ + + _validation = { + 'public_ips': {'readonly': True}, + } + + _attribute_map = { + 'public_ips': {'key': 'publicIPs', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(NetworkProfileOutboundIPs, self).__init__(**kwargs) + self.public_ips = None class OperationDetail(Model): @@ -1794,6 +1864,34 @@ def __init__(self, **kwargs): self.scale_type = kwargs.get('scale_type', None) +class SupportedRuntimeVersion1(Model): + """Supported deployment runtime version descriptor. + + :param value: The raw value which could be passed to deployment CRUD + operations. Possible values include: 'Java_8', 'Java_11', 'NetCore_31' + :type value: str or + ~azure.mgmt.appplatform.v2020_07_01.models.SupportedRuntimeVersion + :param platform: The platform of this runtime version (possible values: + "Java" or ".NET"). Possible values include: 'Java', '.NET Core' + :type platform: str or + ~azure.mgmt.appplatform.v2020_07_01.models.SupportedRuntimePlatform + :param version: The detailed version (major.minor) of the platform. + :type version: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'platform': {'key': 'platform', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SupportedRuntimeVersion1, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.platform = kwargs.get('platform', None) + self.version = kwargs.get('version', None) + + class TemporaryDisk(Model): """Temporary disk payload. @@ -1854,7 +1952,7 @@ class UserSourceInfo(Model): """Source information for a deployment. :param type: Type of the source uploaded. Possible values include: 'Jar', - 'Source' + 'NetCoreZip', 'Source' :type type: str or ~azure.mgmt.appplatform.v2020_07_01.models.UserSourceType :param relative_path: Relative path of the storage which stores the source diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/models/_models_py3.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/models/_models_py3.py index f3a67049843cb..5d915be530ab8 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/models/_models_py3.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/models/_models_py3.py @@ -183,6 +183,30 @@ def __init__(self, *, public: bool=None, active_deployment_name: str=None, fqdn: self.persistent_disk = persistent_disk +class AvailableRuntimeVersions(Model): + """AvailableRuntimeVersions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A list of all supported runtime versions. + :vartype value: + list[~azure.mgmt.appplatform.v2020_07_01.models.SupportedRuntimeVersion1] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SupportedRuntimeVersion1]'}, + } + + def __init__(self, **kwargs) -> None: + super(AvailableRuntimeVersions, self).__init__(**kwargs) + self.value = None + + class BindingResource(ProxyResource): """Binding resource payload. @@ -748,6 +772,8 @@ class DeploymentInstance(Model): :vartype reason: str :ivar discovery_status: Discovery status of the deployment instance :vartype discovery_status: str + :ivar start_time: Start time of the deployment instance + :vartype start_time: str """ _validation = { @@ -755,6 +781,7 @@ class DeploymentInstance(Model): 'status': {'readonly': True}, 'reason': {'readonly': True}, 'discovery_status': {'readonly': True}, + 'start_time': {'readonly': True}, } _attribute_map = { @@ -762,6 +789,7 @@ class DeploymentInstance(Model): 'status': {'key': 'status', 'type': 'str'}, 'reason': {'key': 'reason', 'type': 'str'}, 'discovery_status': {'key': 'discoveryStatus', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, } def __init__(self, **kwargs) -> None: @@ -770,6 +798,7 @@ def __init__(self, **kwargs) -> None: self.status = None self.reason = None self.discovery_status = None + self.start_time = None class DeploymentResource(ProxyResource): @@ -885,10 +914,13 @@ class DeploymentSettings(Model): :type memory_in_gb: int :param jvm_options: JVM parameter :type jvm_options: str + :param net_core_main_entry_path: The path to the .NET executable relative + to zip root + :type net_core_main_entry_path: str :param environment_variables: Collection of environment variables :type environment_variables: dict[str, str] :param runtime_version: Runtime version. Possible values include: - 'Java_8', 'Java_11' + 'Java_8', 'Java_11', 'NetCore_31' :type runtime_version: str or ~azure.mgmt.appplatform.v2020_07_01.models.RuntimeVersion """ @@ -897,15 +929,17 @@ class DeploymentSettings(Model): 'cpu': {'key': 'cpu', 'type': 'int'}, 'memory_in_gb': {'key': 'memoryInGB', 'type': 'int'}, 'jvm_options': {'key': 'jvmOptions', 'type': 'str'}, + 'net_core_main_entry_path': {'key': 'netCoreMainEntryPath', 'type': 'str'}, 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, } - def __init__(self, *, cpu: int=1, memory_in_gb: int=1, jvm_options: str=None, environment_variables=None, runtime_version=None, **kwargs) -> None: + def __init__(self, *, cpu: int=1, memory_in_gb: int=1, jvm_options: str=None, net_core_main_entry_path: str=None, environment_variables=None, runtime_version=None, **kwargs) -> None: super(DeploymentSettings, self).__init__(**kwargs) self.cpu = cpu self.memory_in_gb = memory_in_gb self.jvm_options = jvm_options + self.net_core_main_entry_path = net_core_main_entry_path self.environment_variables = environment_variables self.runtime_version = runtime_version @@ -1268,6 +1302,9 @@ def __init__(self, *, type: str, name: str, **kwargs) -> None: class NetworkProfile(Model): """Service network profile payload. + Variables are only populated by the server, and will be ignored when + sending a request. + :param service_runtime_subnet_id: Fully qualified resource Id of the subnet to host Azure Spring Cloud Service Runtime :type service_runtime_subnet_id: str @@ -1282,14 +1319,23 @@ class NetworkProfile(Model): :param app_network_resource_group: Name of the resource group containing network resources of Azure Spring Cloud Apps :type app_network_resource_group: str + :ivar outbound_ips: Desired outbound IP resources for Azure Spring Cloud + instance. + :vartype outbound_ips: + ~azure.mgmt.appplatform.v2020_07_01.models.NetworkProfileOutboundIPs """ + _validation = { + 'outbound_ips': {'readonly': True}, + } + _attribute_map = { 'service_runtime_subnet_id': {'key': 'serviceRuntimeSubnetId', 'type': 'str'}, 'app_subnet_id': {'key': 'appSubnetId', 'type': 'str'}, 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, 'service_runtime_network_resource_group': {'key': 'serviceRuntimeNetworkResourceGroup', 'type': 'str'}, 'app_network_resource_group': {'key': 'appNetworkResourceGroup', 'type': 'str'}, + 'outbound_ips': {'key': 'outboundIPs', 'type': 'NetworkProfileOutboundIPs'}, } def __init__(self, *, service_runtime_subnet_id: str=None, app_subnet_id: str=None, service_cidr: str=None, service_runtime_network_resource_group: str=None, app_network_resource_group: str=None, **kwargs) -> None: @@ -1299,6 +1345,30 @@ def __init__(self, *, service_runtime_subnet_id: str=None, app_subnet_id: str=No self.service_cidr = service_cidr self.service_runtime_network_resource_group = service_runtime_network_resource_group self.app_network_resource_group = app_network_resource_group + self.outbound_ips = None + + +class NetworkProfileOutboundIPs(Model): + """Desired outbound IP resources for Azure Spring Cloud instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar public_ips: A list of public IP addresses. + :vartype public_ips: list[str] + """ + + _validation = { + 'public_ips': {'readonly': True}, + } + + _attribute_map = { + 'public_ips': {'key': 'publicIPs', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(NetworkProfileOutboundIPs, self).__init__(**kwargs) + self.public_ips = None class OperationDetail(Model): @@ -1794,6 +1864,34 @@ def __init__(self, *, minimum: int, maximum: int=None, default: int=None, scale_ self.scale_type = scale_type +class SupportedRuntimeVersion1(Model): + """Supported deployment runtime version descriptor. + + :param value: The raw value which could be passed to deployment CRUD + operations. Possible values include: 'Java_8', 'Java_11', 'NetCore_31' + :type value: str or + ~azure.mgmt.appplatform.v2020_07_01.models.SupportedRuntimeVersion + :param platform: The platform of this runtime version (possible values: + "Java" or ".NET"). Possible values include: 'Java', '.NET Core' + :type platform: str or + ~azure.mgmt.appplatform.v2020_07_01.models.SupportedRuntimePlatform + :param version: The detailed version (major.minor) of the platform. + :type version: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'platform': {'key': 'platform', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, value=None, platform=None, version: str=None, **kwargs) -> None: + super(SupportedRuntimeVersion1, self).__init__(**kwargs) + self.value = value + self.platform = platform + self.version = version + + class TemporaryDisk(Model): """Temporary disk payload. @@ -1854,7 +1952,7 @@ class UserSourceInfo(Model): """Source information for a deployment. :param type: Type of the source uploaded. Possible values include: 'Jar', - 'Source' + 'NetCoreZip', 'Source' :type type: str or ~azure.mgmt.appplatform.v2020_07_01.models.UserSourceType :param relative_path: Relative path of the storage which stores the source diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/operations/__init__.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/operations/__init__.py index b886c1ca927ff..0a24a9df9f9cb 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/operations/__init__.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/operations/__init__.py @@ -18,6 +18,7 @@ from ._custom_domains_operations import CustomDomainsOperations from ._deployments_operations import DeploymentsOperations from ._operations import Operations +from ._runtime_versions_operations import RuntimeVersionsOperations from ._skus_operations import SkusOperations __all__ = [ @@ -30,5 +31,6 @@ 'CustomDomainsOperations', 'DeploymentsOperations', 'Operations', + 'RuntimeVersionsOperations', 'SkusOperations', ] diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/operations/_runtime_versions_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/operations/_runtime_versions_operations.py new file mode 100644 index 0000000000000..d7dfdef53fc7a --- /dev/null +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/operations/_runtime_versions_operations.py @@ -0,0 +1,93 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RuntimeVersionsOperations(object): + """RuntimeVersionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2020-07-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-07-01" + + self.config = config + + def list_runtime_versions( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available runtime versions supported by + Microsoft.AppPlatform provider. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AvailableRuntimeVersions or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.appplatform.v2020_07_01.models.AvailableRuntimeVersions or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_runtime_versions.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AvailableRuntimeVersions', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_runtime_versions.metadata = {'url': '/providers/Microsoft.AppPlatform/runtimeVersions'}