Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePR azure-mgmt-appplatform] Add configuration to generate AppPlatform SDK for API version 2021-06-01-preview #15525

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -135,11 +141,14 @@
SkuScaleType,
ResourceSkuRestrictionsType,
ResourceSkuRestrictionsReasonCode,
SupportedRuntimeValue,
SupportedRuntimePlatform,
)

__all__ = [
'AppResource',
'AppResourceProperties',
'AvailableRuntimeVersions',
'BindingResource',
'BindingResourceProperties',
'CertificateProperties',
Expand All @@ -166,6 +175,7 @@
'NameAvailability',
'NameAvailabilityParameters',
'NetworkProfile',
'NetworkProfileOutboundIPs',
'OperationDetail',
'OperationDisplay',
'OperationProperties',
Expand All @@ -184,6 +194,7 @@
'ServiceSpecification',
'Sku',
'SkuCapacity',
'SupportedRuntimeVersion',
'TemporaryDisk',
'TestKeys',
'TraceProperties',
Expand All @@ -210,4 +221,6 @@
'SkuScaleType',
'ResourceSkuRestrictionsType',
'ResourceSkuRestrictionsReasonCode',
'SupportedRuntimeValue',
'SupportedRuntimePlatform',
]
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,15 @@ class AppResourceProvisioningState(str, Enum):
class UserSourceType(str, Enum):

jar = "Jar"
net_core_zip = "NetCoreZip"
source = "Source"


class RuntimeVersion(str, Enum):

java_8 = "Java_8"
java_11 = "Java_11"
net_core_31 = "NetCore_31"


class DeploymentResourceProvisioningState(str, Enum):
Expand Down Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -725,20 +749,24 @@ 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 = {
'name': {'readonly': True},
'status': {'readonly': True},
'reason': {'readonly': True},
'discovery_status': {'readonly': True},
'start_time': {'readonly': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'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):
Expand All @@ -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):
Expand Down Expand Up @@ -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
"""
Expand All @@ -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'},
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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):
Expand All @@ -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):
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down
Loading