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 2836eaee3431..a0ff01ceabf3 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 fd6e2ee703f5..05307b382a42 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 SupportedRuntimeVersion 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 SupportedRuntimeVersion from ._models import TemporaryDisk from ._models import TestKeys from ._models import TraceProperties @@ -135,11 +141,14 @@ SkuScaleType, ResourceSkuRestrictionsType, ResourceSkuRestrictionsReasonCode, + SupportedRuntimeValue, + 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', + 'SupportedRuntimeVersion', 'TemporaryDisk', 'TestKeys', 'TraceProperties', @@ -210,4 +221,6 @@ 'SkuScaleType', 'ResourceSkuRestrictionsType', 'ResourceSkuRestrictionsReasonCode', + 'SupportedRuntimeValue', + '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 43b052634d0f..39cfc85a61ab 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 SupportedRuntimeValue(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 2a7fe772dfd3..08f58d3ef8fd 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.SupportedRuntimeVersion] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SupportedRuntimeVersion]'}, + } + + 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 SupportedRuntimeVersion(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.SupportedRuntimeValue + :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(SupportedRuntimeVersion, 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 665c35cb7822..b5b8edb6c82f 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.SupportedRuntimeVersion] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SupportedRuntimeVersion]'}, + } + + 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 SupportedRuntimeVersion(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.SupportedRuntimeValue + :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(SupportedRuntimeVersion, 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 45301a531c0e..de8f71f38f04 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 000000000000..d3eaac0f5b06 --- /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 4bd86311153c..ca5a03e81bd9 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 f344f11ac6f3..4ce60886aabf 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 @@ -21,6 +22,8 @@ from ._models_py3 import ConfigServerProperties from ._models_py3 import ConfigServerResource from ._models_py3 import ConfigServerSettings + from ._models_py3 import ConfigServerSettingsErrorRecord + from ._models_py3 import ConfigServerSettingsValidateResult from ._models_py3 import CustomDomainProperties from ._models_py3 import CustomDomainResource from ._models_py3 import CustomDomainValidatePayload @@ -41,6 +44,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 +63,7 @@ from ._models_py3 import ServiceSpecification from ._models_py3 import Sku from ._models_py3 import SkuCapacity + from ._models_py3 import SupportedRuntimeVersion from ._models_py3 import TemporaryDisk from ._models_py3 import TestKeys from ._models_py3 import TrackedResource @@ -66,6 +71,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 @@ -75,6 +81,8 @@ from ._models import ConfigServerProperties from ._models import ConfigServerResource from ._models import ConfigServerSettings + from ._models import ConfigServerSettingsErrorRecord + from ._models import ConfigServerSettingsValidateResult from ._models import CustomDomainProperties from ._models import CustomDomainResource from ._models import CustomDomainValidatePayload @@ -95,6 +103,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 +122,7 @@ from ._models import ServiceSpecification from ._models import Sku from ._models import SkuCapacity + from ._models import SupportedRuntimeVersion from ._models import TemporaryDisk from ._models import TestKeys from ._models import TrackedResource @@ -139,11 +149,14 @@ SkuScaleType, ResourceSkuRestrictionsType, ResourceSkuRestrictionsReasonCode, + SupportedRuntimeValue, + SupportedRuntimePlatform, ) __all__ = [ 'AppResource', 'AppResourceProperties', + 'AvailableRuntimeVersions', 'BindingResource', 'BindingResourceProperties', 'CertificateProperties', @@ -153,6 +166,8 @@ 'ConfigServerProperties', 'ConfigServerResource', 'ConfigServerSettings', + 'ConfigServerSettingsErrorRecord', + 'ConfigServerSettingsValidateResult', 'CustomDomainProperties', 'CustomDomainResource', 'CustomDomainValidatePayload', @@ -173,6 +188,7 @@ 'NameAvailability', 'NameAvailabilityParameters', 'NetworkProfile', + 'NetworkProfileOutboundIPs', 'OperationDetail', 'OperationDisplay', 'OperationProperties', @@ -191,6 +207,7 @@ 'ServiceSpecification', 'Sku', 'SkuCapacity', + 'SupportedRuntimeVersion', 'TemporaryDisk', 'TestKeys', 'TrackedResource', @@ -216,4 +233,6 @@ 'SkuScaleType', 'ResourceSkuRestrictionsType', 'ResourceSkuRestrictionsReasonCode', + 'SupportedRuntimeValue', + '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 bff22e842112..b24c61016427 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 SupportedRuntimeValue(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 b8da605188fa..899625f1fad8 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.SupportedRuntimeVersion] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SupportedRuntimeVersion]'}, + } + + def __init__(self, **kwargs): + super(AvailableRuntimeVersions, self).__init__(**kwargs) + self.value = None + + class BindingResource(ProxyResource): """Binding resource payload. @@ -626,6 +650,51 @@ def __init__(self, **kwargs): self.git_property = kwargs.get('git_property', None) +class ConfigServerSettingsErrorRecord(Model): + """Error record of the config server settings. + + :param name: The name of the config server settings error record + :type name: str + :param uri: The uri of the config server settings error record + :type uri: str + :param messages: The detail error messages of the record + :type messages: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'messages': {'key': 'messages', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ConfigServerSettingsErrorRecord, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.uri = kwargs.get('uri', None) + self.messages = kwargs.get('messages', None) + + +class ConfigServerSettingsValidateResult(Model): + """Validation result for config server settings. + + :param is_valid: Indicate if the config server settings are valid + :type is_valid: bool + :param details: The detail validation results + :type details: + list[~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerSettingsErrorRecord] + """ + + _attribute_map = { + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'details': {'key': 'details', 'type': '[ConfigServerSettingsErrorRecord]'}, + } + + def __init__(self, **kwargs): + super(ConfigServerSettingsValidateResult, self).__init__(**kwargs) + self.is_valid = kwargs.get('is_valid', None) + self.details = kwargs.get('details', None) + + class CustomDomainProperties(Model): """Custom domain of app resource payload. @@ -748,6 +817,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 +826,7 @@ class DeploymentInstance(Model): 'status': {'readonly': True}, 'reason': {'readonly': True}, 'discovery_status': {'readonly': True}, + 'start_time': {'readonly': True}, } _attribute_map = { @@ -762,6 +834,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 +843,7 @@ def __init__(self, **kwargs): self.status = None self.reason = None self.discovery_status = None + self.start_time = None class DeploymentResource(ProxyResource): @@ -885,10 +959,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 +974,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 +984,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 +1347,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 +1364,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 +1390,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 +1909,34 @@ def __init__(self, **kwargs): self.scale_type = kwargs.get('scale_type', None) +class SupportedRuntimeVersion(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.SupportedRuntimeValue + :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(SupportedRuntimeVersion, 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 +1997,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 f3a67049843c..261e7655946e 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.SupportedRuntimeVersion] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SupportedRuntimeVersion]'}, + } + + def __init__(self, **kwargs) -> None: + super(AvailableRuntimeVersions, self).__init__(**kwargs) + self.value = None + + class BindingResource(ProxyResource): """Binding resource payload. @@ -626,6 +650,51 @@ def __init__(self, *, git_property=None, **kwargs) -> None: self.git_property = git_property +class ConfigServerSettingsErrorRecord(Model): + """Error record of the config server settings. + + :param name: The name of the config server settings error record + :type name: str + :param uri: The uri of the config server settings error record + :type uri: str + :param messages: The detail error messages of the record + :type messages: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'messages': {'key': 'messages', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, uri: str=None, messages=None, **kwargs) -> None: + super(ConfigServerSettingsErrorRecord, self).__init__(**kwargs) + self.name = name + self.uri = uri + self.messages = messages + + +class ConfigServerSettingsValidateResult(Model): + """Validation result for config server settings. + + :param is_valid: Indicate if the config server settings are valid + :type is_valid: bool + :param details: The detail validation results + :type details: + list[~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerSettingsErrorRecord] + """ + + _attribute_map = { + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'details': {'key': 'details', 'type': '[ConfigServerSettingsErrorRecord]'}, + } + + def __init__(self, *, is_valid: bool=None, details=None, **kwargs) -> None: + super(ConfigServerSettingsValidateResult, self).__init__(**kwargs) + self.is_valid = is_valid + self.details = details + + class CustomDomainProperties(Model): """Custom domain of app resource payload. @@ -748,6 +817,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 +826,7 @@ class DeploymentInstance(Model): 'status': {'readonly': True}, 'reason': {'readonly': True}, 'discovery_status': {'readonly': True}, + 'start_time': {'readonly': True}, } _attribute_map = { @@ -762,6 +834,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 +843,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 +959,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 +974,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 +1347,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 +1364,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 +1390,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 +1909,34 @@ def __init__(self, *, minimum: int, maximum: int=None, default: int=None, scale_ self.scale_type = scale_type +class SupportedRuntimeVersion(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.SupportedRuntimeValue + :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(SupportedRuntimeVersion, self).__init__(**kwargs) + self.value = value + self.platform = platform + self.version = version + + class TemporaryDisk(Model): """Temporary disk payload. @@ -1854,7 +1997,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 b886c1ca927f..0a24a9df9f9c 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/_config_servers_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/operations/_config_servers_operations.py index d08df16e4e26..c5c72fd3eaf9 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/operations/_config_servers_operations.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_07_01/operations/_config_servers_operations.py @@ -318,3 +318,111 @@ def get_long_running_output(response): else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) update_patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default'} + + + def _validate_initial( + self, resource_group_name, service_name, git_property=None, custom_headers=None, raw=False, **operation_config): + config_server_settings = models.ConfigServerSettings(git_property=git_property) + + # Construct URL + url = self.validate.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # 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' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(config_server_settings, 'ConfigServerSettings') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + 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('ConfigServerSettingsValidateResult', response) + if response.status_code == 202: + deserialized = self._deserialize('ConfigServerSettingsValidateResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def validate( + self, resource_group_name, service_name, git_property=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Check if the config server settings are valid. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :param git_property: Property of git environment. + :type git_property: + ~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerGitProperty + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ConfigServerSettingsValidateResult or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerSettingsValidateResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.appplatform.v2020_07_01.models.ConfigServerSettingsValidateResult]] + :raises: :class:`CloudError` + """ + raw_result = self._validate_initial( + resource_group_name=resource_group_name, + service_name=service_name, + git_property=git_property, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ConfigServerSettingsValidateResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/validate'} 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 000000000000..d7dfdef53fc7 --- /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'}